Permalink
Browse files

Added missing dev dep on rcov. Cleaned up generated Rakefile.

  • Loading branch information...
1 parent a1d1b76 commit 60acef5a2c0df99bf71eecf15d14f25123cf23ee @technicalpickles committed Feb 15, 2010
View
3 features/generator/gemfile.feature
@@ -10,7 +10,8 @@ Feature: generated Gemfiel
Scenario: default
When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
Then 'Gemfile' has a development dependency on 'bundler'
- #And 'Gemfile' has a development dependency on 'jeweler'
+ And 'Gemfile' has a development dependency on 'jeweler'
+ And 'Gemfile' has a development dependency on 'rcov'
Scenario: bacon
When I generate a bacon project named 'the-perfect-gem' that is 'zomg, so good'
View
9 jeweler.gemspec
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
s.files = [
".gitignore",
"ChangeLog.markdown",
+ "Gemfile",
"LICENSE",
"README.markdown",
"Rakefile",
@@ -32,6 +33,7 @@ Gem::Specification.new do |s|
"features/generator/directory_layout.feature",
"features/generator/dotdocument.feature",
"features/generator/env_options.feature",
+ "features/generator/gemfile.feature",
"features/generator/git.feature",
"features/generator/license.feature",
"features/generator/rakefile.feature",
@@ -86,6 +88,7 @@ Gem::Specification.new do |s|
"lib/jeweler/tasks.rb",
"lib/jeweler/templates/.document",
"lib/jeweler/templates/.gitignore",
+ "lib/jeweler/templates/Gemfile",
"lib/jeweler/templates/LICENSE",
"lib/jeweler/templates/README.rdoc",
"lib/jeweler/templates/Rakefile",
@@ -171,7 +174,8 @@ Gem::Specification.new do |s|
"test/jeweler/test_version_helper.rb",
"test/shoulda_macros/jeweler_macros.rb",
"test/test_helper.rb",
- "test/test_jeweler.rb"
+ "test/test_jeweler.rb",
+ "tmp/existing-project-with-version-plaintext/VERSION"
]
s.homepage = %q{http://github.com/technicalpickles/jeweler}
s.rdoc_options = ["--charset=UTF-8"]
@@ -223,6 +227,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency(%q<rake>, [">= 0"])
s.add_runtime_dependency(%q<git>, [">= 1.2.5"])
s.add_runtime_dependency(%q<gemcutter>, [">= 0.1.0"])
+ s.add_runtime_dependency(%q<bundler>, [">= 0.9.5"])
s.add_development_dependency(%q<shoulda>, [">= 0"])
s.add_development_dependency(%q<mhennemeyer-output_catcher>, [">= 0"])
s.add_development_dependency(%q<rr>, [">= 0"])
@@ -236,6 +241,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<rake>, [">= 0"])
s.add_dependency(%q<git>, [">= 1.2.5"])
s.add_dependency(%q<gemcutter>, [">= 0.1.0"])
+ s.add_dependency(%q<bundler>, [">= 0.9.5"])
s.add_dependency(%q<shoulda>, [">= 0"])
s.add_dependency(%q<mhennemeyer-output_catcher>, [">= 0"])
s.add_dependency(%q<rr>, [">= 0"])
@@ -250,6 +256,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<rake>, [">= 0"])
s.add_dependency(%q<git>, [">= 1.2.5"])
s.add_dependency(%q<gemcutter>, [">= 0.1.0"])
+ s.add_dependency(%q<bundler>, [">= 0.9.5"])
s.add_dependency(%q<shoulda>, [">= 0"])
s.add_dependency(%q<mhennemeyer-output_catcher>, [">= 0"])
s.add_dependency(%q<rr>, [">= 0"])
View
2 lib/jeweler/generator.rb
@@ -91,6 +91,8 @@ def initialize(options = {})
# TODO make bundler optional?
development_dependencies << ["bundler", ">= 0.9.5"]
+ development_dependencies << ["jeweler", ">= 1.4.0"]
+ development_dependencies << ["rcov", ">= 0"]
development_dependencies << ["reek", ">= 0"] if should_use_reek
development_dependencies << ["roodi", ">= 0"] if should_use_roodi
View
40 lib/jeweler/templates/jeweler_tasks.erb
@@ -1,29 +1,23 @@
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "<%= project_name %>"
- gem.summary = %Q{<%= summary %>}
- gem.description = %Q{<%= description %>}
- gem.email = "<%= user_email %>"
- gem.homepage = "<%= homepage %>"
- gem.authors = ["<%= user_name %>"]
+require 'jeweler'
+Jeweler::Tasks.new do |gem|
+ gem.name = "<%= project_name %>"
+ gem.summary = %Q{<%= summary %>}
+ gem.description = %Q{<%= description %>}
+ gem.email = "<%= user_email %>"
+ gem.homepage = "<%= homepage %>"
+ gem.authors = ["<%= user_name %>"]
<% if should_setup_rubyforge %>
- gem.rubyforge_project = "<%= project_name %>"
+ gem.rubyforge_project = "<%= project_name %>"
<% end %>
- # Have dependencies? Add them to Gemfile
-<% development_dependencies.each do |name, version| %>
- gem.add_development_dependency "<%= name %>", "<%= version %>"
-<% end %>
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
- end
+ # Have dependencies? Add them to Gemfile
+
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
+end
<% if should_setup_gemcutter %>
- Jeweler::GemcutterTasks.new
+Jeweler::GemcutterTasks.new
<% end %>
<% if should_setup_rubyforge %>
- Jeweler::RubyforgeTasks.new do |rubyforge|
- rubyforge.doc_task = "<%= doc_task %>"
- end
-<% end %>
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+Jeweler::RubyforgeTasks.new do |rubyforge|
+ rubyforge.doc_task = "<%= doc_task %>"
end
+<% end %>
View
70 lib/jeweler/templates/other_tasks.erb
@@ -37,61 +37,33 @@ Micronaut::RakeTask.new(:rcov) do |examples|
examples.rcov = true
end
<% else %>
-begin
- require 'rcov/rcovtask'
- Rcov::RcovTask.new do |<%= test_task %>|
- <%= test_task %>.libs << '<%= test_dir %>'
- <%= test_task %>.pattern = '<%= test_pattern %>'
- <%= test_task %>.verbose = true
- end
-rescue LoadError
- task :rcov do
- abort "RCov is not available. In order to run rcov, you must: gem install spicycode-rcov"
- end
+require 'rcov/rcovtask'
+Rcov::RcovTask.new do |<%= test_task %>|
+ <%= test_task %>.libs << '<%= test_dir %>'
+ <%= test_task %>.pattern = '<%= test_pattern %>'
+ <%= test_task %>.verbose = true
end
<% end %>
-task :<%= test_task %> => :check_dependencies
-
<% if should_use_cucumber %>
-begin
- require 'cucumber/rake/task'
- Cucumber::Rake::Task.new(:features)
-
- task :features => :check_dependencies
-rescue LoadError
- task :features do
- abort "Cucumber is not available. In order to run features, you must: gem install cucumber"
- end
-end
+require 'cucumber/rake/task'
+Cucumber::Rake::Task.new(:features)
<% end %>
<% if should_use_reek %>
-begin
- require 'reek/adapters/rake_task'
- Reek::RakeTask.new do |t|
- t.fail_on_error = true
- t.verbose = false
- t.source_files = 'lib/**/*.rb'
- end
-rescue LoadError
- task :reek do
- abort "Reek is not available. In order to run reek, you must: gem install reek"
- end
+require 'reek/adapters/rake_task'
+Reek::RakeTask.new do |t|
+ t.fail_on_error = true
+ t.verbose = false
+ t.source_files = 'lib/**/*.rb'
end
<% end %>
<% if should_use_roodi %>
-begin
- require 'roodi'
- require 'roodi_task'
- RoodiTask.new do |t|
- t.verbose = false
- end
-rescue LoadError
- task :roodi do
- abort "Roodi is not available. In order to run roodi, you must: gem install roodi"
- end
+require 'roodi'
+require 'roodi_task'
+RoodiTask.new do |t|
+ t.verbose = false
end
<% end %>
@@ -109,12 +81,6 @@ Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.include('lib/**/*.rb')
end
<% when :yard %>
-begin
- require 'yard'
- YARD::Rake::YardocTask.new
-rescue LoadError
- task :yardoc do
- abort "YARD is not available. In order to run yardoc, you must: gem install yard"
- end
-end
+require 'yard'
+YARD::Rake::YardocTask.new
<% end %>

0 comments on commit 60acef5

Please sign in to comment.