gherkin 1.0.20 → 1.0.21

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ == 1.0.21 (2010-04-27)
2
+
3
+ === Bugfixes
4
+ * Fix compile warning on ruby 1.9.2dev (2009-07-18 trunk 24186) (#53 Aslak Hellesøy)
5
+
1
6
  == 1.0.20
2
7
 
3
8
  === Bugfixes
@@ -2,4 +2,4 @@
2
2
  :major: 1
3
3
  :minor: 0
4
4
  :build:
5
- :patch: 20
5
+ :patch: 21
@@ -6,9 +6,9 @@ Feature: Pretty printer
6
6
  Given I have Cucumber's home dir defined in CUCUMBER_HOME
7
7
  When I find all of the .feature files
8
8
  And I parse the prettified representation of each of them
9
- # Of course, we don't really want any errors. The last
10
- # two files that were not identical are written to p1.feature
11
- # and p2.feature. Do a diff -u p1.feature p2.feature
12
- #
9
+ # Of course, we don't really want any errors. The last
10
+ # two files that were not identical are written to p1.feature
11
+ # and p2.feature. Do a diff -u p1.feature p2.feature
12
+ #
13
13
  Then the following files should have errors:
14
14
  | Path | Error |
@@ -16,11 +16,10 @@ module Gherkin
16
16
  end
17
17
 
18
18
  cmd_name = args.shift
19
+ die("Missing command") if cmd_name.nil?
20
+ cmd = Tools.const_get(cmd_name.capitalize.to_sym).new(args) rescue die("Unknown command #{cmd_name}")
19
21
  begin
20
- die("Missing command") if cmd_name.nil?
21
- Tools.const_get(cmd_name.capitalize.to_sym).new(args).run
22
- rescue NameError
23
- die("Unknown command #{cmd_name}")
22
+ cmd.run
24
23
  rescue => e
25
24
  Trollop::die(e.message)
26
25
  end
@@ -8,7 +8,7 @@ module Gherkin
8
8
  def run
9
9
  each do |file|
10
10
  purdy = StringIO.new
11
- listener = PrettyFormatter.new(purdy)
11
+ listener = Formatter::PrettyFormatter.new(purdy)
12
12
  scan(file, listener)
13
13
  purdy.rewind
14
14
  File.open(file, 'w') {|io| io.write(purdy.read)}
@@ -106,30 +106,32 @@ class Benchmarker
106
106
 
107
107
  def run_rb_gherkin
108
108
  require 'gherkin'
109
- require 'gherkin/rb_lexer/en'
109
+ require 'gherkin/i18n_lexer'
110
110
  require 'null_listener'
111
+ parser = Gherkin::Parser::Parser.new(NullListener.new, true, "root")
112
+ lexer = Gherkin::I18nLexer.new(parser, true)
111
113
  @features.each do |feature|
112
- parser = Gherkin::Parser.new(NullListener.new, true, "root")
113
- lexer = Gherkin::RbLexer::En.new(parser)
114
114
  lexer.scan(File.read(feature))
115
115
  end
116
116
  end
117
117
 
118
118
  def run_native_gherkin
119
119
  require 'gherkin'
120
+ require 'gherkin/i18n_lexer'
120
121
  require 'null_listener'
122
+ parser = Gherkin::Parser::Parser.new(NullListener.new, true, "root")
123
+ lexer = Gherkin::I18nLexer.new(parser, false)
121
124
  @features.each do |feature|
122
- parser = Gherkin::Parser.new(NullListener.new, true, "root")
123
- lexer = Gherkin::Lexer['en'].new(parser)
124
125
  lexer.scan(File.read(feature))
125
126
  end
126
127
  end
127
128
 
128
129
  def run_native_gherkin_no_parser
129
130
  require 'gherkin'
131
+ require 'gherkin/i18n_lexer'
130
132
  require 'null_listener'
133
+ lexer = Gherkin::I18nLexer.new(NullListener.new, false)
131
134
  @features.each do |feature|
132
- lexer = Gherkin::Lexer['en'].new(NullListener.new)
133
135
  lexer.scan(File.read(feature))
134
136
  end
135
137
  end
@@ -53,6 +53,7 @@ langs.each do |i18n|
53
53
  File.open(extconf, "w") do |io|
54
54
  io.write(<<-EOF)
55
55
  require 'mkmf'
56
+ CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
56
57
  $CFLAGS << ' -O0 -Wall -Werror'
57
58
  dir_config("gherkin_lexer_#{i18n.underscored_iso_code}")
58
59
  have_library("c", "main")
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 20
9
- version: 1.0.20
8
+ - 21
9
+ version: 1.0.21
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mike Sassak
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-04-23 00:00:00 +02:00
19
+ date: 2010-04-27 00:00:00 -05:00
20
20
  default_executable: gherkin
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency