gherkin-ruby 0.2.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5d0f0b1a771e37d1528b2f15f96469687705e70c
4
+ data.tar.gz: 770078062dbcfc31e9d9a56563472a94525e4699
5
+ SHA512:
6
+ metadata.gz: 3b8cc5d8c95c3bdb1ab2357c3daea17144908cbae229ad59006ffb3d361f1f8e3b69b647be8a616955d7a7a733844bad5bc8d8a03e53d560f321b3fcf91540cc
7
+ data.tar.gz: cef951dfba2a9cd5dc2b0bd2a00a321d1dae6e715b534aef449993d8b9a2577ee37a01d436887f005fdcd18fbfb4c37b6c5ce16a190f6fb64cc0625b3f40c06b
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.1.2
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
- env:
2
- - RBXOPT=-X19
1
+ script: "bundle exec rake test"
3
2
  rvm:
4
- - 1.9.2
5
3
  - 1.9.3
6
- - ruby-head
7
- - rbx-head
4
+ - 2.0.0
5
+ - 2.1.2
6
+ - rbx-2
7
+ - jruby-19mode
data/Gemfile CHANGED
@@ -3,3 +3,4 @@ source "http://rubygems.org"
3
3
  # Specify your gem's dependencies in gherkin.gemspec
4
4
  gemspec
5
5
  gem 'rake'
6
+ gem 'racc', platform: :ruby
data/Rakefile CHANGED
@@ -14,8 +14,8 @@ task :regenerate do
14
14
  has_racc = `which racc`
15
15
 
16
16
  if has_rex && has_racc
17
- `rex lib/gherkin/parser/gherkin.rex -o lib/gherkin/parser/lexer.rb`
18
- `racc #{'--debug' if ENV['DEBUG_RACC']} lib/gherkin/parser/gherkin.y -o lib/gherkin/parser/parser.rb`
17
+ `rex lib/gherkin_ruby/parser/gherkin.rex -o lib/gherkin_ruby/parser/lexer.rb`
18
+ `racc #{'--debug' if ENV['DEBUG_RACC']} lib/gherkin_ruby/parser/gherkin.y -o lib/gherkin_ruby/parser/parser.rb`
19
19
  else
20
20
  puts "You need both Rexical and Racc to do that. Install them by doing:"
21
21
  puts
data/Readme.md CHANGED
@@ -1,14 +1,27 @@
1
1
  # gherkin-ruby [![Build Status](https://secure.travis-ci.org/codegram/gherkin-ruby.png)](http://travis-ci.org/codegram/gherkin-ruby) [![Dependency Status](https://gemnasium.com/codegram/gherkin-ruby.png)](http://gemnasium.com/codegram/gherkin-ruby)
