guard-cucumber 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,9 @@ module Guard
2
2
  class Cucumber
3
3
  module Runner
4
4
  class << self
5
+
5
6
  def run(paths, options = {})
7
+ return false if paths.empty?
6
8
  message = options[:message] || (paths == ['features'] ? 'Run all Cucumber features' : "Run Cucumber features #{ paths.join(' ') }")
7
9
  UI.info message, :reset => true
8
10
  system(cucumber_command(paths, options))
@@ -19,7 +21,10 @@ module Guard
19
21
  cmd << options[:cli] if options[:cli]
20
22
 
21
23
  if options[:notification] != false
22
- cmd << "--require #{ File.expand_path(File.join(File.dirname(__FILE__), '..', 'notification_formatter.rb')) } --format Guard::Cucumber::NotificationFormatter --out #{ null_device }"
24
+ notification_formatter_path = File.expand_path(File.join(File.dirname(__FILE__), 'notification_formatter.rb'))
25
+ cmd << "--require #{ notification_formatter_path }"
26
+ cmd << "--format Guard::Cucumber::NotificationFormatter"
27
+ cmd << "--out #{ null_device }"
23
28
  cmd << "--require features"
24
29
  end
25
30
 
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module CucumberVersion
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  end
5
5
  end
@@ -0,0 +1,203 @@
1
+ !RBIX
2
+ 333337424968067900
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 28
13
+ 99
14
+ 7
15
+ 0
16
+ 65
17
+ 49
18
+ 1
19
+ 2
20
+ 13
21
+ 99
22
+ 12
23
+ 7
24
+ 2
25
+ 12
26
+ 7
27
+ 3
28
+ 12
29
+ 65
30
+ 12
31
+ 49
32
+ 4
33
+ 4
34
+ 15
35
+ 49
36
+ 2
37
+ 0
38
+ 15
39
+ 2
40
+ 11
41
+ I
42
+ 6
43
+ I
44
+ 0
45
+ I
46
+ 0
47
+ I
48
+ 0
49
+ n
50
+ p
51
+ 5
52
+ x
53
+ 5
54
+ Guard
55
+ x
56
+ 11
57
+ open_module
58
+ x
59
+ 15
60
+ __module_init__
61
+ M
62
+ 1
63
+ n
64
+ n
65
+ x
66
+ 5
67
+ Guard
68
+ i
69
+ 28
70
+ 5
71
+ 66
72
+ 99
73
+ 7
74
+ 0
75
+ 65
76
+ 49
77
+ 1
78
+ 2
79
+ 13
80
+ 99
81
+ 12
82
+ 7
83
+ 2
84
+ 12
85
+ 7
86
+ 3
87
+ 12
88
+ 65
89
+ 12
90
+ 49
91
+ 4
92
+ 4
93
+ 15
94
+ 49
95
+ 2
96
+ 0
97
+ 11
98
+ I
99
+ 6
100
+ I
101
+ 0
102
+ I
103
+ 0
104
+ I
105
+ 0
106
+ n
107
+ p
108
+ 5
109
+ x
110
+ 15
111
+ CucumberVersion
112
+ x
113
+ 11
114
+ open_module
115
+ x
116
+ 15
117
+ __module_init__
118
+ M
119
+ 1
120
+ n
121
+ n
122
+ x
123
+ 15
124
+ CucumberVersion
125
+ i
126
+ 12
127
+ 5
128
+ 66
129
+ 65
130
+ 7
131
+ 0
132
+ 7
133
+ 1
134
+ 64
135
+ 49
136
+ 2
137
+ 2
138
+ 11
139
+ I
140
+ 3
141
+ I
142
+ 0
143
+ I
144
+ 0
145
+ I
146
+ 0
147
+ n
148
+ p
149
+ 3
150
+ x
151
+ 7
152
+ VERSION
153
+ s
154
+ 5
155
+ 0.3.0
156
+ x
157
+ 9
158
+ const_set
159
+ p
160
+ 3
161
+ I
162
+ 2
163
+ I
164
+ 3
165
+ I
166
+ c
167
+ x
168
+ 70
169
+ /Users/michi/Repositories/guard-cucumber/lib/guard/cucumber/version.rb
170
+ p
171
+ 0
172
+ x
173
+ 13
174
+ attach_method
175
+ p
176
+ 3
177
+ I
178
+ 2
179
+ I
180
+ 2
181
+ I
182
+ 1c
183
+ x
184
+ 70
185
+ /Users/michi/Repositories/guard-cucumber/lib/guard/cucumber/version.rb
186
+ p
187
+ 0
188
+ x
189
+ 13
190
+ attach_method
191
+ p
192
+ 3
193
+ I
194
+ 0
195
+ I
196
+ 1
197
+ I
198
+ 1c
199
+ x
200
+ 70
201
+ /Users/michi/Repositories/guard-cucumber/lib/guard/cucumber/version.rb
202
+ p
203
+ 0
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: guard-cucumber
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.0
5
+ version: 0.3.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Michael Kessler
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-28 00:00:00 +02:00
13
+ date: 2011-05-13 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -65,7 +65,7 @@ dependencies:
65
65
  requirements:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: 0.2.0
