aslakhellesoy-cucumber 0.1.99.12 → 0.1.99.13
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.
- data/History.txt +7 -0
- data/Manifest.txt +2 -0
- data/Rakefile +1 -1
- data/lib/cucumber/formatter/ansicolor.rb +5 -1
- data/lib/cucumber/languages.yml +5 -1
- data/lib/cucumber/parser.rb +23 -5
- data/lib/cucumber/parser/i18n.tt +9 -9
- data/lib/cucumber/version.rb +1 -1
- metadata +3 -3
data/History.txt
CHANGED
@@ -56,6 +56,12 @@ which is a richer DSL than JBehave's language. -Over 20 spoken languages, Tables
|
|
56
56
|
Scenario Outlines, the rich command line, the nice output format and everything
|
57
57
|
pure Ruby users have been enjoying for a while.
|
58
58
|
|
59
|
+
== TODO Before 0.2 release
|
60
|
+
* Verify that custom formatters work - write a feature for it
|
61
|
+
* Implement at least a basic HTML formatter
|
62
|
+
* Get cucumber.jar working. Move to separate github project. I have it somewhat working with:
|
63
|
+
mvn compile && java -classpath /usr/local/jruby/lib/jruby-complete.jar:target/classes:/usr/local/jruby/lib/ruby/gems/1.8/gems/treetop-1.2.4/lib:/usr/local/jruby/lib/ruby/gems/1.8/gems/polyglot-0.2.3/lib:/usr/local/jruby/lib/ruby/gems/1.8/gems/term-ansicolor-1.0.3/lib:. cukes.Cucumber --help
|
64
|
+
|
59
65
|
== Bugfixes
|
60
66
|
* -n option does not suppress the line info for a Scenario Outline (#175 Aslak Hellesøy)
|
61
67
|
* Errors with rspec-rails matchers in cucumber 0.1.99 (#173 David Chelimsky)
|
@@ -69,6 +75,7 @@ pure Ruby users have been enjoying for a while.
|
|
69
75
|
* Pending steps in > steps called from steps (#65 Aslak Hellesøy)
|
70
76
|
|
71
77
|
=== New features
|
78
|
+
* Keywords can be aliased in languages.yml. See English for an example (scenarios: Scenarios|Examples)
|
72
79
|
* Adding support for Background (#153 Joseph Wilk)
|
73
80
|
* Added Česky/Czech (Vojtech Salbaba)
|
74
81
|
* New --no-multiline option to reduce noise. Useful if lots of features are failing.
|
data/Manifest.txt
CHANGED
@@ -217,6 +217,7 @@ lib/cucumber/rake/task.rb
|
|
217
217
|
lib/cucumber/step_definition.rb
|
218
218
|
lib/cucumber/step_mother.rb
|
219
219
|
lib/cucumber/version.rb
|
220
|
+
pom.xml
|
220
221
|
rails_generators/cucumber/USAGE
|
221
222
|
rails_generators/cucumber/cucumber_generator.rb
|
222
223
|
rails_generators/cucumber/templates/cucumber
|
@@ -271,3 +272,4 @@ spec/cucumber/treetop_parser/with_tags.feature
|
|
271
272
|
spec/cucumber/world/pending_spec.rb
|
272
273
|
spec/spec.opts
|
273
274
|
spec/spec_helper.rb
|
275
|
+
src/main/java/cukes/Cucumber.java
|
data/Rakefile
CHANGED
@@ -5,4 +5,4 @@ require 'config/hoe' # setup Hoe + all gem configuration
|
|
5
5
|
Dir['gem_tasks/**/*.rake'].each { |rake| load rake }
|
6
6
|
|
7
7
|
# Hoe gives us :default => :test, but we don't have Test::Unit tests.
|
8
|
-
Rake::Task[:default].clear_prerequisites
|
8
|
+
Rake::Task[:default].clear_prerequisites rescue nil # For some super weird reason this fails for some...
|
@@ -1,7 +1,11 @@
|
|
1
1
|
# Hack to work around Win32/Console, which bundles a licence-violating, outdated
|
2
2
|
# copy of term/ansicolor that doesn't implement Term::ANSIColor#coloring=.
|
3
3
|
# We want the official one!
|
4
|
-
|
4
|
+
begin
|
5
|
+
gem 'term-ansicolor'
|
6
|
+
rescue Exception => ignore
|
7
|
+
# In order to work with Cucumber.java, which doesn't bundle gems.
|
8
|
+
end
|
5
9
|
$LOAD_PATH.each{|path| $LOAD_PATH.unshift($LOAD_PATH.delete(path)) if path =~ /term-ansicolor/}
|
6
10
|
require 'term/ansicolor'
|
7
11
|
|
data/lib/cucumber/languages.yml
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
# We use the codes here (prefer 2 letters when possible)
|
3
3
|
# http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
|
4
4
|
#
|
5
|
+
# If you want several aliases for a keyword, just separate them
|
6
|
+
# with a | character. Make sure there are no ambiguities in the
|
7
|
+
# keywords.
|
8
|
+
#
|
5
9
|
"en":
|
6
10
|
name: English
|
7
11
|
native: English
|
@@ -10,7 +14,7 @@
|
|
10
14
|
background: Background
|
11
15
|
scenario: Scenario
|
12
16
|
scenario_outline: Scenario Outline
|
13
|
-
examples: Examples
|
17
|
+
examples: Examples|Scenarios
|
14
18
|
given: Given
|
15
19
|
when: When
|
16
20
|
then: Then
|
data/lib/cucumber/parser.rb
CHANGED
@@ -13,12 +13,30 @@ module Cucumber
|
|
13
13
|
#
|
14
14
|
# The AST classes are defined in the Cucumber::Ast module.
|
15
15
|
module Parser
|
16
|
+
translator = Module.new do
|
17
|
+
def keywordz(key)
|
18
|
+
'Scenario'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
16
22
|
def self.load_parser(keywords)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
23
|
+
Loader.new(keywords)
|
24
|
+
end
|
25
|
+
|
26
|
+
class Loader
|
27
|
+
def initialize(keywords)
|
28
|
+
@keywords = keywords
|
29
|
+
template = File.open(File.dirname(__FILE__) + "/parser/i18n.tt", Cucumber.file_mode('r')).read
|
30
|
+
erb = ERB.new(template)
|
31
|
+
grammar = erb.result(binding)
|
32
|
+
Treetop.load_from_string(grammar)
|
33
|
+
require 'cucumber/parser/feature'
|
34
|
+
end
|
35
|
+
|
36
|
+
def keywords(key)
|
37
|
+
values = @keywords[key].split('|')
|
38
|
+
values.map{|value| "'#{value}'"}.join(" / ")
|
39
|
+
end
|
22
40
|
end
|
23
41
|
end
|
24
42
|
end
|
data/lib/cucumber/parser/i18n.tt
CHANGED
@@ -3,27 +3,27 @@ module Cucumber
|
|
3
3
|
grammar I18n
|
4
4
|
|
5
5
|
rule background_keyword
|
6
|
-
|
6
|
+
(<%= keywords('background') %>) ':'
|
7
7
|
end
|
8
8
|
|
9
9
|
rule scenario_keyword
|
10
|
-
|
10
|
+
(<%= keywords('scenario') %>) ':'
|
11
11
|
end
|
12
12
|
|
13
13
|
rule scenario_outline_keyword
|
14
|
-
|
14
|
+
(<%= keywords('scenario_outline') %>) ':'
|
15
15
|
end
|
16
16
|
|
17
17
|
rule step_keyword
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
(<%= keywords('given') %>) /
|
19
|
+
(<%= keywords('when') %>) /
|
20
|
+
(<%= keywords('then') %>) /
|
21
|
+
(<%= keywords('and') %>) /
|
22
|
+
(<%= keywords('but') %>)
|
23
23
|
end
|
24
24
|
|
25
25
|
rule examples_keyword
|
26
|
-
|
26
|
+
(<%= keywords('examples') %>) ':'?
|
27
27
|
end
|
28
28
|
|
29
29
|
end
|
data/lib/cucumber/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aslakhellesoy-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.99.
|
4
|
+
version: 0.1.99.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Aslak Helles\xC3\xB8y"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-01-
|
12
|
+
date: 2009-01-28 00:00:00 -08:00
|
13
13
|
default_executable: cucumber
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 1.8.
|
49
|
+
version: 1.8.3
|
50
50
|
version:
|
51
51
|
description: Executable Feature scenarios
|
52
52
|
email:
|