gherkin 2.12.1-java → 2.12.2-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86a70ad9e2165125e4952b6190193173a2583873
4
- data.tar.gz: df4e5f3f809f1fa2f65f57c7f9f572f5dd44f9d2
3
+ metadata.gz: a5dfa59e8c3d9cf12b27417d08d25a9c75e001ca
4
+ data.tar.gz: 80beea57e1bf5276eb4e6a57578eb4e73d5d5bee
5
5
  SHA512:
6
- metadata.gz: dca548e4ccaf2e5c11922413c813d7c64b725ae28f06d7db6d8d32cac91d5e4c90e2bf9ed3cc930d6f7fcc31c8297a0f56f125dfa080cde51b84a047bc5fd0ee
7
- data.tar.gz: 8b256cc805586f56c7595400babbb973a6446798e56743742371f07f1c9fbe5c57565f789d66da67f0c1b832d15f1be6a5070ae6da5f34750551596b0875793d
6
+ metadata.gz: a662c145323d88960e9de58021272a4769a0e6dd2a8eceb8b634ccc2cc726471b47abc09d4da7f7c0a634d8b15931687dee5a74fbfacbcc98f4575844970f5c9
7
+ data.tar.gz: e42d775b59a7f8659f30a972587e41eed92ce89746a6d3a765565bf16e3ba556fbf3961f8a3f6a320bdc379a879864c83ff78625f322f877f06fd31b6b39d6ba
@@ -1 +1 @@
1
- 2.0.0-p0
1
+ 2.0.0-p247
data/History.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## [2.12.2](https://github.com/cucumber/gherkin/compare/v2.12.1...v2.12.2)
2
+
3
+ * [Core] Fix Ruby 2.0 warnings ([#265](https://github.com/cucumber/gherkin/issues/265) Aslak Hellesøy)
4
+ * [Java] Expose ID so that tools can differentiate between runs of scenario examples ([#279](https://github.com/cucumber/gherkin/pull/278) jtnord)
5
+ * [Java] Ensure PrettyFormatter outputs whole lines and flushed in between ([#277](https://github.com/cucumber/gherkin/pull/277) Ramon Nogueira)
6
+ * [Java] Durations are Longs not longs as they are optional ([#276](https://github.com/cucumber/gherkin/pull/276) jtnord)
7
+ * [Core] Added ಕನ್ನಡ kannaḍa language ([#282](https://github.com/cucumber/gherkin/pull/282) Nikhil Lingutla)
8
+ * [Java] extension of the Formatter interface for more precise lifecycle handling ([#275](https://github.com/cucumber/gherkin/pull/275) Sebastian Gröbler)
9
+ * Java JSONFormatter should record before hooks in next scenario ([#270](https://github.com/cucumber/gherkin/pull/270) Björn Rasmusson)
10
+ * [JavaScript] Fix encoding issues ([#272](https://github.com/cucumber/gherkin/pull/272) Lukas Degener, Thorsten Glaser)
11
+
1
12
  ## [2.12.1](https://github.com/cucumber/gherkin/compare/v2.12.0...v2.12.1)
2
13
 
3
14
  * Dropped support for ruby 1.8.7 (Aslak Hellesøy)
data/README.md CHANGED
@@ -54,7 +54,7 @@ The jar file is in the central Maven repo.
54
54
  <dependency>
55
55
  <groupId>info.cukes</groupId>
56
56
  <artifactId>gherkin</artifactId>
57
- <version>2.12.1</version>
57
+ <version>2.12.2</version>
58
58
  </dependency>
59
59
 
60
60
  You can get it manually from [Maven Central](http://search.maven.org/#browse%7C-2073395818)
@@ -61,20 +61,20 @@ Gem::Specification.new do |s|
61
61
 
62
62
  s.add_runtime_dependency('multi_json', '~> 1.3')
63
63
 
64
- s.add_development_dependency('cucumber', '>= 1.3.4')
64
+ s.add_development_dependency('cucumber', '>= 1.3.8')
65
65
  s.add_development_dependency('rake', '>= 10.1.0')
66
66
  s.add_development_dependency('bundler', '>= 1.3.5') # Make sure it's in sync with /.travis.yml
67
67
  s.add_development_dependency('rspec', '~> 2.14.1')
68
- s.add_development_dependency('rubyzip', '>= 0.9.9')
68
+ s.add_development_dependency('rubyzip', '>= 1.0.0')
69
+ s.add_development_dependency('ruby-beautify', '= 0.92.2')
69
70
 
70
71
  unless ENV['RUBY_CC_VERSION'] || Gherkin::JRUBY
71
- s.add_development_dependency('therubyracer', '>= 0.11.4') if ENV['GHERKIN_JS']
72
+ s.add_development_dependency('therubyracer', '>= 0.12.0') if ENV['GHERKIN_JS']
72
73
  # For Documentation:
73
- s.add_development_dependency('yard', '>= 0.8.6.2')
74
+ s.add_development_dependency('yard', '>= 0.8.7.2')
74
75
  s.add_development_dependency('rdiscount', '>= 2.1.6')
75
76
  end
76
77
 
77
78
  # Only needed by Cucumber. Remove when Cucumber no longer needs those.
78
- s.add_development_dependency('term-ansicolor', '>= 1.2.2')
79
79
  s.add_development_dependency('builder', '>= 3.2.2')
80
80
  end
Binary file
@@ -17,11 +17,15 @@ module Gherkin
17
17
  @feature_tags = []
18
18
  @feature_element_tags = []
19
19
  @examples_tags = []
20
-
20
+ @examples_range = []
21
21
  @feature_events = []
22
22
  @background_events = []
23
23
  @feature_element_events = []
24
24
  @examples_events = []
25
+
26
+ @examples_name = nil
27
+ @feature_element_name = nil
28
+ @feature_element_range = nil
25
29
  end
26
30
 
27
31
  def uri(uri)
@@ -19,9 +19,10 @@ module Gherkin
19
19
  @step_printer = StepPrinter.new
20
20
  @monochrome = monochrome
21
21
  @executing = executing
22
- @background = nil
23
- @tag_statement = nil
24
22
  @steps = []
23
+
24
+ # Prevent warnings, initialize fields
25
+ @background = @tag_statement = @formats = @statement = nil
25
26
  end
26
27
 
27
28
  def uri(uri)
@@ -133,7 +133,7 @@
133
133
  "scenario": "Σενάριο",
134
134
  "scenario_outline": "Περιγραφή Σεναρίου",
135
135
  "examples": "Παραδείγματα|Σενάρια",
136
- "given": "*|Δεδομένου|Δεδομένου ότι",
136
+ "given": "*|Δεδομένου",
137
137
  "when": "*|Όταν",
138
138
  "then": "*|Τότε",
139
139
  "and": "*|Και",
@@ -433,6 +433,20 @@
433
433
  "and": "*|かつ<",
434
434
  "but": "*|しかし<|但し<|ただし<"
435
435
  },
436
+ "kn": {
437
+ "name": "Kannada",
438
+ "native": "ಕನ್ನಡ",
439
+ "background": "ಹಿನ್ನೆಲೆ",
440
+ "feature": "ಹೆಚ್ಚಳ",
441
+ "scenario": "ಕಥಾಸಾರಾಂಶ",
442
+ "scenario_outline": "ವಿವರಣೆ",
443
+ "examples": "ಉದಾಹರಣೆಗಳು",
444
+ "given": "*|ನೀಡಿದ",
445
+ "when": "*|ಸ್ಥಿತಿಯನ್ನು",
446
+ "then": "*|ನಂತರ",
447
+ "and": "*|ಮತ್ತು",
448
+ "but": "*|ಆದರೆ"
449
+ },
436
450
  "ko": {
437
451
  "name": "Korean",
438
452
  "native": "한국어",
@@ -12,6 +12,7 @@ module Gherkin
12
12
  def initialize(formatter)
13
13
  @formatter = formatter
14
14
  @stash = Stash.new
15
+ @current_builder = nil
15
16
  end
16
17
 
17
18
  def comment(value, line)
@@ -57,13 +58,13 @@ module Gherkin
57
58
 
58
59
  def step(keyword, name, line)
59
60
  replay_step_or_examples
60
- @stash.basic_statement do |comments, id|
61
+ @stash.step do |comments|
61
62
  @current_builder = Formatter::Model::Step::Builder.new(comments, keyword, name, line)
62
63
  end
63
64
  end
64
65
 
65
66
  def row(cells, line)
66
- @stash.basic_statement do |comments, id|
67
+ @stash.row do |comments, id|
67
68
  @current_builder.row(comments, cells, line, id)
68
69
  end
69
70
  end
@@ -117,13 +118,19 @@ module Gherkin
117
118
  yield @comments, @tags, @examples_id
118
119
  @comments, @tags = [], []
119
120
  end
120
-
121
- def basic_statement
121
+
122
+ def step
122
123
  @row_index += 1
123
- yield @comments, "#{@examples_id};#{@row_index}"
124
+ yield @comments
124
125
  @comments = []
125
126
  end
126
-
127
+
128
+ def row
129
+ @row_index += 1
130
+ yield @comments, defined?(@examples_id) ? "#{@examples_id};#{@row_index}" : :undefined_examples_id
131
+ @comments = []
132
+ end
133
+
127
134
  def tag(tag)
128
135
  @tags << tag
129
136
  end
@@ -3,8 +3,8 @@
3
3
  module Gherkin
4
4
  unless defined?(Gherkin::VERSION)
5
5
  # See the comment in gherkin.gemspec if you bump the MINOR version (MAJOR.MINOR.PATCH).
6
- VERSION = '2.12.1'
7
- JRUBY = defined?(JRUBY_VERSION)
6
+ VERSION = '2.12.2'
7
+ JRUBY = defined?(JRUBY_VERSION)
8
8
 
9
9
  if !JRUBY && !(RUBY_VERSION =~ /^(1\.9\.3|2\.0)/)
10
10
  warn("WARNING: Unsupported Ruby version - #{RUBY_VERSION}")
@@ -21,6 +21,7 @@ module Gherkin
21
21
  def evaluate(tags)
22
22
  return true if @ands.flatten.empty?
23
23
  vars = Hash[*tags.map{|tag| [tag.name, true]}.flatten]
24
+ raise "No vars" if vars.nil? # Useless statement to prevent ruby warnings about unused var
24
25
  !!Kernel.eval(ruby_expression)
25
26
  end
26
27
 
@@ -115,7 +115,7 @@
115
115
  action end_feature {
116
116
  if(this.cs < lexer_first_final) {
117
117
  var content = this.current_line_content(data, p);
118
- throw "Lexing error on line " + this.line_number + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.";
118
+ throw new Error("Lexing error on line " + this.line_number + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.");
119
119
  } else {
120
120
  this.listener.eof();
121
121
  }
@@ -128,6 +128,7 @@
128
128
  %% write data;
129
129
  %% access this.;
130
130
  %% variable data data;
131
+ %% getkey signedCharValue(data[p]);
131
132
 
132
133
  var Lexer = function(listener) {
133
134
  // Check that listener has the required functions
@@ -135,7 +136,7 @@ var Lexer = function(listener) {
135
136
  for(var i=0, len=events.length; i<len; i++) {
136
137
  var event = events[i];
137
138
  if(typeof listener[event] != 'function') {
138
- throw "Error. No " + event + " function exists on " + JSON.stringify(listener);
139
+ throw new Error("Error. No " + event + " function exists on " + JSON.stringify(listener));
139
140
  }
140
141
  }
141
142
  this.listener = listener;
@@ -157,30 +158,124 @@ Lexer.prototype.scan = function(data) {
157
158
 
158
159
  this.line_number = 1;
159
160
  this.last_newline = 0;
161
+ var signedCharValue=function(v){return v > 127 ? v-256 : v; };
160
162
 
161
163
  %% write init;
162
164
  %% write exec;
163
165
  };
164
166
 
167
+
168
+ /*
169
+ * Decode utf-8 byte sequence to string.
170
+ */
171
+ var decodeUtf8 = function(bytes) {
172
+ var result = "";
173
+ var i = 0;
174
+ var wc;
175
+ var c;
176
+
177
+ while (i < bytes.length) {
178
+ /* parse as UTF-8 lead byte */
179
+ wc = bytes[i++];
180
+ if (wc < 0x80) {
181
+ count = 0;
182
+ } else if (wc < 0xC2 || wc >= 0xF8) {
183
+ throw new Error("input is not a valid UTF-8 lead octet");
184
+ } else if (wc < 0xE0) {
185
+ count = 1;
186
+ wc = (wc & 0x1F) << 6;
187
+ } else if (wc < 0xF0) {
188
+ count = 2;
189
+ wc = (wc & 0x0F) << 12;
190
+ } else /* wc < 0xF8 */ {
191
+ count = 3;
192
+ wc = (wc & 0x07) << 18;
193
+ }
194
+
195
+ /* parse trail bytes, if any */
196
+ while (count) {
197
+ if (!(i < bytes.length)) {
198
+ throw new Error("short read");
199
+ }
200
+ if ((c = bytes[i++] ^ 0x80) > 0x3F) {
201
+ throw new Error("input is not a valid UTF-8 trail octet");
202
+ }
203
+ wc |= c << (6 * --count);
204
+ if (wc < (1 << (5 * count + 6))) {
205
+ throw new Error("invalid non-minimal encoded input");
206
+ }
207
+ }
208
+
209
+ /* handle conversion to UTF-16 if needed */
210
+ if (wc > 0xFFFF) {
211
+ wc -= 0x10000;
212
+ result += String.fromCharCode(0xD800 + (wc >> 10));
213
+ wc = 0xDC00 + (wc & 0x3FF);
214
+ }
215
+ result += String.fromCharCode(wc);
216
+ }
217
+
218
+ return result;
219
+ };
220
+
221
+ /*
222
+ * Encode string to an array of bytes using utf8 encoding.
223
+ *
224
+ * Javascript internally stores character data as utf16 (like java).
225
+ * String.charCodeAt() does *not* produce unicode points, but simply
226
+ * reflects this internal representation. Thus, it is necessary
227
+ * to first decode the utf-16 representation before encoding to
228
+ * utf-8.
229
+ */
230
+ var encodeUtf8 = function(string) {
231
+ var bytes = [];
232
+ var i = 0;
233
+ var j = 0;
234
+ var wc;
235
+
236
+ while (i < string.length) {
237
+ wc = string.charCodeAt(i++);
238
+ if (wc >= 0xD800 && wc <= 0xDBFF && i < string.length && string.charCodeAt(i) >= 0xDC00 && string.charCodeAt(i) <= 0xDFFF) {
239
+ /* decode UTF-16 */
240
+ wc = 0x10000 + ((wc & 0x3FF) << 10) + (string.charCodeAt(i++) & 0x3FF);
241
+ }
242
+
243
+ /* emit lead byte */
244
+ if (wc < 0x80) {
245
+ bytes[j++] = wc;
246
+ count = 0;
247
+ } else if (wc < 0x800) {
248
+ bytes[j++] = 0xC0 | (wc >> 6);
249
+ count = 1;
250
+ } else if (wc < 0x10000) {
251
+ bytes[j++] = 0xE0 | (wc >> 12);
252
+ count = 2;
253
+ } else {
254
+ /* SMP: 21-bit Unicode */
255
+ bytes[j++] = 0xF0 | (wc >> 18);
256
+ count = 3;
257
+ }
258
+
259
+ /* emit trail bytes, if any */
260
+ while (count) {
261
+ bytes[j++] = 0x80 | ((wc >> (6 * --count)) & 0x3F);
262
+ }
263
+ }
264
+
265
+ return bytes;
266
+
267
+ };
268
+
165
269
  Lexer.prototype.bytesToString = function(bytes) {
166
270
  if(typeof bytes.write == 'function') {
167
271
  // Node.js
168
272
  return bytes.toString('utf-8');
169
- } else {
170
- var result = "";
171
- for(var b in bytes) {
172
- result += String.fromCharCode(bytes[b]);
173
- }
174
- return result;
175
273
  }
274
+ return decodeUtf8(bytes);
176
275
  };
177
276
 
178
277
  Lexer.prototype.stringToBytes = function(string) {
179
- var bytes = [];
180
- for(var i = 0; i < string.length; i++) {
181
- bytes[i] = string.charCodeAt(i);
182
- }
183
- return bytes;
278
+ return encodeUtf8(string);
184
279
  };
185
280
 
186
281
  Lexer.prototype.unindent = function(startcol, text) {
@@ -202,7 +297,7 @@ Lexer.prototype.store_keyword_content = function(event, data, p, eof) {
202
297
  };
203
298
 
204
299
  Lexer.prototype.current_line_content = function(data, p) {
205
- var rest = data.slice(this.last_newline, -1);
300
+ var rest = Array.prototype.slice.call(data,this.last_newline, -1);
206
301
  var end = rest.indexOf(10) || -1;
207
302
  return this.bytesToString(rest.slice(0, end)).trim();
208
303
  };
@@ -126,6 +126,9 @@ module Gherkin
126
126
 
127
127
  def initialize(listener)
128
128
  @listener = listener
129
+
130
+ # Initialize ivars to avoid warnings
131
+ @keyword = nil
129
132
  %% write data;
130
133
  end
131
134
 
@@ -198,6 +198,7 @@ module Gherkin
198
198
  | is | Icelandic | Íslenska |
199
199
  | it | Italian | italiano |
200
200
  | ja | Japanese | 日本語 |
201
+ | kn | Kannada | ಕನ್ನಡ |
201
202
  | ko | Korean | 한국어 |
202
203
  | lt | Lithuanian | lietuvių kalba |
203
204
  | lu | Luxemburgish | Lëtzebuergesch |
@@ -98,28 +98,6 @@ module Gherkin
98
98
  {
99
99
  "id":"one/a-scenario",
100
100
  "type":"scenario",
101
- "before": [
102
- {
103
- "match":{
104
- "location":"features/step_definitions/hooks.rb:1"
105
- },
106
- "result":{
107
- "status":"passed",
108
- "error_message":"Passed hook",
109
- "duration": 3
110
- }
111
- },
112
- {
113
- "match":{
114
- "location":"features/step_definitions/hooks.rb:2"
115
- },
116
- "result":{
117
- "status":"failed",
118
- "error_message":"Failed hook",
119
- "duration": 22
120
- }
121
- }
122
- ],
123
101
  "steps":[
124
102
  {
125
103
  "keyword":"Given ",
@@ -152,6 +130,16 @@ module Gherkin
152
130
  }
153
131
  ],
154
132
  "after": [
133
+ {
134
+ "match":{
135
+ "location":"features/step_definitions/hooks.rb:1"
136
+ },
137
+ "result":{
138
+ "status":"passed",
139
+ "error_message":"Passed after",
140
+ "duration": 3
141
+ }
142
+ },
155
143
  {
156
144
  "match":{
157
145
  "location":"features/step_definitions/hooks.rb:3"
@@ -11,9 +11,13 @@ module Gherkin
11
11
 
12
12
  it "should store the i18n language of the last scanned feature" do
13
13
  @lexer.scan("# language: fr\n")
14
- @lexer.i18n_language.iso_code.should == "fr"
15
- @lexer.scan("# language: no\n")
16
- @lexer.i18n_language.iso_code.should == "no"
14
+ # This if is kind of dumb - it's just to avoid warnings from ruby
15
+ if(@lexer.i18n_language.iso_code.should == "fr")
16
+ @lexer.scan("# language: no\n")
17
+ @lexer.i18n_language.iso_code.should == "no"
18
+ else
19
+ fail
20
+ end
17
21
  end
18
22
 
19
23
  it "should detect language when there are spaces and CRLF" do
@@ -5,7 +5,7 @@ module Gherkin
5
5
  describe Parser do
6
6
  unless defined?(JRUBY_VERSION)
7
7
  it "should raise when feature doesn't parse" do
8
- p = Parser.new(mock('formatter').as_null_object)
8
+ p = Parser.new(double('formatter').as_null_object)
9
9
  lambda do
10
10
  p.parse("Feature: f\nFeature: f", __FILE__, __LINE__-1)
11
11
  end.should raise_error(Regexp.new("Parse error at #{__FILE__}:\\d+"))
@@ -7,7 +7,7 @@ if defined?(JRUBY_VERSION)
7
7
  module Rubify
8
8
  describe "rubify" do
9
9
  before do
10
- @java_collection = [mock("Java.java.util.ArrayList")]
10
+ @java_collection = [double("Java.java.util.ArrayList")]
11
11
  @java_collection.stub(:===).and_return(Java.java.util.Collection)
12
12
  @java_collection.stub(:line).and_return(15)
13
13
  @rubified_array = rubify(@java_collection)
@@ -1,6 +1,4 @@
1
1
  # encoding: utf-8
2
- require 'spec_helper'
3
-
4
2
  module Gherkin
5
3
  module Lexer
6
4
  shared_examples_for "a Gherkin lexer lexing doc_strings" do
@@ -1,6 +1,4 @@
1
1
  #encoding: utf-8
2
- require 'spec_helper'
3
-
4
2
  module Gherkin
5
3
  module Lexer
6
4
  shared_examples_for "encoding" do
@@ -1,6 +1,4 @@
1
1
  #encoding: utf-8
2
- require 'spec_helper'
3
-
4
2
  module Gherkin
5
3
  module Lexer
6
4
  shared_examples_for "a Gherkin lexer" do
@@ -1,6 +1,4 @@
1
1
  # encoding: utf-8
2
- require 'spec_helper'
3
-
4
2
  module Gherkin
5
3
  module Lexer
6
4
  shared_examples_for "a Gherkin lexer lexing rows" do
@@ -1,6 +1,4 @@
1
1
  # encoding: utf-8
2
- require 'spec_helper'
3
-
4
2
  module Gherkin
5
3
  module Lexer
6
4
  shared_examples_for "a Gherkin lexer lexing tags" do
@@ -1,6 +1,16 @@
1
+ def silence_warnings(&block)
2
+ warn_level = $VERBOSE
3
+ $VERBOSE = nil
4
+ result = block.call
5
+ $VERBOSE = warn_level
6
+ result
7
+ end
8
+
1
9
  if RUBY_VERSION =~ /1\.9|2\.0/
2
- Encoding.default_external = Encoding::UTF_8
3
- Encoding.default_internal = Encoding::UTF_8
10
+ silence_warnings do
11
+ Encoding.default_external = Encoding::UTF_8
12
+ Encoding.default_internal = Encoding::UTF_8
13
+ end
4
14
  end
5
15
  if defined?(JRUBY_VERSION)
6
16
  java_import java.util.ArrayList
@@ -30,7 +40,7 @@ module GherkinSpecHelper
30
40
 
31
41
  def fixture(file)
32
42
  encoding = Gherkin::Lexer::Encoding.new
33
- source = encoding.read_file(File.dirname(__FILE__) + "/gherkin/fixtures/" + file)
43
+ encoding.read_file(File.dirname(__FILE__) + "/gherkin/fixtures/" + file)
34
44
  end
35
45
 
36
46
  def rubify_hash(hash)
@@ -51,8 +61,10 @@ end
51
61
  # Allows comparison of Java List with Ruby Array (rows)
52
62
  RSpec::Matchers.define :r do |expected|
53
63
  match do |row|
54
- def row.inspect
55
- "r " + self.map{|cell| cell}.inspect
64
+ silence_warnings do
65
+ def row.inspect
66
+ "r " + self.map{|cell| cell}.inspect
67
+ end
56
68
  end
57
69
  row.map{|cell| cell}.should == expected
58
70
  end
@@ -60,8 +72,10 @@ end
60
72
 
61
73
  RSpec::Matchers.define :a do |expected|
62
74
  match do |array|
63
- def array.inspect
64
- "a " + self.map{|e| e.to_sym}.inspect
75
+ silence_warnings do
76
+ def array.inspect
77
+ "a " + self.map{|e| e.to_sym}.inspect
78
+ end
65
79
  end
66
80
  array.map{|e| e.to_sym}.should == expected
67
81
  end
@@ -55,8 +55,8 @@ namespace :ikvm do
55
55
  mkdir_p File.dirname(pkg_dir) unless File.directory?(pkg_dir)
56
56
  nuget("Pack #{GHERKIN_NUSPEC} -Version #{GHERKIN_VERSION} -OutputDirectory #{pkg_dir}")
57
57
  # Now, verify that we have a proper dll inside the package
58
- require 'zip/zipfilesystem'
59
- Zip::ZipFile.open(GHERKIN_NUPKG) do |zipfile|
58
+ require 'zip'
59
+ Zip::File.open(GHERKIN_NUPKG) do |zipfile|
60
60
  dll = zipfile.get_entry('lib/gherkin.dll')
61
61
  if(dll.size < 3_000_000)
62
62
  raise "Looks like the dll is too small."
@@ -112,7 +112,6 @@ EOF
112
112
 
113
113
  task :push => GHERKIN_NUPKG do
114
114
  nuget("Push #{GHERKIN_NUPKG}")
115
- nuget("Publish gherkin #{GHERKIN_VERSION}")
116
115
  end
117
116
 
118
117
  file IKVMC_EXE do
@@ -39,6 +39,14 @@ class RagelTask
39
39
  # Minify
40
40
  sh %{node #{UGLIFYJS} #{target} > #{min_target}}
41
41
  end
42
+
43
+ if(@lang == 'rb')
44
+ # Prettify the code so we don't get indentation warnings
45
+ sh %{rbeautify #{target} > tmp.rb}
46
+ sh %{mv tmp.rb #{target}}
47
+ # rbeautify has a bug with class << self ... end alignment. Fix it.
48
+ sh %{perl -i -0pe 's/ end\n self._/ end\n self._/g' #{target}}
49
+ end
42
50
  end
43
51
 
44
52
  if(@lang != 'java')
@@ -2,5 +2,5 @@ require 'rspec/core/rake_task'
2
2
 
3
3
  desc "Run RSpec"
4
4
  task :spec do
5
- sh "rspec spec"
5
+ sh "rspec spec --color --warnings"
6
6
  end
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.12.1
4
+ version: 2.12.2
5
5
  platform: java
6
6
  authors:
7
7
  - Mike Sassak
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-08-10 00:00:00.000000000 Z
13
+ date: 2013-10-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - '>='
34
34
  - !ruby/object:Gem::Version
35
- version: 1.3.4
35
+ version: 1.3.8
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '>='
41
41
  - !ruby/object:Gem::Version
42
- version: 1.3.4
42
+ version: 1.3.8
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rake
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -88,70 +88,70 @@ dependencies:
88
88
  requirements:
89
89
  - - '>='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.9.9
91
+ version: 1.0.0
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - '>='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.9.9
98
+ version: 1.0.0
99
99
  - !ruby/object:Gem::Dependency
100
- name: therubyracer
100
+ name: ruby-beautify
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - '>='
103
+ - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.11.4
105
+ version: 0.92.2
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - '>='
110
+ - - '='
111
111
  - !ruby/object:Gem::Version
112
- version: 0.11.4
112
+ version: 0.92.2
113
113
  - !ruby/object:Gem::Dependency
114
- name: yard
114
+ name: therubyracer
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - '>='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.8.6.2
119
+ version: 0.12.0
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - '>='
125
125
  - !ruby/object:Gem::Version
126
- version: 0.8.6.2
126
+ version: 0.12.0
127
127
  - !ruby/object:Gem::Dependency
128
- name: rdiscount
128
+ name: yard
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - '>='
132
132
  - !ruby/object:Gem::Version
133
- version: 2.1.6
133
+ version: 0.8.7.2
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - '>='
139
139
  - !ruby/object:Gem::Version
140
- version: 2.1.6
140
+ version: 0.8.7.2
141
141
  - !ruby/object:Gem::Dependency
142
- name: term-ansicolor
142
+ name: rdiscount
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - '>='
146
146
  - !ruby/object:Gem::Version
147
- version: 1.2.2
147
+ version: 2.1.6
148
148
  type: :development
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - '>='
153
153
  - !ruby/object:Gem::Version
154
- version: 1.2.2
154
+ version: 2.1.6
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: builder
157
157
  requirement: !ruby/object:Gem::Requirement
@@ -339,7 +339,7 @@ rubyforge_project:
339
339
  rubygems_version: 2.0.3
340
340
  signing_key:
341
341
  specification_version: 4
342
- summary: gherkin-2.12.1
342
+ summary: gherkin-2.12.2
343
343
  test_files:
344
344
  - features/escaped_pipes.feature
345
345
  - features/feature_parser.feature