guard-cucumber 1.6.0 → 2.0.0
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.
- checksums.yaml +4 -4
- data/README.md +30 -37
- data/lib/guard/cucumber/runner.rb +2 -36
- data/lib/guard/cucumber/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9e3c1db9b6016e54a5c1bb80af18191b2d50609
|
4
|
+
data.tar.gz: 3029d06db9f14727600acd964864c0be2d3bc7b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a385aa9831a9379e76abc17d85a3f57e94b65a8588675fb06cbaafd7b18e649c0062775c17216b35cff94e7402017e33326270e78928729379508f4ffb85e989
|
7
|
+
data.tar.gz: 8dcb1740a32f896ae493ef4be25f44e4fe17c99ae9dcbfabe075624b50e2ab186061e4ac11eef64f10982dba0616af0ddd16ec4ff0fb70c5ae843b0598657fa0
|
data/README.md
CHANGED
@@ -53,57 +53,49 @@ Please read the [Guard documentation](http://github.com/guard/guard#readme) for
|
|
53
53
|
|
54
54
|
## Options
|
55
55
|
|
56
|
-
You can pass any of the standard Cucumber CLI options using the :
|
56
|
+
You can pass any of the standard Cucumber CLI options using the :cmd_additional_args option:
|
57
57
|
|
58
58
|
```ruby
|
59
|
-
guard 'cucumber', :
|
59
|
+
guard 'cucumber', :cmd_additional_args => '-c --drb --port 1234 --profile guard'
|
60
60
|
```
|
61
61
|
|
62
|
-
Former `:color`, `:drb`, `:port` and `:
|
62
|
+
Former `:color`, `:drb`, `:port`, `:profile` and `:cli` options are thus deprecated and have no effect anymore.
|
63
63
|
|
64
|
-
|
64
|
+
You can specify custom cucumber command to run using the :cmd option:
|
65
65
|
|
66
66
|
```ruby
|
67
|
-
:
|
68
|
-
|
67
|
+
guard 'cucumber', :cmd => 'spring cucumber'
|
68
|
+
```
|
69
69
|
|
70
|
-
|
71
|
-
['set_a', 'set_b'] # default: ['features']
|
70
|
+
Former `:bundler`, `:bin_stubs`, `:change_format`, `:rvm` and `:command_prefix` options are thus deprecated and have no effect anymore.
|
72
71
|
|
73
|
-
:bundler => false # Don't use "bundle exec" to run the Cucumber command
|
74
|
-
# default: true
|
75
72
|
|
76
|
-
|
77
|
-
# default: false
|
73
|
+
### List of available options
|
78
74
|
|
79
|
-
|
80
|
-
|
75
|
+
```ruby
|
76
|
+
cmd: 'spring cucumber' # Specify custom cucumber command to run, default: 'cucumber'
|
77
|
+
cmd_additional_args: # Pass arbitrary Cucumber CLI arguments,
|
78
|
+
'--profile guard -c' # default: '--no-profile --color --format progress --strict'
|
81
79
|
|
82
|
-
:
|
80
|
+
feature_sets: # Use non-default feature directory/ies
|
81
|
+
['set_a', 'set_b'] # default: ['features']
|
82
|
+
|
83
|
+
notification: false # Don't display Growl (or Libnotify) notification
|
83
84
|
# default: true
|
84
85
|
|
85
|
-
:
|
86
|
+
all_after_pass: false # Don't run all features after changed features pass
|
86
87
|
# default: true
|
87
88
|
|
88
|
-
:
|
89
|
+
all_on_start: false # Don't run all the features at startup
|
89
90
|
# default: true
|
90
91
|
|
91
|
-
:
|
92
|
+
keep_failed: false # Keep failed features until they pass
|
92
93
|
# default: true
|
93
94
|
|
94
|
-
:
|
95
|
+
run_all: {cmd: "-p"} # Override any option when running all specs
|
95
96
|
# default: {}
|
96
97
|
|
97
|
-
:
|
98
|
-
# This replaces the Cucumber --format option within the :cli option
|
99
|
-
# default: nil
|
100
|
-
|
101
|
-
:command_prefix => 'xvfb-run' # Add a prefix to the cucumber command such as 'xvfb-run' or any
|
102
|
-
# other shell script.
|
103
|
-
# The example generates: 'xvfb-run bundle exec cucumber ...'
|
104
|
-
# default: nil
|
105
|
-
|
106
|
-
:focus_on => 'dev' # Focus on scenarios tagged with '@dev'
|
98
|
+
focus_on: 'dev' # Focus on scenarios tagged with '@dev'
|
107
99
|
# If '@dev' is on line 6 in 'foo.feature',
|
108
100
|
# this example runs: 'bundle exec cucumber foo.feature:6'
|
109
101
|
# default: nil
|
@@ -125,14 +117,14 @@ then the default profile forces guard-cucumber to always run all features, becau
|
|
125
117
|
|
126
118
|
If you want to configure Cucumber from Guard solely, then you should pass `--no-profile` to the `:cli` option.
|
127
119
|
|
128
|
-
Since guard-cucumber version 0.3.2, the default `:
|
120
|
+
Since guard-cucumber version 0.3.2, the default `:cmd_additional_args` options are:
|
129
121
|
|
130
122
|
```ruby
|
131
|
-
:
|
123
|
+
cmd_additional_args: '--no-profile --color --format progress --strict'
|
132
124
|
```
|
133
125
|
|
134
126
|
This default configuration has been chosen to avoid strange behavior when mixing configurations from
|
135
|
-
the cucumber.yml default profile with the guard-cucumber `:
|
127
|
+
the cucumber.yml default profile with the guard-cucumber `:cmd_additional_args` option.
|
136
128
|
|
137
129
|
You can safely remove `config/cucumber.yml`, since all configuration is done in the `Guardfile`.
|
138
130
|
|
@@ -161,7 +153,7 @@ guard 'spork' do
|
|
161
153
|
watch('spec/spec_helper.rb')
|
162
154
|
end
|
163
155
|
|
164
|
-
guard 'cucumber', :
|
156
|
+
guard 'cucumber', :cmd_additional_args => '--drb --format progress --no-profile' do
|
165
157
|
watch(%r{^features/.+\.feature$})
|
166
158
|
watch(%r{^features/support/.+$}) { 'features' }
|
167
159
|
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
|
@@ -174,23 +166,24 @@ There is a section with alternative configurations on the [Wiki](https://github.
|
|
174
166
|
|
175
167
|
To use Guard::Cucumber with [Zeus](https://github.com/burke/zeus), just set the command prefix:
|
176
168
|
```
|
177
|
-
guard 'cucumber', :
|
169
|
+
guard 'cucumber', :cmd => 'zeus cucumber' do
|
178
170
|
...
|
179
171
|
end
|
180
172
|
```
|
181
173
|
|
182
|
-
|
174
|
+
Don't use `cmd: 'bundle exec zeus cucumber'` because Zeus recommends to avoid a bundler call.
|
183
175
|
|
184
176
|
## Cucumber with Spring
|
185
177
|
|
186
178
|
To use Guard::Cucumber with [Spring](https://github.com/jonleighton/spring), just set the command prefix:
|
187
179
|
```
|
188
|
-
guard 'cucumber', :
|
180
|
+
guard 'cucumber', :cmd => 'spring cucumber' do
|
189
181
|
...
|
190
182
|
end
|
191
183
|
```
|
192
184
|
|
193
|
-
|
185
|
+
Don't use `cmd: 'bundle exec zeus cucumber'` because Spring recommends to avoid a bundler call.
|
186
|
+
|
194
187
|
|
195
188
|
Issues
|
196
189
|
------
|
@@ -59,33 +59,12 @@ module Guard
|
|
59
59
|
#
|
60
60
|
def cucumber_command(paths, options)
|
61
61
|
cmd = []
|
62
|
-
|
63
|
-
_add_rvm_options(cmd, options[:rvm])
|
64
|
-
_add_bundler_options(cmd, options[:bundler])
|
65
|
-
cmd << cucumber_exec(options)
|
66
|
-
_add_cli_options(cmd, options[:cli])
|
62
|
+
_add_cli_options(cmd, options[:cmd] || "cucumber")
|
67
63
|
_add_notification(cmd, options)
|
68
|
-
|
64
|
+
_add_cli_options(cmd, options[:cmd_additional_args])
|
69
65
|
(cmd + paths).join(" ")
|
70
66
|
end
|
71
67
|
|
72
|
-
# Simple test if binstubs prefix should be used.
|
73
|
-
#
|
74
|
-
# @return [String] Cucumber executable
|
75
|
-
#
|
76
|
-
def cucumber_exec(options = {})
|
77
|
-
options[:binstubs] == true ? "bin/cucumber" : "cucumber"
|
78
|
-
end
|
79
|
-
|
80
|
-
# Simple test if bundler should be used. it just checks for the
|
81
|
-
# `Gemfile`.
|
82
|
-
#
|
83
|
-
# @return [Boolean] bundler exists
|
84
|
-
#
|
85
|
-
def bundler?
|
86
|
-
@bundler ||= File.exist?("#{ Dir.pwd }/Gemfile")
|
87
|
-
end
|
88
|
-
|
89
68
|
# Returns a null device for all OS.
|
90
69
|
#
|
91
70
|
# @return [String] the name of the null device
|
@@ -111,22 +90,9 @@ module Guard
|
|
111
90
|
end.join(" ")
|
112
91
|
end
|
113
92
|
|
114
|
-
def _add_rvm_options(cmd, rvm_args)
|
115
|
-
return unless rvm_args.is_a?(Array)
|
116
|
-
cmd << "rvm #{ rvm_args.join(',') } exec"
|
117
|
-
end
|
118
|
-
|
119
|
-
def _add_bundler_options(cmd, bundler)
|
120
|
-
cmd << "bundle exec" if bundler? && bundler != false
|
121
|
-
end
|
122
|
-
|
123
93
|
def _add_cli_options(cmd, cli)
|
124
94
|
cmd << cli if cli
|
125
95
|
end
|
126
|
-
|
127
|
-
def _add_cmd_prefix(cmd, prefix)
|
128
|
-
cmd << prefix if prefix
|
129
|
-
end
|
130
96
|
end
|
131
97
|
end
|
132
98
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cezary Baginski
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-11-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard-compat
|