Rakefile in jbox-gitolite-1.1.11 vs Rakefile in jbox-gitolite-1.2.0

- old
+ new

@@ -1,13 +1,12 @@ require 'bundler' Bundler::GemHelper.install_tasks + +require 'rake' require 'rspec/core/rake_task' +require 'rdoc/task' -require 'ci/reporter/rake/rspec' - -# Rake tasks from https://github.com/mojombo/rakegem/blob/master/Rakefile - # Helper Functions def name @name ||= Dir['*.gemspec'].first.split('.').first end @@ -15,21 +14,28 @@ line = File.read("lib/#{name}/version.rb")[/^\s*VERSION\s*=\s*.*/] line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1] end # Standard tasks -RSpec::Core::RakeTask.new(:spec) -task :test => :spec +RSpec::Core::RakeTask.new(:spec) do |config| + config.rspec_opts = "--color --format nested --fail-fast" +end + task :default => :spec +task :test => :spec -require 'rdoc/task' Rake::RDocTask.new do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = "#{name} #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end desc "Open an irb session preloaded with this library" task :console do sh "irb -rubygems -r ./lib/#{name}.rb" +end + +desc "Show library version" +task :version do + puts "#{name} #{version}" end