gherkin 1.0.30-universal-dotnet
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitattributes +2 -0
- data/.gitignore +9 -0
- data/.mailmap +2 -0
- data/History.txt +187 -0
- data/LICENSE +20 -0
- data/README.rdoc +59 -0
- data/Rakefile +58 -0
- data/VERSION.yml +5 -0
- data/bin/gherkin +5 -0
- data/cucumber.yml +3 -0
- data/features/escaped_pipes.feature +8 -0
- data/features/feature_parser.feature +226 -0
- data/features/native_lexer.feature +19 -0
- data/features/parser_with_native_lexer.feature +205 -0
- data/features/pretty_printer.feature +14 -0
- data/features/step_definitions/eyeball_steps.rb +3 -0
- data/features/step_definitions/gherkin_steps.rb +30 -0
- data/features/step_definitions/pretty_formatter_steps.rb +55 -0
- data/features/steps_parser.feature +46 -0
- data/features/support/env.rb +33 -0
- data/ikvm/.gitignore +3 -0
- data/java/.gitignore +2 -0
- data/java/src/main/java/gherkin/lexer/.gitignore +1 -0
- data/java/src/main/resources/gherkin/.gitignore +1 -0
- data/lib/.gitignore +4 -0
- data/lib/gherkin.rb +2 -0
- data/lib/gherkin/c_lexer.rb +17 -0
- data/lib/gherkin/cli/main.rb +33 -0
- data/lib/gherkin/formatter/argument.rb +27 -0
- data/lib/gherkin/formatter/colors.rb +119 -0
- data/lib/gherkin/formatter/escaping.rb +15 -0
- data/lib/gherkin/formatter/monochrome_format.rb +9 -0
- data/lib/gherkin/formatter/pretty_formatter.rb +168 -0
- data/lib/gherkin/i18n.rb +176 -0
- data/lib/gherkin/i18n.yml +588 -0
- data/lib/gherkin/i18n_lexer.rb +38 -0
- data/lib/gherkin/native.rb +7 -0
- data/lib/gherkin/native/ikvm.rb +55 -0
- data/lib/gherkin/native/java.rb +47 -0
- data/lib/gherkin/native/null.rb +9 -0
- data/lib/gherkin/parser/event.rb +45 -0
- data/lib/gherkin/parser/filter_listener.rb +199 -0
- data/lib/gherkin/parser/meta.txt +5 -0
- data/lib/gherkin/parser/parser.rb +142 -0
- data/lib/gherkin/parser/root.txt +11 -0
- data/lib/gherkin/parser/steps.txt +4 -0
- data/lib/gherkin/parser/tag_expression.rb +50 -0
- data/lib/gherkin/rb_lexer.rb +8 -0
- data/lib/gherkin/rb_lexer/.gitignore +1 -0
- data/lib/gherkin/rb_lexer/README.rdoc +8 -0
- data/lib/gherkin/rubify.rb +18 -0
- data/lib/gherkin/tools.rb +8 -0
- data/lib/gherkin/tools/files.rb +35 -0
- data/lib/gherkin/tools/reformat.rb +19 -0
- data/lib/gherkin/tools/stats.rb +21 -0
- data/lib/gherkin/tools/stats_listener.rb +57 -0
- data/ragel/i18n/.gitignore +1 -0
- data/ragel/lexer.c.rl.erb +425 -0
- data/ragel/lexer.java.rl.erb +216 -0
- data/ragel/lexer.rb.rl.erb +173 -0
- data/ragel/lexer_common.rl.erb +50 -0
- data/spec/gherkin/c_lexer_spec.rb +21 -0
- data/spec/gherkin/csharp_lexer_spec.rb +20 -0
- data/spec/gherkin/fixtures/1.feature +8 -0
- data/spec/gherkin/fixtures/comments_in_table.feature +9 -0
- data/spec/gherkin/fixtures/complex.feature +45 -0
- data/spec/gherkin/fixtures/dos_line_endings.feature +45 -0
- data/spec/gherkin/fixtures/i18n_fr.feature +14 -0
- data/spec/gherkin/fixtures/i18n_no.feature +7 -0
- data/spec/gherkin/fixtures/i18n_zh-CN.feature +9 -0
- data/spec/gherkin/fixtures/simple_with_comments.feature +7 -0
- data/spec/gherkin/fixtures/simple_with_tags.feature +11 -0
- data/spec/gherkin/fixtures/with_bom.feature +3 -0
- data/spec/gherkin/formatter/argument_spec.rb +28 -0
- data/spec/gherkin/formatter/colors_spec.rb +19 -0
- data/spec/gherkin/formatter/pretty_formatter_spec.rb +162 -0
- data/spec/gherkin/formatter/spaces.feature +9 -0
- data/spec/gherkin/formatter/tabs.feature +9 -0
- data/spec/gherkin/i18n_lexer_spec.rb +26 -0
- data/spec/gherkin/i18n_spec.rb +144 -0
- data/spec/gherkin/java_lexer_spec.rb +21 -0
- data/spec/gherkin/parser/filter_listener_spec.rb +390 -0
- data/spec/gherkin/parser/parser_spec.rb +50 -0
- data/spec/gherkin/parser/tag_expression_spec.rb +116 -0
- data/spec/gherkin/rb_lexer_spec.rb +19 -0
- data/spec/gherkin/sexp_recorder.rb +32 -0
- data/spec/gherkin/shared/lexer_spec.rb +550 -0
- data/spec/gherkin/shared/py_string_spec.rb +150 -0
- data/spec/gherkin/shared/row_spec.rb +104 -0
- data/spec/gherkin/shared/tags_spec.rb +50 -0
- data/spec/spec_helper.rb +87 -0
- data/tasks/bench.rake +188 -0
- data/tasks/bench/feature_builder.rb +49 -0
- data/tasks/bench/generated/.gitignore +1 -0
- data/tasks/bench/null_listener.rb +4 -0
- data/tasks/compile.rake +89 -0
- data/tasks/cucumber.rake +26 -0
- data/tasks/gems.rake +45 -0
- data/tasks/ikvm.rake +47 -0
- data/tasks/ragel_task.rb +70 -0
- data/tasks/rdoc.rake +12 -0
- data/tasks/release.rake +26 -0
- data/tasks/rspec.rake +15 -0
- metadata +257 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
class StepsBuilder
|
2
|
+
def initialize
|
3
|
+
@steps = []
|
4
|
+
end
|
5
|
+
|
6
|
+
def step(content, generator)
|
7
|
+
@steps << " Given #{content}"
|
8
|
+
if(rand(5) == 0)
|
9
|
+
cols = rand(8) + 1
|
10
|
+
rows = rand(10)
|
11
|
+
rows.times do
|
12
|
+
row = " |"
|
13
|
+
cols.times do
|
14
|
+
row << generator.table_cell << "|"
|
15
|
+
end
|
16
|
+
@steps << row
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_s
|
22
|
+
@steps.join("\n")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class FeatureBuilder
|
27
|
+
def initialize(name, &block)
|
28
|
+
@name = name
|
29
|
+
@scenarios = {}
|
30
|
+
block.call(self)
|
31
|
+
end
|
32
|
+
|
33
|
+
def scenario(name, &block)
|
34
|
+
@scenarios[name] = StepsBuilder.new
|
35
|
+
block.call(@scenarios[name])
|
36
|
+
end
|
37
|
+
|
38
|
+
def to_s
|
39
|
+
str = "Feature: #{@name}\n"
|
40
|
+
@scenarios.each do |scenario, steps|
|
41
|
+
str += "\n"
|
42
|
+
str += " Scenario: #{scenario}\n"
|
43
|
+
str += steps.to_s
|
44
|
+
str += "\n"
|
45
|
+
end
|
46
|
+
str
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
*.feature
|
data/tasks/compile.rake
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/ragel_task'
|
2
|
+
BYPASS_NATIVE_IMPL = true
|
3
|
+
require 'gherkin/i18n'
|
4
|
+
|
5
|
+
CLEAN.include [
|
6
|
+
'pkg', 'tmp',
|
7
|
+
'**/*.{o,bundle,jar,so,obj,pdb,lib,def,exp,log}', 'ext',
|
8
|
+
'java/target',
|
9
|
+
'ragel/i18n/*.rl',
|
10
|
+
'lib/gherkin/rb_lexer/*.rb',
|
11
|
+
'ext/**/*.c',
|
12
|
+
'java/src/main/java/gherkin/lexer/*.java',
|
13
|
+
'java/src/main/resources/gherkin/*.properties',
|
14
|
+
]
|
15
|
+
|
16
|
+
desc "Compile the Java extensions"
|
17
|
+
task :jar => 'lib/gherkin.jar'
|
18
|
+
|
19
|
+
file 'lib/gherkin.jar' => Dir['java/src/main/java/**/*.java'] do
|
20
|
+
sh("mvn -f java/pom.xml package")
|
21
|
+
end
|
22
|
+
|
23
|
+
rl_langs = ENV['RL_LANGS'] ? ENV['RL_LANGS'].split(',') : []
|
24
|
+
langs = Gherkin::I18n.all.select { |lang| rl_langs.empty? || rl_langs.include?(lang.iso_code) }
|
25
|
+
|
26
|
+
langs.each do |i18n|
|
27
|
+
java = RagelTask.new('java', i18n)
|
28
|
+
rb = RagelTask.new('rb', i18n)
|
29
|
+
|
30
|
+
file 'lib/gherkin.jar' => [java.target, rb.target]
|
31
|
+
|
32
|
+
begin
|
33
|
+
if defined?(JRUBY_VERSION)
|
34
|
+
java_properties = "java/src/main/resources/gherkin/I18nKeywords_#{i18n.iso_code.gsub(/-/, '_')}.properties"
|
35
|
+
file java_properties => 'lib/gherkin/i18n.yml' do
|
36
|
+
File.open(java_properties, 'wb') do |io|
|
37
|
+
io.puts("# Generated file. Do not edit.")
|
38
|
+
Gherkin::I18n::KEYWORD_KEYS.each do |key|
|
39
|
+
value = Gherkin::I18n.unicode_escape(i18n.keywords(key).join("|"))
|
40
|
+
io.puts("#{key}:#{value}")
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
file 'lib/gherkin.jar' => java_properties
|
45
|
+
else
|
46
|
+
require 'rake/extensiontask'
|
47
|
+
|
48
|
+
c = RagelTask.new('c', i18n)
|
49
|
+
|
50
|
+
extconf = "ext/gherkin_lexer_#{i18n.underscored_iso_code}/extconf.rb"
|
51
|
+
file extconf do
|
52
|
+
FileUtils.mkdir(File.dirname(extconf)) unless File.directory?(File.dirname(extconf))
|
53
|
+
File.open(extconf, "w") do |io|
|
54
|
+
io.write(<<-EOF)
|
55
|
+
require 'mkmf'
|
56
|
+
CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
|
57
|
+
$CFLAGS << ' -O0 -Wall -Werror' if CONFIG['CC'] =~ /gcc/
|
58
|
+
dir_config("gherkin_lexer_#{i18n.underscored_iso_code}")
|
59
|
+
have_library("c", "main")
|
60
|
+
create_makefile("gherkin_lexer_#{i18n.underscored_iso_code}")
|
61
|
+
EOF
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
Rake::ExtensionTask.new("gherkin_lexer_#{i18n.underscored_iso_code}") do |ext|
|
66
|
+
if ENV['RUBY_CC_VERSION']
|
67
|
+
ext.cross_compile = true
|
68
|
+
ext.cross_platform = 'i386-mingw32'
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# The way tasks are defined with compile:xxx (but without namespace) in rake-compiler forces us
|
73
|
+
# to use these hacks for setting up dependencies. Ugly!
|
74
|
+
Rake::Task["compile:gherkin_lexer_#{i18n.underscored_iso_code}"].prerequisites.unshift(extconf)
|
75
|
+
Rake::Task["compile:gherkin_lexer_#{i18n.underscored_iso_code}"].prerequisites.unshift(c.target)
|
76
|
+
Rake::Task["compile:gherkin_lexer_#{i18n.underscored_iso_code}"].prerequisites.unshift(rb.target)
|
77
|
+
|
78
|
+
Rake::Task["compile"].prerequisites.unshift(extconf)
|
79
|
+
Rake::Task["compile"].prerequisites.unshift(c.target)
|
80
|
+
Rake::Task["compile"].prerequisites.unshift(rb.target)
|
81
|
+
end
|
82
|
+
rescue LoadError
|
83
|
+
unless defined?($c_warned)
|
84
|
+
warn "WARNING: Rake::ExtensionTask not installed. Skipping C compilation."
|
85
|
+
$c_warned = true
|
86
|
+
task :compile # no-op
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
data/tasks/cucumber.rake
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
begin
|
2
|
+
require 'cucumber/rake/task'
|
3
|
+
|
4
|
+
Cucumber::Rake::Task.new(:cucumber) do |t|
|
5
|
+
t.cucumber_opts = "--profile default"
|
6
|
+
end
|
7
|
+
task :cucumber => [:check_dependencies]
|
8
|
+
|
9
|
+
namespace :cucumber do
|
10
|
+
Cucumber::Rake::Task.new(:rcov, "Run Cucumber using RCov") do |t|
|
11
|
+
t.cucumber_opts = "--profile default"
|
12
|
+
t.rcov = true
|
13
|
+
t.rcov_opts = %w{--exclude spec\/}
|
14
|
+
end
|
15
|
+
|
16
|
+
Cucumber::Rake::Task.new(:native_lexer, "Run Native lexer Cucumber features") do |t|
|
17
|
+
t.cucumber_opts = "--profile native_lexer"
|
18
|
+
end
|
19
|
+
task :native_lexer => [:check_dependencies, :clean, :compile]
|
20
|
+
end
|
21
|
+
|
22
|
+
rescue LoadError
|
23
|
+
task :cucumber do
|
24
|
+
raise "Cucumber not installed"
|
25
|
+
end
|
26
|
+
end
|
data/tasks/gems.rake
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
namespace :gems do
|
2
|
+
desc "Build MRI/C POSIX gem"
|
3
|
+
task :posix => :release_dir do
|
4
|
+
sh "rake clean spec"
|
5
|
+
sh "rake gemspec build"
|
6
|
+
mv "pkg/gherkin-#{GHERKIN_VERSION}.gem", 'release'
|
7
|
+
end
|
8
|
+
|
9
|
+
[:mswin32, :mingw32].each do |win_compiler|
|
10
|
+
desc "Build MRI/C precompiled #{win_compiler} gem"
|
11
|
+
task win_compiler do
|
12
|
+
# Bootstrap with:
|
13
|
+
#
|
14
|
+
# rake-compiler cross-ruby VERSION=1.9.1-p243
|
15
|
+
# rake-compiler cross-ruby VERSION=1.8.6-p114
|
16
|
+
#
|
17
|
+
sh "rake cross compile RUBY_CC_VERSION=1.8.6:1.9.1"
|
18
|
+
sh "rake gemspec build PLATFORM=i386-#{win_compiler}"
|
19
|
+
mv "pkg/gherkin-#{GHERKIN_VERSION}-x86-#{win_compiler}.gem", 'release'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
desc 'Build JRuby gem'
|
24
|
+
task :jruby => :release_dir do
|
25
|
+
sh "rvm jruby rake spec"
|
26
|
+
sh "rvm jruby rake gemspec build PLATFORM=java"
|
27
|
+
mv "pkg/gherkin-#{GHERKIN_VERSION}-java.gem", 'release'
|
28
|
+
end
|
29
|
+
|
30
|
+
desc 'Build IronRuby gem'
|
31
|
+
task :ironruby => [:jruby, 'ikvm:dll', 'ikvm:copy_ikvm_dlls'] do
|
32
|
+
sh "rake gemspec build PLATFORM=universal-dotnet"
|
33
|
+
mv "pkg/gherkin-#{GHERKIN_VERSION}-universal-dotnet.gem", 'release'
|
34
|
+
end
|
35
|
+
|
36
|
+
task :release_dir do
|
37
|
+
mkdir 'release' unless File.directory?('release')
|
38
|
+
end
|
39
|
+
|
40
|
+
task :clean_release_dir do
|
41
|
+
rm_rf 'release' if File.directory?('release')
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
task :gems => ['gems:clean_release_dir', 'gems:posix', 'gems:mswin32', 'gems:mingw32', 'gems:jruby', 'gems:ironruby']
|
data/tasks/ikvm.rake
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# To test out the pure Java main program on .NET, execute:
|
2
|
+
#
|
3
|
+
# rake ikvm
|
4
|
+
#
|
5
|
+
# Just print dots:
|
6
|
+
#
|
7
|
+
# [mono] pkg/gherkin.exe features
|
8
|
+
#
|
9
|
+
# Pretty print all to STDOUT:
|
10
|
+
#
|
11
|
+
# [mono] pkg/gherkin.exe features pretty
|
12
|
+
#
|
13
|
+
# To test out the pure C# main program on .NET, execute:
|
14
|
+
#
|
15
|
+
# rake ikvm (you need this to generate all the .dll files needed for the next step)
|
16
|
+
#
|
17
|
+
# Then build ikvm/Gherkin.sln. Then:
|
18
|
+
#
|
19
|
+
# [mono] mono ikvm/Gherkin/bin/Debug/Gherkin.exe features/steps_parser.feature
|
20
|
+
#
|
21
|
+
namespace :ikvm do
|
22
|
+
desc 'Make a .NET .exe'
|
23
|
+
task :exe => 'lib/gherkin.jar' do
|
24
|
+
mkdir_p 'release' unless File.directory?('release')
|
25
|
+
sh("mono /usr/local/ikvm/bin/ikvmc.exe -target:exe lib/gherkin.jar -out:release/gherkin-#{GHERKIN_VERSION}.exe")
|
26
|
+
end
|
27
|
+
|
28
|
+
desc 'Make a .NET .dll'
|
29
|
+
task :dll => 'lib/gherkin.jar' do
|
30
|
+
mkdir_p 'release' unless File.directory?('release')
|
31
|
+
sh("mono /usr/local/ikvm/bin/ikvmc.exe -target:library lib/gherkin.jar -out:release/gherkin-#{GHERKIN_VERSION}.dll")
|
32
|
+
cp "release/gherkin-#{GHERKIN_VERSION}.dll", 'lib/gherkin.dll'
|
33
|
+
end
|
34
|
+
|
35
|
+
desc 'Copy the IKVM .dll files over to the pkg dir'
|
36
|
+
task :copy_ikvm_dlls do
|
37
|
+
Dir['/usr/local/ikvm/bin/{IKVM.OpenJDK.Core,IKVM.OpenJDK.Text,IKVM.OpenJDK.Security,IKVM.Runtime}.dll'].each do |dll|
|
38
|
+
cp dll, 'release'
|
39
|
+
cp dll, 'lib'
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
task :ikvm => ['ikvm:copy_ikvm_dlls', 'ikvm:exe', 'ikvm:dll'] do
|
45
|
+
sh "mono release/gherkin-#{GHERKIN_VERSION}.exe features"
|
46
|
+
end
|
47
|
+
|
data/tasks/ragel_task.rb
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'erb'
|
3
|
+
|
4
|
+
class RagelTask
|
5
|
+
RL_OUTPUT_DIR = File.dirname(__FILE__) + "/../ragel/i18n"
|
6
|
+
|
7
|
+
def initialize(lang, i18n)
|
8
|
+
@lang = lang
|
9
|
+
@i18n = i18n
|
10
|
+
define_tasks
|
11
|
+
end
|
12
|
+
|
13
|
+
def define_tasks
|
14
|
+
file target => [lang_ragel, common_ragel] do
|
15
|
+
mkdir_p(File.dirname(target)) unless File.directory?(File.dirname(target))
|
16
|
+
sh "ragel #{flags} #{lang_ragel} -o #{target}"
|
17
|
+
end
|
18
|
+
|
19
|
+
file lang_ragel => lang_erb do
|
20
|
+
write(ERB.new(IO.read(lang_erb)).result(binding), lang_ragel)
|
21
|
+
end
|
22
|
+
|
23
|
+
file common_ragel => common_erb do
|
24
|
+
write(ERB.new(IO.read(common_erb)).result(binding), common_ragel)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def target
|
29
|
+
{
|
30
|
+
'c' => "ext/gherkin_lexer_#{@i18n.underscored_iso_code}/gherkin_lexer_#{@i18n.underscored_iso_code}.c",
|
31
|
+
'java' => "java/src/main/java/gherkin/lexer/#{@i18n.underscored_iso_code.upcase}.java",
|
32
|
+
'rb' => "lib/gherkin/rb_lexer/#{@i18n.underscored_iso_code}.rb"
|
33
|
+
}[@lang]
|
34
|
+
end
|
35
|
+
|
36
|
+
def common_ragel
|
37
|
+
RL_OUTPUT_DIR + "/lexer_common.#{@i18n.underscored_iso_code}.rl"
|
38
|
+
end
|
39
|
+
|
40
|
+
def common_erb
|
41
|
+
File.dirname(__FILE__) + '/../ragel/lexer_common.rl.erb'
|
42
|
+
end
|
43
|
+
|
44
|
+
def lang_ragel
|
45
|
+
RL_OUTPUT_DIR + "/#{@i18n.underscored_iso_code}.#{@lang}.rl"
|
46
|
+
end
|
47
|
+
|
48
|
+
def lang_erb
|
49
|
+
File.dirname(__FILE__) + "/../ragel/lexer.#{@lang}.rl.erb"
|
50
|
+
end
|
51
|
+
|
52
|
+
def flags
|
53
|
+
{
|
54
|
+
'c' => '-C',
|
55
|
+
'java' => '-J',
|
56
|
+
'rb' => '-R'
|
57
|
+
}[@lang]
|
58
|
+
end
|
59
|
+
|
60
|
+
def write(content, filename)
|
61
|
+
mkdir_p(File.dirname(filename)) unless File.directory?(File.dirname(filename))
|
62
|
+
File.open(filename, "wb") do |file|
|
63
|
+
file.write(content)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def ragel_list(keywords)
|
68
|
+
"(#{keywords.map{|keyword| %{"#{keyword}"}}.join(' | ')})"
|
69
|
+
end
|
70
|
+
end
|
data/tasks/rdoc.rake
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rake/rdoctask'
|
2
|
+
|
3
|
+
Rake::RDocTask.new do |rdoc|
|
4
|
+
config = YAML.load_file('VERSION.yml')
|
5
|
+
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
6
|
+
|
7
|
+
rdoc.rdoc_dir = 'rdoc'
|
8
|
+
rdoc.title = "Gherkin #{version}"
|
9
|
+
rdoc.rdoc_files.include('README.rdoc')
|
10
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
11
|
+
rdoc.rdoc_files.exclude('lib/gherkin/lexer')
|
12
|
+
end
|
data/tasks/release.rake
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
namespace :release do
|
2
|
+
desc 'Uplad all packages and tag git'
|
3
|
+
task :ALL => [:gems, :push_dll, :push_jar, :push_gems, 'git:release']
|
4
|
+
|
5
|
+
task :push_gems do
|
6
|
+
Dir.chdir('release') do
|
7
|
+
Dir['*.gem'].each do |gem_file|
|
8
|
+
sh("gem push #{gem_file}")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
task :push_dll => :ikvm do
|
14
|
+
Dir.chdir('release') do
|
15
|
+
# This requires aslakhellesoy's build of the github gem,
|
16
|
+
# which has tekkub's upload command.
|
17
|
+
sh("github upload #{Dir['gherkin*.dll'][0]}")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
task :push_jar do
|
22
|
+
Dir.chdir('java') do
|
23
|
+
sh("mvn deploy")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/tasks/rspec.rake
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec/rake/spectask'
|
2
|
+
|
3
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
4
|
+
spec.libs << 'lib' << 'spec'
|
5
|
+
spec.spec_opts << '--color --diff'
|
6
|
+
end
|
7
|
+
task :spec => [:check_dependencies]
|
8
|
+
|
9
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
10
|
+
spec.libs << 'lib' << 'spec'
|
11
|
+
spec.spec_opts << '--color --diff'
|
12
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
13
|
+
spec.rcov = true
|
14
|
+
spec.rcov_opts = %w{--exclude spec\/}
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,257 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gherkin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 43
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 30
|
10
|
+
version: 1.0.30
|
11
|
+
platform: universal-dotnet
|
12
|
+
authors:
|
13
|
+
- Mike Sassak
|
14
|
+
- Gregory Hnatiuk
|
15
|
+
- "Aslak Helles\xC3\xB8y"
|
16
|
+
autorequire:
|
17
|
+
bindir: bin
|
18
|
+
cert_chain: []
|
19
|
+
|
20
|
+
date: 2010-05-20 00:00:00 +02:00
|
21
|
+
default_executable: gherkin
|
22
|
+
dependencies:
|
23
|
+
- !ruby/object:Gem::Dependency
|
24
|
+
name: trollop
|
25
|
+
prerelease: false
|
26
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
hash: 83
|
32
|
+
segments:
|
33
|
+
- 1
|
34
|
+
- 16
|
35
|
+
- 2
|
36
|
+
version: 1.16.2
|
37
|
+
type: :runtime
|
38
|
+
version_requirements: *id001
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
name: rspec
|
41
|
+
prerelease: false
|
42
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
hash: 27
|
48
|
+
segments:
|
49
|
+
- 1
|
50
|
+
- 3
|
51
|
+
- 0
|
52
|
+
version: 1.3.0
|
53
|
+
type: :development
|
54
|
+
version_requirements: *id002
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: cucumber
|
57
|
+
prerelease: false
|
58
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
hash: 7
|
64
|
+
segments:
|
65
|
+
- 0
|
66
|
+
- 7
|
67
|
+
- 2
|
68
|
+
version: 0.7.2
|
69
|
+
type: :development
|
70
|
+
version_requirements: *id003
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: rake-compiler
|
73
|
+
prerelease: false
|
74
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
hash: 3
|
80
|
+
segments:
|
81
|
+
- 0
|
82
|
+
- 7
|
83
|
+
- 0
|
84
|
+
version: 0.7.0
|
85
|
+
type: :development
|
86
|
+
version_requirements: *id004
|
87
|
+
description: A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
|
88
|
+
email: cukes@googlegroups.com
|
89
|
+
executables:
|
90
|
+
- gherkin
|
91
|
+
extensions: []
|
92
|
+
|
93
|
+
extra_rdoc_files:
|
94
|
+
- LICENSE
|
95
|
+
- README.rdoc
|
96
|
+
files:
|
97
|
+
- .gitattributes
|
98
|
+
- .gitignore
|
99
|
+
- .mailmap
|
100
|
+
- History.txt
|
101
|
+
- LICENSE
|
102
|
+
- README.rdoc
|
103
|
+
- Rakefile
|
104
|
+
- VERSION.yml
|
105
|
+
- bin/gherkin
|
106
|
+
- cucumber.yml
|
107
|
+
- features/escaped_pipes.feature
|
108
|
+
- features/feature_parser.feature
|
109
|
+
- features/native_lexer.feature
|
110
|
+
- features/parser_with_native_lexer.feature
|
111
|
+
- features/pretty_printer.feature
|
112
|
+
- features/step_definitions/eyeball_steps.rb
|
113
|
+
- features/step_definitions/gherkin_steps.rb
|
114
|
+
- features/step_definitions/pretty_formatter_steps.rb
|
115
|
+
- features/steps_parser.feature
|
116
|
+
- features/support/env.rb
|
117
|
+
- ikvm/.gitignore
|
118
|
+
- java/.gitignore
|
119
|
+
- java/src/main/java/gherkin/lexer/.gitignore
|
120
|
+
- java/src/main/resources/gherkin/.gitignore
|
121
|
+
- lib/.gitignore
|
122
|
+
- lib/IKVM.OpenJDK.Core.dll
|
123
|
+
- lib/IKVM.OpenJDK.Security.dll
|
124
|
+
- lib/IKVM.OpenJDK.Text.dll
|
125
|
+
- lib/IKVM.Runtime.dll
|
126
|
+
- lib/gherkin.dll
|
127
|
+
- lib/gherkin.rb
|
128
|
+
- lib/gherkin/c_lexer.rb
|
129
|
+
- lib/gherkin/cli/main.rb
|
130
|
+
- lib/gherkin/formatter/argument.rb
|
131
|
+
- lib/gherkin/formatter/colors.rb
|
132
|
+
- lib/gherkin/formatter/escaping.rb
|
133
|
+
- lib/gherkin/formatter/monochrome_format.rb
|
134
|
+
- lib/gherkin/formatter/pretty_formatter.rb
|
135
|
+
- lib/gherkin/i18n.rb
|
136
|
+
- lib/gherkin/i18n.yml
|
137
|
+
- lib/gherkin/i18n_lexer.rb
|
138
|
+
- lib/gherkin/native.rb
|
139
|
+
- lib/gherkin/native/ikvm.rb
|
140
|
+
- lib/gherkin/native/java.rb
|
141
|
+
- lib/gherkin/native/null.rb
|
142
|
+
- lib/gherkin/parser/event.rb
|
143
|
+
- lib/gherkin/parser/filter_listener.rb
|
144
|
+
- lib/gherkin/parser/meta.txt
|
145
|
+
- lib/gherkin/parser/parser.rb
|
146
|
+
- lib/gherkin/parser/root.txt
|
147
|
+
- lib/gherkin/parser/steps.txt
|
148
|
+
- lib/gherkin/parser/tag_expression.rb
|
149
|
+
- lib/gherkin/rb_lexer.rb
|
150
|
+
- lib/gherkin/rb_lexer/.gitignore
|
151
|
+
- lib/gherkin/rb_lexer/README.rdoc
|
152
|
+
- lib/gherkin/rubify.rb
|
153
|
+
- lib/gherkin/tools.rb
|
154
|
+
- lib/gherkin/tools/files.rb
|
155
|
+
- lib/gherkin/tools/reformat.rb
|
156
|
+
- lib/gherkin/tools/stats.rb
|
157
|
+
- lib/gherkin/tools/stats_listener.rb
|
158
|
+
- ragel/i18n/.gitignore
|
159
|
+
- ragel/lexer.c.rl.erb
|
160
|
+
- ragel/lexer.java.rl.erb
|
161
|
+
- ragel/lexer.rb.rl.erb
|
162
|
+
- ragel/lexer_common.rl.erb
|
163
|
+
- spec/gherkin/c_lexer_spec.rb
|
164
|
+
- spec/gherkin/csharp_lexer_spec.rb
|
165
|
+
- spec/gherkin/fixtures/1.feature
|
166
|
+
- spec/gherkin/fixtures/comments_in_table.feature
|
167
|
+
- spec/gherkin/fixtures/complex.feature
|
168
|
+
- spec/gherkin/fixtures/dos_line_endings.feature
|
169
|
+
- spec/gherkin/fixtures/i18n_fr.feature
|
170
|
+
- spec/gherkin/fixtures/i18n_no.feature
|
171
|
+
- spec/gherkin/fixtures/i18n_zh-CN.feature
|
172
|
+
- spec/gherkin/fixtures/simple_with_comments.feature
|
173
|
+
- spec/gherkin/fixtures/simple_with_tags.feature
|
174
|
+
- spec/gherkin/fixtures/with_bom.feature
|
175
|
+
- spec/gherkin/formatter/argument_spec.rb
|
176
|
+
- spec/gherkin/formatter/colors_spec.rb
|
177
|
+
- spec/gherkin/formatter/pretty_formatter_spec.rb
|
178
|
+
- spec/gherkin/formatter/spaces.feature
|
179
|
+
- spec/gherkin/formatter/tabs.feature
|
180
|
+
- spec/gherkin/i18n_lexer_spec.rb
|
181
|
+
- spec/gherkin/i18n_spec.rb
|
182
|
+
- spec/gherkin/java_lexer_spec.rb
|
183
|
+
- spec/gherkin/parser/filter_listener_spec.rb
|
184
|
+
- spec/gherkin/parser/parser_spec.rb
|
185
|
+
- spec/gherkin/parser/tag_expression_spec.rb
|
186
|
+
- spec/gherkin/rb_lexer_spec.rb
|
187
|
+
- spec/gherkin/sexp_recorder.rb
|
188
|
+
- spec/gherkin/shared/lexer_spec.rb
|
189
|
+
- spec/gherkin/shared/py_string_spec.rb
|
190
|
+
- spec/gherkin/shared/row_spec.rb
|
191
|
+
- spec/gherkin/shared/tags_spec.rb
|
192
|
+
- spec/spec_helper.rb
|
193
|
+
- tasks/bench.rake
|
194
|
+
- tasks/bench/feature_builder.rb
|
195
|
+
- tasks/bench/generated/.gitignore
|
196
|
+
- tasks/bench/null_listener.rb
|
197
|
+
- tasks/compile.rake
|
198
|
+
- tasks/cucumber.rake
|
199
|
+
- tasks/gems.rake
|
200
|
+
- tasks/ikvm.rake
|
201
|
+
- tasks/ragel_task.rb
|
202
|
+
- tasks/rdoc.rake
|
203
|
+
- tasks/release.rake
|
204
|
+
- tasks/rspec.rake
|
205
|
+
has_rdoc: true
|
206
|
+
homepage: http://github.com/aslakhellesoy/gherkin
|
207
|
+
licenses: []
|
208
|
+
|
209
|
+
post_install_message:
|
210
|
+
rdoc_options:
|
211
|
+
- --charset=UTF-8
|
212
|
+
require_paths:
|
213
|
+
- lib
|
214
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
215
|
+
none: false
|
216
|
+
requirements:
|
217
|
+
- - ">="
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
hash: 3
|
220
|
+
segments:
|
221
|
+
- 0
|
222
|
+
version: "0"
|
223
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
224
|
+
none: false
|
225
|
+
requirements:
|
226
|
+
- - ">="
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
hash: 3
|
229
|
+
segments:
|
230
|
+
- 0
|
231
|
+
version: "0"
|
232
|
+
requirements: []
|
233
|
+
|
234
|
+
rubyforge_project:
|
235
|
+
rubygems_version: 1.3.7
|
236
|
+
signing_key:
|
237
|
+
specification_version: 3
|
238
|
+
summary: Fast Gherkin lexer/parser
|
239
|
+
test_files:
|
240
|
+
- spec/gherkin/c_lexer_spec.rb
|
241
|
+
- spec/gherkin/csharp_lexer_spec.rb
|
242
|
+
- spec/gherkin/formatter/argument_spec.rb
|
243
|
+
- spec/gherkin/formatter/colors_spec.rb
|
244
|
+
- spec/gherkin/formatter/pretty_formatter_spec.rb
|
245
|
+
- spec/gherkin/i18n_lexer_spec.rb
|
246
|
+
- spec/gherkin/i18n_spec.rb
|
247
|
+
- spec/gherkin/java_lexer_spec.rb
|
248
|
+
- spec/gherkin/parser/filter_listener_spec.rb
|
249
|
+
- spec/gherkin/parser/parser_spec.rb
|
250
|
+
- spec/gherkin/parser/tag_expression_spec.rb
|
251
|
+
- spec/gherkin/rb_lexer_spec.rb
|
252
|
+
- spec/gherkin/sexp_recorder.rb
|
253
|
+
- spec/gherkin/shared/lexer_spec.rb
|
254
|
+
- spec/gherkin/shared/py_string_spec.rb
|
255
|
+
- spec/gherkin/shared/row_spec.rb
|
256
|
+
- spec/gherkin/shared/tags_spec.rb
|
257
|
+
- spec/spec_helper.rb
|