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