guard-cucumber 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -98,8 +98,8 @@ Former `:color`, `:drb`, `:port` and `:profile` options are thus deprecated and
98
98
  # This replaces the Cucumber --format option within the :cli option
99
99
  # default: nil
100
100
 
101
- :command_prefix => 'xvfb-run' # Add a prefix to the cucumber command such as 'xvfb-run' or any
102
- # other shell script.
101
+ :command_prefix => 'xvfb-run' # Add a prefix to the cucumber command such as 'xvfb-run' or any
102
+ # other shell script.
103
103
  # The example generates: 'xvfb-run bundle exec cucumber ...'
104
104
  # default: nil
105
105
  ```
@@ -165,13 +165,6 @@ end
165
165
 
166
166
  There is a section with alternative configurations on the [Wiki](https://github.com/netzpirat/guard-cucumber/wiki/Spork-configurations).
167
167
 
168
- ## Shameless self promotion
169
-
170
- Developed by Michael Kessler, sponsored by [mksoft.ch](https://mksoft.ch).
171
-
172
- If you like Guard::Cucumber, you can watch the repository at [GitHub](https://github.com/netzpirat/guard-cucumber) and
173
- follow [@netzpirat](https://twitter.com/#!/netzpirat) on Twitter for project updates.
174
-
175
168
  Issues
176
169
  ------
177
170
 
@@ -30,6 +30,7 @@ module Guard
30
30
  #
31
31
  def initialize(watchers = [], options = { })
32
32
  super
33
+
33
34
  @options = {
34
35
  :all_after_pass => true,
35
36
  :all_on_start => true,
@@ -83,7 +84,7 @@ module Guard
83
84
  #
84
85
  def run_on_changes(paths)
85
86
  paths += @failed_paths if @options[:keep_failed]
86
- paths = Inspector.clean(paths)
87
+ paths = Inspector.clean(paths, options[:feature_sets])
87
88
  options = @options[:change_format] ? change_format(@options[:change_format]) : @options
88
89
  passed = Runner.run(paths, paths.include?('features') ? options.merge({ :message => 'Running all features' }) : options)
89
90
 
@@ -11,12 +11,13 @@ module Guard
11
11
  # Cucumber features.
12
12
  #
13
13
  # @param [Array<String>] paths the changed paths
14
+ # @param [Array<String>] feature_sets the feature sets
14
15
  # @return [Array<String>] the valid feature files
15
16
  #
16
- def clean(paths)
17
+ def clean(paths, feature_sets)
17
18
  paths.uniq!
18
19
  paths.compact!
19
- paths = paths.select { |p| cucumber_file?(p) || cucumber_folder?(p) }
20
+ paths = paths.select { |p| cucumber_file?(p, feature_sets) || cucumber_folder?(p, feature_sets) }
20
21
  paths = paths.delete_if { |p| included_in_other_path?(p, paths) }
21
22
  clear_cucumber_files_list
22
23
  paths
@@ -27,29 +28,32 @@ module Guard
27
28
  # Tests if the file is the features folder.
28
29
  #
29
30
  # @param [String] file the file
31
+ # @param [Array<String>] feature_sets the feature sets
30
32
  # @return [Boolean] when the file is the feature folder
31
33
  #
32
- def cucumber_folder?(path)
33
- path.match(/^\/?features/) && !path.match(/\..+$/)
34
+ def cucumber_folder?(path, feature_sets)
35
+ path.match(/^\/?(#{ feature_sets.join('|') })/) && !path.match(/\..+$/)
34
36
  end
35
37
 
36
38
  # Tests if the file is valid.
37
39
  #
38
40
  # @param [String] file the file
41
+ # @param [Array<String>] feature_sets the feature sets
39
42
  # @return [Boolean] when the file valid
40
43
  #
41
- def cucumber_file?(path)
42
- cucumber_files.include?(path.split(':').first)
44
+ def cucumber_file?(path, feature_sets)
45
+ cucumber_files(feature_sets).include?(path.split(':').first)
43
46
  end
44
47
 
45
48
  # Scans the project and keeps a list of all
46
49
  # feature files in the `features` directory.
47
50
  #
48
51
  # @see #clear_jasmine_specs
52
+ # @param [Array<String>] feature_sets the feature sets
49
53
  # @return [Array<String>] the valid files
50
54
  #
51
- def cucumber_files
52
- @cucumber_files ||= Dir.glob('features/**/*.feature')
55
+ def cucumber_files(feature_sets)
56
+ @cucumber_files ||= Dir.glob("#{ feature_sets.join(',') }/**/*.feature")
53
57
  end
54
58
 
55
59
  # Clears the list of features in this project.
@@ -66,7 +70,7 @@ module Guard
66
70
  #
67
71
  def included_in_other_path?(path, paths)
68
72
  paths = paths.select { |p| p != path }
69
- massaged = path[0...(path.index(":")||path.size)]
73
+ massaged = path[0...(path.index(':') || path.size)]
70
74
  paths.any? { |p| (path.include?(p) && (path.gsub(p, '')).include?('/')) || massaged.include?(p) }
71
75
  end
72
76
  end
@@ -14,6 +14,7 @@ module Guard
14
14
  # @option options [Boolean] :bundler use bundler or not
15
15
  # @option options [Array<String>] :rvm a list of rvm version to use for the test
16
16
  # @option options [Boolean] :notification show notifications
17
+ # @option options [String] :command_prefix allows adding an additional prefix to the cucumber command. Ideal for running xvfb-run for terminal only cucumber tests.
17
18
  # @return [Boolean] the status of the execution
18
19
  #
19
20
  def run(paths, options = { })
@@ -34,7 +35,7 @@ module Guard
34
35
  # @option options [Boolean] :bundler use bundler or not
35
36
  # @option options [Array<String>] :rvm a list of rvm version to use for the test
36
37
  # @option options [Boolean] :notification show notifications
37
- # @option options [Boolean] :command_prefix allows adding an additional prefix to the cucumber command. Ideal for running xvfb-run for terminal only cucumber tests.
38
+ # @option options [String] :command_prefix allows adding an additional prefix to the cucumber command. Ideal for running xvfb-run for terminal only cucumber tests.
38
39
  # @return [String] the Cucumber command
39
40
  #
40
41
  def cucumber_command(paths, options)
@@ -1,6 +1,6 @@
1
1
  module Guard
2
2
  module CucumberVersion
3
3
  # Guard::Cucumber version that is used for the Gem specification
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  end
6
6
  end
@@ -152,7 +152,7 @@ x
152
152
  VERSION
153
153
  s
154
154
  5
155
- 0.8.0
155
+ 1.2.0
156
156
  x
157
157
  9
158
158
  const_set
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: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-19 00:00:00.000000000 Z
12
+ date: 2012-10-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
@@ -43,86 +43,6 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: 1.2.0
46
- - !ruby/object:Gem::Dependency
47
- name: bundler
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: rspec
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :development
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: guard-rspec
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
- - !ruby/object:Gem::Dependency
95
- name: yard
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- - !ruby/object:Gem::Dependency
111
- name: redcarpet
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
46
  description: Guard::Cucumber automatically run your features (much like autotest)
127
47
  email:
128
48
  - michi@netzpiraten.ch
@@ -153,7 +73,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
153
73
  version: '0'
154
74
  segments:
155
75
  - 0
156
- hash: -162567122808560821
76
+ hash: 1779235362422729347
157
77
  required_rubygems_version: !ruby/object:Gem::Requirement
158
78
  none: false
159
79
  requirements:
@@ -165,6 +85,6 @@ rubyforge_project: guard-cucumber
165
85
  rubygems_version: 1.8.24
166
86
  signing_key:
167
87
  specification_version: 3
168
- summary: Guard gem for Cucumber
88
+ summary: Guard plugin for Cucumber
169
89
  test_files: []
170
90
  has_rdoc: