gherkin 1.0.30-i386-mswin32 → 2.0.0-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/.rspec +1 -0
  2. data/History.txt +19 -0
  3. data/Rakefile +4 -4
  4. data/VERSION.yml +2 -2
  5. data/features/feature_parser.feature +11 -0
  6. data/features/json_formatter.feature +238 -0
  7. data/features/pretty_formatter.feature +9 -0
  8. data/features/step_definitions/gherkin_steps.rb +1 -1
  9. data/features/step_definitions/json_formatter_steps.rb +32 -0
  10. data/features/step_definitions/pretty_formatter_steps.rb +24 -23
  11. data/features/support/env.rb +3 -3
  12. data/lib/gherkin/formatter/json_formatter.rb +82 -0
  13. data/lib/gherkin/formatter/pretty_formatter.rb +73 -78
  14. data/lib/gherkin/i18n.rb +22 -18
  15. data/lib/gherkin/i18n.yml +9 -9
  16. data/lib/gherkin/i18n_lexer.rb +2 -2
  17. data/lib/gherkin/parser/event.rb +6 -6
  18. data/lib/gherkin/parser/filter_listener.rb +5 -1
  19. data/lib/gherkin/parser/formatter_listener.rb +113 -0
  20. data/lib/gherkin/parser/json_parser.rb +102 -0
  21. data/lib/gherkin/parser/parser.rb +10 -2
  22. data/lib/gherkin/parser/row.rb +15 -0
  23. data/lib/gherkin/rubify.rb +2 -0
  24. data/lib/gherkin/tools/files.rb +1 -1
  25. data/lib/gherkin/tools/reformat.rb +1 -2
  26. data/lib/gherkin/tools/stats.rb +1 -1
  27. data/lib/gherkin/tools/stats_listener.rb +5 -5
  28. data/ragel/lexer.c.rl.erb +41 -12
  29. data/ragel/lexer.java.rl.erb +26 -17
  30. data/ragel/lexer.rb.rl.erb +10 -5
  31. data/ragel/lexer_common.rl.erb +6 -6
  32. data/spec/gherkin/c_lexer_spec.rb +2 -2
  33. data/spec/gherkin/fixtures/complex.js +105 -0
  34. data/spec/gherkin/formatter/argument_spec.rb +3 -3
  35. data/spec/gherkin/formatter/colors_spec.rb +3 -4
  36. data/spec/gherkin/formatter/pretty_formatter_spec.rb +21 -50
  37. data/spec/gherkin/i18n_lexer_spec.rb +6 -6
  38. data/spec/gherkin/i18n_spec.rb +16 -9
  39. data/spec/gherkin/java_lexer_spec.rb +1 -2
  40. data/spec/gherkin/output_stream_string_io.rb +24 -0
  41. data/spec/gherkin/parser/filter_listener_spec.rb +16 -9
  42. data/spec/gherkin/parser/formatter_listener_spec.rb +134 -0
  43. data/spec/gherkin/parser/json_parser_spec.rb +129 -0
  44. data/spec/gherkin/parser/parser_spec.rb +9 -9
  45. data/spec/gherkin/parser/tag_expression_spec.rb +8 -8
  46. data/spec/gherkin/rb_lexer_spec.rb +1 -1
  47. data/spec/gherkin/sexp_recorder.rb +21 -1
  48. data/spec/gherkin/shared/{lexer_spec.rb → lexer_group.rb} +172 -102
  49. data/spec/gherkin/shared/{py_string_spec.rb → py_string_group.rb} +21 -17
  50. data/spec/gherkin/shared/{row_spec.rb → row_group.rb} +36 -19
  51. data/spec/gherkin/shared/{tags_spec.rb → tags_group.rb} +13 -9
  52. data/spec/spec_helper.rb +18 -38
  53. data/tasks/bench.rake +3 -3
  54. data/tasks/compile.rake +13 -14
  55. data/tasks/rspec.rake +6 -11
  56. metadata +42 -28
  57. data/features/pretty_printer.feature +0 -14
  58. data/spec/gherkin/csharp_lexer_spec.rb +0 -20
