gherkin 2.2.1-i386-mingw32 → 2.2.2-i386-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -7,4 +7,5 @@ pkg
7
7
  ext
8
8
  tmp
9
9
  release
10
- .bundle
10
+ .bundle
11
+ Gemfile.lock
@@ -1,4 +1,10 @@
1
- == 2.2.1
1
+ == 2.2.2 (2010-09-21)
2
+
3
+ === New Features
4
+ * Use json instead of json_pure (Aslak Hellesøy)
5
+ * JSON formatter and parser can now omit JSON serialization (for speed) and work directly on objects (Aslak Hellesøy)
6
+
7
+ == 2.2.1 (2010-09-12)
2
8
 
3
9
  === New Features
4
10
  * Windows gems are now built against 1.8.6-p287 and 1.9.1-p243, on both mswin32 and mingw32, and should work on 1.8.6, 1.8.7, 1.9.1 and 1.9.2 versions of rubyinstaller.org as well as older windows rubies. (Aslak Hellesøy)
@@ -28,14 +28,13 @@ E.g. in Bash, export RL_LANG="en,fr,no". This can be quite helpful when modifyin
28
28
 
29
29
  == Release process
30
30
 
31
- * Bump version in the VERSION.yml file and:
31
+ * Bump version in the VERSION file and:
32
32
  ** java/pom.xml
33
33
  ** ikvm/Gherkin/Gherkin.csproj
34
- * Make sure both JRuby and MRI has the latest Cucumber installed (from source) otherwise the jruby gem might not get the jar inside it.
35
- ** Install cucumber without gherkin dep: gem install --ignore-dependencies pkg/cucumber
36
34
  * rake gems:prepare && ./build_native_gems.sh && rake release:ALL
37
35
  * Announce on Cucumber list, IRC and Twitter.
38
36
 
37
+
39
38
  == Configuring Rake-Compiler for cross compilation
40
39
  In order to build Windows binaries (so we can release Windows gems from OS X/Linux) we need to set up rake-compiler.
41
40
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.1
1
+ 2.2.2
@@ -50,8 +50,11 @@ Gem::Specification.new do |s|
50
50
  end
51
51
 
52
52
  s.add_dependency('trollop', '~> 1.16.2')
53
+ s.add_dependency('json', '~> 1.4.6')
54
+ s.add_dependency('term-ansicolor','~> 1.0.5')
55
+
53
56
  s.add_development_dependency('rake', '~> 0.8.7')
54
57
  s.add_development_dependency('awesome_print', '~> 0.2.1')
55
- s.add_development_dependency('rspec', '~> 2.0.0.beta.20')
58
+ s.add_development_dependency('rspec', '~> 2.0.0.beta.22')
56
59
  s.add_development_dependency('cucumber', '~> 0.9.0') unless File.directory?(File.join(gherkin_dir, '../cucumber'))
57
60
  end
@@ -1,5 +1,4 @@
1
1
  require 'json'
2
- require 'json/pure' # Needed to make JSON.generate work.
3
2
  require 'gherkin/formatter/model'
4
3
  require 'gherkin/native'
5
4
 
@@ -8,15 +7,22 @@ module Gherkin
8
7
  class JSONFormatter
9
8
  native_impl('gherkin')
10
9
 
10
+ attr_reader :gherkin_object
11
+
12
+ # Creates a new instance that writes the resulting JSON to +io+.
13
+ # If +io+ is nil, the JSON will not be written, but instead a Ruby
14
+ # object can be retrieved with #gherkin_object
11
15
  def initialize(io)
12
16
  @io = io
13
17
  end
14
18
 
15
19
  def uri(uri)
20
+ # We're ignoring the uri - we don't want it as part of the JSON
21
+ # (The pretty formatter uses it just for visual niceness - comments)
16
22
  end
17
23
 
18
24
  def feature(feature)
19
- @feature_hash = feature.to_hash
25
+ @gherkin_object = feature.to_hash
20
26
  end
