initial commit
This commit is contained in:
commit
cef8c2100a
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
*.gem
|
||||
.bundle
|
||||
Gemfile.lock
|
||||
pkg/*
|
4
Gemfile
Normal file
4
Gemfile
Normal file
@ -0,0 +1,4 @@
|
||||
source "http://rubygems.org"
|
||||
|
||||
# Specify your gem's dependencies in guard-jasmine-headless-webkit.gemspec
|
||||
gemspec
|
21
guard-jasmine-headless-webkit.gemspec
Normal file
21
guard-jasmine-headless-webkit.gemspec
Normal 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
|
27
lib/guard/jasmine-headless-webkit.rb
Normal file
27
lib/guard/jasmine-headless-webkit.rb
Normal 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
|
||||
|
5
lib/guard/jasmine-headless-webkit/version.rb
Normal file
5
lib/guard/jasmine-headless-webkit/version.rb
Normal file
@ -0,0 +1,5 @@
|
||||
module Guard
|
||||
module JasmineHeadlessWebkit
|
||||
VERSION = "0.0.1"
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user