gherkin 1.0.2-i386-mingw32 → 1.0.3-i386-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/.gitattributes +1 -0
  2. data/History.txt +18 -0
  3. data/README.rdoc +12 -1
  4. data/Rakefile +4 -2
  5. data/VERSION.yml +1 -1
  6. data/bin/gherkin +1 -1
  7. data/dotnet/.gitignore +13 -0
  8. data/features/feature_parser.feature +22 -2
  9. data/features/native_lexer.feature +1 -1
  10. data/features/parser_with_native_lexer.feature +1 -1
  11. data/features/step_definitions/gherkin_steps.rb +2 -6
  12. data/features/step_definitions/pretty_printer_steps.rb +2 -3
  13. data/features/steps_parser.feature +1 -1
  14. data/gherkin.gemspec +46 -18
  15. data/java/Gherkin.iml +2 -4
  16. data/java/build.xml +3 -0
  17. data/java/src/gherkin/FixJava.java +6 -3
  18. data/java/src/gherkin/I18nLexer.java +48 -0
  19. data/java/src/gherkin/Listener.java +3 -1
  20. data/java/src/gherkin/Main.java +17 -0
  21. data/java/src/gherkin/Parser.java +9 -3
  22. data/java/src/gherkin/formatter/Argument.java +39 -0
  23. data/java/src/gherkin/formatter/ArgumentFormat.java +17 -0
  24. data/java/src/gherkin/formatter/Colors.java +7 -0
  25. data/java/src/gherkin/formatter/Formatter.java +15 -0
  26. data/java/src/gherkin/formatter/PrettyFormatter.java +219 -0
  27. data/java/src/gherkin/parser/StateMachineReader.java +8 -3
  28. data/java/test/gherkin/formatter/ArgumentTest.java +17 -0
  29. data/lib/gherkin/csharp_lexer.rb +15 -0
  30. data/lib/gherkin/format/argument.rb +35 -0
  31. data/lib/gherkin/format/monochrome_format.rb +9 -0
  32. data/lib/gherkin/i18n.rb +22 -0
  33. data/lib/gherkin/i18n.yml +34 -20
  34. data/lib/gherkin/i18n_lexer.rb +57 -13
  35. data/lib/gherkin/lexer.rb +9 -18
  36. data/lib/gherkin/parser.rb +3 -3
  37. data/lib/gherkin/parser/meta.txt +5 -4
  38. data/lib/gherkin/parser/root.txt +11 -9
  39. data/lib/gherkin/parser/steps.txt +4 -3
  40. data/lib/gherkin/rb_parser.rb +13 -5
  41. data/lib/gherkin/tools/colors.rb +119 -0
  42. data/lib/gherkin/tools/files.rb +6 -1
  43. data/lib/gherkin/tools/pretty_listener.rb +115 -23
  44. data/ragel/lexer.c.rl.erb +67 -51
  45. data/ragel/lexer.csharp.rl.erb +240 -0
  46. data/ragel/lexer.java.rl.erb +27 -18
  47. data/ragel/lexer.rb.rl.erb +17 -17
  48. data/ragel/lexer_common.rl.erb +8 -8
  49. data/spec/gherkin/c_lexer_spec.rb +4 -4
  50. data/spec/gherkin/csharp_lexer_spec.rb +20 -0
  51. data/spec/gherkin/fixtures/comments_in_table.feature +9 -0
  52. data/spec/gherkin/fixtures/complex.feature +2 -0
  53. data/spec/gherkin/fixtures/dos_line_endings.feature +45 -0
  54. data/spec/gherkin/fixtures/i18n_fr.feature +1 -0
  55. data/spec/gherkin/fixtures/i18n_no.feature +1 -0
  56. data/spec/gherkin/fixtures/i18n_zh-CN.feature +1 -0
  57. data/spec/gherkin/format/argument_spec.rb +28 -0
  58. data/spec/gherkin/i18n_lexer_spec.rb +4 -4
  59. data/spec/gherkin/i18n_spec.rb +31 -23
  60. data/spec/gherkin/java_lexer_spec.rb +4 -3
  61. data/spec/gherkin/parser_spec.rb +5 -0
  62. data/spec/gherkin/rb_lexer_spec.rb +4 -2
  63. data/spec/gherkin/sexp_recorder.rb +1 -1
  64. data/spec/gherkin/shared/lexer_spec.rb +169 -60
  65. data/spec/gherkin/shared/py_string_spec.rb +6 -0
  66. data/spec/gherkin/shared/row_spec.rb +107 -0
  67. data/spec/gherkin/shared/tags_spec.rb +1 -1
  68. data/spec/gherkin/tools/colors_spec.rb +19 -0
  69. data/spec/gherkin/tools/pretty_listener_spec.rb +147 -0
  70. data/spec/spec_helper.rb +31 -7
  71. data/tasks/compile.rake +81 -7
  72. data/tasks/ragel_task.rb +6 -4
  73. data/tasks/rspec.rake +2 -2
  74. metadata +92 -31
  75. data/lib/gherkin/java_lexer.rb +0 -10
  76. data/spec/gherkin/shared/table_spec.rb +0 -97
