Rakefile in roles_generic-0.3.9 vs Rakefile in roles_generic-0.5.0
- old
+ new
@@ -1,27 +1,48 @@
+# encoding: utf-8
+
+require 'rubygems'
+require 'bundler'
begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "roles_generic"
- gem.summary = %Q{Generic role strategies sharing the same API}
- gem.description = %Q{Generic role strategies sharing the same API. Easy to insert in any model}
- gem.email = "kmandrup@gmail.com"
- gem.homepage = "http://github.com/kristianmandrup/roles_generic"
- gem.authors = ["Kristian Mandrup"]
- gem.rubygems_version = '1.5.0'
-
- # See Gemfile for regular dependencies
- gem.add_development_dependency "rspec", '>= 2.4.1'
- gem.add_development_dependency "generator-spec", '>= 0.7.3'
+ Bundler.setup(:default, :development)
+rescue Bundler::BundlerError => e
+ $stderr.puts e.message
+ $stderr.puts "Run `bundle install` to install missing gems"
+ exit e.status_code
+end
+require 'rake'
- # COMMENTED OUT TO AVOID DUPLICATION WITH GEMFILE:
- # https://github.com/technicalpickles/jeweler/issues#issue/152
- gem.add_dependency 'require_all', '~> 1.2.0'
- gem.add_dependency 'activesupport', '>= 3.0.1'
- gem.add_dependency 'sugar-high', '~> 0.4.0'
+require 'jeweler'
+Jeweler::Tasks.new do |gem|
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
+ gem.name = "roles_generic"
+ gem.summary = %Q{Generic role strategies sharing the same API}
+ gem.description = %Q{Generic role strategies sharing the same API. Easy to insert in any model}
+ gem.email = "kmandrup@gmail.com"
+ gem.homepage = "http://github.com/kristianmandrup/roles_generic"
+ gem.email = "kmandrup@gmail.com"
+ gem.authors = ["Kristian Mandrup"]
+ # dependencies defined in Gemfile
+end
+Jeweler::RubygemsDotOrgTasks.new
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+require 'rake/testtask'
+Rake::TestTask.new(:test) do |test|
+ test.libs << 'lib' << 'test'
+ test.pattern = 'test/**/test_*.rb'
+ test.verbose = true
end
+
+task :default => :test
+
+require 'rake/rdoctask'
+Rake::RDocTask.new do |rdoc|
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
+
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = "roles_generic #{version}"
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
+
+
+