gherkin-ruby 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/gherkin-ruby.gemspec +2 -2
- data/lib/gherkin_ruby.rb +10 -0
- data/lib/{gherkin → gherkin_ruby}/ast.rb +1 -1
- data/lib/{gherkin → gherkin_ruby}/parser.rb +0 -0
- data/lib/{gherkin → gherkin_ruby}/parser/gherkin.rex +1 -1
- data/lib/{gherkin → gherkin_ruby}/parser/gherkin.y +1 -1
- data/lib/{gherkin → gherkin_ruby}/parser/lexer.rb +2 -2
- data/lib/{gherkin → gherkin_ruby}/parser/parser.rb +3 -3
- data/lib/gherkin_ruby/version.rb +3 -0
- data/test/gherkin/ast_test.rb +2 -2
- data/test/gherkin/parser/lexer_test.rb +1 -1
- data/test/gherkin/parser/parser_test.rb +1 -1
- data/test/gherkin/parser_test.rb +2 -2
- data/test/test_helper.rb +1 -1
- metadata +17 -11
- data/lib/gherkin.rb +0 -10
- data/lib/gherkin/version.rb +0 -3
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/
|
18
|
-
`racc #{'--debug' if ENV['DEBUG_RACC']} lib/
|
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/gherkin-ruby.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "
|
3
|
+
require "gherkin_ruby/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "gherkin-ruby"
|
7
|
-
s.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"
|
data/lib/gherkin_ruby.rb
ADDED
File without changes
|
@@ -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/
|
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
|
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.
|
3
|
+
# This file is automatically generated by Racc 1.4.9
|
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
|
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
|
403
|
+
end # module GherkinRuby
|
data/test/gherkin/ast_test.rb
CHANGED
@@ -7,7 +7,7 @@ class MyVisitor
|
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
class MyNode <
|
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
|
18
|
+
module GherkinRuby
|
19
19
|
module AST
|
20
20
|
describe Node do
|
21
21
|
it 'is visitable' do
|
data/test/gherkin/parser_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
|
-
module
|
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 =
|
28
|
+
parser = GherkinRuby::Parser.new
|
29
29
|
@result = parser.parse(@scenario)
|
30
30
|
end
|
31
31
|
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gherkin-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2013-04-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rexical
|
@@ -75,14 +75,14 @@ files:
|
|
75
75
|
- Rakefile
|
76
76
|
- Readme.md
|
77
77
|
- gherkin-ruby.gemspec
|
78
|
-
- lib/
|
79
|
-
- lib/
|
80
|
-
- lib/
|
81
|
-
- lib/
|
82
|
-
- lib/
|
83
|
-
- lib/
|
84
|
-
- lib/
|
85
|
-
- lib/
|
78
|
+
- lib/gherkin_ruby.rb
|
79
|
+
- lib/gherkin_ruby/ast.rb
|
80
|
+
- lib/gherkin_ruby/parser.rb
|
81
|
+
- lib/gherkin_ruby/parser/gherkin.rex
|
82
|
+
- lib/gherkin_ruby/parser/gherkin.y
|
83
|
+
- lib/gherkin_ruby/parser/lexer.rb
|
84
|
+
- lib/gherkin_ruby/parser/parser.rb
|
85
|
+
- lib/gherkin_ruby/version.rb
|
86
86
|
- test/gherkin/ast_test.rb
|
87
87
|
- test/gherkin/parser/lexer_test.rb
|
88
88
|
- test/gherkin/parser/parser_test.rb
|
@@ -100,15 +100,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- - ! '>='
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
|
+
segments:
|
104
|
+
- 0
|
105
|
+
hash: 2989768941724411014
|
103
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
107
|
none: false
|
105
108
|
requirements:
|
106
109
|
- - ! '>='
|
107
110
|
- !ruby/object:Gem::Version
|
108
111
|
version: '0'
|
112
|
+
segments:
|
113
|
+
- 0
|
114
|
+
hash: 2989768941724411014
|
109
115
|
requirements: []
|
110
116
|
rubyforge_project: gherkin-ruby
|
111
|
-
rubygems_version: 1.8.
|
117
|
+
rubygems_version: 1.8.25
|
112
118
|
signing_key:
|
113
119
|
specification_version: 3
|
114
120
|
summary: Gherkin-ruby is a Gherkin parser in pure Ruby using Rexical and Racc
|
data/lib/gherkin.rb
DELETED
data/lib/gherkin/version.rb
DELETED