gherkin 2.3.7 → 2.4.0

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.
Files changed (50) hide show
  1. data/.gitignore +3 -0
  2. data/.yardopts +5 -0
  3. data/{History.txt → History.md} +153 -127
  4. data/{README.rdoc → README.md} +66 -64
  5. data/Rakefile +9 -2
  6. data/features/json_formatter.feature +1 -1
  7. data/features/json_parser.feature +1 -1
  8. data/gherkin.gemspec +16 -14
  9. data/js/lib/gherkin/lexer/.npmignore +0 -0
  10. data/lib/gherkin/formatter/ansi_escapes.rb +1 -1
  11. data/lib/gherkin/formatter/model.rb +4 -4
  12. data/lib/gherkin/formatter/pretty_formatter.rb +4 -4
  13. data/lib/gherkin/json_parser.rb +1 -1
  14. data/lib/gherkin/listener/formatter_listener.rb +7 -7
  15. data/lib/gherkin/parser/meta.txt +1 -1
  16. data/lib/gherkin/parser/root.txt +1 -1
  17. data/lib/gherkin/parser/steps.txt +1 -1
  18. data/lib/gherkin/rubify.rb +2 -2
  19. data/ragel/lexer.c.rl.erb +2 -2
  20. data/ragel/lexer.java.rl.erb +2 -2
  21. data/ragel/lexer.js.rl.erb +8 -6
  22. data/ragel/lexer.rb.rl.erb +2 -2
  23. data/ragel/lexer_common.rl.erb +4 -4
  24. data/spec/gherkin/c_lexer_spec.rb +1 -1
  25. data/spec/gherkin/fixtures/complex.json +1 -1
  26. data/spec/gherkin/java_lexer_spec.rb +1 -1
  27. data/spec/gherkin/js_lexer_spec.rb +2 -2
  28. data/spec/gherkin/rb_lexer_spec.rb +1 -1
  29. data/spec/gherkin/sexp_recorder.rb +2 -2
  30. data/spec/gherkin/shared/{py_string_group.rb → doc_string_group.rb} +28 -28
  31. data/spec/gherkin/shared/lexer_group.rb +4 -4
  32. data/spec/spec_helper.rb +1 -1
  33. data/tasks/compile.rake +3 -2
  34. data/tasks/cucumber.rake +1 -1
  35. data/tasks/gems.rake +2 -2
  36. data/tasks/ikvm.rake +4 -4
  37. data/tasks/ragel_task.rb +7 -0
  38. data/tasks/release.rake +10 -9
  39. data/tasks/yard.rake +7 -0
  40. data/tasks/yard/default/layout/html/bubble_32x32.png +0 -0
  41. data/tasks/yard/default/layout/html/bubble_48x48.png +0 -0
  42. data/tasks/yard/default/layout/html/footer.erb +5 -0
  43. data/tasks/yard/default/layout/html/index.erb +1 -0
  44. data/tasks/yard/default/layout/html/layout.erb +25 -0
  45. data/tasks/yard/default/layout/html/logo.erb +1 -0
  46. data/tasks/yard/default/layout/html/setup.rb +4 -0
  47. metadata +53 -26
  48. data/VERSION +0 -1
  49. data/lib/gherkin/version.rb +0 -3
  50. data/tasks/rdoc.rake +0 -9
@@ -8,9 +8,9 @@ module Gherkin
8
8
  case(o)
9
9
  when Java.java.util.Collection, Array
10
10
  o.map{|e| rubify(e)}
11
- when Java.gherkin.formatter.model.PyString
11
+ when Java.gherkin.formatter.model.DocString
12
12
  require 'gherkin/formatter/model'
13
- Formatter::Model::PyString.new(o.value, o.line)
13
+ Formatter::Model::DocString.new(o.value, o.line)
14
14
  else
15
15
  o
16
16
  end
