gherkin 2.2.5-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. data/.gitattributes +2 -0
  2. data/.gitignore +11 -0
  3. data/.mailmap +2 -0
  4. data/.rspec +1 -0
  5. data/.rvmrc +1 -0
  6. data/Gemfile +5 -0
  7. data/History.txt +306 -0
  8. data/LICENSE +20 -0
  9. data/README.rdoc +59 -0
  10. data/Rakefile +16 -0
  11. data/VERSION +1 -0
  12. data/bin/gherkin +5 -0
  13. data/build_native_gems.sh +8 -0
  14. data/cucumber.yml +3 -0
  15. data/features/escaped_pipes.feature +8 -0
  16. data/features/feature_parser.feature +237 -0
  17. data/features/json_formatter.feature +278 -0
  18. data/features/json_parser.feature +318 -0
  19. data/features/native_lexer.feature +19 -0
  20. data/features/parser_with_native_lexer.feature +205 -0
  21. data/features/pretty_formatter.feature +15 -0
  22. data/features/step_definitions/eyeball_steps.rb +3 -0
  23. data/features/step_definitions/gherkin_steps.rb +29 -0
  24. data/features/step_definitions/json_formatter_steps.rb +28 -0
  25. data/features/step_definitions/json_parser_steps.rb +20 -0
  26. data/features/step_definitions/pretty_formatter_steps.rb +82 -0
  27. data/features/steps_parser.feature +46 -0
  28. data/features/support/env.rb +38 -0
  29. data/gherkin.gemspec +59 -0
  30. data/ikvm/.gitignore +3 -0
  31. data/java/.gitignore +2 -0
  32. data/java/src/main/java/gherkin/lexer/i18n/.gitignore +1 -0
  33. data/java/src/main/resources/gherkin/.gitignore +1 -0
  34. data/lib/.gitignore +4 -0
  35. data/lib/gherkin.rb +2 -0
  36. data/lib/gherkin/c_lexer.rb +17 -0
  37. data/lib/gherkin/cli/main.rb +33 -0
  38. data/lib/gherkin/formatter/argument.rb +28 -0
  39. data/lib/gherkin/formatter/colors.rb +119 -0
  40. data/lib/gherkin/formatter/escaping.rb +15 -0
  41. data/lib/gherkin/formatter/filter_formatter.rb +136 -0
  42. data/lib/gherkin/formatter/json_formatter.rb +72 -0
  43. data/lib/gherkin/formatter/line_filter.rb +26 -0
  44. data/lib/gherkin/formatter/model.rb +231 -0
  45. data/lib/gherkin/formatter/monochrome_format.rb +9 -0
  46. data/lib/gherkin/formatter/pretty_formatter.rb +174 -0
  47. data/lib/gherkin/formatter/regexp_filter.rb +21 -0
  48. data/lib/gherkin/formatter/tag_count_formatter.rb +47 -0
  49. data/lib/gherkin/formatter/tag_filter.rb +19 -0
  50. data/lib/gherkin/i18n.rb +180 -0
  51. data/lib/gherkin/i18n.yml +601 -0
  52. data/lib/gherkin/json_parser.rb +88 -0
  53. data/lib/gherkin/lexer/i18n_lexer.rb +47 -0
  54. data/lib/gherkin/listener/event.rb +45 -0
  55. data/lib/gherkin/listener/formatter_listener.rb +113 -0
  56. data/lib/gherkin/native.rb +7 -0
  57. data/lib/gherkin/native/ikvm.rb +55 -0
  58. data/lib/gherkin/native/java.rb +55 -0
  59. data/lib/gherkin/native/null.rb +9 -0
  60. data/lib/gherkin/parser/meta.txt +5 -0
  61. data/lib/gherkin/parser/parser.rb +164 -0
  62. data/lib/gherkin/parser/root.txt +11 -0
  63. data/lib/gherkin/parser/steps.txt +4 -0
  64. data/lib/gherkin/rb_lexer.rb +8 -0
  65. data/lib/gherkin/rb_lexer/.gitignore +1 -0
  66. data/lib/gherkin/rb_lexer/README.rdoc +8 -0
  67. data/lib/gherkin/rubify.rb +24 -0
  68. data/lib/gherkin/tag_expression.rb +62 -0
  69. data/lib/gherkin/tools.rb +8 -0
  70. data/lib/gherkin/tools/files.rb +34 -0
  71. data/lib/gherkin/tools/reformat.rb +20 -0
  72. data/lib/gherkin/tools/stats.rb +20 -0
  73. data/lib/gherkin/tools/stats_listener.rb +60 -0
  74. data/lib/gherkin/version.rb +3 -0
  75. data/ragel/i18n/.gitignore +1 -0
  76. data/ragel/lexer.c.rl.erb +459 -0
  77. data/ragel/lexer.java.rl.erb +224 -0
  78. data/ragel/lexer.rb.rl.erb +179 -0
  79. data/ragel/lexer_common.rl.erb +50 -0
  80. data/spec/gherkin/c_lexer_spec.rb +21 -0
  81. data/spec/gherkin/fixtures/1.feature +8 -0
  82. data/spec/gherkin/fixtures/comments_in_table.feature +9 -0
  83. data/spec/gherkin/fixtures/complex.feature +45 -0
  84. data/spec/gherkin/fixtures/complex.json +143 -0
  85. data/spec/gherkin/fixtures/complex_for_filtering.feature +60 -0
  86. data/spec/gherkin/fixtures/complex_with_tags.feature +61 -0
  87. data/spec/gherkin/fixtures/dos_line_endings.feature +45 -0
  88. data/spec/gherkin/fixtures/hantu_pisang.feature +35 -0
  89. data/spec/gherkin/fixtures/i18n_fr.feature +14 -0
  90. data/spec/gherkin/fixtures/i18n_no.feature +7 -0
  91. data/spec/gherkin/fixtures/i18n_zh-CN.feature +9 -0
  92. data/spec/gherkin/fixtures/scenario_outline_with_tags.feature +13 -0
  93. data/spec/gherkin/fixtures/scenario_without_steps.feature +5 -0
  94. data/spec/gherkin/fixtures/simple_with_comments.feature +7 -0
  95. data/spec/gherkin/fixtures/simple_with_tags.feature +11 -0
  96. data/spec/gherkin/fixtures/with_bom.feature +3 -0
  97. data/spec/gherkin/formatter/argument_spec.rb +28 -0
  98. data/spec/gherkin/formatter/colors_spec.rb +18 -0
  99. data/spec/gherkin/formatter/filter_formatter_spec.rb +165 -0
  100. data/spec/gherkin/formatter/model_spec.rb +15 -0
  101. data/spec/gherkin/formatter/pretty_formatter_spec.rb +140 -0
  102. data/spec/gherkin/formatter/spaces.feature +9 -0
  103. data/spec/gherkin/formatter/tabs.feature +9 -0
  104. data/spec/gherkin/formatter/tag_count_formatter_spec.rb +30 -0
  105. data/spec/gherkin/i18n_spec.rb +149 -0
  106. data/spec/gherkin/java_lexer_spec.rb +20 -0
  107. data/spec/gherkin/json.rb +5 -0
  108. data/spec/gherkin/json_parser_spec.rb +67 -0
  109. data/spec/gherkin/lexer/i18n_lexer_spec.rb +43 -0
  110. data/spec/gherkin/output_stream_string_io.rb +24 -0
  111. data/spec/gherkin/parser/parser_spec.rb +16 -0
  112. data/spec/gherkin/rb_lexer_spec.rb +19 -0
  113. data/spec/gherkin/sexp_recorder.rb +56 -0
  114. data/spec/gherkin/shared/lexer_group.rb +592 -0
  115. data/spec/gherkin/shared/py_string_group.rb +153 -0
  116. data/spec/gherkin/shared/row_group.rb +120 -0
  117. data/spec/gherkin/shared/tags_group.rb +54 -0
  118. data/spec/gherkin/tag_expression_spec.rb +137 -0
  119. data/spec/spec_helper.rb +68 -0
  120. data/tasks/bench.rake +184 -0
  121. data/tasks/bench/feature_builder.rb +49 -0
  122. data/tasks/bench/generated/.gitignore +1 -0
  123. data/tasks/bench/null_listener.rb +4 -0
  124. data/tasks/compile.rake +102 -0
  125. data/tasks/cucumber.rake +18 -0
  126. data/tasks/gems.rake +42 -0
  127. data/tasks/ikvm.rake +54 -0
  128. data/tasks/ragel_task.rb +70 -0
  129. data/tasks/rdoc.rake +9 -0
  130. data/tasks/release.rake +30 -0
  131. data/tasks/rspec.rake +8 -0
  132. metadata +447 -0
