Rakefile in rulebook-0.3.3 vs Rakefile in rulebook-0.4.0
- old
+ new
@@ -1,64 +1,43 @@
require 'rubygems'
-require 'rake'
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "rulebook"
- gem.summary = %Q{Allows you to define a set of 'rules' or dynamic methods to apply to a class}
- gem.description = %Q{Lets you define methods with regex for dynamic methods}
- gem.email = "c00lryguy@gmail.com"
- gem.homepage = "http://github.com/c00lryguy/rulebook"
- gem.authors = ["Ryan Lewis"]
- # gem.add_development_dependency "riot", ">= 0"
- # 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"
-end
+# Gay as hell jeweler workaround
-require 'rake/testtask'
-Rake::TestTask.new(:test) do |test|
- test.libs << 'lib' << 'test'
- test.pattern = 'test/**/test_*.rb'
- test.verbose = false
-end
+require 'psych'
+YAML::ENGINE.yamler = 'psych'
+require 'bundler'
begin
- require 'rcov/rcovtask'
- Rcov::RcovTask.new do |test|
- test.libs << 'test'
- test.pattern = 'test/**/*_test.rb'
- test.verbose = false
- end
-rescue LoadError
- task :rcov do
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
- end
+ 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'
-task :test => :check_dependencies
-
-task :default => :test
-
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
-
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "rulebook #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
+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 = "rulebook"
+ gem.homepage = "http://github.com/c00lryguy/rulebook"
+ gem.license = "MIT"
+ gem.summary = %Q{Define methods with regex for dynamic methods.}
+ gem.description = %Q{Allows you to define a set of 'rules' or dynamic methods to apply to a class.}
+ gem.email = "c00lryguy@gmail.com"
+ gem.authors = ["Ryan Lewis"]
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
+ gem.add_runtime_dependency 'meta_tools', '> 0.1'
+ gem.add_development_dependency 'rake', '> 0.0.0'
+ gem.add_development_dependency 'riot', '> 0.0.0'
end
+Jeweler::RubygemsDotOrgTasks.new
+require 'rake/testtask'
-begin
- require 'reek/rake/task'
-
- Reek::Rake::Task.new do |t|
- t.fail_on_error = true
- t.verbose = true
- end
-rescue LoadError
-end
+Rake::TestTask.new(:test) do |t|
+ t.libs.concat ['lib', 'test']
+ t.pattern = 'test/**/test_*.rb'
+ t.verbose = false
+end
+task :default => :test
\ No newline at end of file