@@ -328,13 +328,13 @@ store_pystring_content(VALUE listener,
328
328
  unescape_escaped_quotes = rb_reg_regcomp(rb_str_new2("\\\\\"\\\\\"\\\\\""));
329
329
  rb_funcall(con, rb_intern("sub!"), 2, re2, rb_str_new2(""));
330
330
  rb_funcall(con, rb_intern("gsub!"), 2, unescape_escaped_quotes, rb_str_new2("\"\"\""));
331
- rb_funcall(listener, rb_intern("py_string"), 2, con, INT2FIX(current_line));
331
+ rb_funcall(listener, rb_intern("doc_string"), 2, con, INT2FIX(current_line));
332
332
  }
333
333
 
334
334
  static void
335
335
  raise_lexer_error(const char * at, int line)
336
336
  {
337
- rb_raise(rb_eGherkinLexingError, "Lexing error on line %d: '%s'. See http://wiki.github.com/aslakhellesoy/gherkin/lexingerror for more information.", line, at);
337
+ rb_raise(rb_eGherkinLexingError, "Lexing error on line %d: '%s'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.", line, at);
338
338
  }
339
339
 
340
340
  static void lexer_init(lexer_state *lexer) {
@@ -32,7 +32,7 @@ public class <%= @i18n.underscored_iso_code.upcase %> implements Lexer {
32
32
 
33
33
  action store_pystring_content {
34
34
  String con = unindent(startCol, substring(data, contentStart, nextKeywordStart-1).replaceFirst("(\\r?\\n)?([\\t ])*\\Z", "").replaceAll("\\\\\"\\\\\"\\\\\"", "\"\"\""));
35
- listener.pyString(con, currentLine);
35
+ listener.docString(con, currentLine);
36
36
  }
37
37
 
38
38
  action store_feature_content {
@@ -131,7 +131,7 @@ public class <%= @i18n.underscored_iso_code.upcase %> implements Lexer {
131
131
  action end_feature {
132
132
  if(cs < lexer_first_final) {
133
133
  String content = currentLineContent(data, lastNewline);
134
- throw new LexingError("Lexing error on line " + lineNumber + ": '" + content + "'. See http://wiki.github.com/aslakhellesoy/gherkin/lexingerror for more information.");
134
+ throw new LexingError("Lexing error on line " + lineNumber + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.");
135
135
  } else {
136
136
  listener.eof();
137
137
  }
@@ -23,7 +23,7 @@
23
23
  this.start_col,
24
24
  this.bytesToString(data.slice(this.content_start, this.next_keyword_start-1)).replace(/(\r?\n)?([\t ])*$/, '').replace(/ESCAPED_TRIPLE_QUOTE/mg, '"""')
25
25
  );
26
- this.listener.py_string(con, this.current_line);
26
+ this.listener.doc_string(con, this.current_line);
27
27
  }
28
28
 
29
29
  action store_feature_content {
@@ -106,7 +106,7 @@
106
106
  action end_feature {
107
107
  if(this.cs < lexer_first_final) {
108
108
  var content = this.current_line_content(data, p);
109
- throw "Lexing error on line " + this.line_number + ": '" + content + "'. See http://wiki.github.com/aslakhellesoy/gherkin/lexingerror for more information.";
109
+ throw "Lexing error on line " + this.line_number + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.";
110
110
  } else {
111
111
  this.listener.eof();
112
112
  }
@@ -122,7 +122,7 @@
122
122
 
123
123
  var Lexer = function(listener) {
124
124
  // Check that listener has the required functions
125
- var events = ['comment', 'tag', 'feature', 'background', 'scenario', 'scenario_outline', 'examples', 'step', 'py_string', 'row', 'eof'];
125
+ var events = ['comment', 'tag', 'feature', 'background', 'scenario', 'scenario_outline', 'examples', 'step', 'doc_string', 'row', 'eof'];
126
126
  for(e in events) {
127
127
  var event = events[e];
128
128
  if(typeof listener[event] != 'function') {
@@ -198,11 +198,13 @@ Lexer.prototype.current_line_content = function(data, p) {
198
198
  return this.bytesToString(rest.slice(0, end)).trim();
199
199
  };
200
200
 
201
- if(typeof exports != 'undefined') {
201
+ // Node.js export
202
+ if(typeof exports !== 'undefined') {
202
203
  exports.Lexer = Lexer;
203
204
  }
204
- if(typeof window != 'undefined') {
205
- window.Lexer = Lexer;
205
+ // Require.js export
206
+ if (typeof define !== 'undefined' && define.amd) {
207
+ define('gherkin/lexer/<%= @i18n.underscored_iso_code %>', [], function() {return Lexer});
206
208
  }
207
209
 
208
210
  })();
@@ -23,7 +23,7 @@ module Gherkin
23
23
 
24
24
  action store_pystring_content {
25
25
  con = unindent(@start_col, utf8_pack(data[@content_start...@next_keyword_start-1]).sub(/(\r?\n)?([\t ])*\Z/, '').gsub(/\\"\\"\\"/, '"""'))
26
- @listener.py_string(con, @current_line)
26
+ @listener.doc_string(con, @current_line)
27
27
  }
28
28
 
29
29
  action store_feature_content {
@@ -106,7 +106,7 @@ module Gherkin
106
106
  action end_feature {
107
107
  if cs < lexer_first_final
108
108
  content = current_line_content(data, p)
109
- raise Gherkin::Lexer::LexingError.new("Lexing error on line %d: '%s'. See http://wiki.github.com/aslakhellesoy/gherkin/lexingerror for more information." % [@line_number, content])
109
+ raise Gherkin::Lexer::LexingError.new("Lexing error on line %d: '%s'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information." % [@line_number, content])
110
110
  else
111
111
  @listener.eof
112
112
  end
@@ -40,11 +40,11 @@
40
40
  RowBody = space* Cell** PIPE :>> (space* EOL+ space*) %store_row;
41
41
  Row = StartRow :>> RowBody <: EndRow?;
42
42
 
43
- StartPyString = '"""' >start_pystring space* :>> EOL;
44
- EndPyString = (space* '"""') >next_keyword_start;
45
- PyString = space* StartPyString %begin_pystring_content (^EOL | EOL)* :>> EndPyString %store_pystring_content space* EOL+;
43
+ StartDocString = '"""' >start_pystring space* :>> EOL;
44
+ EndDocString = (space* '"""') >next_keyword_start;
45
+ DocString = space* StartDocString %begin_pystring_content (^EOL | EOL)* :>> EndDocString %store_pystring_content space* EOL+;
46
46
 
47
- Tokens = BOM? (space | EOL)* (Tags | Comment | FeatureHeading | BackgroundHeading | ScenarioHeading | ScenarioOutlineHeading | ExamplesHeading | Step | Row | PyString)* (space | EOL)* EOF;
47
+ Tokens = BOM? (space | EOL)* (Tags | Comment | FeatureHeading | BackgroundHeading | ScenarioHeading | ScenarioOutlineHeading | ExamplesHeading | Step | Row | DocString)* (space | EOL)* EOF;
48
48
 
49
49
  main := Tokens %end_feature @!end_feature;
50
50
  }%%
@@ -13,7 +13,7 @@ module Gherkin
13
13
 
14
14
  it_should_behave_like "a Gherkin lexer"
15
15
  it_should_behave_like "a Gherkin lexer lexing tags"
16
- it_should_behave_like "a Gherkin lexer lexing py_strings"
16
+ it_should_behave_like "a Gherkin lexer lexing doc_strings"
17
17
  it_should_behave_like "a Gherkin lexer lexing rows"
18
18
  it_should_behave_like "parsing windows files"
19
19
  end
@@ -129,7 +129,7 @@
129
129
  { "name" : "All work and no play",
130
130
  "keyword": "Given ",
131
131
  "multiline_arg": {
132
- "type": "py_string",
132
+ "type": "doc_string",
133
133
  "value": "Makes Homer something something\nAnd something else",
134
134
  "line": 777
135
135
  }
@@ -12,7 +12,7 @@ module Gherkin
12
12
 
13
13
  it_should_behave_like "a Gherkin lexer"
14
14
  it_should_behave_like "a Gherkin lexer lexing tags"
15
- it_should_behave_like "a Gherkin lexer lexing py_strings"
15
+ it_should_behave_like "a Gherkin lexer lexing doc_strings"
16
16
  it_should_behave_like "a Gherkin lexer lexing rows"
17
17
  end
18
18
  end
@@ -1,5 +1,5 @@
1
1
  #encoding: utf-8
2
- if !defined?(JRUBY_VERSION) && !(defined?(RUBY_ENGINE) && RUBY_ENGINE == "ironruby") && ENV['GHERKIN_JS']
2
+ if !defined?(JRUBY_VERSION) && !(defined?(RUBY_ENGINE) && RUBY_ENGINE == "ironruby") && ENV['GHERKIN_JS'] && !ENV['SKIP_JS_SPECS']
3
3
  require 'spec_helper'
4
4
  require 'gherkin/js_lexer'
5
5
 
@@ -13,7 +13,7 @@ module Gherkin
13
13
 
14
14
  it_should_behave_like "a Gherkin lexer"
15
15
  it_should_behave_like "a Gherkin lexer lexing tags"
16
- it_should_behave_like "a Gherkin lexer lexing py_strings"
16
+ it_should_behave_like "a Gherkin lexer lexing doc_strings"
17
17
  it_should_behave_like "a Gherkin lexer lexing rows"
18
18
  # TODO - make this pass!
19
19
  # it_should_behave_like "parsing windows files"
@@ -12,7 +12,7 @@ module Gherkin
12
12
 
13
13
  it_should_behave_like "a Gherkin lexer"
14
14
  it_should_behave_like "a Gherkin lexer lexing tags"
15
- it_should_behave_like "a Gherkin lexer lexing py_strings"
15
+ it_should_behave_like "a Gherkin lexer lexing doc_strings"
16
16
  it_should_behave_like "a Gherkin lexer lexing rows"
17
17
  it_should_behave_like "parsing windows files"
18
18
  end
@@ -10,10 +10,10 @@ module Gherkin
10
10
  end
11
11
 
12
12
  # We can't use method_missing - therubyracer isn't able to invoke methods like that.
13
- [:comment, :tag, :feature, :background, :scenario, :scenario_outline, :examples, :step, :py_string, :row, :eof, :uri, :syntax_error].each do |event|
13
+ [:comment, :tag, :feature, :background, :scenario, :scenario_outline, :examples, :step, :doc_string, :row, :eof, :uri, :syntax_error].each do |event|
14
14
  define_method(event) do |*args|
15
15
  event = :scenario_outline if event == :scenarioOutline # Special Java Lexer handling
16
- event = :py_string if event == :pyString # Special Java Lexer handling
16
+ event = :doc_string if event == :docString # Special Java Lexer handling
17
17
  event = :syntax_error if event == :syntaxError # Special Java Lexer handling
18
18
  args = rubify(args)
19
19
  args = sexpify(args)
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
 
4
4
  module Gherkin
5
5
  module Lexer
6
- shared_examples_for "a Gherkin lexer lexing py_strings" do
6
+ shared_examples_for "a Gherkin lexer lexing doc_strings" do
7
7
  def scan(gherkin)
8
8
  @lexer.scan(gherkin)
9
9
  end
@@ -23,47 +23,47 @@ Feature: some feature
23
23
  """
24
24
  Then bar
25
25
  EOS
26
- @listener.should_receive(:py_string).with(" Hello\nGoodbye", 4)
26
+ @listener.should_receive(:doc_string).with(" Hello\nGoodbye", 4)
27
27
  scan(str)
28
28
  end
29
29
 
30
- it "should parse a simple py_string" do
31
- @listener.should_receive(:py_string).with("I am a py_string", 1)
32
- scan ps("I am a py_string")
30
+ it "should parse a simple doc_string" do
31
+ @listener.should_receive(:doc_string).with("I am a doc_string", 1)
32
+ scan ps("I am a doc_string")
33
33
  end
34
34
 
35
- it "should parse an empty py_string" do
36
- @listener.should_receive(:py_string).with("", 4)
35
+ it "should parse an empty doc_string" do
36
+ @listener.should_receive(:doc_string).with("", 4)
37
37
  scan("Feature: Hi\nScenario: Hi\nGiven a step\n\"\"\"\n\"\"\"")
38
38
  end
39
39
 
40
40
  it "should treat a string containing only newlines as only newlines" do
41
- py_string = <<EOS
41
+ doc_string = <<EOS
42
42
  """
43
43
 
44
44
 
45
45
 
46
46
  """
47
47
  EOS
48
- @listener.should_receive(:py_string).with("\n\n", 1)
49
- scan(py_string)
48
+ @listener.should_receive(:doc_string).with("\n\n", 1)
49
+ scan(doc_string)
50
50
  end
51
51
 
52
52
  it "should parse content separated by two newlines" do
53
53
  scan ps("A\n\nB")
54
54
  @listener.to_sexp.should == [
55
- [:py_string, "A\n\nB", 1],
55
+ [:doc_string, "A\n\nB", 1],
56
56
  [:eof]
57
57
  ]
58
58
  end
59
59
 
60
60
  it "should parse a multiline string" do
61
- @listener.should_receive(:py_string).with("A\nB\nC\nD", 1)
61
+ @listener.should_receive(:doc_string).with("A\nB\nC\nD", 1)
62
62
  scan ps("A\nB\nC\nD")
63
63
  end
64
64
 
65
65
  it "should ignore unescaped quotes inside the string delimeters" do
66
- @listener.should_receive(:py_string).with("What does \"this\" mean?", 1)
66
+ @listener.should_receive(:doc_string).with("What does \"this\" mean?", 1)
67
67
  scan ps('What does "this" mean?')
68
68
  end
69
69
 
@@ -74,17 +74,17 @@ str = <<EOS
74
74
  Line two
75
75
  """
76
76
  EOS
77
- @listener.should_receive(:py_string).with(" Line one\nLine two", 1)
77
+ @listener.should_receive(:doc_string).with(" Line one\nLine two", 1)
78
78
  scan(str)
79
79
  end
80
80
 
81
81
  it "should preserve tabs within the content" do
82
- @listener.should_receive(:py_string).with("I have\tsome tabs\nInside\t\tthe content", 1)
82
+ @listener.should_receive(:doc_string).with("I have\tsome tabs\nInside\t\tthe content", 1)
83
83
  scan ps("I have\tsome tabs\nInside\t\tthe content")
84
84
  end
85
85
 
86
- it "should handle complex py_strings" do
87
- py_string = <<EOS
86
+ it "should handle complex doc_strings" do
87
+ doc_string = <<EOS
88
88
  # Feature comment
89
89
  @one
90
90
  Feature: Sample
@@ -98,34 +98,34 @@ Feature: Sample
98
98
 
99
99
  EOS
100
100
 
101
- @listener.should_receive(:py_string).with(py_string, 1)
102
- scan ps(py_string)
101
+ @listener.should_receive(:doc_string).with(doc_string, 1)
102
+ scan ps(doc_string)
103
103
  end
104
104
 
105
- it "should allow whitespace after the closing py_string delimiter" do
105
+ it "should allow whitespace after the closing doc_string delimiter" do
106
106
  str = <<EOS
107
107
  """
108
108
  Line one
109
109
  """
110
110
  EOS
111
- @listener.should_receive(:py_string).with(" Line one", 1)
111
+ @listener.should_receive(:doc_string).with(" Line one", 1)
112
112
  scan(str)
113
113
  end
114
114
 
115
- it "should preserve the last newline(s) at the end of a py_string" do
115
+ it "should preserve the last newline(s) at the end of a doc_string" do
116
116
  str = <<EOS
117
117
  """
118
- PyString text
118
+ DocString text
119
119
 
120
120
 
121
121
  """
122
122
  EOS
123
- @listener.should_receive(:py_string).with("PyString text\n\n",1)
123
+ @listener.should_receive(:doc_string).with("DocString text\n\n",1)
124
124
  scan(str)
125
125
  end
126
126
 
127
- it "should preserve CRLFs within py_strings" do
128
- @listener.should_receive(:py_string).with("Line one\r\nLine two\r\n", 1)
127
+ it "should preserve CRLFs within doc_strings" do
128
+ @listener.should_receive(:doc_string).with("Line one\r\nLine two\r\n", 1)
129
129
  scan("\"\"\"\r\nLine one\r\nLine two\r\n\r\n\"\"\"")
130
130
  end
131
131
 
@@ -135,7 +135,7 @@ str = <<EOS
135
135
  \\"\\"\\"
136
136
  """
137
137
  EOS
138
- @listener.should_receive(:py_string).with('"""', 1)
138
+ @listener.should_receive(:doc_string).with('"""', 1)
139
139
  scan(str)
140
140
  end
141
141
 
@@ -145,7 +145,7 @@ str = <<EOS
145
145
  \\" \\"\\"
146
146
  """
147
147
  EOS
148
- @listener.should_receive(:py_string).with('\" \"\"', 1)
148
+ @listener.should_receive(:doc_string).with('\" \"\"', 1)
149
149
  scan(str)
150
150
  end
151
151
  end
@@ -282,11 +282,11 @@ f'real
282
282
  ]
283
283
  end
284
284
 
285
- it "should parse steps with inline py_string" do
285
+ it "should parse steps with inline doc_string" do
286
286
  scan("Given I have a string\n\"\"\"\nhello\nworld\n\"\"\"")
287
287
  @listener.to_sexp.should == [
288
288
  [:step, "Given ", "I have a string", 1],
289
- [:py_string, "hello\nworld", 2],
289
+ [:doc_string, "hello\nworld", 2],
290
290
  [:eof]
291
291
  ]
292
292
  end
@@ -497,7 +497,7 @@ f'real
497
497
  [:step, "Then ", "I am happy", 37],
498
498
  [:scenario, "Scenario", "Hammerzeit", "", 39],
499
499
  [:step, "Given ", "All work and no play", 40],
500
- [:py_string, "Makes Homer something something\nAnd something else", 41 ],
500
+ [:doc_string, "Makes Homer something something\nAnd something else", 41 ],
501
501
  [:step, "Then ", "crazy", 45],
502
502
  [:eof]
503
503
  ]
@@ -540,7 +540,7 @@ f'real
540
540
  [:step, "Then ", "I am happy", 37],
541
541
  [:scenario, "Scenario", "Hammerzeit", "", 39],
542
542
  [:step, "Given ", "All work and no play", 40],
543
- [:py_string, "Makes Homer something something\r\nAnd something else", 41],
543
+ [:doc_string, "Makes Homer something something\r\nAnd something else", 41],
544
544
  [:step, "Then ", "crazy", 45],
545
545
  [:eof]
546
546
  ]
@@ -11,7 +11,7 @@ require 'gherkin/java_libs'
11
11
  require 'gherkin/shared/bom_group'
12
12
  require 'gherkin/shared/lexer_group'
13
13
  require 'gherkin/shared/tags_group'
14
- require 'gherkin/shared/py_string_group'
14
+ require 'gherkin/shared/doc_string_group'
15
15
  require 'gherkin/shared/row_group'
16
16
  $:.unshift(File.dirname(__FILE__))
17
17
 
@@ -12,7 +12,8 @@ CLEAN.include [
12
12
  'ext/**/*.c',
13
13
  'java/src/main/java/gherkin/lexer/i18n/*.java',
14
14
  'java/src/main/resources/gherkin/*.properties',
15
- 'js/lib/gherkin/lexer/*.js'
15
+ 'js/lib/gherkin/lexer/*.js',
16
+ 'doc'
16
17
  ]
17
18
 
18
19
  desc "Compile the Java extensions"
@@ -72,7 +73,7 @@ langs.each do |i18n|
72
73
  io.write(<<-EOF)
73
74
  require 'mkmf'
74
75
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
75
- $CFLAGS << ' -O0 -Wall -Werror' if CONFIG['CC'] =~ /gcc/
76
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
76
77
  dir_config("gherkin_lexer_#{i18n.underscored_iso_code}")
77
78
  have_library("c", "main")
78
79
  create_makefile("gherkin_lexer_#{i18n.underscored_iso_code}")
@@ -1,4 +1,4 @@
1
- unless ENV['RUBY_CC_VERSION']
1
+ unless ENV['RUBY_CC_VERSION'] || defined?(JRUBY_VERSION)
2
2
  require 'cucumber/rake/task'
3
3
 
4
4
  Cucumber::Rake::Task.new(:cucumber) do |t|
@@ -8,7 +8,7 @@ namespace :gems do
8
8
  sh "rvm 1.8.6-p399@cucumber rake cross compile RUBY_CC_VERSION=1.8.6"
9
9
  sh "rvm 1.9.1-p243@cucumber rake cross compile RUBY_CC_VERSION=1.9.1"
10
10
  # This will copy the .so files to the proper place
11
- sh "rake cross compile RUBY_CC_VERSION=1.8.6:1.9.1"
11
+ sh "rake -t cross compile RUBY_CC_VERSION=1.8.6:1.9.1"
12
12
  end
13
13
 
14
14
  desc 'Prepare JRuby binares'
@@ -20,7 +20,7 @@ namespace :gems do
20
20
  task :ironruby => [:jruby, 'ikvm:dll', 'ikvm:copy_ikvm_dlls']
21
21
 
22
22
  task :sanity do
23
- raise "The jruby gem looks too small" if File.stat("release/gherkin-#{Gherkin::VERSION}-java.gem").size < 1000000
23
+ raise "The jruby gem looks too small" if File.stat("release/gherkin-#{GHERKIN_VERSION}-java.gem").size < 1000000
24
24
  end
25
25
 
26
26
  desc "Prepare binaries for all gems"
@@ -52,14 +52,14 @@ namespace :ikvm do
52
52
 
53
53
  desc 'Make a .NET .exe'
54
54
  task :exe => ['lib/gherkin.jar', :dependent_dlls] do
55
- ikvmc("-target:exe lib/gherkin.jar -out:release/gherkin-#{Gherkin::VERSION}.exe #{references}")
55
+ ikvmc("-target:exe lib/gherkin.jar -out:release/gherkin-#{GHERKIN_VERSION}.exe #{references}")
56
56
  end
57
57
 
58
58
  desc 'Make a .NET .dll'
59
59
  task :dll => ['lib/gherkin.jar', :dependent_dlls] do
60
60
  mkdir_p 'release' unless File.directory?('release')
61
- ikvmc("-target:library lib/gherkin.jar -out:release/gherkin-#{Gherkin::VERSION}.dll #{references}")
62
- cp "release/gherkin-#{Gherkin::VERSION}.dll", 'lib/gherkin.dll'
61
+ ikvmc("-target:library lib/gherkin.jar -out:release/gherkin-#{GHERKIN_VERSION}.dll #{references}")
62
+ cp "release/gherkin-#{GHERKIN_VERSION}.dll", 'lib/gherkin.dll'
63
63
  end
64
64
 
65
65
  desc 'Copy the IKVM .dll files over to the pkg dir'
@@ -74,7 +74,7 @@ end
74
74
 
75
75
  task :ikvm => ['ikvm:copy_ikvm_dlls', 'ikvm:exe', 'ikvm:dll'] do
76
76
  puts "************** Pretty printing some features with .NET. **************"
77
- mono "release/gherkin-#{Gherkin::VERSION}.exe features"
77
+ mono "release/gherkin-#{GHERKIN_VERSION}.exe features"
78
78
  puts "************** DONE Pretty printing some features with .NET. All OK. **************"
79
79
  end
80
80