Rakefile in mongoid-7.1.11 vs Rakefile in mongoid-7.2.0.rc1
- old
+ new
@@ -2,17 +2,12 @@
require "bundler"
require "bundler/gem_tasks"
Bundler.setup
-ROOT = File.expand_path(File.join(File.dirname(__FILE__)))
-
-$: << File.join(ROOT, 'spec/shared/lib')
-
require "rake"
require "rspec/core/rake_task"
-require 'mrss/spec_organizer'
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require "mongoid/version"
tasks = Rake.application.instance_variable_get('@tasks')
@@ -25,12 +20,15 @@
task :install => :build do
system "sudo gem install mongoid-#{Mongoid::VERSION}.gem"
end
-task :release do
- raise "Please use ./release.sh to release"
+task :release => :build do
+ system "git tag -a v#{Mongoid::VERSION} -m 'Tagging #{Mongoid::VERSION}'"
+ system "git push --tags"
+ system "gem push mongoid-#{Mongoid::VERSION}.gem"
+ system "rm mongoid-#{Mongoid::VERSION}.gem"
end
RSpec::Core::RakeTask.new("spec") do |spec|
spec.pattern = "spec/**/*_spec.rb"
end
@@ -38,36 +36,17 @@
RSpec::Core::RakeTask.new('spec:progress') do |spec|
spec.rspec_opts = %w(--format progress)
spec.pattern = "spec/**/*_spec.rb"
end
-CLASSIFIERS = [
- [%r,^mongoid/attribute,, :attributes],
- [%r,^mongoid/association/[or],, :associations_referenced],
- [%r,^mongoid/association,, :associations],
- [%r,^mongoid,, :unit],
- [%r,^integration,, :integration],
- [%r,^rails,, :rails],
-]
+task :ci do
+ $LOAD_PATH.push File.expand_path("../spec", __FILE__)
+ require 'support/spec_organizer'
-RUN_PRIORITY = %i(
- unit attributes associations_referenced associations
- integration rails
-)
-
-def spec_organizer
- Mrss::SpecOrganizer.new(
- root: ROOT,
- classifiers: CLASSIFIERS,
- priority_order: RUN_PRIORITY,
- )
+ SpecOrganizer.new.run
end
-task :ci do
- spec_organizer.run
-end
-
task :default => :spec
desc "Generate all documentation"
task :docs => 'docs:yard'
@@ -85,5 +64,7 @@
unless File.exist?('gem-private_key.pem')
raise "No private key present, cannot release"
end
end
end
+
+task :release => ['release:check_private_key', 'release:do']