Skip to content
Browse files

Fixing options parsing

  • Loading branch information...
1 parent fad4720 commit 899444c47ec73c10013b945bbf1af35dde535df7 andyw8 committed Nov 7, 2010
View
1 Manifest
@@ -2,7 +2,6 @@ Manifest
README.rdoc
Rakefile
TODO
-cucumber_scaffold.gemspec
lib/generators/cucumber_scaffold/feature/USAGE
lib/generators/cucumber_scaffold/feature/feature_generator.rb
lib/generators/cucumber_scaffold/feature/templates/feature.feature
View
2 Rakefile
@@ -2,7 +2,7 @@ require 'rubygems'
require 'rake'
require 'echoe'
-Echoe.new('cucumber_scaffold', '0.1.0') do |p|
+Echoe.new('cucumber_scaffold', '0.1.1') do |p|
p.description = "Generate scaffolding for Cucumber features and steps definitions"
p.url = "http://github.com/andyw8/cucumber_scaffold"
p.author = "Andy Waite"
View
11 lib/generators/cucumber_scaffold/feature/feature_generator.rb
@@ -15,7 +15,6 @@ def initialize(args, *options)
args[0] = args[0].dup if args[0].is_a?(String) && args[0].frozen?
super
assign_names!(self.name)
- parse!
args.shift
@args = args
end
@@ -52,8 +51,6 @@ def do_it
end
- private
-
def generated_by
'# Generated by cucumber_scaffold - http://github.com/andyw8/cucumber_scaffold'
end
@@ -190,5 +187,13 @@ def make_row(data)
"| #{data.join(' | ')} |"
end
+ protected
+
+ def add_options!(opt)
+ opt.separator ''
+ opt.separator 'Options:'
+ opt.on("--nifty", "Don't generate a model or migration file.") { |v| options[:nifty] = true }
+ end
+
end
end
View
BIN pkg/cucumber_scaffold-0.1.0.gem
Binary file not shown.
View
BIN pkg/cucumber_scaffold-0.1.0.tar.gz
Binary file not shown.
View
BIN pkg/cucumber_scaffold-0.1.1.gem
Binary file not shown.
View
BIN pkg/cucumber_scaffold-0.1.1.tar.gz
Binary file not shown.
View
1 pkg/cucumber_scaffold-0.1.0/Manifest → pkg/cucumber_scaffold-0.1.1/Manifest
@@ -2,7 +2,6 @@ Manifest
README.rdoc
Rakefile
TODO
-cucumber_scaffold.gemspec
lib/generators/cucumber_scaffold/feature/USAGE
lib/generators/cucumber_scaffold/feature/feature_generator.rb
lib/generators/cucumber_scaffold/feature/templates/feature.feature
View
0 pkg/cucumber_scaffold-0.1.0/README.rdoc → pkg/cucumber_scaffold-0.1.1/README.rdoc
File renamed without changes.
View
2 pkg/cucumber_scaffold-0.1.0/Rakefile → pkg/cucumber_scaffold-0.1.1/Rakefile
@@ -2,7 +2,7 @@ require 'rubygems'
require 'rake'
require 'echoe'
-Echoe.new('cucumber_scaffold', '0.1.0') do |p|
+Echoe.new('cucumber_scaffold', '0.1.1') do |p|
p.description = "Generate scaffolding for Cucumber features and steps definitions"
p.url = "http://github.com/andyw8/cucumber_scaffold"
p.author = "Andy Waite"
View
0 pkg/cucumber_scaffold-0.1.0/TODO → pkg/cucumber_scaffold-0.1.1/TODO
File renamed without changes.
View
6 ..._scaffold-0.1.0/cucumber_scaffold.gemspec → ..._scaffold-0.1.1/cucumber_scaffold.gemspec
@@ -2,15 +2,15 @@
Gem::Specification.new do |s|
s.name = %q{cucumber_scaffold}
- s.version = "0.1.0"
+ s.version = "0.1.1"
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
s.authors = ["Andy Waite"]
- s.date = %q{2010-11-06}
+ s.date = %q{2010-11-07}
s.description = %q{Generate scaffolding for Cucumber features and steps definitions}
s.email = %q{andy@andywaite.com}
s.extra_rdoc_files = ["README.rdoc", "TODO", "lib/generators/cucumber_scaffold/feature/USAGE", "lib/generators/cucumber_scaffold/feature/feature_generator.rb", "lib/generators/cucumber_scaffold/feature/templates/feature.feature", "lib/generators/cucumber_scaffold/feature/templates/steps.rb", "lib/generators/cucumber_scaffold/install/USAGE", "lib/generators/cucumber_scaffold/install/install_generator.rb", "lib/generators/cucumber_scaffold/install/templates/shared/web_steps_additional.rb"]
- s.files = ["Manifest", "README.rdoc", "Rakefile", "TODO", "cucumber_scaffold.gemspec", "lib/generators/cucumber_scaffold/feature/USAGE", "lib/generators/cucumber_scaffold/feature/feature_generator.rb", "lib/generators/cucumber_scaffold/feature/templates/feature.feature", "lib/generators/cucumber_scaffold/feature/templates/steps.rb", "lib/generators/cucumber_scaffold/install/USAGE", "lib/generators/cucumber_scaffold/install/install_generator.rb", "lib/generators/cucumber_scaffold/install/templates/shared/web_steps_additional.rb"]
+ s.files = ["Manifest", "README.rdoc", "Rakefile", "TODO", "lib/generators/cucumber_scaffold/feature/USAGE", "lib/generators/cucumber_scaffold/feature/feature_generator.rb", "lib/generators/cucumber_scaffold/feature/templates/feature.feature", "lib/generators/cucumber_scaffold/feature/templates/steps.rb", "lib/generators/cucumber_scaffold/install/USAGE", "lib/generators/cucumber_scaffold/install/install_generator.rb", "lib/generators/cucumber_scaffold/install/templates/shared/web_steps_additional.rb", "cucumber_scaffold.gemspec"]
s.homepage = %q{http://github.com/andyw8/cucumber_scaffold}
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Cucumber_scaffold", "--main", "README.rdoc"]
s.require_paths = ["lib"]
View
0 ...enerators/cucumber_scaffold/feature/USAGE → ...enerators/cucumber_scaffold/feature/USAGE
File renamed without changes.
View
11 ...ber_scaffold/feature/feature_generator.rb → ...ber_scaffold/feature/feature_generator.rb
@@ -15,7 +15,6 @@ def initialize(args, *options)
args[0] = args[0].dup if args[0].is_a?(String) && args[0].frozen?
super
assign_names!(self.name)
- parse!
args.shift
@args = args
end
@@ -52,8 +51,6 @@ def do_it
end
- private
-
def generated_by
'# Generated by cucumber_scaffold - http://github.com/andyw8/cucumber_scaffold'
end
@@ -190,5 +187,13 @@ def make_row(data)
"| #{data.join(' | ')} |"
end
+ protected
+
+ def add_options!(opt)
+ opt.separator ''
+ opt.separator 'Options:'
+ opt.on("--nifty", "Don't generate a model or migration file.") { |v| options[:nifty] = true }
+ end
+
end
end
View
0 ...caffold/feature/templates/feature.feature → ...caffold/feature/templates/feature.feature
File renamed without changes.
View
0 ...umber_scaffold/feature/templates/steps.rb → ...umber_scaffold/feature/templates/steps.rb
File renamed without changes.
View
0 ...enerators/cucumber_scaffold/install/USAGE → ...enerators/cucumber_scaffold/install/USAGE
File renamed without changes.
View
0 ...ber_scaffold/install/install_generator.rb → ...ber_scaffold/install/install_generator.rb
File renamed without changes.
View
0 .../templates/shared/web_steps_additional.rb → .../templates/shared/web_steps_additional.rb
File renamed without changes.

0 comments on commit 899444c

Please sign in to comment.
Something went wrong with that request. Please try again.