21
27
 
22
28
  def background(background)
@@ -40,13 +46,13 @@ module Gherkin
40
46
  end
41
47
 
42
48
  def eof
43
- @io.write(@feature_hash.to_json)
49
+ @io.write(@gherkin_object.to_json) if @io
44
50
  end
45
51
 
46
52
  private
47
53
 
48
54
  def feature_elements
49
- @feature_hash['elements'] ||= []
55
+ @gherkin_object['elements'] ||= []
50
56
  end
51
57
 
52
58
  def feature_element
@@ -10,9 +10,11 @@ module Gherkin
10
10
  @formatter = formatter
11
11
  end
12
12
 
13
- def parse(src, feature_uri='unknown.json', line_offset=0)
13
+ # Parse a gherkin object +o+, which can either be a JSON String,
14
+ # or a Hash (from a parser JSON String).
15
+ def parse(o, feature_uri='unknown.json', line_offset=0)
16
+ o = JSON.parse(o) if String === o
14
17
  @formatter.uri(feature_uri)
15
- o = JSON.parse(src)
16
18
 
17
19
  Formatter::Model::Feature.new(comments(o), tags(o), keyword(o), name(o), description(o), line(o)).replay(@formatter)
18
20
  (o["elements"] || []).each do |feature_element|
@@ -3,11 +3,13 @@ require 'spec_helper'
3
3
  module Gherkin
4
4
  module Parser
5
5
  describe Parser do
6
- it "should raise when feature doesn't parse" do
7
- p = Parser.new(mock('formatter').as_null_object)
8
- lambda do
9
- p.parse("Feature: f\nFeature: f", __FILE__, __LINE__-1)
10
- end.should raise_error(/Parse error at/)
6
+ unless defined?(JRUBY_VERSION)
7
+ it "should raise when feature doesn't parse" do
8
+ p = Parser.new(mock('formatter').as_null_object)
9
+ lambda do
10
+ p.parse("Feature: f\nFeature: f", __FILE__, __LINE__-1)
11
+ end.should raise_error(/Parse error at/)
12
+ end
11
13
  end
12
14
  end
13
15
  end
@@ -2,7 +2,6 @@ require 'rubygems'
2
2
  require 'bundler'
3
3
  Bundler.setup
4
4
 
5
- require 'rspec/autorun'
6
5
  require 'gherkin'
7
6
  require 'stringio'
8
7
  require 'gherkin/sexp_recorder'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gherkin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 1
10
- version: 2.2.1
9
+ - 2
10
+ version: 2.2.2
11
11
  platform: i386-mingw32
12
12
  authors:
13
13
  - Mike Sassak
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-09-13 00:00:00 +02:00
20
+ date: 2010-09-21 00:00:00 +02:00
21
21
  default_executable: gherkin
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -37,9 +37,41 @@ dependencies:
37
37
  type: :runtime
38
38
  version_requirements: *id001
39
39
  - !ruby/object:Gem::Dependency
40
- name: rake
40
+ name: json
41
41
  prerelease: false
42
42
  requirement: &id002 !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ hash: 11
48
+ segments:
49
+ - 1
50
+ - 4
51
+ - 6
52
+ version: 1.4.6
53
+ type: :runtime
54
+ version_requirements: *id002
55
+ - !ruby/object:Gem::Dependency
56
+ name: term-ansicolor
57
+ prerelease: false
58
+ requirement: &id003 !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ hash: 29
64
+ segments:
65
+ - 1
66
+ - 0
67
+ - 5
68
+ version: 1.0.5
69
+ type: :runtime
70
+ version_requirements: *id003
71
+ - !ruby/object:Gem::Dependency
72
+ name: rake
73
+ prerelease: false
74
+ requirement: &id004 !ruby/object:Gem::Requirement
43
75
  none: false
44
76
  requirements:
45
77
  - - ~>
@@ -51,11 +83,11 @@ dependencies:
51
83
  - 7
52
84
  version: 0.8.7
