Rakefile in plow-0.1.0 vs Rakefile in plow-1.0.0

- old
+ new

@@ -1,52 +1,58 @@ -require 'rubygems' -require 'rake' +# encoding: UTF-8 +require 'lib/plow' +Plow::Dependencies.warn_at_exit +################################################################################################### + begin + # TODO experiment with how rubygems activates gems by version requirement in ruby 1.9.1. + # gem 'jeweler', '1.3.0' require 'jeweler' Jeweler::Tasks.new do |gem| + # The gem object is a kind of Gem::Specification + # For additional settings, see http://www.rubygems.org/read/chapter/20 gem.name = "plow" - gem.rubyforge_project = "plow" + gem.rubyforge_project = "plow" # rubyforge's days are numbered... gem.summary = "Plows the fertile soil of your filesystem into neatly organized plots of web-site templates" gem.description = "Plows the fertile soil of your filesystem into neatly organized plots of web-site templates" gem.email = "code@ryansobol.com" gem.homepage = "http://github.com/ryansobol/plow" - gem.authors = ["Ryan Sobol"] - gem.add_development_dependency "rspec", "= 1.2.8" - gem.add_development_dependency "yard", "= 0.2.3.5" - gem.add_development_dependency "bluecloth", "= 2.0.5" # hidden yard dependency for markdown support - # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings + gem.authors = ["Ryan Sobol"] + + gem.required_ruby_version = "~> #{Plow::Dependencies::REQUIRED_RUBY_VERSION}" + + Plow::Dependencies::DEVELOPMENT_GEMS.each_pair do |name, version| + gem.add_development_dependency(name.to_s, version) + end end + Jeweler::GemcutterTasks.new Jeweler::RubyforgeTasks.new do |task| - task.doc_task = "yardoc" + task.doc_task = false # rubyforge's days are numbered... end -rescue LoadError - puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" +rescue LoadError => e + Plow::Dependencies.create_warning_for(e) end -require 'spec/rake/spectask' -Spec::Rake::SpecTask.new(:spec) do |task| - task.libs << 'lib' << 'spec' - task.spec_files = FileList['spec/**/*_spec.rb'] - task.spec_opts = %w{ -O spec/spec.opts } -end +################################################################################################### -Spec::Rake::SpecTask.new(:rcov) do |task| - task.libs << 'lib' << 'spec' - task.pattern = 'spec/**/*_spec.rb' - task.rcov = true +begin + require 'spec/rake/spectask' + Spec::Rake::SpecTask.new(:spec) + task :default => :spec +rescue LoadError => e + Plow::Dependencies.create_warning_for(e) end -task :spec => :check_dependencies +################################################################################################### -task :default => :spec - begin require 'yard' - YARD::Rake::YardocTask.new -rescue LoadError => e - task :yardoc do - abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard" + require 'bluecloth' # hidden yard dependency for markdown support + YARD::Rake::YardocTask.new(:yard) do |t| + t.options += ['--title', "Plow #{Plow::VERSION} Documentation"] end +rescue LoadError => e + Plow::Dependencies.create_warning_for(e) end