Rakefile in menu_builder-0.4.0 vs Rakefile in menu_builder-0.4.1
- old
+ new
@@ -1,53 +1,18 @@
-require 'rubygems'
-require 'rake'
+# encoding: UTF-8
+
+require 'bundler'
+Bundler::GemHelper.install_tasks
+
require 'rake/testtask'
require 'rake/rdoctask'
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "menu_builder"
- gem.summary = %Q{ Killer solution for menus and tabs in Rails }
- gem.description = %Q{ helper and controller macros to define current menu item and also create the menu in view. }
- gem.email = "danielvlopes@gmail.com"
- gem.homepage = "http://github.com/danielvlopes/menu_builder"
- gem.authors = ["Daniel Lopes"]
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
-end
+desc 'Default: run unit tests.'
+task :default => :test
-desc 'Run tests for MenuBuilder.'
+desc 'run unit tests'
Rake::TestTask.new(:test) do |t|
- t.libs << 'test'
+ t.libs << 'lib'
+ t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
-end
-
-begin
- require 'rcov/rcovtask'
- Rcov::RcovTask.new do |test|
- test.libs << 'test'
- test.pattern = 'test/**/test_*.rb'
- test.verbose = true
- end
-rescue LoadError
- task :rcov do
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
- end
-end
-
-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 = "menu_builder #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
+end
\ No newline at end of file