@@ -8,6 +8,7 @@ CLEAN.include [
8
8
  'java/target',
9
9
  'ragel/i18n/*.rl',
10
10
  'lib/gherkin/rb_lexer/*.rb',
11
+ 'lib/*.dll',
11
12
  'ext/**/*.c',
12
13
  'java/src/main/java/gherkin/lexer/*.java',
13
14
  'java/src/main/resources/gherkin/*.properties',
@@ -27,22 +28,20 @@ langs.each do |i18n|
27
28
  java = RagelTask.new('java', i18n)
28
29
  rb = RagelTask.new('rb', i18n)
29
30
 
30
- file 'lib/gherkin.jar' => [java.target, rb.target]
31
-
32
- begin
33
- if defined?(JRUBY_VERSION)
34
- java_properties = "java/src/main/resources/gherkin/I18nKeywords_#{i18n.iso_code.gsub(/-/, '_')}.properties"
35
- file java_properties => 'lib/gherkin/i18n.yml' do
36
- File.open(java_properties, 'wb') do |io|
37
- io.puts("# Generated file. Do not edit.")
38
- Gherkin::I18n::KEYWORD_KEYS.each do |key|
39
- value = Gherkin::I18n.unicode_escape(i18n.keywords(key).join("|"))
40
- io.puts("#{key}:#{value}")
41
- end
31
+ java_properties = "java/src/main/resources/gherkin/I18nKeywords_#{i18n.iso_code.gsub(/-/, '_')}.properties"
32
+ file java_properties => 'lib/gherkin/i18n.yml' do
33
+ File.open(java_properties, 'wb') do |io|
34
+ io.puts("# Generated file. Do not edit.")
35
+ Gherkin::I18n::KEYWORD_KEYS.each do |key|
36
+ value = Gherkin::I18n.unicode_escape(i18n.keywords(key).join("|"))
37
+ io.puts("#{key}:#{value}")
42
38
  end
43
39
  end
44
- file 'lib/gherkin.jar' => java_properties
45
- else
40
+ end
41
+ file 'lib/gherkin.jar' => [java.target, rb.target, java_properties]
42
+
43
+ begin
44
+ if !defined?(JRUBY_VERSION)
46
45
  require 'rake/extensiontask'
47
46
 
48
47
  c = RagelTask.new('c', i18n)
@@ -1,15 +1,10 @@
1
- require 'spec/rake/spectask'
1
+ require 'rspec/core/rake_task'
2
2
 
3
- Spec::Rake::SpecTask.new(:spec) do |spec|
4
- spec.libs << 'lib' << 'spec'
5
- spec.spec_opts << '--color --diff'
6
- end
3
+ RSpec::Core::RakeTask.new(:spec)
7
4
  task :spec => [:check_dependencies]
8
5
 
9
- Spec::Rake::SpecTask.new(:rcov) do |spec|
10
- spec.libs << 'lib' << 'spec'
11
- spec.spec_opts << '--color --diff'
12
- spec.pattern = 'spec/**/*_spec.rb'
13
- spec.rcov = true
14
- spec.rcov_opts = %w{--exclude spec\/}
6
+ RSpec::Core::RakeTask.new(:rcov) do |t|
7
+ t.pattern = 'spec/**/*_spec.rb'
8
+ t.rcov = true
9
+ t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/}
15
10
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gherkin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 43
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
- - 1
7
+ - 2
8
8
  - 0
9
- - 30
10
- version: 1.0.30
9
+ - 0
10
+ version: 2.0.0
11
11
  platform: i386-mswin32
12
12
  authors:
13
13
  - Mike Sassak
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-05-20 00:00:00 +02:00
20
+ date: 2010-06-15 00:00:00 +02:00
21
21
  default_executable: gherkin
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirement: &id001 !ruby/object:Gem::Requirement
27
27
  none: false
28
28
  requirements:
29
- - - ">="
29
+ - - ~>
30
30
  - !ruby/object:Gem::Version
31
31
  hash: 83
32
32
  segments:
@@ -42,14 +42,16 @@ dependencies:
42
42
  requirement: &id002 !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements:
45
- - - ">="
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
- hash: 27
47
+ hash: 62196469
48
48
  segments:
49
- - 1
50
- - 3
49
+ - 2
50
+ - 0
51
51
  - 0
52
- version: 1.3.0
52
+ - beta
53
+ - 11
54
+ version: 2.0.0.beta.11
53
55
  type: :development
