guard-spinach 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/.rvmrc +1 -0
- data/Gemfile +8 -0
- data/Guardfile +5 -0
- data/Rakefile +11 -0
- data/guard-spinach.gemspec +22 -0
- data/lib/guard/spinach/runner.rb +19 -0
- data/lib/guard/spinach/templates/Guardfile +6 -0
- data/lib/guard/spinach/version.rb +3 -0
- data/lib/guard/spinach.rb +14 -0
- data/test/guard/spinach/runner_test.rb +27 -0
- data/test/guard/spinach_test.rb +16 -0
- data/test/test_helper.rb +18 -0
- metadata +105 -0
data/.gitignore
ADDED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use --create 1.9.3@guard-spinach
|
data/Gemfile
ADDED
data/Guardfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/guard/spinach/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Josep Jaume"]
|
6
|
+
gem.email = ["josepjaume@gmail.com"]
|
7
|
+
gem.description = %q{guard-spinach is a guard plugin for spinach}
|
8
|
+
gem.summary = %q{guard-spinach is a guard plugin for spinach}
|
9
|
+
gem.homepage = 'http://github.com/codegram/guard-spinach'
|
10
|
+
|
11
|
+
gem.add_runtime_dependency 'guard'
|
12
|
+
gem.add_runtime_dependency 'spinach'
|
13
|
+
gem.add_development_dependency 'mocha'
|
14
|
+
gem.add_development_dependency 'minitest'
|
15
|
+
|
16
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
gem.files = `git ls-files`.split("\n")
|
18
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
gem.name = "guard-spinach"
|
20
|
+
gem.require_paths = ['lib']
|
21
|
+
gem.version = Guard::SPINACH_VERSION
|
22
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require_relative '../../test_helper'
|
2
|
+
|
3
|
+
describe Guard::Spinach::Runner do
|
4
|
+
subject do
|
5
|
+
Guard::Spinach::Runner.new(paths)
|
6
|
+
end
|
7
|
+
let(:paths) do
|
8
|
+
['fake/path.feature', 'foo/bar.feature']
|
9
|
+
end
|
10
|
+
describe "#initialize" do
|
11
|
+
it "sets up a bunch of file paths" do
|
12
|
+
subject.paths.must_include 'fake/path.feature'
|
13
|
+
subject.paths.must_include 'foo/bar.feature'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
describe "#run_command" do
|
17
|
+
it "generates a valid run command" do
|
18
|
+
subject.run_command.must_equal "spinach fake/path.feature foo/bar.feature"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
describe "#run" do
|
22
|
+
it "runs spinach on all the features in the list" do
|
23
|
+
subject.expects(:system).with("spinach fake/path.feature foo/bar.feature")
|
24
|
+
subject.run
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative '../test_helper'
|
2
|
+
|
3
|
+
describe Guard::Spinach do
|
4
|
+
subject do
|
5
|
+
Guard::Spinach.new(data)
|
6
|
+
end
|
7
|
+
let(:paths) do
|
8
|
+
['fake/path.feature', 'foo/bar.feature']
|
9
|
+
end
|
10
|
+
describe "#run_on_change" do
|
11
|
+
it "fires run on a runner" do
|
12
|
+
Guard::Spinach::Runner.any_instance.expects(:system).with(
|
13
|
+
"spinach fake/path.feature foo/bar.feature")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
Bundler.require :default, :test
|
3
|
+
|
4
|
+
require 'mocha'
|
5
|
+
require 'minitest/spec'
|
6
|
+
require 'minitest/autorun'
|
7
|
+
|
8
|
+
require_relative '../lib/guard/spinach'
|
9
|
+
|
10
|
+
def capture_stdout
|
11
|
+
output = StringIO.new
|
12
|
+
$stdout = output
|
13
|
+
$stderr = output
|
14
|
+
yield
|
15
|
+
ensure
|
16
|
+
$stdout = STDOUT
|
17
|
+
$stdout = STDERR
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: guard-spinach
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Josep Jaume
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-10-14 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: guard
|
16
|
+
requirement: &70226750477840 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70226750477840
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: spinach
|
27
|
+
requirement: &70226750477360 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70226750477360
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: mocha
|
38
|
+
requirement: &70226750476880 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70226750476880
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: minitest
|
49
|
+
requirement: &70226750475900 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70226750475900
|
58
|
+
description: guard-spinach is a guard plugin for spinach
|
59
|
+
email:
|
60
|
+
- josepjaume@gmail.com
|
61
|
+
executables: []
|
62
|
+
extensions: []
|
63
|
+
extra_rdoc_files: []
|
64
|
+
files:
|
65
|
+
- .gitignore
|
66
|
+
- .rvmrc
|
67
|
+
- Gemfile
|
68
|
+
- Guardfile
|
69
|
+
- Rakefile
|
70
|
+
- guard-spinach.gemspec
|
71
|
+
- lib/guard/spinach.rb
|
72
|
+
- lib/guard/spinach/runner.rb
|
73
|
+
- lib/guard/spinach/templates/Guardfile
|
74
|
+
- lib/guard/spinach/version.rb
|
75
|
+
- test/guard/spinach/runner_test.rb
|
76
|
+
- test/guard/spinach_test.rb
|
77
|
+
- test/test_helper.rb
|
78
|
+
homepage: http://github.com/codegram/guard-spinach
|
79
|
+
licenses: []
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
requirements: []
|
97
|
+
rubyforge_project:
|
98
|
+
rubygems_version: 1.8.6
|
99
|
+
signing_key:
|
100
|
+
specification_version: 3
|
101
|
+
summary: guard-spinach is a guard plugin for spinach
|
102
|
+
test_files:
|
103
|
+
- test/guard/spinach/runner_test.rb
|
104
|
+
- test/guard/spinach_test.rb
|
105
|
+
- test/test_helper.rb
|