gherkin 2.4.1 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +7 -9
- data/History.md +5 -0
- data/LICENSE +1 -1
- data/features/step_definitions/json_formatter_steps.rb +1 -1
- data/features/step_definitions/json_parser_steps.rb +1 -1
- data/features/step_definitions/pretty_formatter_steps.rb +1 -1
- data/gherkin.gemspec +3 -3
- data/lib/gherkin/json_parser.rb +5 -5
- data/spec/gherkin/json_parser_spec.rb +1 -1
- metadata +6 -5
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gherkin (2.4.
|
4
|
+
gherkin (2.4.2)
|
5
5
|
json (>= 1.4.6)
|
6
6
|
|
7
7
|
GEM
|
@@ -9,15 +9,14 @@ GEM
|
|
9
9
|
specs:
|
10
10
|
awesome_print (0.4.0)
|
11
11
|
builder (3.0.0)
|
12
|
-
cucumber (0.
|
12
|
+
cucumber (1.0.0)
|
13
13
|
builder (>= 2.1.2)
|
14
14
|
diff-lcs (>= 1.1.2)
|
15
|
-
gherkin (~> 2.4.
|
15
|
+
gherkin (~> 2.4.1)
|
16
16
|
json (>= 1.4.6)
|
17
17
|
term-ansicolor (>= 1.0.5)
|
18
18
|
diff-lcs (1.1.2)
|
19
|
-
json (1.5.
|
20
|
-
json (1.5.2-java)
|
19
|
+
json (1.5.3)
|
21
20
|
libv8 (3.3.10.2)
|
22
21
|
rake (0.9.2)
|
23
22
|
rake-compiler (0.7.9)
|
@@ -32,24 +31,23 @@ GEM
|
|
32
31
|
diff-lcs (~> 1.1.2)
|
33
32
|
rspec-mocks (2.6.0)
|
34
33
|
term-ansicolor (1.0.5)
|
35
|
-
therubyracer (0.9.
|
34
|
+
therubyracer (0.9.2)
|
36
35
|
libv8 (~> 3.3.10)
|
37
36
|
yard (0.7.2)
|
38
37
|
|
39
38
|
PLATFORMS
|
40
|
-
java
|
41
39
|
ruby
|
42
40
|
|
43
41
|
DEPENDENCIES
|
44
42
|
awesome_print (>= 0.4.0)
|
45
43
|
builder (>= 2.1.2)
|
46
44
|
bundler (>= 1.0.15)
|
47
|
-
cucumber (>= 0.
|
45
|
+
cucumber (>= 1.0.0)
|
48
46
|
gherkin!
|
49
47
|
rake (>= 0.9.2)
|
50
48
|
rake-compiler (>= 0.7.8)
|
51
49
|
rdiscount (>= 1.6.8)
|
52
50
|
rspec (>= 2.6.0)
|
53
51
|
term-ansicolor (>= 1.0.5)
|
54
|
-
therubyracer (>= 0.9.
|
52
|
+
therubyracer (>= 0.9.2)
|
55
53
|
yard (>= 0.7.2)
|
data/History.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## [2.4.2](https://github.com/cucumber/gherkin/compare/v2.4.1...v2.4.2)
|
2
|
+
|
3
|
+
### Changed Features
|
4
|
+
* Formatter and Reporter are now two distinct interfaces. JSONParser takes one of each in ctor. (Aslak Hellesøy)
|
5
|
+
|
1
6
|
## [2.4.1](https://github.com/cucumber/gherkin/compare/v2.4.0...v2.4.1)
|
2
7
|
|
3
8
|
### New Features
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2009-
|
1
|
+
Copyright (c) 2009-2011 Mike Sassak, Gregory Hnatiuk, Aslak Hellesøy
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
a copy of this software and associated documentation files (the
|
@@ -18,7 +18,7 @@ end
|
|
18
18
|
|
19
19
|
Then /^the outputted JSON should be:$/ do |expected_json|
|
20
20
|
require 'json'
|
21
|
-
|
21
|
+
puts JSON.pretty_generate(JSON.parse(@io.string))
|
22
22
|
expected = JSON.parse(expected_json).ai
|
23
23
|
actual = JSON.parse(@io.string).ai
|
24
24
|
actual.should == expected
|
@@ -23,7 +23,7 @@ module PrettyPlease
|
|
23
23
|
|
24
24
|
io = StringIO.new
|
25
25
|
pretty_formatter = Gherkin::Formatter::PrettyFormatter.new(io, true, false)
|
26
|
-
json_parser = Gherkin::JSONParser.new(pretty_formatter)
|
26
|
+
json_parser = Gherkin::JSONParser.new(pretty_formatter, pretty_formatter)
|
27
27
|
json_parser.parse(json.string, "#{feature_path}.json", 0)
|
28
28
|
|
29
29
|
io.string
|
data/gherkin.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "gherkin"
|
5
|
-
s.version = "2.4.
|
5
|
+
s.version = "2.4.2"
|
6
6
|
s.authors = ["Mike Sassak", "Gregory Hnatiuk", "Aslak Hellesøy"]
|
7
7
|
s.description = "A fast Gherkin lexer/parser for based on the Ragel State Machine Compiler."
|
8
8
|
s.summary = "#{s.name}-#{s.version}"
|
@@ -44,14 +44,14 @@ Gem::Specification.new do |s|
|
|
44
44
|
|
45
45
|
s.add_dependency('json', '>= 1.4.6')
|
46
46
|
|
47
|
-
s.add_development_dependency('cucumber', '>= 0.
|
47
|
+
s.add_development_dependency('cucumber', '>= 1.0.0')
|
48
48
|
s.add_development_dependency('rake', '>= 0.9.2')
|
49
49
|
s.add_development_dependency('bundler', '>= 1.0.15')
|
50
50
|
s.add_development_dependency('rspec', '>= 2.6.0')
|
51
51
|
s.add_development_dependency('awesome_print', '>= 0.4.0')
|
52
52
|
|
53
53
|
unless ENV['RUBY_CC_VERSION'] || defined?(JRUBY_VERSION)
|
54
|
-
s.add_development_dependency('therubyracer', '>= 0.9.
|
54
|
+
s.add_development_dependency('therubyracer', '>= 0.9.2') if ENV['GHERKIN_JS']
|
55
55
|
# For Documentation:
|
56
56
|
s.add_development_dependency('yard', '>= 0.7.2')
|
57
57
|
s.add_development_dependency('rdiscount', '>= 1.6.8')
|
data/lib/gherkin/json_parser.rb
CHANGED
@@ -10,8 +10,8 @@ module Gherkin
|
|
10
10
|
|
11
11
|
include Base64
|
12
12
|
|
13
|
-
def initialize(formatter)
|
14
|
-
@formatter = formatter
|
13
|
+
def initialize(reporter, formatter)
|
14
|
+
@reporter, @formatter = reporter, formatter
|
15
15
|
end
|
16
16
|
|
17
17
|
# Parse a gherkin object +o+, which can either be a JSON String,
|
@@ -66,19 +66,19 @@ module Gherkin
|
|
66
66
|
|
67
67
|
def match(o)
|
68
68
|
if(m = o['match'])
|
69
|
-
Formatter::Model::Match.new(arguments(m), location(m)).replay(@
|
69
|
+
Formatter::Model::Match.new(arguments(m), location(m)).replay(@reporter)
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
73
|
def result(o)
|
74
74
|
if(r = o['result'])
|
75
|
-
Formatter::Model::Result.new(status(r), duration(r), error_message(r)).replay(@
|
75
|
+
Formatter::Model::Result.new(status(r), duration(r), error_message(r)).replay(@reporter)
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
79
79
|
def embeddings(o)
|
80
80
|
(o['embeddings'] || []).each do |embedding|
|
81
|
-
@
|
81
|
+
@reporter.embedding(embedding['mime_type'], Base64::decode64(embedding['data']))
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gherkin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.4.
|
5
|
+
version: 2.4.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Mike Sassak
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2011-
|
15
|
+
date: 2011-07-08 00:00:00 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rake-compiler
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 1.0.0
|
48
48
|
type: :development
|
49
49
|
version_requirements: *id003
|
50
50
|
- !ruby/object:Gem::Dependency
|
@@ -99,7 +99,7 @@ dependencies:
|
|
99
99
|
requirements:
|
100
100
|
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 0.9.
|
102
|
+
version: 0.9.2
|
103
103
|
type: :development
|
104
104
|
version_requirements: *id008
|
105
105
|
- !ruby/object:Gem::Dependency
|
@@ -230,6 +230,7 @@ files:
|
|
230
230
|
- gherkin.gemspec
|
231
231
|
- ikvm/.gitignore
|
232
232
|
- java/.gitignore
|
233
|
+
- java/Gherkin.iml
|
233
234
|
- java/src/main/java/gherkin/lexer/i18n/.gitignore
|
234
235
|
- java/src/main/resources/gherkin/.gitignore
|
235
236
|
- js/.gitignore
|
@@ -497,7 +498,7 @@ rubyforge_project:
|
|
497
498
|
rubygems_version: 1.8.5
|
498
499
|
signing_key:
|
499
500
|
specification_version: 3
|
500
|
-
summary: gherkin-2.4.
|
501
|
+
summary: gherkin-2.4.2
|
501
502
|
test_files:
|
502
503
|
- features/escaped_pipes.feature
|
503
504
|
- features/feature_parser.feature
|