2
2
  Gherkin-ruby is a pure Ruby implementation of a [Gherkin](http://github.com/cucumber/gherkin) parser.
3
3
 
4
- Tested with MRI 1.9.2, 1.9.3, ruby-head and Rubinius head.
4
+ Tested with MRI 1.9.3, 2.0.0, head, Rubinius 2.0.0-rc1 and Rubinius head.
5
5
 
6
- ## Why this one over the official, fast, Ragel-based Gherkin parser?
6
+ ## WARNING: Will be deprecated after Gherkin 3.0
7
+
8
+ A new rewrite of the Gherkin parser used by Cucumber is planned (for version
9
+ 3.0) gherkin-ruby will not add any more features until then, and will
10
+ eventually be deprecated in favor of Gherkin 3.0.
11
+
12
+ ## FAQ
13
+
14
+ ### Why this one over the official, fast, Ragel-based Gherkin parser?
7
15
 
8
16
  * Less than 200 LOC.
9
17
  * No Java/.NET crap.
10
18
  * Fast enough for our purposes (using it for the [Spinach](http://github.com/codegram/spinach) project)
11
19
 
20
+ ### Why don't you support tables?
21
+
22
+ * Because we believe it's a BDD anti-pattern. Tables show the need for more
23
+ unit tests.
24
+
12
25
  ## Install
13
26
 
14
27
  $ gem install gherkin-ruby
@@ -76,3 +89,10 @@ visitor.visit(ast)
76
89
 
77
90
  * Some optimization
78
91
 
92
+ ## FAQ
93
+
94
+
95
+
96
+ ## License
97
+
98
+ MIT (Expat) License. Copyright 2011-2013 [Codegram Technologies](http://codegram.com)
data/gherkin-ruby.gemspec CHANGED
@@ -1,10 +1,10 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require "gherkin/version"
3
+ require "gherkin_ruby/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "gherkin-ruby"
7
- s.version = Gherkin::VERSION
7
+ s.version = GherkinRuby::VERSION
8
8
  s.authors = ["Marc Divins", "Josep M. Bach"]
9
9
  s.email = ["marcdivc@gmail.com", "josep.m.bach@gmail.com"]
10
10
  s.homepage = "http://github.com/codegram/gherkin-ruby"
@@ -13,9 +13,8 @@ Gem::Specification.new do |s|
13
13
 
14
14
  s.rubyforge_project = "gherkin-ruby"
15
15
 
16
- s.add_development_dependency 'rexical'
17
16
  s.add_development_dependency 'minitest'
18
- s.add_development_dependency 'racc'
17
+ s.add_development_dependency 'rexical'
19
18
 
20
19
  s.files = `git ls-files`.split("\n")
21
20
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -1,4 +1,4 @@
1
- module Gherkin
1
+ module GherkinRuby
2
2
  module AST
3
3
  class Node
4
4
  attr_reader :filename, :line
@@ -1,6 +1,6 @@
1
1
  # Compile with: rex gherkin.rex -o lexer.rb
2
2
 
3
- class Gherkin::Parser
3
+ class GherkinRuby::Parser
4
4
 
5
5
  macro
6
6
  BLANK [\ \t]+
@@ -1,6 +1,6 @@
1
1
  # Compile with: racc gherkin.y -o parser.rb
2
2
 
3
- class Gherkin::Parser
3
+ class GherkinRuby::Parser
4
4
 
5
5
  # Declare tokens produced by the lexer
6
6
  token NEWLINE
@@ -1,13 +1,13 @@
1
1
  #--
2
2
  # DO NOT MODIFY!!!!
3
3
  # This file is automatically generated by rex 1.0.5
4
- # from lexical definition file "lib/gherkin/parser/gherkin.rex".
4
+ # from lexical definition file "lib/gherkin_ruby/parser/gherkin.rex".
5
5
  #++
6
6
 
7
7
  require 'racc/parser'
8
8
  # Compile with: rex gherkin.rex -o lexer.rb
9
9
 
10
- class Gherkin::Parser < Racc::Parser
10
+ class GherkinRuby::Parser < Racc::Parser
11
11
  require 'strscan'
12
12
 
13
13
  class ScanError < StandardError ; end
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.4.8
3
+ # This file is automatically generated by Racc 1.4.11
4
4
  # from Racc grammer file "".
5
5
  #
6
6
 
@@ -9,7 +9,7 @@ require 'racc/parser.rb'
9
9
  require_relative "lexer"
10
10
  require_relative "../ast"
11
11
 
12
- module Gherkin
12
+ module GherkinRuby
13
13
  class Parser < Racc::Parser
14
14
 
15
15
  module_eval(<<'...end gherkin.y/module_eval...', 'gherkin.y', 104)
@@ -400,4 +400,4 @@ def _reduce_none(val, _values, result)
400
400
  end
401
401
 
402
402
  end # class Parser
403
- end # module Gherkin
403
+ end # module GherkinRuby
@@ -0,0 +1,3 @@
1
+ module GherkinRuby
2
+ VERSION = "0.3.2"
3
+ end
@@ -0,0 +1,10 @@
1
+ require_relative "gherkin_ruby/version"
2
+ require_relative 'gherkin_ruby/ast'
3
+ require_relative 'gherkin_ruby/parser'
4
+
5
+ module GherkinRuby
6
+ def self.parse(input)
7
+ parser = Parser.new
8
+ parser.parse(input)
9
+ end
10
+ end
@@ -7,7 +7,7 @@ class MyVisitor
7
7
  end
8
8
  end
9
9
 
10
- class MyNode < Gherkin::AST::Node
10
+ class MyNode < GherkinRuby::AST::Node
11
11
  attr_reader :elements
12
12
  def initialize(name, elements)
13
13
  @name = name
@@ -15,7 +15,7 @@ class MyNode < Gherkin::AST::Node
15
15
  end
16
16
  end
17
17
 
18
- module Gherkin
18
+ module GherkinRuby
19
19
  module AST
20
20
  describe Node do
21
21
  it 'is visitable' do
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
- module Gherkin
3
+ module GherkinRuby
4
4
  describe Parser do
5
5
  before do
6
6
  @lexer = Parser.new
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
- module Gherkin
3
+ module GherkinRuby
4
4
  describe Parser do
5
5
  def parse(input)
6
6
  parser = Parser.new
@@ -1,6 +1,6 @@
1
1
  require_relative '../test_helper'
2
2
 
3
- module Gherkin
3
+ module GherkinRuby
4
4
  describe 'Feature parsing' do
5
5
  before do
6
6
  @scenario = """Feature: My Feature
@@ -25,7 +25,7 @@ module Gherkin
25
25
  Then bar
26
26
  """
27
27
 
28
- parser = Gherkin::Parser.new
28
+ parser = GherkinRuby::Parser.new
29
29
  @result = parser.parse(@scenario)
30
30
  end
31
31
 
data/test/test_helper.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  gem 'minitest'
2
2
  require 'minitest/spec'
3
3
  require 'minitest/autorun'
4
- require_relative '../lib/gherkin'
4
+ require_relative '../lib/gherkin_ruby'
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gherkin-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
5
- prerelease:
4
+ version: 0.3.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Marc Divins
@@ -10,54 +9,34 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2012-06-02 00:00:00.000000000 Z
12
+ date: 2014-07-01 00:00:00.000000000 Z
14
13
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: rexical
17
- requirement: !ruby/object:Gem::Requirement
18
- none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
22
- version: '0'
23
- type: :development
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ! '>='
29
- - !ruby/object:Gem::Version
30
- version: '0'
31
14
  - !ruby/object:Gem::Dependency
32
15
  name: minitest
33
16
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
17
  requirements:
36
- - - ! '>='
18
+ - - ">="
37
19
  - !ruby/object:Gem::Version
38
20
  version: '0'
39
21
  type: :development
40
22
  prerelease: false
41
23
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
24
  requirements:
44
- - - ! '>='
25
+ - - ">="
45
26
  - !ruby/object:Gem::Version
46
27
  version: '0'
47
28
  - !ruby/object:Gem::Dependency
48
- name: racc
29
+ name: rexical
49
30
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
31
  requirements:
52
- - - ! '>='
32
+ - - ">="
53
33
  - !ruby/object:Gem::Version
54
34
  version: '0'
55
35
  type: :development
56
36
  prerelease: false
57
37
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
38
  requirements:
60
- - - ! '>='
39
+ - - ">="
61
40
  - !ruby/object:Gem::Version
62
41
  version: '0'
63
42
  description: Gherkin-ruby is a Gherkin parser in pure Ruby using Rexical and Racc
@@ -68,21 +47,21 @@ executables: []
68
47
  extensions: []
69
48
  extra_rdoc_files: []
70
49
  files:
71
- - .gitignore
72
- - .rvmrc
73
- - .travis.yml
50
+ - ".gitignore"
51
+ - ".ruby-version"
52
+ - ".travis.yml"
74
53
  - Gemfile
75
54
  - Rakefile
76
55
  - Readme.md
77
56
  - gherkin-ruby.gemspec
78
- - lib/gherkin.rb
79
- - lib/gherkin/ast.rb
80
- - lib/gherkin/parser.rb
81
- - lib/gherkin/parser/gherkin.rex
82
- - lib/gherkin/parser/gherkin.y
83
- - lib/gherkin/parser/lexer.rb
84
- - lib/gherkin/parser/parser.rb
85
- - lib/gherkin/version.rb
57
+ - lib/gherkin_ruby.rb
58
+ - lib/gherkin_ruby/ast.rb
59
+ - lib/gherkin_ruby/parser.rb
60
+ - lib/gherkin_ruby/parser/gherkin.rex
61
+ - lib/gherkin_ruby/parser/gherkin.y
62
+ - lib/gherkin_ruby/parser/lexer.rb
63
+ - lib/gherkin_ruby/parser/parser.rb
64
+ - lib/gherkin_ruby/version.rb
86
65
  - test/gherkin/ast_test.rb
87
66
  - test/gherkin/parser/lexer_test.rb
88
67
  - test/gherkin/parser/parser_test.rb
@@ -90,27 +69,26 @@ files:
90
69
  - test/test_helper.rb
91
70
  homepage: http://github.com/codegram/gherkin-ruby
92
71
  licenses: []
72
+ metadata: {}
93
73
  post_install_message:
94
74
  rdoc_options: []
95
75
  require_paths:
96
76
  - lib
97
77
  required_ruby_version: !ruby/object:Gem::Requirement
98
- none: false
99
78
  requirements:
100
- - - ! '>='
79
+ - - ">="
101
80
  - !ruby/object:Gem::Version
102
81
  version: '0'
103
82
  required_rubygems_version: !ruby/object:Gem::Requirement
104
- none: false
105
83
  requirements:
106
- - - ! '>='
84
+ - - ">="
107
85
  - !ruby/object:Gem::Version
108
86
  version: '0'
109
87
  requirements: []
110
88
  rubyforge_project: gherkin-ruby
111
- rubygems_version: 1.8.21
89
+ rubygems_version: 2.2.2
112
90
  signing_key:
113
- specification_version: 3
91
+ specification_version: 4
114
92
  summary: Gherkin-ruby is a Gherkin parser in pure Ruby using Rexical and Racc
115
93
  test_files:
116
94
  - test/gherkin/ast_test.rb
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use --create 1.9.3@gherkin-ruby
@@ -1,3 +0,0 @@
1
- module Gherkin
2
- VERSION = "0.2.1"
3
- end
data/lib/gherkin.rb DELETED
@@ -1,10 +0,0 @@
1
- require_relative "gherkin/version"
2
- require_relative 'gherkin/ast'
3
- require_relative 'gherkin/parser'
4
-
5
- module Gherkin
6
- def self.parse(input)
7
- parser = Parser.new
8
- parser.parse(input)
9
- end
10
- end
File without changes