53
85
  type: :development
54
- version_requirements: *id002
86
+ version_requirements: *id004
55
87
  - !ruby/object:Gem::Dependency
56
88
  name: awesome_print
57
89
  prerelease: false
58
- requirement: &id003 !ruby/object:Gem::Requirement
90
+ requirement: &id005 !ruby/object:Gem::Requirement
59
91
  none: false
60
92
  requirements:
61
93
  - - ~>
@@ -67,25 +99,25 @@ dependencies:
67
99
  - 1
68
100
  version: 0.2.1
69
101
  type: :development
70
- version_requirements: *id003
102
+ version_requirements: *id005
71
103
  - !ruby/object:Gem::Dependency
72
104
  name: rspec
73
105
  prerelease: false
74
- requirement: &id004 !ruby/object:Gem::Requirement
106
+ requirement: &id006 !ruby/object:Gem::Requirement
75
107
  none: false
76
108
  requirements:
77
109
  - - ~>
78
110
  - !ruby/object:Gem::Version
79
- hash: 62196427
111
+ hash: 62196431
80
112
  segments:
81
113
  - 2
82
114
  - 0
83
115
  - 0
84
116
  - beta
85
- - 20
86
- version: 2.0.0.beta.20
117
+ - 22
118
+ version: 2.0.0.beta.22
87
119
  type: :development
88
- version_requirements: *id004
120
+ version_requirements: *id006
89
121
  description: A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
90
122
  email: cukes@googlegroups.com
91
123
  executables:
@@ -103,7 +135,6 @@ files:
103
135
  - .rspec
104
136
  - .rvmrc
105
137
  - Gemfile
106
- - Gemfile.lock
107
138
  - History.txt
108
139
  - LICENSE
109
140
  - README.rdoc
@@ -352,7 +383,7 @@ rubyforge_project:
352
383
  rubygems_version: 1.3.7
353
384
  signing_key:
354
385
  specification_version: 3
355
- summary: gherkin-2.2.1
386
+ summary: gherkin-2.2.2
356
387
  test_files:
357
388
  - features/escaped_pipes.feature
358
389
  - features/feature_parser.feature
@@ -1,49 +0,0 @@
1
- PATH
2
- remote: /Users/aslakhellesoy/scm/cucumber
3
- specs:
4
- cucumber (0.9.0)
5
- builder (~> 2.1.2)
6
- diff-lcs (~> 1.1.2)
7
- json_pure (~> 1.4.6)
8
- term-ansicolor (~> 1.0.5)
9
-
10
- PATH
11
- remote: .
12
- specs:
13
- gherkin (2.2.1)
14
- trollop (~> 1.16.2)
15
-
16
- GEM
17
- remote: http://rubygems.org/
18
- specs:
19
- awesome_print (0.2.1)
20
- builder (2.1.2)
21
- diff-lcs (1.1.2)
22
- json_pure (1.4.6)
23
- rake (0.8.7)
24
- rake-compiler (0.7.1)
25
- rake (>= 0.8.3, < 0.9)
26
- rspec (2.0.0.beta.20)
27
- rspec-core (= 2.0.0.beta.20)
28
- rspec-expectations (= 2.0.0.beta.20)
29
- rspec-mocks (= 2.0.0.beta.20)
30
- rspec-core (2.0.0.beta.20)
31
- rspec-expectations (2.0.0.beta.20)
32
- diff-lcs (>= 1.1.2)
33
- rspec-mocks (2.0.0.beta.20)
34
- term-ansicolor (1.0.5)
35
- trollop (1.16.2)
36
-
37
- PLATFORMS
38
- java
39
- ruby
40
- x86-mingw32
41
-
42
- DEPENDENCIES
43
- awesome_print (~> 0.2.1)
44
- cucumber!
45
- gherkin!
46
- rake (~> 0.8.7)
47
- rake-compiler (~> 0.7.1)
48
- rspec (~> 2.0.0.beta.20)
49
- trollop (~> 1.16.2)