aslakhellesoy-cucumber 0.1.99.6 → 0.1.99.7

Sign up to get free protection for your applications and to get access to all the features.
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
- feature = File.open(path, Cucumber.file_mode('r')) do |io|
21
- parse_or_fail(io.read, path)
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
@@ -3,7 +3,7 @@ module Cucumber #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
5
  TINY = 99
6
- PATCH = 6 # Set to nil for official release
6
+ PATCH = 7 # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aslakhellesoy-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.99.6
4
+ version: 0.1.99.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Aslak Helles\xC3\xB8y"