68
+ version: 0.3.1
69
69
  type: :development
70
70
  version_requirements: *id005
71
71
  description: Guard::Cucumber automatically run your features (much like autotest)
@@ -79,12 +79,15 @@ extra_rdoc_files: []
79
79
 
80
80
  files:
81
81
  - lib/guard/cucumber/inspector.rb
82
+ - lib/guard/cucumber/inspector.rbc
82
83
  - lib/guard/cucumber/notification_formatter.rb
83
- - lib/guard/cucumber/runners/preload_runner.rb
84
- - lib/guard/cucumber/runners/runner.rb
84
+ - lib/guard/cucumber/notification_formatter.rbc
85
+ - lib/guard/cucumber/runner.rb
85
86
  - lib/guard/cucumber/templates/Guardfile
86
87
  - lib/guard/cucumber/version.rb
88
+ - lib/guard/cucumber/version.rbc
87
89
  - lib/guard/cucumber.rb
90
+ - lib/guard/cucumber.rbc
88
91
  - LICENSE
89
92
  - README.md
90
93
  has_rdoc: true
@@ -1,51 +0,0 @@
1
- require 'cucumber'
2
- require 'cucumber/formatter/progress'
3
- require 'guard/cucumber/notification_formatter'
4
-
5
- module Guard
6
- class Cucumber
7
- module PreloadRunner
8
- class << self
9
- def start
10
- UI.info '*** WARNING: Preload the Cucumber environment is known to have some issues with class reloading'
11
- UI.info 'Preload cucumber environment. This could take a while...'
12
-
13
- @configuration = ::Cucumber::Cli::Configuration.new
14
- @runtime = ::Cucumber::Runtime.new(@configuration)
15
- @configuration.parse!(['features'])
16
-
17
- # Hack the support code, since loading the files takes most of the initialization time
18
- @support = ::Cucumber::Runtime::SupportCode.new(@runtime, @configuration)
19
- @support.load_files!(@configuration.support_to_load + @configuration.step_defs_to_load)
20
- @support.fire_hook(:after_configuration, @configuration)
21
- @runtime.instance_variable_set('@support_code', @support)
22
-
23
- UI.info 'Cucumber environment loaded.'
24
- end
25
-
26
- def run(paths, options = {})
27
- @configuration.parse!(paths)
28
- features = @configuration.feature_files
29
- message = options[:message] || run_message(features)
30
- UI.info message, :reset => true
31
-
32
- formatters = [
33
- NotificationFormatter.new(@runtime, $stdout, @configuration.instance_variable_get('@options')),
34
- ::Cucumber::Formatter::Progress.new(@runtime, $stdout, @configuration.instance_variable_get('@options'))
35
- ]
36
- runner = ::Cucumber::Ast::TreeWalker.new(@runtime, formatters, @configuration)
37
- @runtime.visitor = runner
38
- loader = ::Cucumber::Runtime::FeaturesLoader.new(features, @configuration.filters, @configuration.tag_expression)
39
- runner.visit_features(loader.features)
40
- end
41
-
42
- private
43
-
44
- def run_message(paths)
45
- paths == ['features'] ? 'Run all Cucumber features' : "Run Cucumber feature#{ paths.size == 1 ? '' : 's' } #{ paths.join(' ') }"
46
- end
47
-
48
- end
49
- end
50
- end
51
- end