Rakefile in parameters-0.2.1 vs Rakefile in parameters-0.2.2

- old
+ new

@@ -1,43 +1,38 @@ require 'rubygems' +require 'bundler' + +begin + Bundler.setup(:development, :doc) +rescue Bundler::BundlerError => e + STDERR.puts e.message + STDERR.puts "Run `bundle install` to install missing gems" + exit e.status_code +end + require 'rake' +require 'jeweler' require './lib/parameters/version.rb' -begin - require 'jeweler' - Jeweler::Tasks.new do |gem| - gem.name = 'parameters' - gem.version = Parameters::VERSION - gem.license = 'MIT' - gem.summary = %Q{Allows you to add annotated variables to your classes} - gem.description = %Q{Parameters allows you to add annotated variables to your classes which may have configurable default values.} - gem.email = 'postmodern.mod3@gmail.com' - gem.homepage = 'http://github.com/postmodern/parameters' - gem.authors = ['Postmodern'] - gem.add_development_dependency 'rspec', '>= 1.3.0' - gem.add_development_dependency 'yard', '>= 0.5.3' - gem.has_rdoc = 'yard' - end - Jeweler::GemcutterTasks.new -rescue LoadError - puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" +Jeweler::Tasks.new do |gem| + gem.name = 'parameters' + gem.version = Parameters::VERSION + gem.license = 'MIT' + gem.summary = %Q{Allows you to add annotated variables to your classes} + gem.description = %Q{Parameters allows you to add annotated variables to your classes which may have configurable default values.} + gem.email = 'postmodern.mod3@gmail.com' + gem.homepage = 'http://github.com/postmodern/parameters' + gem.authors = ['Postmodern'] + gem.has_rdoc = 'yard' end require 'spec/rake/spectask' Spec::Rake::SpecTask.new(:spec) do |spec| spec.libs += ['lib', 'spec'] spec.spec_files = FileList['spec/**/*_spec.rb'] spec.spec_opts = ['--options', '.specopts'] end -task :spec => :check_dependencies task :default => :spec -begin - require 'yard' - - YARD::Rake::YardocTask.new -rescue LoadError - task :yard do - abort "YARD is not available. In order to run yard, you must: gem install yard" - end -end +require 'yard' +YARD::Rake::YardocTask.new