gherkin 2.11.2 → 2.11.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/.travis.yml +1 -0
  2. data/History.md +9 -0
  3. data/README.md +2 -1
  4. data/ext/gherkin_lexer_ar/gherkin_lexer_ar.c +8 -8
  5. data/ext/gherkin_lexer_bg/gherkin_lexer_bg.c +8 -8
  6. data/ext/gherkin_lexer_bm/gherkin_lexer_bm.c +8 -8
  7. data/ext/gherkin_lexer_ca/gherkin_lexer_ca.c +8 -8
  8. data/ext/gherkin_lexer_cs/gherkin_lexer_cs.c +8 -8
  9. data/ext/gherkin_lexer_cy_gb/gherkin_lexer_cy_gb.c +8 -8
  10. data/ext/gherkin_lexer_da/gherkin_lexer_da.c +8 -8
  11. data/ext/gherkin_lexer_de/gherkin_lexer_de.c +8 -8
  12. data/ext/gherkin_lexer_en/gherkin_lexer_en.c +8 -8
  13. data/ext/gherkin_lexer_en_au/gherkin_lexer_en_au.c +915 -373
  14. data/ext/gherkin_lexer_en_lol/gherkin_lexer_en_lol.c +8 -8
  15. data/ext/gherkin_lexer_en_pirate/gherkin_lexer_en_pirate.c +8 -8
  16. data/ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.c +8 -8
  17. data/ext/gherkin_lexer_en_tx/gherkin_lexer_en_tx.c +8 -8
  18. data/ext/gherkin_lexer_eo/gherkin_lexer_eo.c +8 -8
  19. data/ext/gherkin_lexer_es/gherkin_lexer_es.c +8 -8
  20. data/ext/gherkin_lexer_et/gherkin_lexer_et.c +8 -8
  21. data/ext/gherkin_lexer_fi/gherkin_lexer_fi.c +8 -8
  22. data/ext/gherkin_lexer_fr/gherkin_lexer_fr.c +8 -8
  23. data/ext/gherkin_lexer_he/gherkin_lexer_he.c +8 -8
  24. data/ext/gherkin_lexer_hr/gherkin_lexer_hr.c +8 -8
  25. data/ext/gherkin_lexer_hu/gherkin_lexer_hu.c +8 -8
  26. data/ext/gherkin_lexer_id/gherkin_lexer_id.c +8 -8
  27. data/ext/gherkin_lexer_is/gherkin_lexer_is.c +8 -8
  28. data/ext/gherkin_lexer_it/gherkin_lexer_it.c +8 -8
  29. data/ext/gherkin_lexer_ja/gherkin_lexer_ja.c +8 -8
  30. data/ext/gherkin_lexer_ko/gherkin_lexer_ko.c +8 -8
  31. data/ext/gherkin_lexer_lt/gherkin_lexer_lt.c +8 -8
  32. data/ext/gherkin_lexer_lu/gherkin_lexer_lu.c +8 -8
  33. data/ext/gherkin_lexer_lv/gherkin_lexer_lv.c +8 -8
  34. data/ext/gherkin_lexer_nl/gherkin_lexer_nl.c +8 -8
  35. data/ext/gherkin_lexer_no/gherkin_lexer_no.c +8 -8
  36. data/ext/gherkin_lexer_pl/gherkin_lexer_pl.c +8 -8
  37. data/ext/gherkin_lexer_pt/gherkin_lexer_pt.c +8 -8
  38. data/ext/gherkin_lexer_ro/gherkin_lexer_ro.c +8 -8
  39. data/ext/gherkin_lexer_ru/gherkin_lexer_ru.c +8 -8
  40. data/ext/gherkin_lexer_sk/gherkin_lexer_sk.c +8 -8
  41. data/ext/gherkin_lexer_sr_cyrl/gherkin_lexer_sr_cyrl.c +8 -8
  42. data/ext/gherkin_lexer_sr_latn/gherkin_lexer_sr_latn.c +8 -8
  43. data/ext/gherkin_lexer_sv/gherkin_lexer_sv.c +8 -8
  44. data/ext/gherkin_lexer_tr/gherkin_lexer_tr.c +8 -8
  45. data/ext/gherkin_lexer_uk/gherkin_lexer_uk.c +8 -8
  46. data/ext/gherkin_lexer_uz/gherkin_lexer_uz.c +8 -8
  47. data/ext/gherkin_lexer_vi/gherkin_lexer_vi.c +8 -8
  48. data/ext/gherkin_lexer_zh_cn/gherkin_lexer_zh_cn.c +8 -8
  49. data/ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c +8 -8
  50. data/gherkin.gemspec +4 -4
  51. data/lib/gherkin/i18n.json +10 -10
  52. data/lib/gherkin/i18n.rb +1 -1
  53. data/ragel/lexer.c.rl.erb +5 -5
  54. data/tasks/apidoc.rake +32 -0
  55. data/tasks/ikvm.rake +1 -1
  56. data/tasks/ragel_task.rb +1 -0
  57. data/tasks/release.rake +1 -19
  58. metadata +10 -10
  59. data/tasks/yard.rake +0 -7
