initial commit

This commit is contained in:
John Bintz 2011-05-23 18:37:19 -04:00
commit cef8c2100a
7 changed files with 63 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.gem
.bundle
Gemfile.lock
pkg/*

4
Gemfile Normal file
View File

@ -0,0 +1,4 @@
source "http://rubygems.org"
# Specify your gem's dependencies in guard-jasmine-headless-webkit.gemspec
gemspec

2
Rakefile Normal file
View File

@ -0,0 +1,2 @@
require 'bundler'
Bundler::GemHelper.install_tasks

View File

@ -0,0 +1,21 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "guard/jasmine-headless-webkit/version"
Gem::Specification.new do |s|
s.name = "guard-jasmine-headless-webkit"
s.version = Guard::JasmineHeadlessWebkit::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["John Bintz"]
s.email = ["john@coswellproductions.com"]
s.homepage = ""
s.summary = %q{Run jasmine-headless-webkit using guard}
s.description = %q{Run jasmine-headless-webkit using guard}
s.rubyforge_project = "guard-jasmine-headless-webkit"
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
end

View File

@ -0,0 +1,27 @@
require 'guard'
require 'guard/guard'
module Guard
class JasmineHeadlessWebkit < Guard
def start
UI.info "Guard::JasmineHeadlessWebkit is running."
end
def run_all
system %{jasmine-headless-webkit}
end
def run_on_change(paths)
system %{jasmine-headless-webkit #{paths.join(" ")}}
run_all if $?.exitstatus != 1
end
end
class DSL
def matching_js_file(path)
Dir[path + '*.{js,coffee}'].sort { |left, right| File.mtime(right) <=> File.mtime(left) }.first
end
end
end

View File

@ -0,0 +1,5 @@
module Guard
module JasmineHeadlessWebkit
VERSION = "0.0.1"
end
end