Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed "newgem --help" to not show backtrace summary

  • Loading branch information...
commit 67a75cc1cd15bb2628db527c01d3933e885b795f 1 parent 4b95485
@drnic authored
View
4 History.txt
@@ -1,3 +1,7 @@
+=== 1.5.1 2009-07-01
+
+* Fixed "newgem --help" to not show backtrace summary
+
=== 1.5.0 2009-06-15
* support for hoe 2.0+ DSL
View
16 app_generators/newgem/newgem_generator.rb
@@ -46,9 +46,9 @@ def manifest
record do |m|
# Root directory and all subdirectories.
m.directory ''
- BASEDIRS.each { |path| m.directory path }
-
m.directory "lib/#{gem_name}"
+ m.directory 'script'
+
# Root
m.template_copy_each %w( History.txt Rakefile README.rdoc PostInstall.txt )
@@ -97,6 +97,11 @@ def manifest
end
protected
+ def usage(message = usage_message)
+ puts @option_parser
+ exit
+ end
+
def banner
<<-EOS
Take any library or Rails plugin or command line application,
@@ -180,11 +185,4 @@ def config_args_and_runtime_args(runtime_args)
end
runtime_args
end
-
- # Installation skeleton. Intermediate directories are automatically
- # created so don't sweat their absence here.
- BASEDIRS = %w(
- lib
- script
- )
end
View
2  app_generators/newgem/templates/Rakefile
@@ -6,7 +6,7 @@ require './lib/<%= gem_name %>'
Hoe.plugin :newgem
<%= enable_website ? '' : '# ' %>Hoe.plugin :website
-<%= enable_cucumber ? '' : '# ' %>Hoe.plugin :cucumber_features
+<%= enable_cucumber ? '' : '# ' %>Hoe.plugin :cucumberfeatures
# Generate all the Rake tasks
# Run 'rake -T' to see list of generated tasks (from gem root directory)
View
6 features/install_cucumber.feature
@@ -8,7 +8,7 @@ Feature: RubyGems have features to be described and tested
Given default env variables setup for name and email
And an existing newgem scaffold [called "my_project"]
When I invoke "install_cucumber" generator with arguments ""
- And I enable hoe plugin "cucumber_features"
+ And I enable hoe plugin "cucumberfeatures"
Then folder "features/step_definitions" is created
Then folder "features/support" is created
And file "features/development.feature" is created
@@ -22,7 +22,7 @@ Feature: RubyGems have features to be described and tested
Given default env variables setup for name and email
And an existing newgem scaffold [called "my_project"]
When I invoke "install_cucumber" generator with arguments ""
- And I enable hoe plugin "cucumber_features"
+ And I enable hoe plugin "cucumberfeatures"
Then gem file "features/step_definitions/common_steps.rb" and generated file "features/step_definitions/common_steps.rb" should be the same
Then gem file "features/support/common.rb" and generated file "features/support/common.rb" should be the same
Then gem file "features/support/matchers.rb" and generated file "features/support/matchers.rb" should be the same
@@ -32,7 +32,7 @@ Feature: RubyGems have features to be described and tested
Given default env variables setup for name and email
And an existing newgem scaffold [called "my_project"]
And I invoke "install_cucumber" generator with arguments ""
- And I enable hoe plugin "cucumber_features"
+ And I enable hoe plugin "cucumberfeatures"
And I invoke task "rake manifest"
When I invoke task "rake features"
Then task "rake features" is executed successfully
View
14 features/newgem_cli.feature
@@ -18,9 +18,8 @@ Feature: Can run "newgem" to create RubyGem scaffolds
And I should see
"""
create
- create lib
- create script
create lib/my_project
+ create script
create History.txt
create Rakefile
create README.rdoc
@@ -114,4 +113,15 @@ Feature: Can run "newgem" to create RubyGem scaffolds
Scenario: Run newgem and show current version number
When newgem is executed only with options "--version"
Then shows version number
+
+ Scenario: Display help
+ When newgem is executed only with options "--help"
+ Then I should see
+ """
+ Usage: newgem
+ """
+ But I should not see
+ """
+ rubigen/options.rb
+ """
View
2  lib/newgem.rb
@@ -2,5 +2,5 @@
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
module Newgem
- VERSION = '1.5.0'
+ VERSION = '1.5.1'
end
Please sign in to comment.
Something went wrong with that request. Please try again.