gherkin 2.6.6 → 2.6.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +6 -0
- data/README.md +10 -8
- data/examples/parse_and_output_json.rb +19 -0
- data/gherkin.gemspec +2 -1
- data/tasks/gems.rake +1 -1
- data/tasks/ikvm.rake +14 -2
- metadata +37 -25
data/History.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [2.6.7](https://github.com/cucumber/gherkin/compare/v2.6.6...v2.6.7)
|
2
|
+
|
3
|
+
### Bugfixes
|
4
|
+
|
5
|
+
* Fix bad packaging of NuSpec package. ([#148](https://github.com/cucumber/gherkin/issues/148) Aslak Hellesøy)
|
6
|
+
|
1
7
|
## [2.6.6](https://github.com/cucumber/gherkin/compare/v2.6.5...v2.6.6)
|
2
8
|
|
3
9
|
### New Features
|
data/README.md
CHANGED
@@ -7,12 +7,12 @@ A fast lexer and parser for the Gherkin language based on Ragel. Gherkin is two
|
|
7
7
|
|
8
8
|
Supported platforms:
|
9
9
|
|
10
|
-
* Ruby 1.8.6-1.9.3 (MRI, JRuby, REE, Rubinius)
|
11
|
-
* Pure Java (jar file)
|
12
|
-
* JavaScript
|
13
|
-
* .NET (dll file)
|
10
|
+
* [Ruby](https://rubygems.org/gems/gherkin) 1.8.6-1.9.3 (MRI, JRuby, REE, Rubinius)
|
11
|
+
* [Pure Java](http://search.maven.org/#search%7Cga%7C1%7Cgherkin) (jar file)
|
12
|
+
* [JavaScript](http://search.npmjs.org/#/gherkin) (Tested with V8/node.js/Chrome, but might work on other JavaScript engines)
|
13
|
+
* [.NET](http://nuget.org/List/Packages/gherkin) (dll file)
|
14
14
|
|
15
|
-
## Installation
|
15
|
+
## Installation
|
16
16
|
|
17
17
|
### Ruby/JRuby
|
18
18
|
|
@@ -54,14 +54,14 @@ 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.6.
|
57
|
+
<version>2.6.7</version>
|
58
58
|
</dependency>
|
59
59
|
|
60
60
|
You can get it manually from [Maven Central](http://search.maven.org/#browse%7C-2073395818)
|
61
61
|
|
62
62
|
### .NET
|
63
63
|
|
64
|
-
Get the dll from
|
64
|
+
Get the dll from [NuGet](http://nuget.org/List/Packages/gherkin)
|
65
65
|
|
66
66
|
## API Docs
|
67
67
|
|
@@ -162,7 +162,7 @@ TODO: Make all specs pass with js lexer - replace 'c(listener)' with 'js(listene
|
|
162
162
|
|
163
163
|
You must install Mono from source, or use a release of Mono after November 18 2011.
|
164
164
|
|
165
|
-
You must also download NuGet.exe from [CodePlex](http://nuget.codeplex.com/releases). When it's installed, update it and register your
|
165
|
+
You must also download NuGet.exe from [CodePlex](http://nuget.codeplex.com/releases) and place it in `/usr/local/nuget/NuGet.exe`. When it's installed, update it and register your NuGet API Key:
|
166
166
|
|
167
167
|
# In case we need to update
|
168
168
|
mono /usr/local/nuget/NuGet.exe Update -self
|
@@ -174,6 +174,8 @@ Now you can build the .NET dll with:
|
|
174
174
|
|
175
175
|
rake ikvm
|
176
176
|
|
177
|
+
This should put the dll into `release/nuspec/lib/gherkin.dll`
|
178
|
+
|
177
179
|
### MinGW Rubies (for Windows gems)
|
178
180
|
|
179
181
|
In order to build Windows binaries (so we can release Windows gems from OS X/Linux) we first need to install MinGW.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'gherkin/parser/parser'
|
2
|
+
require 'gherkin/formatter/json_formatter'
|
3
|
+
require 'stringio'
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
# This example reads a couple of features and outputs them as JSON.
|
7
|
+
|
8
|
+
io = StringIO.new
|
9
|
+
formatter = Gherkin::Formatter::JSONFormatter.new(io)
|
10
|
+
parser = Gherkin::Parser::Parser.new(formatter)
|
11
|
+
|
12
|
+
sources = ["features/native_lexer.feature", "features/escaped_pipes.feature"]
|
13
|
+
sources.each do |s|
|
14
|
+
path = File.expand_path(File.dirname(__FILE__) + '/../' + s)
|
15
|
+
parser.parse(IO.read(path), path, 0)
|
16
|
+
end
|
17
|
+
|
18
|
+
formatter.close
|
19
|
+
puts JSON.pretty_generate(JSON.parse(io.string))
|
data/gherkin.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "gherkin"
|
5
5
|
# If bumping the major version here, comment out the cucumber dependency below and uncomment in the Gemfile to build against a local cucumber.
|
6
|
-
s.version = "2.6.
|
6
|
+
s.version = "2.6.7"
|
7
7
|
s.authors = ["Mike Sassak", "Gregory Hnatiuk", "Aslak Hellesøy"]
|
8
8
|
s.description = "A fast Gherkin lexer/parser based on the Ragel State Machine Compiler."
|
9
9
|
s.summary = "#{s.name}-#{s.version}"
|
@@ -50,6 +50,7 @@ Gem::Specification.new do |s|
|
|
50
50
|
s.add_development_dependency('rake', '>= 0.9.2')
|
51
51
|
s.add_development_dependency('bundler', '>= 1.0.21')
|
52
52
|
s.add_development_dependency('rspec', '>= 2.7.0')
|
53
|
+
s.add_development_dependency('rubyzip', '>= 0.9.4')
|
53
54
|
|
54
55
|
unless ENV['RUBY_CC_VERSION'] || defined?(JRUBY_VERSION)
|
55
56
|
s.add_development_dependency('therubyracer', '>= 0.9.9') if ENV['GHERKIN_JS']
|
data/tasks/gems.rake
CHANGED
@@ -5,7 +5,7 @@ namespace :gems do
|
|
5
5
|
exit(1)
|
6
6
|
end
|
7
7
|
# rvm and mingw ruby versions have to match to avoid errors
|
8
|
-
sh "rvm 1.8.7-p352@cucumber rake cross compile RUBY_CC_VERSION=1.8.7"
|
8
|
+
sh "rvm 1.8.7-p352@cucumber do rake cross compile RUBY_CC_VERSION=1.8.7"
|
9
9
|
sh "rake cross compile RUBY_CC_VERSION=1.9.3"
|
10
10
|
# This will copy the .so files to the proper place
|
11
11
|
sh "rake -t cross compile RUBY_CC_VERSION=1.8.7:1.9.3"
|
data/tasks/ikvm.rake
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
+
|
2
3
|
namespace :ikvm do
|
3
4
|
IKVM_VERSION = '0.46.0.1'
|
4
|
-
|
5
|
+
IKVM_DIR = "ikvm/ikvm-#{IKVM_VERSION}"
|
6
|
+
IKVM_ZIP = "ikvm/ikvmbin-#{IKVM_VERSION}.zip"
|
7
|
+
CLOBBER.include(IKVM_DIR, IKVM_ZIP)
|
8
|
+
IKVM_BIN_DIR = "#{IKVM_DIR}/bin"
|
5
9
|
IKVMC_EXE = "#{IKVM_BIN_DIR}/ikvmc.exe"
|
6
10
|
GHERKIN_EXE = "release/gherkin.exe"
|
7
11
|
GHERKIN_PKG_DLL = "release/nuspec/lib/gherkin.dll"
|
@@ -49,6 +53,14 @@ namespace :ikvm do
|
|
49
53
|
pkg_dir = File.dirname(GHERKIN_EXE)
|
50
54
|
mkdir_p File.dirname(pkg_dir) unless File.directory?(pkg_dir)
|
51
55
|
nuget("Pack #{GHERKIN_NUSPEC} -Version #{GHERKIN_VERSION} -OutputDirectory #{pkg_dir}")
|
56
|
+
# Now, fix the path inside the file - see https://github.com/cucumber/gherkin/issues/148
|
57
|
+
require 'zip/zipfilesystem'
|
58
|
+
Zip::ZipFile.open(GHERKIN_NUPKG) do |zipfile|
|
59
|
+
begin
|
60
|
+
zipfile.file.rename 'lib%2Fgherkin.dll', 'lib/gherkin.dll'
|
61
|
+
rescue => looks_like_nuget_has_been_fixed
|
62
|
+
end
|
63
|
+
end
|
52
64
|
end
|
53
65
|
|
54
66
|
file GHERKIN_NUSPEC do
|
@@ -100,7 +112,7 @@ EOF
|
|
100
112
|
end
|
101
113
|
|
102
114
|
file IKVMC_EXE do
|
103
|
-
sh("wget http://downloads.sourceforge.net/project/ikvm/ikvm/#{IKVM_VERSION}/ikvmbin-#{IKVM_VERSION}.zip -O
|
115
|
+
sh("wget http://downloads.sourceforge.net/project/ikvm/ikvm/#{IKVM_VERSION}/ikvmbin-#{IKVM_VERSION}.zip -O #{IKVM_ZIP}")
|
104
116
|
Dir.chdir('ikvm') do
|
105
117
|
sh("unzip ikvmbin-#{IKVM_VERSION}.zip")
|
106
118
|
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.6.
|
4
|
+
version: 2.6.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2011-11-
|
14
|
+
date: 2011-11-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rake-compiler
|
18
|
-
requirement: &
|
18
|
+
requirement: &2152722280 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ! '>='
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: 0.7.9
|
24
24
|
type: :development
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *2152722280
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
|
-
requirement: &
|
29
|
+
requirement: &2152718200 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
@@ -34,10 +34,10 @@ dependencies:
|
|
34
34
|
version: 1.4.6
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *2152718200
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: cucumber
|
40
|
-
requirement: &
|
40
|
+
requirement: &2152717640 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
@@ -45,10 +45,10 @@ dependencies:
|
|
45
45
|
version: 1.1.2
|
46
46
|
type: :development
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *2152717640
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: rake
|
51
|
-
requirement: &
|
51
|
+
requirement: &2152733320 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
54
54
|
- - ! '>='
|
@@ -56,10 +56,10 @@ dependencies:
|
|
56
56
|
version: 0.9.2
|
57
57
|
type: :development
|
58
58
|
prerelease: false
|
59
|
-
version_requirements: *
|
59
|
+
version_requirements: *2152733320
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: bundler
|
62
|
-
requirement: &
|
62
|
+
requirement: &2152732360 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
65
65
|
- - ! '>='
|
@@ -67,10 +67,10 @@ dependencies:
|
|
67
67
|
version: 1.0.21
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
|
-
version_requirements: *
|
70
|
+
version_requirements: *2152732360
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: rspec
|
73
|
-
requirement: &
|
73
|
+
requirement: &2152731640 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - ! '>='
|
@@ -78,10 +78,21 @@ dependencies:
|
|
78
78
|
version: 2.7.0
|
79
79
|
type: :development
|
80
80
|
prerelease: false
|
81
|
-
version_requirements: *
|
81
|
+
version_requirements: *2152731640
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rubyzip
|
84
|
+
requirement: &2152730960 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.9.4
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: *2152730960
|
82
93
|
- !ruby/object:Gem::Dependency
|
83
94
|
name: therubyracer
|
84
|
-
requirement: &
|
95
|
+
requirement: &2152730120 !ruby/object:Gem::Requirement
|
85
96
|
none: false
|
86
97
|
requirements:
|
87
98
|
- - ! '>='
|
@@ -89,10 +100,10 @@ dependencies:
|
|
89
100
|
version: 0.9.9
|
90
101
|
type: :development
|
91
102
|
prerelease: false
|
92
|
-
version_requirements: *
|
103
|
+
version_requirements: *2152730120
|
93
104
|
- !ruby/object:Gem::Dependency
|
94
105
|
name: yard
|
95
|
-
requirement: &
|
106
|
+
requirement: &2152729380 !ruby/object:Gem::Requirement
|
96
107
|
none: false
|
97
108
|
requirements:
|
98
109
|
- - ! '>='
|
@@ -100,10 +111,10 @@ dependencies:
|
|
100
111
|
version: 0.7.3
|
101
112
|
type: :development
|
102
113
|
prerelease: false
|
103
|
-
version_requirements: *
|
114
|
+
version_requirements: *2152729380
|
104
115
|
- !ruby/object:Gem::Dependency
|
105
116
|
name: rdiscount
|
106
|
-
requirement: &
|
117
|
+
requirement: &2152728700 !ruby/object:Gem::Requirement
|
107
118
|
none: false
|
108
119
|
requirements:
|
109
120
|
- - ! '>='
|
@@ -111,10 +122,10 @@ dependencies:
|
|
111
122
|
version: 1.6.8
|
112
123
|
type: :development
|
113
124
|
prerelease: false
|
114
|
-
version_requirements: *
|
125
|
+
version_requirements: *2152728700
|
115
126
|
- !ruby/object:Gem::Dependency
|
116
127
|
name: term-ansicolor
|
117
|
-
requirement: &
|
128
|
+
requirement: &2152728240 !ruby/object:Gem::Requirement
|
118
129
|
none: false
|
119
130
|
requirements:
|
120
131
|
- - ! '>='
|
@@ -122,10 +133,10 @@ dependencies:
|
|
122
133
|
version: 1.0.6
|
123
134
|
type: :development
|
124
135
|
prerelease: false
|
125
|
-
version_requirements: *
|
136
|
+
version_requirements: *2152728240
|
126
137
|
- !ruby/object:Gem::Dependency
|
127
138
|
name: builder
|
128
|
-
requirement: &
|
139
|
+
requirement: &2152727780 !ruby/object:Gem::Requirement
|
129
140
|
none: false
|
130
141
|
requirements:
|
131
142
|
- - ! '>='
|
@@ -133,7 +144,7 @@ dependencies:
|
|
133
144
|
version: 2.1.2
|
134
145
|
type: :development
|
135
146
|
prerelease: false
|
136
|
-
version_requirements: *
|
147
|
+
version_requirements: *2152727780
|
137
148
|
description: A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
|
138
149
|
email: cukes@googlegroups.com
|
139
150
|
executables: []
|
@@ -199,6 +210,7 @@ files:
|
|
199
210
|
- Rakefile
|
200
211
|
- build_native_gems.sh
|
201
212
|
- cucumber.yml
|
213
|
+
- examples/parse_and_output_json.rb
|
202
214
|
- features/escaped_pipes.feature
|
203
215
|
- features/feature_parser.feature
|
204
216
|
- features/json_formatter.feature
|
@@ -477,7 +489,7 @@ rubyforge_project:
|
|
477
489
|
rubygems_version: 1.8.10
|
478
490
|
signing_key:
|
479
491
|
specification_version: 3
|
480
|
-
summary: gherkin-2.6.
|
492
|
+
summary: gherkin-2.6.7
|
481
493
|
test_files:
|
482
494
|
- features/escaped_pipes.feature
|
483
495
|
- features/feature_parser.feature
|