54
56
  version_requirements: *id002
55
57
  - !ruby/object:Gem::Dependency
@@ -58,14 +60,14 @@ dependencies:
58
60
  requirement: &id003 !ruby/object:Gem::Requirement
59
61
  none: false
60
62
  requirements:
61
- - - ">="
63
+ - - ~>
62
64
  - !ruby/object:Gem::Version
63
- hash: 7
65
+ hash: 61
64
66
  segments:
65
67
  - 0
66
- - 7
67
- - 2
68
- version: 0.7.2
68
+ - 8
69
+ - 1
70
+ version: 0.8.1
69
71
  type: :development
70
72
  version_requirements: *id003
71
73
  - !ruby/object:Gem::Dependency
@@ -74,7 +76,7 @@ dependencies:
74
76
  requirement: &id004 !ruby/object:Gem::Requirement
75
77
  none: false
76
78
  requirements:
77
- - - ">="
79
+ - - ~>
78
80
  - !ruby/object:Gem::Version
79
81
  hash: 3
80
82
  segments:
@@ -97,6 +99,7 @@ files:
97
99
  - .gitattributes
98
100
  - .gitignore
99
101
  - .mailmap
102
+ - .rspec
100
103
  - History.txt
101
104
  - LICENSE
102
105
  - README.rdoc
@@ -106,11 +109,13 @@ files:
106
109
  - cucumber.yml
107
110
  - features/escaped_pipes.feature
108
111
  - features/feature_parser.feature
112
+ - features/json_formatter.feature
109
113
  - features/native_lexer.feature
110
114
  - features/parser_with_native_lexer.feature
111
- - features/pretty_printer.feature
115
+ - features/pretty_formatter.feature
112
116
  - features/step_definitions/eyeball_steps.rb
113
117
  - features/step_definitions/gherkin_steps.rb
118
+ - features/step_definitions/json_formatter_steps.rb
114
119
  - features/step_definitions/pretty_formatter_steps.rb
115
120
  - features/steps_parser.feature
116
121
  - features/support/env.rb
@@ -213,6 +218,7 @@ files:
213
218
  - lib/gherkin/formatter/argument.rb
214
219
  - lib/gherkin/formatter/colors.rb
215
220
  - lib/gherkin/formatter/escaping.rb
221
+ - lib/gherkin/formatter/json_formatter.rb
216
222
  - lib/gherkin/formatter/monochrome_format.rb
217
223
  - lib/gherkin/formatter/pretty_formatter.rb
218
224
  - lib/gherkin/i18n.rb
@@ -224,9 +230,12 @@ files:
224
230
  - lib/gherkin/native/null.rb
225
231
  - lib/gherkin/parser/event.rb
226
232
  - lib/gherkin/parser/filter_listener.rb
233
+ - lib/gherkin/parser/formatter_listener.rb
234
+ - lib/gherkin/parser/json_parser.rb
227
235
  - lib/gherkin/parser/meta.txt
228
236
  - lib/gherkin/parser/parser.rb
229
237
  - lib/gherkin/parser/root.txt
238
+ - lib/gherkin/parser/row.rb
230
239
  - lib/gherkin/parser/steps.txt
231
240
  - lib/gherkin/parser/tag_expression.rb
232
241
  - lib/gherkin/rb_lexer.rb
@@ -244,10 +253,10 @@ files:
244
253
  - ragel/lexer.rb.rl.erb
245
254
  - ragel/lexer_common.rl.erb
246
255
  - spec/gherkin/c_lexer_spec.rb
247
- - spec/gherkin/csharp_lexer_spec.rb
248
256
  - spec/gherkin/fixtures/1.feature
249
257
  - spec/gherkin/fixtures/comments_in_table.feature
250
258
  - spec/gherkin/fixtures/complex.feature
259
+ - spec/gherkin/fixtures/complex.js
251
260
  - spec/gherkin/fixtures/dos_line_endings.feature
252
261
  - spec/gherkin/fixtures/i18n_fr.feature
253
262
  - spec/gherkin/fixtures/i18n_no.feature
@@ -263,15 +272,18 @@ files:
263
272
  - spec/gherkin/i18n_lexer_spec.rb
