summaryrefslogtreecommitdiffstats
path: root/vendor/plugins/awesome_nested_set/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/plugins/awesome_nested_set/Rakefile')
-rw-r--r--vendor/plugins/awesome_nested_set/Rakefile46
1 files changed, 14 insertions, 32 deletions
diff --git a/vendor/plugins/awesome_nested_set/Rakefile b/vendor/plugins/awesome_nested_set/Rakefile
index 53906f68b..b913bc5e2 100644
--- a/vendor/plugins/awesome_nested_set/Rakefile
+++ b/vendor/plugins/awesome_nested_set/Rakefile
@@ -1,30 +1,23 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-require 'rake/gempackagetask'
-require 'rcov/rcovtask'
-require "load_multi_rails_rake_tasks"
+# -*- encoding: utf-8 -*-
+$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
+require 'rubygems'
+require 'bundler/setup'
+require 'awesome_nested_set/version'
-spec = eval(File.read("#{File.dirname(__FILE__)}/awesome_nested_set.gemspec"))
-PKG_NAME = spec.name
-PKG_VERSION = spec.version
-
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.need_zip = true
- pkg.need_tar = true
-end
+require "rspec/core/rake_task"
+RSpec::Core::RakeTask.new(:spec)
+task :default => :spec
-desc 'Default: run unit tests.'
-task :default => :test
+task :build do
+ system "gem build awesome_nested_set.gemspec"
+end
-desc 'Test the awesome_nested_set plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
+task :release => :build do
+ system "gem push awesome_nested_set-#{ActsAsGeocodable::VERSION}.gem"
end
+require 'rdoc/task'
desc 'Generate documentation for the awesome_nested_set plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
@@ -33,14 +26,3 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
end
-
-namespace :test do
- desc "just rcov minus html output"
- Rcov::RcovTask.new(:coverage) do |t|
- # t.libs << 'test'
- t.test_files = FileList['test/**/*_test.rb']
- t.output_dir = 'coverage'
- t.verbose = true
- t.rcov_opts = %w(--exclude test,/usr/lib/ruby,/Library/Ruby,lib/awesome_nested_set/named_scope.rb --sort coverage)
- end
-end \ No newline at end of file