aslakhellesoy-cucumber 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- metadata +14 -2
- data/History.txt +0 -4
- data/License.txt +0 -20
- data/Manifest.txt +0 -98
- data/README.txt +0 -42
- data/Rakefile +0 -4
- data/TODO.txt +0 -30
- data/bin/cucumber +0 -3
- data/config/hoe.rb +0 -69
- data/config/requirements.rb +0 -15
- data/examples/calculator/Rakefile +0 -6
- data/examples/calculator/features/addition.feature +0 -16
- data/examples/calculator/features/division.feature +0 -11
- data/examples/calculator/features/steps/calculator_steps.rb +0 -30
- data/examples/calculator/lib/calculator.rb +0 -16
- data/examples/calculator_ruby_features/Rakefile +0 -6
- data/examples/calculator_ruby_features/features/addition.rb +0 -23
- data/examples/calculator_ruby_features/features/steps/calculator_steps.rb +0 -43
- data/examples/java/README.textile +0 -22
- data/examples/java/Rakefile +0 -12
- data/examples/java/features/hello.feature +0 -11
- data/examples/java/features/steps/hello_steps.rb +0 -25
- data/examples/java/features/steps/tree_steps.rb +0 -14
- data/examples/java/features/tree.feature +0 -9
- data/examples/java/src/cucumber/demo/Hello.java +0 -15
- data/examples/norwegian_calculator/Rakefile +0 -6
- data/examples/norwegian_calculator/features/kalkulator_steps.rb +0 -31
- data/examples/norwegian_calculator/features/summering.feature +0 -13
- data/examples/watir/Rakefile +0 -6
- data/examples/watir/features/search.feature +0 -9
- data/examples/watir/features/steps/stories_steps.rb +0 -51
- data/gem_tasks/deployment.rake +0 -34
- data/gem_tasks/environment.rake +0 -7
- data/gem_tasks/fix_cr_lf.rake +0 -10
- data/gem_tasks/gemspec.rake +0 -6
- data/gem_tasks/rspec.rake +0 -21
- data/gem_tasks/treetop.rake +0 -27
- data/gem_tasks/website.rake +0 -17
- data/generators/cucumber/cucumber_generator.rb +0 -20
- data/generators/cucumber/templates/common_webrat.rb +0 -30
- data/generators/cucumber/templates/cucumber.rake +0 -7
- data/generators/cucumber/templates/env.rb +0 -6
- data/generators/feature/feature_generator.rb +0 -17
- data/generators/feature/templates/feature.erb +0 -27
- data/generators/feature/templates/steps.erb +0 -22
- data/lib/cucumber/cli.rb +0 -133
- data/lib/cucumber/core_ext/proc.rb +0 -43
- data/lib/cucumber/core_ext/string.rb +0 -17
- data/lib/cucumber/executor.rb +0 -79
- data/lib/cucumber/formatters/ansicolor.rb +0 -89
- data/lib/cucumber/formatters/html_formatter.rb +0 -272
- data/lib/cucumber/formatters/pretty_formatter.rb +0 -129
- data/lib/cucumber/formatters/progress_formatter.rb +0 -41
- data/lib/cucumber/formatters.rb +0 -1
- data/lib/cucumber/languages.yml +0 -31
- data/lib/cucumber/rails/rspec.rb +0 -12
- data/lib/cucumber/rails/world.rb +0 -71
- data/lib/cucumber/rake/task.rb +0 -75
- data/lib/cucumber/step_methods.rb +0 -41
- data/lib/cucumber/step_mother.rb +0 -38
- data/lib/cucumber/tree/feature.rb +0 -45
- data/lib/cucumber/tree/features.rb +0 -21
- data/lib/cucumber/tree/scenario.rb +0 -85
- data/lib/cucumber/tree/step.rb +0 -141
- data/lib/cucumber/tree/table.rb +0 -26
- data/lib/cucumber/tree/top_down_visitor.rb +0 -23
- data/lib/cucumber/tree.rb +0 -18
- data/lib/cucumber/treetop_parser/feature.treetop.erb +0 -102
- data/lib/cucumber/treetop_parser/feature_en.rb +0 -974
- data/lib/cucumber/treetop_parser/feature_fr.rb +0 -974
- data/lib/cucumber/treetop_parser/feature_no.rb +0 -974
- data/lib/cucumber/treetop_parser/feature_parser.rb +0 -32
- data/lib/cucumber/treetop_parser/feature_pt.rb +0 -974
- data/lib/cucumber/version.rb +0 -9
- data/lib/cucumber.rb +0 -32
- data/script/console +0 -10
- data/script/console.cmd +0 -1
- data/script/destroy +0 -14
- data/script/destroy.cmd +0 -1
- data/script/generate +0 -14
- data/script/generate.cmd +0 -1
- data/script/txt2html +0 -74
- data/script/txt2html.cmd +0 -1
- data/setup.rb +0 -1585
- data/spec/cucumber/core_ext/string_spec.rb +0 -20
- data/spec/cucumber/executor_spec.rb +0 -55
- data/spec/cucumber/formatters/ansicolor_spec.rb +0 -18
- data/spec/cucumber/formatters/features.html +0 -274
- data/spec/cucumber/formatters/html_formatter_spec.rb +0 -59
- data/spec/cucumber/sell_cucumbers.feature +0 -9
- data/spec/cucumber/treetop_parser/feature_parser_spec.rb +0 -40
- data/spec/cucumber/treetop_parser/spaces.feature +0 -10
- data/spec/spec.opts +0 -2
- data/spec/spec_helper.rb +0 -14
- data/website/index.html +0 -11
- data/website/index.txt +0 -39
- data/website/javascripts/rounded_corners_lite.inc.js +0 -285
- data/website/stylesheets/screen.css +0 -138
- data/website/template.html.erb +0 -48
data/lib/cucumber/version.rb
DELETED
data/lib/cucumber.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
$:.unshift(File.dirname(__FILE__)) unless
|
2
|
-
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
|
-
require 'rubygems'
|
4
|
-
require 'treetop/runtime'
|
5
|
-
require 'treetop/ruby_extensions'
|
6
|
-
require 'cucumber/version'
|
7
|
-
require 'cucumber/step_methods'
|
8
|
-
require 'cucumber/tree'
|
9
|
-
require 'cucumber/executor'
|
10
|
-
require 'cucumber/step_mother'
|
11
|
-
require 'cucumber/formatters'
|
12
|
-
require 'cucumber/treetop_parser/feature_parser'
|
13
|
-
require 'cucumber/cli'
|
14
|
-
|
15
|
-
module Cucumber
|
16
|
-
class << self
|
17
|
-
attr_reader :language
|
18
|
-
|
19
|
-
def load_language(lang)
|
20
|
-
@language = config[lang]
|
21
|
-
end
|
22
|
-
|
23
|
-
def languages
|
24
|
-
config.keys.sort
|
25
|
-
end
|
26
|
-
|
27
|
-
def config
|
28
|
-
require 'yaml'
|
29
|
-
@config ||= YAML.load_file(File.dirname(__FILE__) + '/cucumber/languages.yml')
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
data/script/console
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# File: script/console
|
3
|
-
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
-
|
5
|
-
libs = " -r irb/completion"
|
6
|
-
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
-
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
-
libs << " -r #{File.dirname(__FILE__) + '/../lib/cucumber.rb'}"
|
9
|
-
visit_feature "Loading cucumber gem"
|
10
|
-
exec "#{irb} #{libs} --simple-prompt"
|
data/script/console.cmd
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@ruby script/console %*
|
data/script/destroy
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/destroy'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/destroy.cmd
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@ruby script/destroy %*
|
data/script/generate
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/generate'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Generate.new.run(ARGV)
|
data/script/generate.cmd
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@ruby script/generate %*
|
data/script/txt2html
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
begin
|
5
|
-
require 'newgem'
|
6
|
-
rescue LoadError
|
7
|
-
puts "\n\nGenerating the website requires the newgem RubyGem"
|
8
|
-
puts "Install: gem install newgem\n\n"
|
9
|
-
exit(1)
|
10
|
-
end
|
11
|
-
require 'redcloth'
|
12
|
-
require 'syntax/convertors/html'
|
13
|
-
require 'erb'
|
14
|
-
require File.dirname(__FILE__) + '/../lib/cucumber/version.rb'
|
15
|
-
|
16
|
-
version = Cucumber::VERSION::STRING
|
17
|
-
download = 'http://rubyforge.org/projects/cucumber'
|
18
|
-
|
19
|
-
class Fixnum
|
20
|
-
def ordinal
|
21
|
-
# teens
|
22
|
-
return 'th' if (10..19).include?(self % 100)
|
23
|
-
# others
|
24
|
-
case self % 10
|
25
|
-
when 1: return 'st'
|
26
|
-
when 2: return 'nd'
|
27
|
-
when 3: return 'rd'
|
28
|
-
else return 'th'
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
class Time
|
34
|
-
def pretty
|
35
|
-
return "#{mday}#{mday.ordinal} #{strftime('%B')} #{year}"
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def convert_syntax(syntax, source)
|
40
|
-
return Syntax::Convertors::HTML.for_syntax(syntax).convert(source).gsub(%r!^<pre>|</pre>$!,'')
|
41
|
-
end
|
42
|
-
|
43
|
-
if ARGV.length >= 1
|
44
|
-
src, template = ARGV
|
45
|
-
template ||= File.join(File.dirname(__FILE__), '/../website/template.html.erb')
|
46
|
-
|
47
|
-
else
|
48
|
-
puts("Usage: #{File.split($0).last} source.txt [template.html.erb] > output.html")
|
49
|
-
exit!
|
50
|
-
end
|
51
|
-
|
52
|
-
template = ERB.new(File.open(template).read)
|
53
|
-
|
54
|
-
title = nil
|
55
|
-
body = nil
|
56
|
-
File.open(src) do |fsrc|
|
57
|
-
title_text = fsrc.readline
|
58
|
-
body_text = fsrc.read
|
59
|
-
syntax_items = []
|
60
|
-
body_text.gsub!(%r!<(pre|code)[^>]*?syntax=['"]([^'"]+)[^>]*>(.*?)</\1>!m){
|
61
|
-
ident = syntax_items.length
|
62
|
-
element, syntax, source = $1, $2, $3
|
63
|
-
syntax_items << "<#{element} class='syntax'>#{convert_syntax(syntax, source)}</#{element}>"
|
64
|
-
"syntax-temp-#{ident}"
|
65
|
-
}
|
66
|
-
title = RedCloth.new(title_text).to_html.gsub(%r!<.*?>!,'').strip
|
67
|
-
body = RedCloth.new(body_text).to_html
|
68
|
-
body.gsub!(%r!(?:<pre><code>)?syntax-temp-(\d+)(?:</code></pre>)?!){ syntax_items[$1.to_i] }
|
69
|
-
end
|
70
|
-
stat = File.stat(src)
|
71
|
-
created = stat.ctime
|
72
|
-
modified = stat.mtime
|
73
|
-
|
74
|
-
$stdout << template.result(binding)
|
data/script/txt2html.cmd
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@ruby script/txt2html %*
|