guard-cucumber 0.2.3 → 0.2.4

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Michael Kessler
1
+ Copyright (c) 2010 - 2011 Michael Kessler
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # Guard::Cucumber
2
+
3
+ Guard::Cucumber allows you to automatically run Cucumber features when files are modified. It is tested on Ruby 1.8.7 & 1.9.2.
4
+
5
+ ## Install
6
+
7
+ Please be sure to have [Guard](http://github.com/guard/guard) installed before continue.
8
+
9
+ Install the gem:
10
+
11
+ gem install guard-cucumber
12
+
13
+ Add it to your `Gemfile`, preferably inside the test group:
14
+
15
+ gem 'guard-cucumber'
16
+
17
+ Add Guard definition to your `Guardfile` by running this command:
18
+
19
+ guard init cucumber
20
+
21
+ ## Usage
22
+
23
+ Please read the [Guard usage documentation](http://github.com/guard/guard#readme).
24
+
25
+ ## Guardfile
26
+
27
+ Guard::Cucumber can be adapted to all kind of projects. Please read the
28
+ [Guard documentation](http://github.com/guard/guard#readme) for more information about the Guardfile DSL.
29
+
30
+ guard 'cucumber' do
31
+ watch(%r{features/.+\.feature})
32
+ watch(%r{features/support/.+}) { 'features' }
33
+ watch(%r{features/step_definitions/.+}) { 'features' }
34
+ end
35
+
36
+ ## Options
37
+
38
+ There are several options you can pass to Guard::Cucumber to customize the arguments when calling Cucumber:
39
+
40
+ :color => false # Disable colored output
41
+ :drb => true # Enable Spork DRb server
42
+ :port => 1234 # Set custom Spork port
43
+ :bundler => false # Don't use "bundle exec"
44
+ :rvm => ['1.8.7', '1.9.2'] # Directly run your specs on multiple ruby
45
+ :profile => 'cucumber_profile' # Let cucumber use another profile than the default one
46
+ :command => 'whatever' # Pass any other command to cucumber
47
+
48
+ ## Development
49
+
50
+ - Source hosted at [GitHub](http://github.com/netzpirat/guard-cucumber)
51
+ - Report issues/Questions/Feature requests on [GitHub Issues](http://github.com/netzpirat/guard-cucumber/issues)
52
+
53
+ Pull requests are very welcome! Make sure your patches are well tested.
54
+
55
+ ## Contributors
56
+
57
+ * [Oriol Gual](https://github.com/oriolgual)
58
+ * [Aleksei Gusev](https://github.com/hron)
59
+
60
+ ## Acknowledgment
61
+
62
+ The [Guard Team](https://github.com/guard/guard/contributors) for giving us such a nice pice of software
63
+ that is so easy to extend, one *has* to make a plugin for it!
64
+
65
+ All the authors of the numerous [Guards](http://github.com/guard) avaiable for making the Guard ecosystem
66
+ so much growing and comprehensive.
67
+
68
+ ## License
69
+
70
+ (The MIT License)
71
+
72
+ Copyright (c) 2010 - 2011 Michael Kessler
73
+
74
+ Permission is hereby granted, free of charge, to any person obtaining
75
+ a copy of this software and associated documentation files (the
76
+ 'Software'), to deal in the Software without restriction, including
77
+ without limitation the rights to use, copy, modify, merge, publish,
78
+ distribute, sublicense, and/or sell copies of the Software, and to
79
+ permit persons to whom the Software is furnished to do so, subject to
80
+ the following conditions:
81
+
82
+ The above copyright notice and this permission notice shall be
83
+ included in all copies or substantial portions of the Software.
84
+
85
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
88
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
89
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
90
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
91
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -22,7 +22,17 @@ module Guard
22
22
  cmd << '--color' if options[:color] != false
23
23
  cmd << "--drb" if options[:drb]
24
24
  cmd << "--port #{ options[:port] }" if options[:port] && options[:drb]
25
- cmd << "--require features"
25
+
26
+ if not require_command?(options)
27
+ if options[:drb]
28
+ cmd << "--require features/support"
29
+ cmd << "--require features/step_definitions"
30
+ else
31
+ cmd << "--require features"
32
+ end
33
+ end
34
+
35
+ cmd << options[:command] if options[:command]
26
36
  cmd = cmd + paths
27
37
  cmd.join(' ')
28
38
  end
@@ -30,8 +40,12 @@ module Guard
30
40
  def bundler?
31
41
  @bundler ||= File.exist?("#{Dir.pwd}/Gemfile")
32
42
  end
43
+
44
+ def require_command?(options)
45
+ !options[:command].nil? && options[:command] =~ /^--require/
46
+ end
47
+
33
48
  end
34
49
  end
35
50
  end
36
51
  end
37
-
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module CucumberVersion
3
- VERSION = '0.2.3'
3
+ VERSION = '0.2.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 31
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
8
  - 2
8
- - 3
9
- version: 0.2.3
9
+ - 4
10
+ version: 0.2.4
10
11
  platform: ruby
11
12
  authors:
12
13
  - Michael Kessler
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-01-21 00:00:00 +01:00
18
+ date: 2011-03-14 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ~>
27
28
  - !ruby/object:Gem::Version
29
+ hash: 19
28
30
  segments:
29
31
  - 0
30
32
  - 3
@@ -40,6 +42,7 @@ dependencies:
40
42
  requirements:
41
43
  - - ~>
42
44
  - !ruby/object:Gem::Version
45
+ hash: 55
43
46
  segments:
44
47
  - 0
45
48
  - 10
@@ -55,11 +58,12 @@ dependencies:
55
58
  requirements:
56
59
  - - ~>
57
60
  - !ruby/object:Gem::Version
61
+ hash: 3
58
62
  segments:
59
63
  - 1
60
64
  - 0
61
- - 9
62
- version: 1.0.9
65
+ - 10
66
+ version: 1.0.10
63
67
  type: :development
64
68
  version_requirements: *id003
65
69
  - !ruby/object:Gem::Dependency
@@ -70,11 +74,12 @@ dependencies:
70
74
  requirements:
71
75
  - - ~>
72
76
  - !ruby/object:Gem::Version
77
+ hash: 27
73
78
  segments:
74
79
  - 2
75
- - 4
80
+ - 5
76
81
  - 0
77
- version: 2.4.0
82
+ version: 2.5.0
78
83
  type: :development
79
84
  version_requirements: *id004
80
85
  - !ruby/object:Gem::Dependency
@@ -85,11 +90,12 @@ dependencies:
85
90
  requirements:
86
91
  - - ~>
87
92
  - !ruby/object:Gem::Version
93
+ hash: 23
88
94
  segments:
89
95
  - 0
90
- - 1
91
- - 9
92
- version: 0.1.9
96
+ - 2
97
+ - 0
98
+ version: 0.2.0
93
99
  type: :development
94
100
  version_requirements: *id005
95
101
  description: Guard::Cucumber automatically run your features (much like autotest)
@@ -110,7 +116,7 @@ files:
110
116
  - lib/guard/cucumber/version.rb
111
117
  - lib/guard/cucumber.rb
112
118
  - LICENSE
113
- - README.rdoc
119
+ - README.md
114
120
  has_rdoc: true
115
121
  homepage: http://github.com/netzpirat/guard-cucumber
116
122
  licenses: []
@@ -125,6 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
125
131
  requirements:
126
132
  - - ">="
127
133
  - !ruby/object:Gem::Version
134
+ hash: 3
128
135
  segments:
129
136
  - 0
130
137
  version: "0"
@@ -133,6 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
140
  requirements:
134
141
  - - ">="
135
142
  - !ruby/object:Gem::Version
143
+ hash: 23
136
144
  segments:
137
145
  - 1
138
146
  - 3
@@ -141,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
149
  requirements: []
142
150
 
143
151
  rubyforge_project: guard-cucumber
144
- rubygems_version: 1.3.7
152
+ rubygems_version: 1.6.1
145
153
  signing_key:
146
154
  specification_version: 3
147
155
  summary: Guard gem for Cucumber
data/README.rdoc DELETED
@@ -1,63 +0,0 @@
1
- = Guard::Cucumber
2
-
3
- Guard::Cucumber allows to automatically run Cucumber features when files are modified.
4
-
5
- - Tested on Ruby 1.8.7 & 1.9.2.
6
-
7
- == Install
8
-
9
- Please be sure to have {guard}[http://github.com/guard/guard] installed before continue.
10
-
11
- Install the gem:
12
-
13
- gem install guard-cucumber
14
-
15
- Add it to your Gemfile (inside test group):
16
-
17
- gem 'guard-cucumber'
18
-
19
- Add guard definition to your Guardfile by running this command:
20
-
21
- guard init cucumber
22
-
23
- == Usage
24
-
25
- Please read {guard usage doc}[http://github.com/guard/guard#readme]
26
-
27
- == Guardfile
28
-
29
- Cucumber guard can be adapated to all kind of projects.
30
- Please read {guard doc}[http://github.com/guard/guard#readme] for more info about Guardfile DSL.
31
-
32
- guard 'cucumber' do
33
- watch(%r{features/.+\.feature})
34
- watch(%r{features/support/.+}) { 'features' }
35
- watch(%r{features/step_definitions/.+}) { 'features' }
36
- end
37
-
38
- == Options
39
-
40
- There are several options you can pass to the Cucumber Guard to customize the arguments when calling Cucumber:
41
-
42
- :color => false # Disable colored output
43
- :drb => true # Enable Spork DRb server
44
- :port => 1234 # Set custom Spork port
45
- :bundler => false # Don't use "bundle exec"
46
- :rvm => ['1.8.7', '1.9.2'] # Directly run your specs on multiple ruby
47
- :profile => 'cucumber_profile' # Let cucumber use another profile than the default one
48
-
49
- == Development
50
-
51
- - Source hosted at {GitHub}[http://github.com/netzpirat/guard-cucumber]
52
- - Report issues/Questions/Feature requests on {GitHub Issues}[http://github.com/netzpirat/guard-cucumber/issues]
53
-
54
- Pull requests are very welcome! Make sure your patches are well tested.
55
-
56
- == Authors
57
-
58
- {Michael Kessler}[http://github.com/netzpirat]
59
-
60
- == Acknowledgment
61
-
62
- Many thanks to the {Guard Team}[https://github.com/guard/guard/contributors] and all the authors of the numerous {Guards}[http://github.com/guard]
63
-