gherkin 1.0.20 → 1.0.21
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/VERSION.yml +1 -1
- data/features/pretty_printer.feature +4 -4
- data/lib/gherkin/cli/main.rb +3 -4
- data/lib/gherkin/tools/reformat.rb +1 -1
- data/tasks/bench.rake +8 -6
- data/tasks/compile.rake +1 -0
- metadata +3 -3
data/History.txt
CHANGED
data/VERSION.yml
CHANGED
@@ -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 |
|
data/lib/gherkin/cli/main.rb
CHANGED
@@ -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
|
-
|
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
|
data/tasks/bench.rake
CHANGED
@@ -106,30 +106,32 @@ class Benchmarker
|
|
106
106
|
|
107
107
|
def run_rb_gherkin
|
108
108
|
require 'gherkin'
|
109
|
-
require 'gherkin/
|
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
|
data/tasks/compile.rake
CHANGED
@@ -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
|
-
-
|
9
|
-
version: 1.0.
|
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-
|
19
|
+
date: 2010-04-27 00:00:00 -05:00
|
20
20
|
default_executable: gherkin
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|