gherkin 2.11.0 → 2.11.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  #encoding: utf-8
2
- unless defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == "ironruby")
2
+ unless defined?(JRUBY_VERSION)
3
3
  require 'spec_helper'
4
4
  require 'gherkin_lexer_en'
5
5
 
@@ -85,7 +85,6 @@ module Gherkin
85
85
  }
86
86
  ]
87
87
  }
88
-
89
88
  JSON.parse(expected).should == JSON.parse(io.string)
90
89
  end
91
90
  end
@@ -1,11 +1,11 @@
1
1
  #encoding: utf-8
2
- if !defined?(JRUBY_VERSION) && !(defined?(RUBY_ENGINE) && RUBY_ENGINE == "ironruby") && ENV['GHERKIN_JS']
2
+ if !defined?(JRUBY_VERSION) && ENV['GHERKIN_JS']
3
3
  require 'spec_helper'
4
4
  require 'gherkin/js_lexer'
5
5
 
6
6
  module Gherkin
7
7
  module Lexer
8
- describe "Javascript Lexer" do
8
+ describe "JavaScript Lexer" do
9
9
  before do
10
10
  @listener = Gherkin::SexpRecorder.new
11
11
  @lexer = Gherkin::JsLexer['en'].new(@listener)
@@ -1,5 +1,6 @@
1
1
  require 'yaml'
2
2
  require 'erb'
3
+ require 'rbconfig'
3
4
 
4
5
  class RagelTask
5
6
  begin
@@ -27,7 +28,8 @@ class RagelTask
27
28
  sh "ragel #{flags} #{lang_ragel} -o #{target}"
28
29
  if(@lang == 'js')
29
30
  # Ragel chokes if we put the escaped triple quotes in .rl, so we'll do the replace with sed after the fact. Lots of backslashes!!
30
- sh %{sed -i '' 's/ESCAPED_TRIPLE_QUOTE/\\\\\\\\\\\\"\\\\\\\\\\\\"\\\\\\\\\\\\"/' #{target}}
31
+ sed = Config::CONFIG['host_os'] =~ /linux/i ? "sed -i" : "sed -i ''"
32
+ sh %{#{sed} 's/ESCAPED_TRIPLE_QUOTE/\\\\\\\\\\\\"\\\\\\\\\\\\"\\\\\\\\\\\\"/' #{target}}
31
33
 
32
34
  # Minify
33
35
  sh %{node #{UGLIFYJS} #{target} > #{target.gsub(/\.js$/, '.min.js')}}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gherkin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.0
4
+ version: 2.11.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-06-08 00:00:00.000000000 Z
14
+ date: 2012-06-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake-compiler
@@ -314,9 +314,9 @@ files:
314
314
  - lib/gherkin/listener/event.rb
315
315
  - lib/gherkin/listener/formatter_listener.rb
316
316
  - lib/gherkin/native.rb
317
- - lib/gherkin/native/ikvm.rb
318
317
  - lib/gherkin/native/java.rb
319
318
  - lib/gherkin/native/null.rb
319
+ - lib/gherkin/native/therubyracer.rb
320
320
  - lib/gherkin/parser/meta.txt
321
321
  - lib/gherkin/parser/parser.rb
322
322
  - lib/gherkin/parser/root.txt
@@ -559,7 +559,7 @@ rubyforge_project:
559
559
  rubygems_version: 1.8.24
560
560
  signing_key:
561
561
  specification_version: 3
562
- summary: gherkin-2.11.0
562
+ summary: gherkin-2.11.1
563
563
  test_files:
564
564
  - features/escaped_pipes.feature
565
565
  - features/feature_parser.feature
@@ -1,55 +0,0 @@
1
- class Class
2
-
3
- def implements(java_class_name)
4
- m = java_class_name.split('.').inject(Object) do |mod, name|
5
- mod = mod.const_get(name)
6
- end
7
- include m
8
- end
9
-
10
- # Causes a .NET class to be instantiated instead of the Ruby class when
11
- # running on IronRuby. This is used to test both pure .NET and pure Ruby classes
12
- # from the same Ruby based test suite. The .NET Class must have a package name
13
- # that corresponds with the Ruby class.
14
- def native_impl(lib)
15
- begin
16
- load_assembly(lib)
17
- rescue LoadError => e
18
- e.message << "\nTry this: SET MONO_PATH=#{File.expand_path(File.dirname(__FILE__) + '/../..')} (or export MONO_PATH=...)"
19
- raise e
20
- end
21
-
22
- class << self
23
- def ikvmify(arg)
24
- if Array === arg
25
- arg.map{|a| ikvmify(a)}
26
- else
27
- case(arg)
28
- when Regexp
29
- Object.const_get('java').const_get('util').const_get('regex').const_get('Pattern').compile(arg.source)
30
- else
31
- arg
32
- end
33
- end
34
- end
35
-
36
- def new(*args)
37
- ikvm_class.new(*ikvmify(args))
38
- end
39
-
40
- def ===(object)
41
- super || object.java_kind_of?(java_class)
42
- end
43
-
44
- def ikvm_class
45
- names = self.name.split('::')
46
- namespace = Object
47
- names[0..-2].each do |module_name|
48
- namespace = namespace.const_get(module_name.downcase)
49
- end
50
-
51
- namespace.const_get(names[-1])
52
- end
53
- end
54
- end
55
- end