gherkin 2.11.7-java → 2.11.8-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ cucumber
@@ -0,0 +1 @@
1
+ ruby-1.9.3-p194
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [2.11.8](https://github.com/cucumber/gherkin/compare/v2.11.7...v2.11.8)
2
+
3
+ * [Core] Added Galician (gl) ([#249](https://github.com/cucumber/gherkin/pull/249) son-cativo)
4
+ * [Java, JRuby] Set default i18n when create Parser ([#229](https://github.com/cucumber/gherkin/pull/229) Tomohiko Himura)
5
+ * [Java, JRuby] Filter out code keywords starting with a number: `I18n.code_keywords`. (Aslak Hellesøy)
6
+
1
7
  ## [2.11.7](https://github.com/cucumber/gherkin/compare/v2.11.6...v2.11.7)
2
8
 
3
9
  * [Java, JRuby] Fix ArrayOutOfBoundException in JSONFormatter ([#239](https://github.com/cucumber/gherkin/issues/239) Joseph Hughes)
data/README.md CHANGED
@@ -54,7 +54,7 @@ The jar file is in the central Maven repo.
54
54
  <dependency>
55
55
  <groupId>info.cukes</groupId>
56
56
  <artifactId>gherkin</artifactId>
57
- <version>2.11.7</version>
57
+ <version>2.11.8</version>
58
58
  </dependency>
59
59
 
60
60
  You can get it manually from [Maven Central](http://search.maven.org/#browse%7C-2073395818)
@@ -150,7 +150,7 @@ And you can try it out with node.js:
150
150
 
151
151
  Or the json formatter:
152
152
 
153
- node js/example/json_fomratter_example.js
153
+ node js/example/json_formatter_example.js
154
154
 
155
155
  If you're hacking and just want to rebuild the English parser:
156
156
 
@@ -214,19 +214,17 @@ Now we're ready to install the Windows rubies:
214
214
  unset GHERKIN_JS
215
215
 
216
216
  # 1.9.3
217
- rvm install 1.9.3-p362
218
- rvm use 1.9.3-p362
219
- rvm gemset create cucumber
220
- rvm gemset use cucumber
217
+ rvm install 1.9.3-p392
218
+ rvm use 1.9.3-p392
219
+ rvm gemset use cucumber --create
221
220
  gem install bundler
222
221
  bundle install
223
- PATH=/usr/local/mingw/bin:$PATH CC=/usr/local/mingw/bin/i686-w64-mingw32-gcc rake-compiler cross-ruby VERSION=1.9.3-p362
222
+ PATH=/usr/local/mingw/bin:$PATH CC=/usr/local/mingw/bin/i686-w64-mingw32-gcc rake-compiler cross-ruby VERSION=1.9.3-p392
224
223
 
225
224
  # 1.8.7
226
225
  CC=gcc-4.2 rvm install 1.8.7-p371
227
226
  rvm use 1.8.7-p371
228
- rvm gemset create cucumber
229
- rvm gemset use cucumber
227
+ rvm gemset use cucumber --create
230
228
  gem install bundler
231
229
  bundle install
232
230
  PATH=/usr/local/mingw/bin:$PATH CC=/usr/local/mingw/bin/i686-w64-mingw32-gcc rake-compiler cross-ruby VERSION=1.8.7-p371
@@ -60,14 +60,14 @@ Gem::Specification.new do |s|
60
60
 
61
61
  s.add_runtime_dependency('multi_json', '~> 1.3')
62
62
 
63
- s.add_development_dependency('cucumber', '>= 1.2.1')
63
+ s.add_development_dependency('cucumber', '>= 1.2.5')
64
64
  s.add_development_dependency('rake', '>= 10.0.3')
65
65
  s.add_development_dependency('bundler', '>= 1.2.3') # Make sure it's in sync with /.travis.yml
66
- s.add_development_dependency('rspec', '~> 2.12.0')
66
+ s.add_development_dependency('rspec', '~> 2.13.0')
67
67
  s.add_development_dependency('rubyzip', '>= 0.9.9')
68
68
 
69
69
  unless ENV['RUBY_CC_VERSION'] || Gherkin::JRUBY
70
- s.add_development_dependency('therubyracer', '>= 0.11.2') if ENV['GHERKIN_JS']
70
+ s.add_development_dependency('therubyracer', '>= 0.11.4') if ENV['GHERKIN_JS']
71
71
  # For Documentation:
72
72
  s.add_development_dependency('yard', '>= 0.8.3')
73
73
  s.add_development_dependency('rdiscount', '>= 1.6.8')
@@ -1,7 +1,5 @@
1
1
  #!/bin/sh
2
-
3
2
  mkdir -p /usr/local/mingw
4
- cd /usr/local/mingw
5
- # Don't attempt any of the newer versions - they don't work (gcc 4.7.0)
6
- wget http://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Automated%20Builds/mingw-w32-1.0-bin_i686-darwin_20110819.tar.bz2
7
- tar xvfj mingw-w32-1.0-bin_i686-darwin_20110819.tar.bz2
3
+
4
+ # We need GCC 4.7 in order to build ruby 1.8.7. When we drop support for that we can use a more recent one
5
+ cd /usr/local/mingw && curl --silent --location http://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Automated%20Builds/mingw-w32-1.0-bin_i686-darwin_20120227.tar.bz2 | tar xvj
Binary file
@@ -307,6 +307,20 @@
307
307
  "and": "*|Et",
308
308
  "but": "*|Mais"
309
309
  },
310
+ "gl": {
311
+ "name": "Galician",
312
+ "native": "galego",
313
+ "background": "Contexto",
314
+ "feature": "Característica",
315
+ "scenario": "Escenario",
316
+ "scenario_outline": "Esbozo do escenario",
317
+ "examples": "Exemplos",
318
+ "given": "*|Dado|Dada|Dados|Dadas",
319
+ "when": "*|Cando",
320
+ "then": "*|Entón|Logo",
321
+ "and": "*|E",
322
+ "but": "*|Mais|Pero"
323
+ },
310
324
  "he": {
311
325
  "name": "Hebrew",
312
326
  "native": "עברית",
@@ -131,6 +131,7 @@ module Gherkin
131
131
  def code_keywords
132
132
  result = step_keywords.map{|keyword| self.class.code_keyword_for(keyword)}
133
133
  result.delete('*')
134
+ result.delete_if {|kw| kw =~ /^\d/}
134
135
  result
135
136
  end
136
137
 
@@ -14,9 +14,10 @@ module Gherkin
14
14
  LANGUAGE_PATTERN = /^(\xEF\xBB\xBF)?\s*#\s*language\s*:\s*([a-zA-Z\-]+)/ #:nodoc:
15
15
  attr_reader :i18n_language
16
16
 
17
- def initialize(listener, force_ruby=false)
17
+ def initialize(listener, force_ruby=false, iso_code='en')
18
18
  @listener = listener
19
19
  @force_ruby = force_ruby
20
+ @iso_code = iso_code
20
21
  end
21
22
 
22
23
  def scan(source)
@@ -31,7 +32,7 @@ module Gherkin
31
32
  end
32
33
 
33
34
  def lang(source)
34
- key = 'en'
35
+ key = @iso_code
35
36
  source.each_line do |line|
36
37
  break unless COMMENT_OR_EMPTY_LINE_PATTERN =~ line
37
38
  if LANGUAGE_PATTERN =~ line
@@ -15,13 +15,13 @@ module Gherkin
15
15
  native_impl('gherkin')
16
16
 
17
17
  # Initialize the parser. +machine_name+ refers to a state machine table.
18
- def initialize(formatter, raise_on_error=true, machine_name='root', force_ruby=false)
18
+ def initialize(formatter, raise_on_error=true, machine_name='root', force_ruby=false, iso_code = 'en')
19
19
  @formatter = formatter
20
20
  @listener = Listener::FormatterListener.new(@formatter)
21
21
  @raise_on_error = raise_on_error
22
22
  @machine_name = machine_name
23
23
  @machines = []
24
- @lexer = Gherkin::Lexer::I18nLexer.new(self, force_ruby)
24
+ @lexer = Gherkin::Lexer::I18nLexer.new(self, force_ruby, iso_code)
25
25
  end
26
26
 
27
27
  def parse(gherkin, feature_uri, line_offset)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Gherkin
4
4
  unless defined?(Gherkin::VERSION)
5
- VERSION = '2.11.7'
5
+ VERSION = '2.11.8'
6
6
  JRUBY = defined?(JRUBY_VERSION)
7
7
 
8
8
  if !JRUBY && !(RUBY_VERSION =~ /^(1\.8\.7|1\.9\.3|2\.0)/)
@@ -189,6 +189,7 @@ module Gherkin
189
189
  | fa | Persian | فارسی |
190
190
  | fi | Finnish | suomi |
191
191
  | fr | French | français |
192
+ | gl | Galician | galego |
192
193
  | he | Hebrew | עברית |
193
194
  | hi | Hindi | हिंदी |
194
195
  | hr | Croatian | hrvatski |
@@ -241,6 +242,11 @@ module Gherkin
241
242
  | but (code) | "Mais" |
242
243
  }
243
244
  end
245
+
246
+ it "should not list keywords that start with a number" do
247
+ Gherkin::I18n.get('en-old').code_keywords.should include("Ðaðe")
248
+ Gherkin::I18n.get('en-old').code_keywords.should_not include("7")
249
+ end
244
250
  end
245
251
  end
246
252
  end
@@ -4,39 +4,57 @@ require 'spec_helper'
4
4
  module Gherkin
5
5
  module Lexer
6
6
  describe I18nLexer do
7
- before do
8
- @lexer = Gherkin::Lexer::I18nLexer.new(Gherkin::SexpRecorder.new, false)
9
- end
7
+ context "when default ios_code is 'en'" do
8
+ before do
9
+ @lexer = Gherkin::Lexer::I18nLexer.new(Gherkin::SexpRecorder.new, false)
10
+ end
10
11
 
11
- it "should store the i18n language of the last scanned feature" do
12
- @lexer.scan("# language: fr\n")
13
- @lexer.i18n_language.iso_code.should == "fr"
14
- @lexer.scan("# language: no\n")
15
- @lexer.i18n_language.iso_code.should == "no"
16
- end
12
+ it "should store the i18n language of the last scanned feature" do
13
+ @lexer.scan("# language: fr\n")
14
+ @lexer.i18n_language.iso_code.should == "fr"
15
+ @lexer.scan("# language: no\n")
16
+ @lexer.i18n_language.iso_code.should == "no"
17
+ end
17
18
 
18
- it "should detect language when there are spaces and CRLF" do
19
- @lexer.scan("# language: da \r\n")
20
- @lexer.i18n_language.iso_code.should == "da"
21
- end
19
+ it "should detect language when there are spaces and CRLF" do
20
+ @lexer.scan("# language: da \r\n")
21
+ @lexer.i18n_language.iso_code.should == "da"
22
+ end
22
23
 
23
- it "should detect language when the language comment is not the first line" do
24
- @lexer.scan("# hello\n# language: no\n")
25
- @lexer.i18n_language.iso_code.should == "no"
26
- end
24
+ it "should detect language when the language comment is not the first line" do
25
+ @lexer.scan("# hello\n# language: no\n")
26
+ @lexer.i18n_language.iso_code.should == "no"
27
+ end
27
28
 
28
- it "should detect language when the language is on the third line, and there are empty lines above" do
29
- @lexer.scan("# hello\n\n# language: no\n")
30
- @lexer.i18n_language.iso_code.should == "no"
31
- end
29
+ it "should detect language when the language is on the third line, and there are empty lines above" do
30
+ @lexer.scan("# hello\n\n# language: no\n")
31
+ @lexer.i18n_language.iso_code.should == "no"
32
+ end
33
+
34
+ it "should use English i18n by default" do
35
+ @lexer.scan("Feature: foo\n")
36
+ @lexer.i18n_language.iso_code.should == "en"
37
+ end
32
38
 
33
- it "should use English i18n by default" do
34
- @lexer.scan("Feature: foo\n")
35
- @lexer.i18n_language.iso_code.should == "en"
39
+ it "should === its ruby class, even when the impl is Java" do
40
+ Gherkin::Lexer::I18nLexer.should === Gherkin::Lexer::I18nLexer.new(Gherkin::SexpRecorder.new, true)
41
+ end
36
42
  end
37
43
 
38
- it "should === its ruby class, even when the impl is Java" do
39
- Gherkin::Lexer::I18nLexer.should === Gherkin::Lexer::I18nLexer.new(Gherkin::SexpRecorder.new, true)
44
+ context "when default ios_code is 'ja'" do
45
+ before do
46
+ @lexer = Gherkin::Lexer::I18nLexer.new(Gherkin::SexpRecorder.new, false, 'ja')
47
+ end
48
+
49
+ it "should store the i18n language of the last scanned feature" do
50
+ @lexer.scan("# language: en")
51
+ @lexer.i18n_language.iso_code.should == "en"
52
+ end
53
+
54
+ it "should use Japanese" do
55
+ @lexer.scan("機能: foo\n")
56
+ @lexer.i18n_language.iso_code.should == "ja"
57
+ end
40
58
  end
41
59
  end
42
60
  end
@@ -22,14 +22,16 @@ class RagelTask
22
22
  def define_tasks
23
23
  deps = [lang_ragel, common_ragel]
24
24
  deps.unshift(UGLIFYJS) if(@lang == 'js')
25
+ sed = Config::CONFIG['host_os'] =~ /linux/i ? "sed -i" : "sed -i ''"
25
26
 
26
27
  min_target = target.gsub(/\.js$/, '.min.js')
27
28
  file target => deps do
28
29
  mkdir_p(File.dirname(target)) unless File.directory?(File.dirname(target))
29
30
  sh "ragel #{flags} #{lang_ragel} -o #{target}"
31
+ # Remove absolute paths from ragel-generated sources
32
+ sh %{#{sed} "s|#{Dir.pwd}/tasks/../||" #{target}}
30
33
  if(@lang == 'js')
31
34
  # 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
- sed = Config::CONFIG['host_os'] =~ /linux/i ? "sed -i" : "sed -i ''"
33
35
  sh %{#{sed} 's/ESCAPED_TRIPLE_QUOTE/\\\\\\\\\\\\"\\\\\\\\\\\\"\\\\\\\\\\\\"/' #{target}}
34
36
  sh %{#{sed} 's/const/var/' #{target}}
35
37
 
@@ -1,6 +1,9 @@
1
1
  require 'rspec/core/rake_task'
2
2
 
3
3
  desc "Run RSpec"
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ desc "Run RSpec with RCov"
4
7
  RSpec::Core::RakeTask.new(:rcov) do |t|
5
8
  t.rcov = true
6
9
  t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/}
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.7
4
+ version: 2.11.8
5
5
  prerelease:
6
6
  platform: java
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-04-05 00:00:00.000000000 Z
14
+ date: 2013-04-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: multi_json
@@ -36,7 +36,7 @@ dependencies:
36
36
  requirements:
37
37
  - - ! '>='
38
38
  - !ruby/object:Gem::Version
39
- version: 1.2.1
39
+ version: 1.2.5
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
@@ -44,7 +44,7 @@ dependencies:
44
44
  requirements:
45
45
  - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
- version: 1.2.1
47
+ version: 1.2.5
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rake
50
50
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +84,7 @@ dependencies:
84
84
  requirements:
85
85
  - - ~>
86
86
  - !ruby/object:Gem::Version
87
- version: 2.12.0
87
+ version: 2.13.0
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: 2.12.0
95
+ version: 2.13.0
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: rubyzip
98
98
  requirement: !ruby/object:Gem::Requirement
@@ -116,7 +116,7 @@ dependencies:
116
116
  requirements:
117
117
  - - ! '>='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.11.2
119
+ version: 0.11.4
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
@@ -124,7 +124,7 @@ dependencies:
124
124
  requirements:
125
125
  - - ! '>='
126
126
  - !ruby/object:Gem::Version
127
- version: 0.11.2
127
+ version: 0.11.4
128
128
  - !ruby/object:Gem::Dependency
129
129
  name: yard
130
130
  requirement: !ruby/object:Gem::Requirement
@@ -199,7 +199,8 @@ files:
199
199
  - .mailmap
200
200
  - .rbenv-gemsets
201
201
  - .rspec
202
- - .rvmrc
202
+ - .ruby-gemset
203
+ - .ruby-version
203
204
  - .travis.yml
204
205
  - .yardopts
205
206
  - Gemfile
@@ -361,6 +362,70 @@ rubyforge_project:
361
362
  rubygems_version: 1.8.25
362
363
  signing_key:
363
364
  specification_version: 3
364
- summary: gherkin-2.11.7
365
- test_files: []
365
+ summary: gherkin-2.11.8
366
+ test_files:
367
+ - features/escaped_pipes.feature
368
+ - features/feature_parser.feature
369
+ - features/json_formatter.feature
370
+ - features/json_parser.feature
371
+ - features/native_lexer.feature
372
+ - features/parser_with_native_lexer.feature
373
+ - features/pretty_formatter.feature
374
+ - features/step_definitions/eyeball_steps.rb
375
+ - features/step_definitions/gherkin_steps.rb
376
+ - features/step_definitions/json_formatter_steps.rb
377
+ - features/step_definitions/json_parser_steps.rb
378
+ - features/step_definitions/pretty_formatter_steps.rb
379
+ - features/steps_parser.feature
380
+ - features/support/env.rb
381
+ - spec/gherkin/c_lexer_spec.rb
382
+ - spec/gherkin/fixtures/1.feature
383
+ - spec/gherkin/fixtures/comments_in_table.feature
384
+ - spec/gherkin/fixtures/complex.feature
385
+ - spec/gherkin/fixtures/complex.json
386
+ - spec/gherkin/fixtures/complex_for_filtering.feature
387
+ - spec/gherkin/fixtures/complex_with_tags.feature
388
+ - spec/gherkin/fixtures/dos_line_endings.feature
389
+ - spec/gherkin/fixtures/examples_with_only_header.feature
390
+ - spec/gherkin/fixtures/hantu_pisang.feature
391
+ - spec/gherkin/fixtures/i18n_fr.feature
392
+ - spec/gherkin/fixtures/i18n_fr2.feature
393
+ - spec/gherkin/fixtures/i18n_no.feature
394
+ - spec/gherkin/fixtures/i18n_pt1.feature
395
+ - spec/gherkin/fixtures/i18n_pt2.feature
396
+ - spec/gherkin/fixtures/i18n_pt3.feature
397
+ - spec/gherkin/fixtures/i18n_pt4.feature
398
+ - spec/gherkin/fixtures/i18n_zh-CN.feature
399
+ - spec/gherkin/fixtures/iso-8859-1.feature
400
+ - spec/gherkin/fixtures/issue_145.feature
401
+ - spec/gherkin/fixtures/scenario_outline_with_tags.feature
402
+ - spec/gherkin/fixtures/scenario_without_steps.feature
403
+ - spec/gherkin/fixtures/simple_with_comments.feature
404
+ - spec/gherkin/fixtures/simple_with_tags.feature
405
+ - spec/gherkin/fixtures/with_bom.feature
406
+ - spec/gherkin/fixtures/with_bom_and_language_spec.feature
407
+ - spec/gherkin/formatter/ansi_escapes_spec.rb
408
+ - spec/gherkin/formatter/filter_formatter_spec.rb
409
+ - spec/gherkin/formatter/json_formatter_spec.rb
410
+ - spec/gherkin/formatter/model_spec.rb
411
+ - spec/gherkin/formatter/pretty_formatter_spec.rb
412
+ - spec/gherkin/formatter/spaces.feature
413
+ - spec/gherkin/formatter/step_printer_spec.rb
414
+ - spec/gherkin/formatter/tabs.feature
415
+ - spec/gherkin/formatter/tag_count_formatter_spec.rb
416
+ - spec/gherkin/i18n_spec.rb
417
+ - spec/gherkin/java_lexer_spec.rb
418
+ - spec/gherkin/json_parser_spec.rb
419
+ - spec/gherkin/lexer/i18n_lexer_spec.rb
420
+ - spec/gherkin/native_lexer_spec.rb
421
+ - spec/gherkin/parser/parser_spec.rb
422
+ - spec/gherkin/rubify_spec.rb
423
+ - spec/gherkin/sexp_recorder.rb
424
+ - spec/gherkin/shared/doc_string_group.rb
425
+ - spec/gherkin/shared/encoding_group.rb
426
+ - spec/gherkin/shared/lexer_group.rb
427
+ - spec/gherkin/shared/row_group.rb
428
+ - spec/gherkin/shared/tags_group.rb
429
+ - spec/gherkin/tag_expression_spec.rb
430
+ - spec/spec_helper.rb
366
431
  has_rdoc:
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm gemset use cucumber