@@ -0,0 +1 @@
1
+ spec/gherkin/fixtures/dos_line_endings.feature -crlf
@@ -1,3 +1,21 @@
1
+ == In Git
2
+
3
+ == Bugfixes
4
+ * The C lexer correctly instantiates a new array for each table, instead of reusing the old one. (Aslak Hellesøy)
5
+ * Emit keywords with space instead of stripping (< keywords are emmitted without space) (Aslak Hellesøy)
6
+ * gherkin reformat now prints comments, and does it with proper indentation (Aslak Hellesøy)
7
+ * .NET resource files are now automatically copied into the .dll (#46 Aslak Hellesøy)
8
+
9
+ == New features
10
+ * The Pure Java implementation now has a simple main method that pretty prints a feature. (#39 Aslak Hellesøy)
11
+ * Writing code generated i18n syntax highlighters for Gherkin is a lot easier thanks to several convenience methods in Gherkin::I18n. (Aslak Hellesøy)
12
+ * .NET (C#) port (#36, #37 Attila Sztupak)
13
+ * Tables parsed and sent by row rather than by table. (Mike Sassak)
14
+
15
+ == Changed features
16
+ * Switced to ISO 639-1 (language) and ISO 3166 alpha-2 (region - if applicable). Applies to Catalan,
17
+ Swedish, Welsh, Romanian and Serbian. (Aslak Hellesøy)
18
+
1
19
  == 1.0.2 (2009-12-30)
2
20
 
3
21
  == Bugfixes
@@ -9,6 +9,9 @@ Fast Gherkin lexer and parser based on Ragel. Gherkin is two things:
9
9
 
10
10
  rake clean spec cucumber
11
11
 
12
+ If the RL_LANG environment variable is set, only the parsers for the languages specified there will be built.
13
+ E.g. in Bash, export RL_LANG="en,fr,no". This can be quite helpful when modifying the Ragel grammar.
14
+
12
15
  == Release process
13
16
 
14
17
  * Run "rake clean spec cucumber" for each platform (1.8.6, 1.8.7, 1.9, jruby) to make sure all is green.
@@ -17,10 +20,18 @@ rake clean spec cucumber
17
20
  * rake clean jar compile
18
21
  * rake gemspec
19
22
  * git commit -a -m "Release vX.Y.Z"
20
- * rake release
23
+ * rake gemcutter:release
21
24
  * ./nativegems.sh
22
25
  * gem push pkg/... (for each native gem)
23
26
 
27
+ == Configuring Rake-Compiler for cross compilation
28
+ In order to build Windows binaries (so we can release Windows gems from OS X/Linux) we need to set up rake-compiler.
29
+
30
+ http://github.com/luislavena/rake-compiler/
31
+
32
+ I didn't want to install macports (I'm on homebrew) and I couldn't figure out how to build MinGW myself. I got prebuilt binaries:
33
+ http://crossgcc.rts-software.org/doku.php - just add the bin folder to your PATH
34
+
24
35
  == Note on Patches/Pull Requests
25
36
 
26
37
  * Fork the project.
data/Rakefile CHANGED
@@ -15,10 +15,12 @@ begin
15
15
  gem.authors = ["Mike Sassak", "Gregory Hnatiuk", "Aslak Hellesøy"]
16
16
  gem.executables = ["gherkin"]
17
17
  gem.add_dependency "trollop", ">= 1.15"
18
- gem.add_development_dependency "rspec", ">= 1.2.9"
19
- gem.add_development_dependency "cucumber", ">= 0.5.1"
18
+ gem.add_development_dependency "rspec", ">= 1.3.0"
19
+ gem.add_development_dependency "cucumber", ">= 0.6.2"
20
20
  gem.add_development_dependency "rake-compiler", ">= 0.7.0" unless defined?(JRUBY_VERSION)
21
+ gem.add_development_dependency "albacore", ">= 0.1.0"
21
22
 
23
+ gem.files -= FileList['dotnet/**/*']
22
24
  case ENV['PLATFORM']
23
25
  when 'java'
24
26
  gem.platform = 'java'
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 0
3
- :patch: 2
3
+ :patch: 3
4
4
  :major: 1
@@ -2,4 +2,4 @@
2
2
  $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
3
3
 
4
4
  require 'gherkin/cli/main'
5
- Gherkin::Cli::Main.run(ARGV)
5
+ Gherkin::Cli::Main.run(ARGV)
@@ -0,0 +1,13 @@
1
+ *.user
2
+ *.suo
3
+ bin
4
+ obj
5
+ Gherkin/StateMachine/meta.txt
6
+ Gherkin/StateMachine/root.txt
7
+ Gherkin/StateMachine/steps.txt
8
+ Gherkin/Lexer/*.cs
9
+ *.sln.cache
10
+ _ReSharper*
11
+ Gherkin.sln.proj
12
+ *.pidb
13
+ *.userprefs
@@ -6,7 +6,7 @@ Feature: Gherkin Feature lexer
6
6
  make all the syntax decisions for me
7
7
 
8
8
  Background:
9
- Given a "en", "ruby" "root" parser
9
+ Given a "ruby" "root" parser
10
10
 
11
11
  Scenario: Correctly formed feature
12
12
  Given the following text is parsed:
@@ -92,7 +92,7 @@ Feature: Gherkin Feature lexer
92
92
  """
93
93
  Then there should be parse errors on lines 5, 10 and 12
94
94
 
95
- Scenario: Tables
95
+ Scenario: Malformed Tables
96
96
  Given the following text is parsed:
97
97
  """
98
98
  Feature: Antiques Roadshow
@@ -115,6 +115,26 @@ Feature: Gherkin Feature lexer
115
115
  """
116
116
  Then there should be parse errors on lines 10 and 17
117
117
 
118
+ Scenario: Well-formed Tables
119
+ Given the following text is parsed:
120
+ """
121
+ Feature: Row-by-row
122
+
123
+ Scenario: Tables with comments!
124
+ Given I can now comment out a row:
125
+ | Key | Value |
126
+ # | Yes | No |
127
+ # | Good | Bad |
128
+ | Good | Evil |
129
+ Then I am pleased by these things:
130
+ | Raindrops | Roses |
131
+ # | Whiskers | Kittens |
132
+ | Bright Copper | Kettles |
133
+ # | Warm woolen | Mittens |
134
+ | Also Oban | And Hendricks |
135
+ """
136
+ Then there should be no parse errors
137
+
118
138
  Scenario: Multiline keyword descriptions
119
139
  Given the following text is parsed:
120
140
  """
@@ -1,7 +1,7 @@
1
1
  Feature: Native (C/Java) Lexer
2
2
 
3
3
  Background:
4
- Given a "en", "native" "root" parser
4
+ Given a "native" "root" parser
5
5
 
6
6
  Scenario: Parsing an empty feature
7
7
  Given the following text is parsed:
@@ -5,7 +5,7 @@ Feature: Gherkin Feature lexer/parser
5
5
  make all the syntax decisions for me
6
6
 
7
7
  Background:
8
- Given a "en", "native" "root" parser
8
+ Given a "native" "root" parser
9
9
 
10
10
  Scenario: Correctly formed feature
11
11
  When the following text is parsed:
@@ -1,10 +1,6 @@
1
- Given /^a "([^\"]*)", "([^\"]*)" "([^\"]*)" parser$/ do |i18n_language, impl, parser_name|
1
+ Given /^a "([^\"]*)" "([^\"]*)" parser$/ do |ruby_or_native, parser_name|
2
2
  parser = Gherkin::Parser.new(@listener, false, parser_name)
3
- programming_language = {
4
- 'ruby' => 'rb',
5
- 'native' => (defined?(JRUBY_VERSION) ? 'java' : 'c')
6
- }[impl]
7
- @lexer = Gherkin::Lexer.send(programming_language)[i18n_language].new(parser)
3
+ @lexer = Gherkin::I18nLexer.new(parser, ruby_or_native == "ruby")
8
4
  end
9
5
 
10
6
  Given "the following text is parsed:" do |text|
@@ -31,13 +31,12 @@ When /^I parse the prettified representation of each of them$/ do
31
31
  pretty1 = nil
32
32
  pretty2 = nil
33
33
  begin
34
- # announce "========== #{feature}:"
35
34
  pretty1 = pretty(IO.read(feature))
36
35
  pretty2 = pretty(pretty1)
37
36
  pretty2.should == pretty1
38
37
  rescue Spec::Expectations::ExpectationNotMetError => e
39
- File.open("p1.feature", "w") {|io| io.write(pretty1)}
40
- File.open("p2.feature", "w") {|io| io.write(pretty2)}
38
+ File.open("p1.feature", "wb") {|io| io.write(pretty1)}
39
+ File.open("p2.feature", "wb") {|io| io.write(pretty2)}
41
40
  announce "========== #{feature}:"
42
41
  if(e.message =~ /(@@.*)/m)
43
42
  announce $1
@@ -4,7 +4,7 @@ Feature: Gherkin Steps parser
4
4
  I want a steps parser to make writing compound steps easier
5
5
 
6
6
  Background:
7
- Given a "en", "ruby" "steps" parser
7
+ Given a "ruby" "steps" parser
8
8
 
9
9
  Scenario: Parsing steps
10
10
  Given the following text is parsed:
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gherkin}
8
- s.version = "1.0.2"
8
+ s.version = "1.0.3"
9
9
  s.platform = %q{i386-mingw32}
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.authors = ["Mike Sassak", "Gregory Hnatiuk", "Aslak Helles\303\270y"]
13
- s.date = %q{2009-12-30}
13
+ s.date = %q{2010-03-30}
14
14
  s.default_executable = %q{gherkin}
15
15
  s.description = %q{A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.}
16
16
  s.email = %q{cukes@googlegroups.com}
@@ -20,7 +20,8 @@ Gem::Specification.new do |s|
20
20
  "README.rdoc"
21
21
  ]
22
22
  s.files = [
23
- ".gitignore",
23
+ ".gitattributes",
24
+ ".gitignore",
24
25
  ".mailmap",
25
26
  "History.txt",
26
27
  "LICENSE",
@@ -29,6 +30,7 @@ Gem::Specification.new do |s|
29
30
  "VERSION.yml",
30
31
  "bin/gherkin",
31
32
  "cucumber.yml",
33
+ "dotnet/.gitignore",
32
34
  "features/feature_parser.feature",
33
35
  "features/native_lexer.feature",
34
36
  "features/parser_with_native_lexer.feature",
@@ -42,22 +44,32 @@ Gem::Specification.new do |s|
42
44
  "java/Gherkin.iml",
43
45
  "java/build.xml",
44
46
  "java/src/gherkin/FixJava.java",
47
+ "java/src/gherkin/I18nLexer.java",
45
48
  "java/src/gherkin/Lexer.java",
46
49
  "java/src/gherkin/LexingError.java",
47
50
  "java/src/gherkin/Listener.java",
51
+ "java/src/gherkin/Main.java",
48
52
  "java/src/gherkin/ParseError.java",
49
53
  "java/src/gherkin/Parser.java",
54
+ "java/src/gherkin/formatter/Argument.java",
55
+ "java/src/gherkin/formatter/ArgumentFormat.java",
56
+ "java/src/gherkin/formatter/Colors.java",
57
+ "java/src/gherkin/formatter/Formatter.java",
58
+ "java/src/gherkin/formatter/PrettyFormatter.java",
50
59
  "java/src/gherkin/lexer/.gitignore",
51
60
  "java/src/gherkin/parser/StateMachineReader.java",
61
+ "java/test/gherkin/formatter/ArgumentTest.java",
52
62
  "lib/.gitignore",
53
63
  "lib/gherkin.rb",
54
64
  "lib/gherkin/c_lexer.rb",
55
65
  "lib/gherkin/cli/main.rb",
56
66
  "lib/gherkin/core_ext/array.rb",
67
+ "lib/gherkin/csharp_lexer.rb",
68
+ "lib/gherkin/format/argument.rb",
69
+ "lib/gherkin/format/monochrome_format.rb",
57
70
  "lib/gherkin/i18n.rb",
58
71
  "lib/gherkin/i18n.yml",
59
72
  "lib/gherkin/i18n_lexer.rb",
60
- "lib/gherkin/java_lexer.rb",
61
73
  "lib/gherkin/lexer.rb",
62
74
  "lib/gherkin/parser.rb",
63
75
  "lib/gherkin/parser/meta.txt",
@@ -68,6 +80,7 @@ Gem::Specification.new do |s|
68
80
  "lib/gherkin/rb_lexer/README.rdoc",
69
81
  "lib/gherkin/rb_parser.rb",
70
82
  "lib/gherkin/tools.rb",
83
+ "lib/gherkin/tools/colors.rb",
71
84
  "lib/gherkin/tools/files.rb",
72
85
  "lib/gherkin/tools/pretty_listener.rb",
73
86
  "lib/gherkin/tools/reformat.rb",
@@ -75,12 +88,13 @@ Gem::Specification.new do |s|
75
88
  "lib/gherkin/tools/stats_listener.rb",
76
89
  "lib/gherkin_lexer_ar.so",
77
90
  "lib/gherkin_lexer_bg.so",
78
- "lib/gherkin_lexer_cat.so",
91
+ "lib/gherkin_lexer_ca.so",
79
92
  "lib/gherkin_lexer_cs.so",
80
- "lib/gherkin_lexer_cy.so",
93
+ "lib/gherkin_lexer_cyGB.so",
81
94
  "lib/gherkin_lexer_da.so",
82
95
  "lib/gherkin_lexer_de.so",
83
96
  "lib/gherkin_lexer_en.so",
97
+ "lib/gherkin_lexer_enScouse.so",
84
98
  "lib/gherkin_lexer_enau.so",
85
99
  "lib/gherkin_lexer_enlol.so",
86
100
  "lib/gherkin_lexer_entx.so",
@@ -102,12 +116,12 @@ Gem::Specification.new do |s|
102
116
  "lib/gherkin_lexer_pl.so",
103
117
  "lib/gherkin_lexer_pt.so",
104
118
  "lib/gherkin_lexer_ro.so",
105
- "lib/gherkin_lexer_ro2.so",
119
+ "lib/gherkin_lexer_roRO.so",
106
120
  "lib/gherkin_lexer_ru.so",
107
- "lib/gherkin_lexer_se.so",
108
121
  "lib/gherkin_lexer_sk.so",
109
- "lib/gherkin_lexer_sr.so",
122
+ "lib/gherkin_lexer_srCyrl.so",
110
123
  "lib/gherkin_lexer_srLatn.so",
124
+ "lib/gherkin_lexer_sv.so",
111
125
  "lib/gherkin_lexer_tr.so",
112
126
  "lib/gherkin_lexer_uz.so",
113
127
  "lib/gherkin_lexer_vi.so",
@@ -116,18 +130,23 @@ Gem::Specification.new do |s|
116
130
  "nativegems.sh",
117
131
  "ragel/i18n/.gitignore",
118
132
  "ragel/lexer.c.rl.erb",
133
+ "ragel/lexer.csharp.rl.erb",
119
134
  "ragel/lexer.java.rl.erb",
120
135
  "ragel/lexer.rb.rl.erb",
121
136
  "ragel/lexer_common.rl.erb",
122
137
  "spec/gherkin/c_lexer_spec.rb",
138
+ "spec/gherkin/csharp_lexer_spec.rb",
123
139
  "spec/gherkin/fixtures/1.feature",
140
+ "spec/gherkin/fixtures/comments_in_table.feature",
124
141
  "spec/gherkin/fixtures/complex.feature",
142
+ "spec/gherkin/fixtures/dos_line_endings.feature",
125
143
  "spec/gherkin/fixtures/i18n_fr.feature",
126
144
  "spec/gherkin/fixtures/i18n_no.feature",
127
145
  "spec/gherkin/fixtures/i18n_zh-CN.feature",
128
146
  "spec/gherkin/fixtures/simple.feature",
129
147
  "spec/gherkin/fixtures/simple_with_comments.feature",
130
148
  "spec/gherkin/fixtures/simple_with_tags.feature",
149
+ "spec/gherkin/format/argument_spec.rb",
131
150
  "spec/gherkin/i18n_lexer_spec.rb",
132
151
  "spec/gherkin/i18n_spec.rb",
133
152
  "spec/gherkin/java_lexer_spec.rb",
@@ -136,8 +155,10 @@ Gem::Specification.new do |s|
136
155
  "spec/gherkin/sexp_recorder.rb",
137
156
  "spec/gherkin/shared/lexer_spec.rb",
138
157
  "spec/gherkin/shared/py_string_spec.rb",
139
- "spec/gherkin/shared/table_spec.rb",
158
+ "spec/gherkin/shared/row_spec.rb",
140
159
  "spec/gherkin/shared/tags_spec.rb",
160
+ "spec/gherkin/tools/colors_spec.rb",
161
+ "spec/gherkin/tools/pretty_listener_spec.rb",
141
162
  "spec/spec_helper.rb",
142
163
  "tasks/bench.rake",
143
164
  "tasks/bench/feature_builder.rb",
@@ -152,10 +173,12 @@ Gem::Specification.new do |s|
152
173
  s.homepage = %q{http://github.com/aslakhellesoy/gherkin}
153
174
  s.rdoc_options = ["--charset=UTF-8"]
154
175
  s.require_paths = ["lib"]
155
- s.rubygems_version = %q{1.3.5}
176
+ s.rubygems_version = %q{1.3.6}
156
177
  s.summary = %q{Fast Gherkin lexer/parser}
157
178
  s.test_files = [
158
179
  "spec/gherkin/c_lexer_spec.rb",
180
+ "spec/gherkin/csharp_lexer_spec.rb",
181
+ "spec/gherkin/format/argument_spec.rb",
159
182
  "spec/gherkin/i18n_lexer_spec.rb",
160
183
  "spec/gherkin/i18n_spec.rb",
161
184
  "spec/gherkin/java_lexer_spec.rb",
@@ -164,8 +187,10 @@ Gem::Specification.new do |s|
164
187
  "spec/gherkin/sexp_recorder.rb",
165
188
  "spec/gherkin/shared/lexer_spec.rb",
166
189
  "spec/gherkin/shared/py_string_spec.rb",
167
- "spec/gherkin/shared/table_spec.rb",
190
+ "spec/gherkin/shared/row_spec.rb",
168
191
  "spec/gherkin/shared/tags_spec.rb",
192
+ "spec/gherkin/tools/colors_spec.rb",
193
+ "spec/gherkin/tools/pretty_listener_spec.rb",
169
194
  "spec/spec_helper.rb"
170
195
  ]
171
196
 
@@ -175,20 +200,23 @@ Gem::Specification.new do |s|
175
200
 
176
201
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
177
202
  s.add_runtime_dependency(%q<trollop>, [">= 1.15"])
178
- s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
179
- s.add_development_dependency(%q<cucumber>, [">= 0.5.1"])
203
+ s.add_development_dependency(%q<rspec>, [">= 1.3.0"])
204
+ s.add_development_dependency(%q<cucumber>, [">= 0.6.2"])
180
205
  s.add_development_dependency(%q<rake-compiler>, [">= 0.7.0"])
206
+ s.add_development_dependency(%q<albacore>, [">= 0.1.0"])
181
207
  else
182
208
  s.add_dependency(%q<trollop>, [">= 1.15"])
183
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
184
- s.add_dependency(%q<cucumber>, [">= 0.5.1"])
209
+ s.add_dependency(%q<rspec>, [">= 1.3.0"])
210
+ s.add_dependency(%q<cucumber>, [">= 0.6.2"])
185
211
  s.add_dependency(%q<rake-compiler>, [">= 0.7.0"])
212
+ s.add_dependency(%q<albacore>, [">= 0.1.0"])
186
213
  end
187
214
  else
188
215
  s.add_dependency(%q<trollop>, [">= 1.15"])
189
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
190
- s.add_dependency(%q<cucumber>, [">= 0.5.1"])
216
+ s.add_dependency(%q<rspec>, [">= 1.3.0"])
217
+ s.add_dependency(%q<cucumber>, [">= 0.6.2"])
191
218
  s.add_dependency(%q<rake-compiler>, [">= 0.7.0"])
219
+ s.add_dependency(%q<albacore>, [">= 0.1.0"])
192
220
  end
193
221
  end
194
222
 
@@ -1,24 +1,22 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <module relativePaths="true" type="JAVA_MODULE" version="4">
2
+ <module type="JAVA_MODULE" version="4">
3
3
  <component name="NewModuleRootManager" inherit-compiler-output="true">
4
4
  <exclude-output />
5
5
  <content url="file://$MODULE_DIR$">
6
6
  <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7
7
  <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
8
- <excludeFolder url="file://$MODULE_DIR$/target" />
9
8
  </content>
10
9
  <orderEntry type="inheritedJdk" />
11
10
  <orderEntry type="sourceFolder" forTests="false" />
12
11
  <orderEntry type="module-library" scope="TEST">
13
12
  <library>
14
13
  <CLASSES>
15
- <root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.6.jar!/" />
14
+ <root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.7.jar!/" />
16
15
  </CLASSES>
17
16
  <JAVADOC />
18
17
  <SOURCES />
19
18
  </library>
20
19
  </orderEntry>
21
- <orderEntry type="library" scope="TEST" name="Mockito" level="application" />
22
20
  </component>
23
21
  </module>
24
22
 
@@ -8,6 +8,9 @@
8
8
  <jar destfile="${basedir}/../lib/gherkin.jar">
9
9
  <fileset dir="${basedir}/target/classes" />
10
10
  <fileset dir="${basedir}/../lib" includes="gherkin/parser/*.txt" />
11
+ <manifest>
12
+ <attribute name="Main-Class" value="gherkin.Main" />
13
+ </manifest>
11
14
  </jar>
12
15
  </target>
13
16
  </project>
@@ -17,14 +17,17 @@ public class FixJava {
17
17
  return sb.toString();
18
18
  }
19
19
 
20
- public static String readResourceAsString(String filePath) throws IOException {
21
- Reader machine = new InputStreamReader(FixJava.class.getResourceAsStream(filePath));
20
+ public static String readResource(String filePath) throws IOException {
21
+ Reader reader = new InputStreamReader(FixJava.class.getResourceAsStream(filePath));
22
+ return readReader(reader);
23
+ }
22
24
 
25
+ public static String readReader(Reader reader) throws IOException {
23
26
  final char[] buffer = new char[0x10000];
24
27
  StringBuilder sb = new StringBuilder();
25
28
  int read;
26
29
  do {
27
- read = machine.read(buffer, 0, buffer.length);
30
+ read = reader.read(buffer, 0, buffer.length);
28
31
  if (read > 0) {
29
32
  sb.append(buffer, 0, read);
30
33
  }