aslakhellesoy-cucumber 0.1.99.6 → 0.1.99.7
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/History.txt +1 -0
- data/lib/cucumber/cli.rb +3 -2
- data/lib/cucumber/parser/treetop_ext.rb +6 -2
- data/lib/cucumber/version.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
@@ -66,6 +66,7 @@ pure Ruby users have been enjoying for a while.
|
|
66
66
|
* Pending steps in > steps called from steps (#65 Aslak Hellesøy)
|
67
67
|
|
68
68
|
=== New features
|
69
|
+
* Added ability to pass URIs to cucumber in addition to files and directories. Useful for troubleshooting! (Aslak Hellesøy)
|
69
70
|
* Groups of tabular scenarios (#57 Aslak Hellesøy)
|
70
71
|
* Tagging scenarios and features. Pick the ones to run with --tags (#54 Aslak Hellesøy)
|
71
72
|
* Make the current scenario available to the steps. (#44 Aslak Hellesøy)
|
data/lib/cucumber/cli.rb
CHANGED
@@ -57,7 +57,8 @@ module Cucumber
|
|
57
57
|
opts.banner = ["Usage: cucumber [options] [[FILE[:LINE[:LINE]*]] | [FILES|DIRS]]", "",
|
58
58
|
"Examples:",
|
59
59
|
"cucumber examples/i18n/en/features",
|
60
|
-
"cucumber --language it examples/i18n/it/features/somma.feature:6:98:113", "", ""
|
60
|
+
"cucumber --language it examples/i18n/it/features/somma.feature:6:98:113", "", "",
|
61
|
+
"cucumber --no-snippets http://tinyurl.com/cuke-mastermind", "", "",
|
61
62
|
].join("\n")
|
62
63
|
opts.on("-r LIBRARY|DIR", "--require LIBRARY|DIR",
|
63
64
|
"Require files before executing the features. If this",
|
@@ -259,7 +260,7 @@ Defined profiles in cucumber.yml:
|
|
259
260
|
path = path.gsub(/\\/, '/') # In case we're on windows. Globs don't work with backslashes.
|
260
261
|
File.directory?(path) ? Dir["#{path}/**/*.rb"] : path
|
261
262
|
end.flatten.uniq
|
262
|
-
files.sort { |a,b| (b =~ %r{/support/} || -1) <=> (a =~ %r{/support/} || -1) }
|
263
|
+
files.sort { |a,b| (b =~ %r{/support/} || -1) <=> (a =~ %r{/support/} || -1) }.reject{|f| f =~ /^http/}
|
263
264
|
end
|
264
265
|
|
265
266
|
def feature_files
|
@@ -17,8 +17,12 @@ module Cucumber
|
|
17
17
|
lines = []
|
18
18
|
end
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
loader = lambda { |io| parse_or_fail(io.read, path) }
|
21
|
+
feature = if path =~ /^http/
|
22
|
+
require 'open-uri'
|
23
|
+
open(path, &loader)
|
24
|
+
else
|
25
|
+
File.open(path, Cucumber.file_mode('r'), &loader)
|
22
26
|
end
|
23
27
|
feature.lines = lines
|
24
28
|
feature
|
data/lib/cucumber/version.rb
CHANGED