@@ -0,0 +1,2 @@
1
+ spec/gherkin/fixtures/dos_line_endings.feature -crlf
2
+ spec/gherkin/fixtures/with_bom.feature -crlf
@@ -0,0 +1,11 @@
1
+ *.sw?
2
+ *.rbc
3
+ .DS_Store
4
+ coverage
5
+ rdoc
6
+ pkg
7
+ ext
8
+ tmp
9
+ release
10
+ .bundle
11
+ Gemfile.lock
@@ -0,0 +1,2 @@
1
+ Gregory Hnatiuk <ghnatiuk@gmail.com>
2
+ Mike Sassak <msassak@gmail.com>
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm @cucumber
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source "http://rubygems.org"
2
+ gemspec
3
+
4
+ @dependencies.reject!{|dep| dep.name == 'cucumber'}
5
+ gem 'cucumber', :path => '../cucumber'
@@ -0,0 +1,306 @@
1
+ == 2.2.5 (2010-10-1)
2
+
3
+ === New Features
4
+ * Gherkin will scan all top comments for the language comment. (Aslak Hellesøy)
5
+
6
+ == 2.2.4 (2010-09-22)
7
+
8
+ === Bugfixes
9
+ * C99 features used by gherkin code (#75 Graham Agnew)
10
+
11
+ == 2.2.3 (2010-09-21)
12
+
13
+ === Bugfixes
14
+ * Add back missing development dependency on cucumber (Aslak Hellesøy)
15
+
16
+ == 2.2.2 (2010-09-21)
17
+
18
+ === New Features
19
+ * Use json instead of json_pure (Aslak Hellesøy)
20
+ * JSON formatter and parser can now omit JSON serialization (for speed) and work directly on objects (Aslak Hellesøy)
21
+
22
+ == 2.2.1 (2010-09-12)
23
+
24
+ === New Features
25
+ * Windows gems are now built against 1.8.6-p287 and 1.9.1-p243, on both mswin32 and mingw32, and should work on 1.8.6, 1.8.7, 1.9.1 and 1.9.2 versions of rubyinstaller.org as well as older windows rubies. (Aslak Hellesøy)
26
+
27
+ === Changed features
28
+ * Build system no longer uses Jeweler - only Rake, Bundler and Rubygems (Aslak Hellesøy)
29
+
30
+ == 2.2.0 (2010-07-26)
31
+
32
+ This release breaks some APIs since the previous 2.1.5 release. If you install gherkin 2.2.0 you must also upgrade to
33
+ Cucumber 0.9.0.
34
+
35
+ === Bugfixes
36
+ * I18nLexer doesn't recognise language header with \r\n on OS X. (#70 Aslak Hellesøy)
37
+
38
+ === New Features
39
+ * Pure Java FilterFormatter. (Aslak Hellesøy)
40
+ * Pure Java JSONFormatter. (Aslak Hellesøy)
41
+
42
+ === Changed Features
43
+ * All formatter events take exactly one argument. Each argument is a single object with all data. (Aslak Hellesøy)
44
+ * Several java classes have moved to a different package in order to improve separation of concerns. (Aslak Hellesøy)
45
+
46
+ == 2.1.5 (2010-07-17)
47
+
48
+ === Bugfixes
49
+ * Line filter works on JRuby with Scenarios without steps. (Aslak Hellesøy)
50
+
51
+ === Changed Features
52
+ * The JSON schema now puts background inside the "elements" Array. Makes parsing simpler. (Aslak Hellesøy)
53
+
54
+ == 2.1.4 (2010-07-14)
55
+
56
+ === Bugfixes
57
+ * #steps fails on JRuby with 2.1.3 (#68 Aslak Hellesøy)
58
+
59
+ == 2.1.3 (2010-07-14)
60
+
61
+ === Bugfixes
62
+ * Examples are not cleared when an ignored Scenario Outline/Examples is followed by a Scenario. (#67 Aslak Hellesøy)
63
+
64
+ == 2.1.2 (2010-07-13)
65
+
66
+ === Bugfixes
67
+ * Fix some missing require statements that surfaced when gherkin was used outside Cucumber. (Aslak Hellesøy)
68
+
69
+ == 2.1.1 (2010-07-12)
70
+
71
+ The previous release had a missing gherkin.jar in the jruby gem. This release fixes that. For good this time!
72
+
73
+ == 2.1.0 (2010-07-12)
74
+
75
+ === New Features
76
+ * Pirate! (anteaya)
77
+ * Tag limits for negative tags (Aslak Hellesøy)
78
+
79
+ === Changed Features
80
+ * The formatter API has changed and the listener API is now only used internally. (Aslak Hellesøy)
81
+
82
+ === Removed Features
83
+ * FilterListener has been replaced with FilterFormatter. Currently only in Ruby (no Java impl yet). (Aslak Hellesøy)
84
+
85
+ == 2.0.2 (2010-06-16)
86
+
87
+ === New Features
88
+ * New JSON Lexer. (Gregory Hnatiuk)
89
+
90
+ === Bugfixes
91
+ * Fixed incorrect indentation for descriptions in Java. (Aslak Hellesøy)
92
+ * Fixed support for xx-yy languages and Hebrew and Indonesian (JDK bugs). (Aslak Hellesøy)
93
+
94
+ === Changed Features
95
+ * Examples are now nested inside the Scenario Outline in the JSON format. (Gregory Hnatiuk)
96
+
97
+ == 2.0.1 (2010-06-15)
98
+
99
+ The previous release had a missing gherkin.jar in the jruby gem. This release fixes that.
100
+
101
+ == 2.0.0 (2010-06-15)
102
+
103
+ We're breaking the old listener API in this release, and added a new JSON formatter,
104
+ which calls for a new major version.
105
+
106
+ === New Features
107
+ * New JSON formatter. (Aslak Hellesøy, Joseph Wilk)
108
+ * New synonyms for Hungarian (Bence Golda)
109
+ * Upgraded to use RSpec 2.0.0 (Aslak Hellesøy)
110
+
111
+ === Bugfixes
112
+ * undefined method `<=>' on JRuby (#52 Aslak Hellesøy)
113
+ * Include link to explanation of LexingError (Mike Sassak)
114
+
115
+ === Changed Features
116
+ * The formatter API has completely changed. There is a Gherkin Listener API and a Formatter API.
117
+ The FormatterListener acts as an adapter between them. (Aslak Hellesøy)
118
+ * The listener API now has an additional argument for description (text following the first line of Feature:, Scenario: etc.) (Gregroy Hnatiuk, Matt Wynne)
119
+
120
+ == 1.0.30 (2010-05-18)
121
+
122
+ === New Features
123
+ * Native gems for IronRuby. Bundles IKVM OpenJDK dlls as well as ikvmc-compiled gherkin.dll. Experimental! (Aslak Hellesøy)
124
+
125
+ == 1.0.29 (2010-05-18)
126
+
127
+ === Bugfixes
128
+ * Use I18n.class' class loader instead of context class loader to load Java lexers. Hoping this fixes loading bug for good. (Aslak Hellesøy)
129
+
130
+ == 1.0.28 (2010-05-18)
131
+
132
+ === Bugfixes
133
+ * Use context class loader instead of boot class loader to load Java lexers. (Aslak Hellesøy)
134
+ * Only add gcc flags when the compiler is gcc. (#60 Aslak Hellesøy, Christian Höltje)
135
+
136
+ == 1.0.27 (2010-05-17)
137
+
138
+ === New Features
139
+ * Table cells can now contain escaped bars - \| and escaped backslashes - \\. (#48. Gregory Hnatiuk, Aslak Hellesøy)
140
+ * Luxemburgish (lu) added. (Christoph König)
141
+
142
+ == 1.0.26 (2010-05-09)
143
+
144
+ === New Features
145
+ * Ignore the BOM that many retarded Windows editors insist on sticking in the beginning of a file. (Aslak Hellesøy)
146
+
147
+ == 1.0.25 (2010-05-02)
148
+
149
+ === Bugfixes
150
+ * Allow fallback to a slower ruby lexer if the C lexer can't be loaded for some reason.
151
+ * Can't run specs in gherkin 1.0.24 (#59 Aslak Hellesøy)
152
+
153
+ == 1.0.24 (2010-05-02)
154
+
155
+ === Bugfixes
156
+ * hard tabs crazy indentation for pystrings in formatter (#55 Aslak Hellesøy)
157
+
158
+ == 1.0.23 (2010-05-02)
159
+
160
+ === Changed Features
161
+ * Java API now uses camelCased method names instead of underscored (more Java-like) (Aslak Hellesøy)
162
+
163
+ == 1.0.22 (2010-04-28)
164
+
165
+ === Bugfixes
166
+ * Make prebuilt binaries work on both Ruby 1.8.x and 1.9.x on Windows (#54 Luis Lavena, Aslak Hellesøy)
167
+
168
+ == 1.0.21 (2010-04-27)
169
+
170
+ === Bugfixes
171
+ * Fix compile warning on ruby 1.9.2dev (2009-07-18 trunk 24186) (#53 Aslak Hellesøy)
172
+
173
+ == 1.0.20 (2010-04-20)
174
+
175
+ === Bugfixes
176
+ * The gherkin CLI is working again (Gregory Hnatiuk)
177
+
178
+ == 1.0.19 (2010-04-20)
179
+
180
+ === New Features
181
+ * Works with JRuby 1.5.0.RC1 (Aslak Hellesøy)
182
+
183
+ === Changed Features
184
+ * I18n.code_keywords now return And and But as well, making Cucumber StepDefs a little more flexible (Aslak Hellesøy)
185
+
186
+ == 1.0.18 (2010-04-20)
187
+
188
+ === Bugfixes
189
+ * Explicitly use UTF-8 encoding when scanning source with Java lexer. (Aslak Hellesøy)
190
+
191
+ == 1.0.17 (2010-04-19)
192
+
193
+ === Bugfixes
194
+ * Gherkin::I18n.keyword_regexp was broken (used for 3rd party code generation). (#51 Aslak Hellesøy)
195
+
196
+ == 1.0.16 (2010-04-19)
197
+ (Something went wrong when releasing 1.0.15)
198
+
199
+ === Bugfixes
200
+ * Reduced risk of halfway botched releases. (Aslak Hellesøy)
201
+
202
+ == 1.0.15 (2010-04-19)
203
+
204
+ === New Features
205
+ * Implemented more functionality in I18n.java. (Aslak Hellesøy)
206
+
207
+ === Changed Features
208
+ * Java methods are no longer throwing Exception (but RuntimeException). (Aslak Hellesøy)
209
+
210
+ == 1.0.14 (2010-04-18)
211
+ (Something went wrong when releasing 1.0.13)
212
+
213
+ == 1.0.13 (2010-04-18)
214
+
215
+ === New Features
216
+ * Filter on Background name. (Aslak Hellesøy)
217
+
218
+ == 1.0.12 (2010-04-18)
219
+
220
+ === Bugfixes
221
+ * Fixed incorrect filtering of pystring in Background. (Mike Sassak)
222
+
223
+ == 1.0.11 (2010-04-16)
224
+
225
+ === Bugfixes
226
+ * Fixed bad packaging (C files were not packaged in POSIX gem)
227
+
228
+ == 1.0.10 (2010-04-16)
229
+
230
+ === New Features
231
+ * Added Esperanto and added a Russian synonym for Feature. (Antono Vasiljev)
232
+ * Pure Java implementation of FilterListener and TagExpression (Mike Gaffney, Aslak Hellesøy)
233
+
234
+ === Changed Features
235
+ * TagExpression takes array args instead of varargs. (Aslak Hellesøy)
236
+
237
+ == 1.0.9 (2010-04-12)
238
+
239
+ === Bugfixes
240
+ * Triple escaped quotes (\"\"\") in PyStrings are unescaped to """. (Aslak Hellesøy)
241
+
242
+ == 1.0.8 (2010-04-10)
243
+
244
+ === Bugfixes
245
+ * Removed illegal comma from Ukrainian synonym. (Aslak Hellesøy)
246
+
247
+ == 1.0.7 (2010-04-10)
248
+
249
+ === Bugfixes
250
+ * Fixed problems with packaging of 1.0.6 release. (Aslak Hellesøy)
251
+
252
+ == 1.0.6 (2010-04-10)
253
+
254
+ === New Features
255
+ * Fully automated release process. (Aslak Hellesøy)
256
+
257
+ === Changed Features
258
+ * Made generated classes use a more uniform naming convention. (Aslak Hellesøy)
259
+
260
+ === Removed Features
261
+ * Removed C# port, obsoleted by IKVM build from 1.0.5. (Aslak Hellesøy)
262
+
263
+ == 1.0.5 (2010-04-08)
264
+
265
+ === New Features
266
+ * New .NET build of gherkin - an ikvmc build of gherkin.jar to gherkin.dll. (Aslak Hellesøy)
267
+
268
+ === Bugfixes
269
+ * Made parsers reusable so that the same instance can parse several features. (Aslak Hellesøy)
270
+
271
+ == 1.0.4 (2010-04-07)
272
+
273
+ === New features
274
+ * Pure java releases of Gherkin at http://cukes.info/maven
275
+ * A FilterListener in Ruby that is the last missing piece to plug Gherkin into Cucumber. (Gregory Hnatiuk, Aslak Hellesøy, Matt Wynne, Mike Sassak)
276
+
277
+ === Changed features
278
+ * The Lexer now emits the '@' for tags. (Aslak Hellesøy)
279
+
280
+ == 1.0.3 (2010-03-31)
281
+
282
+ === Bugfixes
283
+ * The C lexer correctly instantiates a new array for each table, instead of reusing the old one. (Aslak Hellesøy)
284
+ * Emit keywords with space instead of stripping (< keywords are emmitted without space) (Aslak Hellesøy)
285
+ * gherkin reformat now prints comments, and does it with proper indentation (Aslak Hellesøy)
286
+ * .NET resource files are now automatically copied into the .dll (#46 Aslak Hellesøy)
287
+
288
+ === New features
289
+ * The Pure Java implementation now has a simple main method that pretty prints a feature. (#39 Aslak Hellesøy)
290
+ * Writing code generated i18n syntax highlighters for Gherkin is a lot easier thanks to several convenience methods in Gherkin::I18n. (Aslak Hellesøy)
291
+ * .NET (C#) port (#36, #37 Attila Sztupak)
292
+ * Tables parsed and sent by row rather than by table. (Mike Sassak)
293
+
294
+ === Changed features
295
+ * Switced to ISO 639-1 (language) and ISO 3166 alpha-2 (region - if applicable). Applies to Catalan,
296
+ Swedish, Welsh, Romanian and Serbian. (Aslak Hellesøy)
297
+
298
+ == 1.0.2 (2009-12-30)
299
+
300
+ === Bugfixes
301
+ * Build passes on Ruby 1.9.2 (Aslak Hellesøy)
302
+
303
+ === New features
304
+ * New command line based on trollop. Commands: reformat, stats. (Aslak Hellesøy)
305
+ * I18nLexer#scan sets #language to the I18n for the language scanned (Mike Sassak)
306
+ * I18n#adverbs, brings I18n to parity with Cucumber::Parser::NaturalLanguage (Mike Sassak)
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009-2010 Mike Sassak, Gregory Hnatiuk, Aslak Hellesøy
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,59 @@
1
+ = Gherkin
2
+
3
+ Fast Gherkin lexer and parser based on Ragel. Gherkin is two things:
4
+
5
+ * The language that has evolved out of the Cucumber project.
6
+ * This library
7
+
8
+ == Generating and building the code
9
+
10
+ You'll need MRI (any version) if you want to build for MRI. To build the Java implementation you'll need JRuby.
11
+ You'll also need Ragel installed and on your PATH.
12
+ Finally you'll need the jeweler gem. (Jeweler will tell you what other gems you need when you run rake)
13
+
14
+ === MRI
15
+
16
+ rake clean compile
17
+
18
+ === Java
19
+
20
+ rake clean jar
21
+
22
+ == Running RSpec and Cucumber tests
23
+
24
+ rake clean spec cucumber
25
+
26
+ If the RL_LANG environment variable is set, only the parsers for the languages specified there will be built.
27
+ E.g. in Bash, export RL_LANG="en,fr,no". This can be quite helpful when modifying the Ragel grammar.
28
+
29
+ == Release process
30
+
31
+ * Bump version in the VERSION file and:
32
+ ** java/pom.xml
33
+ ** ikvm/Gherkin/Gherkin.csproj
34
+ * rake gems:prepare && ./build_native_gems.sh && rake release:ALL
35
+ * Announce on Cucumber list, IRC and Twitter.
36
+
37
+ == Configuring Rake-Compiler for cross compilation
38
+ In order to build Windows binaries (so we can release Windows gems from OS X/Linux) we need to set up rake-compiler.
39
+
40
+ http://github.com/luislavena/rake-compiler/
41
+
42
+ 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 (version 4.3.0):
43
+ http://crossgcc.rts-software.org/doku.php - just add the bin folder to your PATH
44
+
45
+ == Note on Patches/Pull Requests
46
+
47
+ * Fork the project.
48
+ * Run rake ragel:rb to generate all the I18n lexers
49
+ * Make your feature addition or bug fix.
50
+ * Add tests for it. This is important so I don't break it in a
51
+ future version unintentionally.
52
+ * Commit, do not mess with Rakefile, VERSION, or History.txt.
53
+ (if you want to have your own version, that is fine but
54
+ bump version in a commit by itself I can ignore when I pull)
55
+ * Send me a pull request. Bonus points for topic branches.
56
+
57
+ == Copyright
58
+
59
+ Copyright (c) 2009-2010 Mike Sassak, Gregory Hnatiuk, Aslak Hellesøy. See LICENSE for details.
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ require 'rubygems'
3
+ require 'bundler'
4
+ Bundler.setup
5
+ Bundler::GemHelper.install_tasks
6
+
7
+ require 'rake/clean'
8
+
9
+ $:.unshift(File.dirname(__FILE__) + '/lib')
10
+ require 'gherkin/version'
11
+
12
+ Dir['tasks/**/*.rake'].each { |rake| load File.expand_path(rake) }
13
+
14
+ task :default => [:spec, :cucumber]
15
+ task :spec => defined?(JRUBY_VERSION) ? :jar : :compile
16
+ task :cucumber => defined?(JRUBY_VERSION) ? :jar : :compile
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 2.2.5
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
3
+
4
+ require 'gherkin/cli/main'
5
+ Gherkin::Cli::Main.run(ARGV)
@@ -0,0 +1,8 @@
1
+ #!/bin/sh
2
+ rm -Rf release
3
+ mkdir release
4
+ GEM_PLATFORM=java gem build gherkin.gemspec
5
+ GEM_PLATFORM=x86-mswin32 gem build gherkin.gemspec
6
+ GEM_PLATFORM=x86-mingw32 gem build gherkin.gemspec
7
+ GEM_PLATFORM=universal-dotnet gem build gherkin.gemspec
8
+ mv *.gem release