gherkin 2.11.1-java → 2.11.2-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,20 +0,0 @@
1
- require 'v8'
2
-
3
- module Gherkin
4
- # Thin adapter for the JavaScript lexer, primarily used for testing.
5
- class JsLexer
6
- def self.[](i18n_underscored_iso_code)
7
- cxt = V8::Context.new
8
- cxt['exports'] = {}
9
-
10
- # Mimic Node.js / Firebug console.log
11
- cxt['console'] = STDOUT
12
- def STDOUT.log(*a)
13
- p a
14
- end
15
-
16
- cxt.load(File.dirname(__FILE__) + "/../../js/lib/gherkin/lexer/#{i18n_underscored_iso_code}.min.js")
17
- cxt['exports']['Lexer']
18
- end
19
- end
20
- end
@@ -1,8 +0,0 @@
1
- module Gherkin
2
- module RbLexer
3
- def self.[](i18n_underscored_iso_code)
4
- require "gherkin/rb_lexer/#{i18n_underscored_iso_code}"
5
- const_get(i18n_underscored_iso_code.capitalize)
6
- end
7
- end
8
- end
@@ -1,8 +0,0 @@
1
- = Lexers
2
-
3
- Gherkin support lexing of lots of natural languages, defined by gherkin/i18n.yml
4
- The lexers are generated with the following command:
5
-
6
- rake ragel:i18n
7
-
8
- You have to run this command if you modify gherkin/i18n.yml
@@ -1,23 +0,0 @@
1
- #encoding: utf-8
2
- if !defined?(JRUBY_VERSION) && ENV['GHERKIN_JS']
3
- require 'spec_helper'
4
- require 'gherkin/js_lexer'
5
-
6
- module Gherkin
7
- module Lexer
8
- describe "JavaScript Lexer" do
9
- before do
10
- @listener = Gherkin::SexpRecorder.new
11
- @lexer = Gherkin::JsLexer['en'].new(@listener)
12
- end
13
-
14
- it_should_behave_like "a Gherkin lexer"
15
- it_should_behave_like "a Gherkin lexer lexing tags"
16
- it_should_behave_like "a Gherkin lexer lexing doc_strings"
17
- it_should_behave_like "a Gherkin lexer lexing rows"
18
- # TODO - make this pass!
19
- # it_should_behave_like "parsing windows files"
20
- end
21
- end
22
- end
23
- end
@@ -1,20 +0,0 @@
1
- #encoding: utf-8
2
- require 'spec_helper'
3
- require 'gherkin/rb_lexer/en'
4
-
5
- module Gherkin
6
- module Lexer
7
- describe "Ruby Lexer" do
8
- before do
9
- @listener = Gherkin::SexpRecorder.new
10
- @lexer = Gherkin::RbLexer::En.new(@listener)
11
- end
12
-
13
- it_should_behave_like "a Gherkin lexer"
14
- it_should_behave_like "a Gherkin lexer lexing tags"
15
- it_should_behave_like "a Gherkin lexer lexing doc_strings"
16
- it_should_behave_like "a Gherkin lexer lexing rows"
17
- it_should_behave_like "parsing windows files"
18
- end
19
- end
20
- end