264
273
  - spec/gherkin/i18n_spec.rb
265
274
  - spec/gherkin/java_lexer_spec.rb
275
+ - spec/gherkin/output_stream_string_io.rb
266
276
  - spec/gherkin/parser/filter_listener_spec.rb
277
+ - spec/gherkin/parser/formatter_listener_spec.rb
278
+ - spec/gherkin/parser/json_parser_spec.rb
267
279
  - spec/gherkin/parser/parser_spec.rb
268
280
  - spec/gherkin/parser/tag_expression_spec.rb
269
281
  - spec/gherkin/rb_lexer_spec.rb
270
282
  - spec/gherkin/sexp_recorder.rb
271
- - spec/gherkin/shared/lexer_spec.rb
272
- - spec/gherkin/shared/py_string_spec.rb
273
- - spec/gherkin/shared/row_spec.rb
274
- - spec/gherkin/shared/tags_spec.rb
283
+ - spec/gherkin/shared/lexer_group.rb
284
+ - spec/gherkin/shared/py_string_group.rb
285
+ - spec/gherkin/shared/row_group.rb
286
+ - spec/gherkin/shared/tags_group.rb
275
287
  - spec/spec_helper.rb
276
288
  - tasks/bench.rake
277
289
  - tasks/bench/feature_builder.rb
@@ -321,20 +333,22 @@ specification_version: 3
321
333
  summary: Fast Gherkin lexer/parser
322
334
  test_files:
323
335
  - spec/gherkin/c_lexer_spec.rb
324
- - spec/gherkin/csharp_lexer_spec.rb
325
336
  - spec/gherkin/formatter/argument_spec.rb
326
337
  - spec/gherkin/formatter/colors_spec.rb
327
338
  - spec/gherkin/formatter/pretty_formatter_spec.rb
328
339
  - spec/gherkin/i18n_lexer_spec.rb
329
340
  - spec/gherkin/i18n_spec.rb
330
341
  - spec/gherkin/java_lexer_spec.rb
342
+ - spec/gherkin/output_stream_string_io.rb
331
343
  - spec/gherkin/parser/filter_listener_spec.rb
344
+ - spec/gherkin/parser/formatter_listener_spec.rb
345
+ - spec/gherkin/parser/json_parser_spec.rb
332
346
  - spec/gherkin/parser/parser_spec.rb
333
347
  - spec/gherkin/parser/tag_expression_spec.rb
334
348
  - spec/gherkin/rb_lexer_spec.rb
335
349
  - spec/gherkin/sexp_recorder.rb
336
- - spec/gherkin/shared/lexer_spec.rb
337
- - spec/gherkin/shared/py_string_spec.rb
338
- - spec/gherkin/shared/row_spec.rb
339
- - spec/gherkin/shared/tags_spec.rb
350
+ - spec/gherkin/shared/lexer_group.rb
351
+ - spec/gherkin/shared/py_string_group.rb
352
+ - spec/gherkin/shared/row_group.rb
353
+ - spec/gherkin/shared/tags_group.rb
340
354
  - spec/spec_helper.rb
@@ -1,14 +0,0 @@
1
- Feature: Pretty printer
2
- In order to have pretty gherkin
3
- I want to verify that all prettified cucumber features parse OK
4
-
5
- Scenario: Parse all the features in Cucumber
6
- Given I have Cucumber's home dir defined in CUCUMBER_HOME
7
- When I find all of the .feature files
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
- #
13
- Then the following files should have errors:
14
- | Path | Error |
@@ -1,20 +0,0 @@
1
- #encoding: utf-8
2
- if defined?(RUBY_ENGINE) && RUBY_ENGINE == "ironruby"
3
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
4
-
5
- module Gherkin
6
- module Lexer
7
- describe "C# Lexer" do
8
- before do
9
- @listener = Gherkin::SexpRecorder.new
10
- @lexer = Gherkin::Lexer.csharp['en'].new(@listener)
11
- end
12
-
13
- it_should_behave_like "a Gherkin lexer"
14
- it_should_behave_like "a Gherkin lexer lexing tags"
15
- it_should_behave_like "a Gherkin lexer lexing py_strings"
16
- it_should_behave_like "a Gherkin lexer lexing rows"
17
- end
18
- end
19
- end
20
- end