Skip to content

Commit

Permalink
move mongoid support to a separate gem
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmolnar committed Jun 25, 2018
1 parent 1d1c64b commit 24e0f1c
Show file tree
Hide file tree
Showing 30 changed files with 2 additions and 2,280 deletions.
8 changes: 0 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ else
end
end

if ENV['DB'] =~ /mongoid4/
gem 'mongoid', '~> 4.0.0', require: false
end

if ENV['DB'] =~ /mongoid5/
gem 'mongoid', '~> 5.0.0', require: false
end

group :test do
# TestUnit was removed from Ruby 2.2 but still needed for testing Rails 3.x.
gem 'test-unit', '~> 3.0' if RUBY_VERSION >= '2.2'
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ en:

## Mongoid

Mongoid support has been moved to its own gem at [ransack-mongoid](github.com/activerecord-hackery/ransack-mongoid).
Ransack works with Mongoid in the same way as Active Record, except that with
Mongoid, associations are not currently supported. Demo source code may be found
[here](https://github.com/Zhomart/ransack-mongodb-demo). A `result` method
Expand Down
23 changes: 1 addition & 22 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,8 @@ RSpec::Core::RakeTask.new(:spec) do |rspec|
# rspec.rspec_opts = ['--backtrace']
end

RSpec::Core::RakeTask.new(:mongoid) do |rspec|
ENV['SPEC'] = 'spec/mongoid/**/*_spec.rb'
rspec.rspec_opts = ['--backtrace']
end

task :default do
if ENV['DB'] =~ /mongoid/
Rake::Task["mongoid"].invoke
else
Rake::Task["spec"].invoke
end
Rake::Task["spec"].invoke
end

desc "Open an irb session with Ransack and the sample data used in specs"
Expand All @@ -31,15 +22,3 @@ task :console do
ARGV.clear
Pry.start
end

desc "Open an irb session with Ransack, Mongoid and the sample data used in specs"
task :mongoid_console do
require 'irb'
require 'irb/completion'
require 'pry'
require 'mongoid'
require File.expand_path('../lib/ransack.rb', __FILE__)
require File.expand_path('../spec/mongoid/support/schema.rb', __FILE__)
ARGV.clear
Pry.start
end
15 changes: 0 additions & 15 deletions lib/ransack/adapters/mongoid.rb

This file was deleted.

Empty file.
37 changes: 0 additions & 37 deletions lib/ransack/adapters/mongoid/attributes/attribute.rb

This file was deleted.

17 changes: 0 additions & 17 deletions lib/ransack/adapters/mongoid/attributes/order_predications.rb

This file was deleted.

141 changes: 0 additions & 141 deletions lib/ransack/adapters/mongoid/attributes/predications.rb

This file was deleted.

Loading

0 comments on commit 24e0f1c

Please sign in to comment.