@@ -745,7 +745,7 @@ static VALUE
745
745
  unindent(VALUE con, int start_col)
746
746
  {
747
747
  VALUE re;
748
- // Gherkin will crash gracefully if the string representation of start_col pushes the pattern past 32 characters
748
+ /* Gherkin will crash gracefully if the string representation of start_col pushes the pattern past 32 characters */
749
749
  char pat[32];
750
750
  snprintf(pat, 32, "^[\t ]{0,%d}", start_col);
751
751
  re = rb_reg_regcomp(rb_str_new2(pat));
@@ -1176,14 +1176,14 @@ _match:
1176
1176
  buff = data;
1177
1177
  }
1178
1178
 
1179
- // Allocate as a ruby string so that it gets cleaned up by GC
1179
+ /* Allocate as a ruby string so that it gets cleaned up by GC */
1180
1180
  newstr_val = rb_str_new(buff, len);
1181
1181
  newstr = RSTRING_PTR(newstr_val);
1182
1182
 
1183
1183
 
1184
1184
  for (count = 0; count < len; count++) {
1185
1185
  if(buff[count] == 10) {
1186
- newstr[newstr_count] = '\0'; // terminate new string at first newline found
1186
+ newstr[newstr_count] = '\0'; /* terminate new string at first newline found */
1187
1187
  break;
1188
1188
  } else {
1189
1189
  if (buff[count] == '%') {
@@ -1197,7 +1197,7 @@ _match:
1197
1197
  }
1198
1198
 
1199
1199
  line = lexer->line_number;
1200
- lexer_init(lexer); // Re-initialize so we can scan again with the same lexer
1200
+ lexer_init(lexer); /* Re-initialize so we can scan again with the same lexer */
1201
1201
  raise_lexer_error(newstr, line);
1202
1202
  } else {
1203
1203
  rb_funcall(listener, rb_intern("eof"), 0);
@@ -1239,14 +1239,14 @@ _again:
1239
1239
  buff = data;
1240
1240
  }
1241
1241
 
1242
- // Allocate as a ruby string so that it gets cleaned up by GC
1242
+ /* Allocate as a ruby string so that it gets cleaned up by GC */
1243
1243
  newstr_val = rb_str_new(buff, len);
1244
1244
  newstr = RSTRING_PTR(newstr_val);
1245
1245
 
1246
1246
 
1247
1247
  for (count = 0; count < len; count++) {
1248
1248
  if(buff[count] == 10) {
1249
- newstr[newstr_count] = '\0'; // terminate new string at first newline found
1249
+ newstr[newstr_count] = '\0'; /* terminate new string at first newline found */
1250
1250
  break;
1251
1251
  } else {
1252
1252
  if (buff[count] == '%') {
@@ -1260,7 +1260,7 @@ _again:
1260
1260
  }
1261
1261
 
1262
1262
  line = lexer->line_number;
1263
- lexer_init(lexer); // Re-initialize so we can scan again with the same lexer
1263
+ lexer_init(lexer); /* Re-initialize so we can scan again with the same lexer */
1264
1264
  raise_lexer_error(newstr, line);
1265
1265
  } else {
1266
1266
  rb_funcall(listener, rb_intern("eof"), 0);
@@ -1281,7 +1281,7 @@ _again:
1281
1281
  assert(lexer->content_start <= len && "content starts after data end");
1282
1282
  assert(lexer->mark < len && "mark is after data end");
1283
1283
 
1284
- // Reset lexer by re-initializing the whole thing
1284
+ /* Reset lexer by re-initializing the whole thing */
1285
1285
  lexer_init(lexer);
1286
1286
 
1287
1287
  if (cs == lexer_error) {
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  # When both are building OK, do a `bundle exec rake install` in both cucumber and gherkin projects, revert the changes in the first 2 steps
16
16
  # and release both projects. Do this for both ruby 1.8.7, ruby 1.9.3 and jruby.
17
17
  #
18
- s.version = "2.11.2"
18
+ s.version = "2.11.3"
19
19
  s.authors = ["Mike Sassak", "Gregory Hnatiuk", "Aslak Hellesøy"]
20
20
  s.description = "A fast Gherkin lexer/parser based on the Ragel State Machine Compiler."
21
21
  s.summary = "#{s.name}-#{s.version}"
@@ -52,7 +52,7 @@ Gem::Specification.new do |s|
52
52
  s.files += Dir['lib/gherkin/rb_lexer/*.rb']
53
53
  s.files += Dir['ext/**/*.c']
54
54
  s.extensions = Dir['ext/**/extconf.rb']
55
- s.add_development_dependency('rake-compiler', '>= 0.8.0')
55
+ s.add_development_dependency('rake-compiler', '>= 0.8.1')
56
56
  end
57
57
  s.files -= Dir['**/.gitignore']
58
58
 
@@ -60,7 +60,7 @@ Gem::Specification.new do |s|
60
60
 
61
61
  s.add_development_dependency('cucumber', '>= 1.2.1')
62
62
  s.add_development_dependency('rake', '>= 0.9.2')
63
- s.add_development_dependency('bundler', '>= 1.1.5')
63
+ s.add_development_dependency('bundler', '>= 1.2.1') # Make sure it's in sync with /.travis.yml
64
64
  s.add_development_dependency('rspec', '~> 2.11.0')
65
65
  s.add_development_dependency('rubyzip', '>= 0.9.9')
66
66
 
@@ -73,5 +73,5 @@ Gem::Specification.new do |s|
73
73
 
74
74
  # Only needed by Cucumber. Remove when Cucumber no longer needs those.
75
75
  s.add_development_dependency('term-ansicolor', '>= 1.0.7')
76
- s.add_development_dependency('builder', '>= 2.1.2')
76
+ s.add_development_dependency('builder', '>= 3.1.3')
77
77
  end
@@ -128,16 +128,16 @@
128
128
  "en-au": {
129
129
  "name": "Australian",
130
130
  "native": "Australian",
131
- "feature": "Crikey",
132
- "background": "Background",
133
- "scenario": "Mate",
134
- "scenario_outline": "Blokes",
135
- "examples": "Cobber",
136
- "given": "*|Ya know how",
137
- "when": "*|When",
138
- "then": "*|Ya gotta",
139
- "and": "*|N",
140
- "but": "*|Cept"
131
+ "feature": "Pretty much",
132
+ "background": "First off",
133
+ "scenario": "Awww, look mate",
134
+ "scenario_outline": "Reckon it's like",
135
+ "examples": "You'll wanna",
136
+ "given": "*|Y'know",
137
+ "when": "*|It's just unbelievable",
138
+ "then": "*|But at the end of the day I reckon",
139
+ "and": "*|Too right",
140
+ "but": "*|Yeah nah"
141
141
  },
142
142
  "en-lol": {
143
143
  "name": "LOLCAT",
@@ -11,7 +11,7 @@ module Gherkin
11
11
  FEATURE_ELEMENT_KEYS = %w{feature background scenario scenario_outline examples}
12
12
  STEP_KEYWORD_KEYS = %w{given when then and but}
13
13
  KEYWORD_KEYS = FEATURE_ELEMENT_KEYS + STEP_KEYWORD_KEYS
14
- LANGUAGES = JSON.parse(IO.read(File.dirname(__FILE__) + '/i18n.json'))
14
+ LANGUAGES = JSON.parse(File.open(File.dirname(__FILE__) + '/i18n.json', 'r:utf-8').read)
15
15
 
16
16
  class << self
17
17
  include Rubify
@@ -221,14 +221,14 @@ static VALUE rb_eGherkinLexingError;
221
221
  buff = data;
222
222
  }
223
223
 
224
- // Allocate as a ruby string so that it gets cleaned up by GC
224
+ /* Allocate as a ruby string so that it gets cleaned up by GC */
225
225
  newstr_val = rb_str_new(buff, len);
226
226
  newstr = RSTRING_PTR(newstr_val);
227
227
 
228
228
 
229
229
  for (count = 0; count < len; count++) {
230
230
  if(buff[count] == 10) {
231
- newstr[newstr_count] = '\0'; // terminate new string at first newline found
231
+ newstr[newstr_count] = '\0'; /* terminate new string at first newline found */
232
232
  break;
233
233
  } else {
234
234
  if (buff[count] == '%') {
@@ -242,7 +242,7 @@ static VALUE rb_eGherkinLexingError;
242
242
  }
243
243
 
244
244
  line = lexer->line_number;
245
- lexer_init(lexer); // Re-initialize so we can scan again with the same lexer
245
+ lexer_init(lexer); /* Re-initialize so we can scan again with the same lexer */
246
246
  raise_lexer_error(newstr, line);
247
247
  } else {
248
248
  rb_funcall(listener, rb_intern("eof"), 0);
@@ -260,7 +260,7 @@ static VALUE
260
260
  unindent(VALUE con, int start_col)
261
261
  {
262
262
  VALUE re;
263
- // Gherkin will crash gracefully if the string representation of start_col pushes the pattern past 32 characters
263
+ /* Gherkin will crash gracefully if the string representation of start_col pushes the pattern past 32 characters */
264
264
  char pat[32];
265
265
  snprintf(pat, 32, "^[\t ]{0,%d}", start_col);
266
266
  re = rb_reg_regcomp(rb_str_new2(pat));
@@ -428,7 +428,7 @@ static VALUE CLexer_scan(VALUE self, VALUE input)
428
428
  assert(lexer->content_start <= len && "content starts after data end");
429
429
  assert(lexer->mark < len && "mark is after data end");
430
430
 
431
- // Reset lexer by re-initializing the whole thing
431
+ /* Reset lexer by re-initializing the whole thing */
432
432
  lexer_init(lexer);
433
433
 
434
434
  if (cs == lexer_error) {
@@ -0,0 +1,32 @@
1
+ unless ENV['RUBY_CC_VERSION'] || defined?(JRUBY_VERSION)
2
+ require 'yard'
3
+ require 'yard/rake/yardoc_task'
4
+
5
+ SITE_DIR = File.expand_path(File.dirname(__FILE__) + '/../../cucumber.github.com')
6
+ API_DIR = File.join(SITE_DIR, 'api', 'gherkin', GHERKIN_VERSION)
7
+
8
+ namespace :api do
9
+ file :dir do
10
+ raise "You need to git clone git@github.com:cucumber/cucumber.github.com.git #{SITE_DIR}" unless File.directory?(SITE_DIR)
11
+ mkdir_p API_DIR
12
+ end
13
+
14
+ YARD::Templates::Engine.register_template_path(File.expand_path(File.join(File.dirname(__FILE__), 'yard')))
15
+ YARD::Rake::YardocTask.new(:yard) do |yard|
16
+ dir = File.join(API_DIR, 'ruby')
17
+ mkdir_p dir
18
+ yard.options = ["--out", dir]
19
+ end
20
+ task :yard => :dir
21
+
22
+ task :mvn_javadoc => :dir do
23
+ Dir.chdir('java') do
24
+ sh("mvn javadoc:javadoc")
25
+ dir = File.join(API_DIR, 'java')
26
+ mv 'target/site/apidocs', dir
27
+ end
28
+ end
29
+
30
+ task :doc => [:mvn_javadoc, :yard]
31
+ end
32
+ end
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  namespace :ikvm do
4
- IKVM_VERSION = '0.46.0.1'
4
+ IKVM_VERSION = '7.1.4532.2'
5
5
  IKVM_DIR = "ikvm/ikvm-#{IKVM_VERSION}"
6
6
  IKVM_ZIP = "ikvm/ikvmbin-#{IKVM_VERSION}.zip"
7
7
  CLOBBER.include(IKVM_DIR, IKVM_ZIP)
@@ -31,6 +31,7 @@ class RagelTask
31
31
  # Ragel chokes if we put the escaped triple quotes in .rl, so we'll do the replace with sed after the fact. Lots of backslashes!!
32
32
  sed = Config::CONFIG['host_os'] =~ /linux/i ? "sed -i" : "sed -i ''"
33
33
  sh %{#{sed} 's/ESCAPED_TRIPLE_QUOTE/\\\\\\\\\\\\"\\\\\\\\\\\\"\\\\\\\\\\\\"/' #{target}}
34
+ sh %{#{sed} 's/const/var/' #{target}}
34
35
 
35
36
  # Minify
36
37
  sh %{node #{UGLIFYJS} #{target} > #{min_target}}
@@ -1,6 +1,6 @@
1
1
  namespace :release do
2
2
  desc 'Upload all packages and tag git'
3
- task :ALL => ['gems:sanity', 'ikvm:check', :mvn_deploy_jar, :mvn_deploy_site, :push_native_gems, :push_npm_package, 'ikvm:push', :release, :push_yard, :symlink_docs, :post_release]
3
+ task :ALL => ['gems:sanity', 'ikvm:check', :mvn_deploy_jar, :push_native_gems, :push_npm_package, 'ikvm:push', :release, 'api:doc', :post_release]
4
4
 
5
5
  desc 'Push all gems to rubygems.org'
6
6
  task :push_native_gems do
@@ -22,28 +22,10 @@ namespace :release do
22
22
  end
23
23
  end
24
24
 
25
- desc 'Push javadocs to cukes.info'
26
- task :mvn_deploy_site do
27
- Dir.chdir('java') do
28
- sh("mvn site:site site:deploy")
29
- end
30
- end
31
-
32
25
  desc 'Push npm package to http://npmjs.org/'
33
26
  task :push_npm_package do
34
27
  Dir.chdir('js') do
35
28
  sh("npm publish")
36
29
  end
37
30
  end
38
-
39
- desc 'Push yardoc to http://cukes.info/gherkin/api/#{GHERKIN_VERSION}'
40
- task :push_yard => :yard do
41
- sh("tar czf release/api-#{GHERKIN_VERSION}.tgz -C doc .")
42
- sh("scp release/api-#{GHERKIN_VERSION}.tgz cukes.info:/var/www/gherkin/api/ruby")
43
- end
44
-
45
- task :symlink_docs do
46
- sh("ssh cukes.info 'cd /var/www/gherkin/api/ruby && mkdir #{GHERKIN_VERSION} && tar xzf api-#{GHERKIN_VERSION}.tgz -C #{GHERKIN_VERSION} && rm -f latest && ln -s #{GHERKIN_VERSION} latest'")
47
- sh("ssh cukes.info 'cd /var/www/gherkin/api/java && rm -f latest && ln -s #{GHERKIN_VERSION} latest'")
48
- end
49
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gherkin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.2
4
+ version: 2.11.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-08-17 00:00:00.000000000 Z
14
+ date: 2012-10-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake-compiler
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ! '>='
22
22
  - !ruby/object:Gem::Version
23
- version: 0.8.0
23
+ version: 0.8.1
24
24
  type: :development
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,7 +28,7 @@ dependencies:
28
28
  requirements:
29
29
  - - ! '>='
30
30
  - !ruby/object:Gem::Version
31
- version: 0.8.0
31
+ version: 0.8.1
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: json
34
34
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +84,7 @@ dependencies:
84
84
  requirements:
85
85
  - - ! '>='
86
86
  - !ruby/object:Gem::Version
87
- version: 1.1.5
87
+ version: 1.2.1
88
88
  type: :development
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
@@ -92,7 +92,7 @@ dependencies:
92
92
  requirements:
93
93
  - - ! '>='
94
94
  - !ruby/object:Gem::Version
95
- version: 1.1.5
95
+ version: 1.2.1
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: rspec
98
98
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +196,7 @@ dependencies:
196
196
  requirements:
197
197
  - - ! '>='
198
198
  - !ruby/object:Gem::Version
199
- version: 2.1.2
199
+ version: 3.1.3
200
200
  type: :development
201
201
  prerelease: false
202
202
  version_requirements: !ruby/object:Gem::Requirement
@@ -204,7 +204,7 @@ dependencies:
204
204
  requirements:
205
205
  - - ! '>='
206
206
  - !ruby/object:Gem::Version
207
- version: 2.1.2
207
+ version: 3.1.3
208
208
  description: A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
209
209
  email: cukes@googlegroups.com
210
210
  executables: []
@@ -376,6 +376,7 @@ files:
376
376
  - spec/gherkin/shared/tags_group.rb
377
377
  - spec/gherkin/tag_expression_spec.rb
378
378
  - spec/spec_helper.rb
379
+ - tasks/apidoc.rake
379
380
  - tasks/bench.rake
380
381
  - tasks/bench/feature_builder.rb
381
382
  - tasks/bench/null_listener.rb
@@ -386,7 +387,6 @@ files:
386
387
  - tasks/ragel_task.rb
387
388
  - tasks/release.rake
388
389
  - tasks/rspec.rake
389
- - tasks/yard.rake
390
390
  - tasks/yard/default/layout/html/bubble_32x32.png
391
391
  - tasks/yard/default/layout/html/bubble_48x48.png
392
392
  - tasks/yard/default/layout/html/footer.erb
@@ -510,7 +510,7 @@ rubyforge_project:
510
510
  rubygems_version: 1.8.24
511
511
  signing_key:
512
512
  specification_version: 3
513
- summary: gherkin-2.11.2
513
+ summary: gherkin-2.11.3
514
514
  test_files:
515
515
  - features/escaped_pipes.feature
516
516
  - features/feature_parser.feature
@@ -1,7 +0,0 @@
1
- unless ENV['RUBY_CC_VERSION'] || defined?(JRUBY_VERSION)
2
- require 'yard'
3
- require 'yard/rake/yardoc_task'
4
-
5
- YARD::Templates::Engine.register_template_path(File.expand_path(File.join(File.dirname(__FILE__), 'yard')))
6
- YARD::Rake::YardocTask.new(:yard)
7
- end