gherkin 1.0.18 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +8 -0
- data/VERSION.yml +1 -1
- data/lib/gherkin/i18n.rb +2 -7
- data/spec/gherkin/i18n_spec.rb +2 -0
- data/spec/spec_helper.rb +1 -1
- metadata +3 -3
data/History.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
== 1.0.19
|
2
|
+
|
3
|
+
=== New Features
|
4
|
+
* Works with JRuby 1.5.0.RC1 (Aslak Hellesøy)
|
5
|
+
|
6
|
+
=== Changed Features
|
7
|
+
* I18n.code_keywords now return And and But as well, making Cucumber StepDefs a little more flexible (Aslak Hellesøy)
|
8
|
+
|
1
9
|
== 1.0.18 (2010-04-21)
|
2
10
|
|
3
11
|
=== Bugfixes
|
data/VERSION.yml
CHANGED
data/lib/gherkin/i18n.rb
CHANGED
@@ -11,7 +11,6 @@ module Gherkin
|
|
11
11
|
ALL_KEYS = %w{name native feature background scenario scenario_outline examples given when then and but}
|
12
12
|
KEYWORD_KEYS = ALL_KEYS - %w{name native}
|
13
13
|
STEP_KEYWORD_KEYS = %w{given when then and but}
|
14
|
-
GWT_KEYWORD_KEYS = %w{given when then}
|
15
14
|
LANGUAGES = YAML.load_file(File.dirname(__FILE__) + '/i18n.yml')
|
16
15
|
|
17
16
|
class << self
|
@@ -132,13 +131,9 @@ module Gherkin
|
|
132
131
|
STEP_KEYWORD_KEYS.map{|iso_code| keywords(iso_code)}.flatten.uniq
|
133
132
|
end
|
134
133
|
|
135
|
-
def gwt_keywords
|
136
|
-
GWT_KEYWORD_KEYS.map{|iso_code| keywords(iso_code)}.flatten.uniq
|
137
|
-
end
|
138
|
-
|
139
134
|
# Keywords that can be used in code
|
140
135
|
def code_keywords
|
141
|
-
result =
|
136
|
+
result = step_keywords.map{|keyword| self.class.code_keyword_for(keyword)}
|
142
137
|
result.delete('*')
|
143
138
|
result
|
144
139
|
end
|
@@ -158,7 +153,7 @@ module Gherkin
|
|
158
153
|
KEYWORD_KEYS.each do |key|
|
159
154
|
pf.row([key, keywords(key).map{|keyword| %{"#{keyword}"}}.join(', ')], 0)
|
160
155
|
end
|
161
|
-
|
156
|
+
STEP_KEYWORD_KEYS.each do |key|
|
162
157
|
code_keywords = keywords(key).reject{|keyword| keyword == '* '}.map do |keyword|
|
163
158
|
%{"#{self.class.code_keyword_for(keyword)}"}
|
164
159
|
end.join(', ')
|
data/spec/gherkin/i18n_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 19
|
9
|
+
version: 1.0.19
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Mike Sassak
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-04-
|
19
|
+
date: 2010-04-23 00:00:00 +02:00
|
20
20
|
default_executable: gherkin
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|