gherkin 2.11.4-java → 2.11.5-java

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [2.11.5](https://github.com/cucumber/gherkin/compare/v2.11.4...v2.11.5)
2
+
3
+ * [Core] Czech translation cleaned a little bit up. ([#202](https://github.com/cucumber/gherkin/pull/202) Jakub Linhart)
4
+ * [JavaScript] No lexer modules in 2.11.4 NPM package ([#198](https://github.com/cucumber/gherkin/issues/198) Aslak Hellesøy)
5
+
1
6
  ## [2.11.4](https://github.com/cucumber/gherkin/compare/v2.11.3...v2.11.4)
2
7
 
3
8
  * [Core] Support for file encodings different from UTF-8 in feature files. ([#158](https://github.com/cucumber/gherkin/issues/158) Aslak Hellesøy)
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.4</version>
57
+ <version>2.11.5</version>
58
58
  </dependency>
59
59
 
60
60
  You can get it manually from [Maven Central](http://search.maven.org/#browse%7C-2073395818)
@@ -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.4"
18
+ s.version = "2.11.5"
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}"
Binary file
@@ -91,7 +91,7 @@
91
91
  "scenario": "Scénář",
92
92
  "scenario_outline": "Náčrt Scénáře|Osnova scénáře",
93
93
  "examples": "Příklady",
94
- "given": "*|Pokud",
94
+ "given": "*|Pokud|Za předpokladu",
95
95
  "when": "*|Když",
96
96
  "then": "*|Pak",
97
97
  "and": "*|A také|A",
@@ -5,13 +5,20 @@ module Gherkin
5
5
 
6
6
  COMMENT_OR_EMPTY_LINE_PATTERN = /^\s*#|^\s*$/
7
7
  ENCODING_PATTERN = /^\s*#\s*encoding\s*:\s*([0-9a-zA-Z\-]+)/i #:nodoc:
8
+ DEFAULT_ENCODING = 'UTF-8'
8
9
 
9
10
  def read_file(path)
10
11
  source = File.new(path).read
11
12
  enc = encoding(source)
12
- if(enc != 'UTF-8')
13
+ if(enc != DEFAULT_ENCODING)
13
14
  # Read it again with different encoding
14
- source = File.new(path, "r:#{enc}:UTF-8").read
15
+ source = File.new(path, "r:#{enc}:#{DEFAULT_ENCODING}").read
16
+ if source.respond_to?(:encode)
17
+ source = source.encode(DEFAULT_ENCODING)
18
+ else
19
+ require 'iconv'
20
+ source = Iconv.new(DEFAULT_ENCODING, enc).iconv(source)
21
+ end
15
22
  end
16
23
  source
17
24
  end
@@ -19,7 +26,7 @@ module Gherkin
19
26
  private
20
27
 
21
28
  def encoding(source)
22
- encoding = 'UTF-8'
29
+ encoding = DEFAULT_ENCODING
23
30
  source.each_line do |line|
24
31
  break unless COMMENT_OR_EMPTY_LINE_PATTERN =~ line
25
32
  if ENCODING_PATTERN =~ line
@@ -24,6 +24,9 @@ namespace :release do
24
24
 
25
25
  desc 'Push npm package to http://npmjs.org/'
26
26
  task :push_npm_package do
27
+ en_min_js = File.expand_path(File.dirname(__FILE__) + '/../js/lib/gherkin/lexer/en.min.js')
28
+ raise "No #{en_min_js}. Did you set GHERKIN_JS=true in your shell?" unless File.file?(en_min_js)
29
+
27
30
  Dir.chdir('js') do
28
31
  sh("npm publish")
29
32
  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.4
4
+ version: 2.11.5
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: 2012-10-09 00:00:00.000000000 Z
14
+ date: 2012-10-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json
@@ -109,6 +109,22 @@ dependencies:
109
109
  - - ! '>='
110
110
  - !ruby/object:Gem::Version
111
111
  version: 0.9.9
112
+ - !ruby/object:Gem::Dependency
113
+ name: therubyracer
114
+ requirement: !ruby/object:Gem::Requirement
115
+ none: false
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: 0.10.2
120
+ type: :development
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: 0.10.2
112
128
  - !ruby/object:Gem::Dependency
113
129
  name: yard
114
130
  requirement: !ruby/object:Gem::Requirement
@@ -343,7 +359,7 @@ rubyforge_project:
343
359
  rubygems_version: 1.8.24
344
360
  signing_key:
345
361
  specification_version: 3
346
- summary: gherkin-2.11.4
362
+ summary: gherkin-2.11.5
347
363
  test_files:
348
364
  - features/escaped_pipes.feature
349
365
  - features/feature_parser.feature