Rakefile in mongoid-7.1.7 vs Rakefile in mongoid-7.1.8
- old
+ new
@@ -2,12 +2,17 @@
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')
@@ -31,9 +36,35 @@
end
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],
+]
+
+RUN_PRIORITY = %i(
+ unit attributes associations_referenced associations
+ integration rails
+)
+
+def spec_organizer
+ Mrss::SpecOrganizer.new(
+ root: ROOT,
+ classifiers: CLASSIFIERS,
+ priority_order: RUN_PRIORITY,
+ )
+end
+
+task :ci do
+ spec_organizer.run
end
task :default => :spec
desc "Generate all documentation"