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 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/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"
@@ -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
@@ -1,4 +1,4 @@
1
- module Gherkin
1
+ module GherkinRuby
2
2
  module AST
3
3
  class Node
4
4
  attr_reader :filename, :line
File without changes
@@ -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.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 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.0"
3
+ 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,7 +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
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: 2012-06-02 00:00:00.000000000 Z
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/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
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.21
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
@@ -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
@@ -1,3 +0,0 @@
1
- module Gherkin
2
- VERSION = "0.2.1"
3
- end