Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Mongoid 3.0.0 is out!

  • Loading branch information...
commit 054a537dc5b0e8d80267594756dbbf6c1b58ea4a 1 parent 07d7348
@mshibuya mshibuya authored
View
7 .travis.yml
@@ -9,23 +9,30 @@ env:
- "CI_ORM=active_record CI_DB_ADAPTER=postgresql CI_DB_USERNAME=postgres"
- "CI_ORM=active_record CI_DB_ADAPTER=mysql"
- "CI_ORM=mongoid"
+ - "CI_ORM=mongoid CI_ORM_VERSION=2.4"
- "CI_ORM=mongoid CI_ORM_VERSION=head"
language: ruby
matrix:
exclude:
- rvm: 1.8.7
+ env: "CI_ORM=mongoid"
+ - rvm: 1.8.7
env: "CI_ORM=mongoid CI_ORM_VERSION=head"
- rvm: jruby-19mode
env: "CI_ORM=active_record CI_DB_ADAPTER=postgresql CI_DB_USERNAME=postgres"
- rvm: jruby-19mode
env: "CI_ORM=active_record CI_DB_ADAPTER=mysql"
- rvm: jruby-19mode
+ env: "CI_ORM=mongoid CI_ORM_VERSION=2.4"
+ - rvm: jruby-19mode
env: "CI_ORM=mongoid CI_ORM_VERSION=head"
- rvm: rbx-19mode
env: "CI_ORM=active_record CI_DB_ADAPTER=postgresql CI_DB_USERNAME=postgres"
- rvm: rbx-19mode
env: "CI_ORM=active_record CI_DB_ADAPTER=mysql"
- rvm: rbx-19mode
+ env: "CI_ORM=mongoid CI_ORM_VERSION=2.4"
+ - rvm: rbx-19mode
env: "CI_ORM=mongoid CI_ORM_VERSION=head"
allow_failures:
- env: "CI_ORM=mongoid CI_ORM_VERSION=head"
View
18 Gemfile
@@ -33,19 +33,21 @@ end
group :mongoid do
case ENV['CI_ORM_VERSION']
- when 'head'
- gem 'mongoid', :git => 'git://github.com/mongoid/mongoid.git'
- gem 'mongoid-paperclip', :require => 'mongoid_paperclip', :git => 'git://github.com/mshibuya/mongoid-paperclip.git', :branch => 'fix-stop-patching-logger'
- # For now, carrierwave-mongoid's mongoid dependency is restricted to '~> 2.1'
- gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid', :git => 'git://github.com/tanordheim/carrierwave-mongoid.git', :branch => 'mongoid_3_0'
- else
+ when '2.4'
platforms :ruby, :mswin, :mingw do
- gem 'bson'
gem 'bson_ext'
end
- gem 'mongoid'
+ gem 'mongoid', '~> 2.4'
gem 'mongoid-paperclip', :require => 'mongoid_paperclip'
gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
+ when 'head'
+ gem 'mongoid', :git => 'git://github.com/mongoid/mongoid.git'
+ gem 'mongoid-paperclip', :require => 'mongoid_paperclip', :git => 'git://github.com/meskyanichi/mongoid-paperclip.git', :branch => 'develop'
+ gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid', :git => 'git://github.com/jnicklas/carrierwave-mongoid.git', :branch => 'mongoid-3.0'
+ else
+ gem 'mongoid', '~> 3.0.0'
+ gem 'mongoid-paperclip', :require => 'mongoid_paperclip', :git => 'git://github.com/meskyanichi/mongoid-paperclip.git', :branch => 'develop'
+ gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid', :git => 'git://github.com/jnicklas/carrierwave-mongoid.git', :branch => 'mongoid-3.0'
end
end
View
2  lib/rails_admin/adapters/mongoid.rb
@@ -36,7 +36,7 @@ def first(options = {},scope=nil)
def all(options = {},scope=nil)
scope ||= self.scoped
- scope = scope.includes(options[:include]) if options[:include]
+ scope = scope.includes(*options[:include]) if options[:include]
scope = scope.limit(options[:limit]) if options[:limit]
scope = scope.any_in(:_id => options[:bulk_ids]) if options[:bulk_ids]
scope = scope.where(query_conditions(options[:query])) if options[:query]
View
2  lib/rails_admin/support/csv_converter.rb
@@ -11,7 +11,7 @@ class CSVConverter
def initialize(objects = [], schema = {})
return self if (@objects = objects).blank?
- @model = objects.first.class
+ @model = objects.dup.first.class
@abstract_model = RailsAdmin::AbstractModel.new(@model)
@model_config = @abstract_model.config
@methods = [(schema[:only] || []) + (schema[:methods] || [])].flatten.compact
View
18 spec/dummy_app/Gemfile
@@ -34,17 +34,23 @@ group :active_record do
end
group :mongoid do
- gem 'bson_ext', :platforms => [:ruby, :mswin, :mingw]
case ENV['CI_ORM_VERSION']
+ when '2.4'
+ platforms :ruby, :mswin, :mingw do
+ gem 'bson_ext'
+ end
+ gem 'mongoid', '~> 2.4'
+ gem 'mongoid-paperclip', :require => 'mongoid_paperclip'
+ gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
when 'head'
gem 'mongoid', :git => 'git://github.com/mongoid/mongoid.git'
- # For now, carrierwave-mongooid's mongoid dependency is restricted to '~> 2.1'
- gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid', :git => 'git://github.com/tanordheim/carrierwave-mongoid.git', :branch => 'mongoid_3_0'
+ gem 'mongoid-paperclip', :require => 'mongoid_paperclip', :git => 'git://github.com/meskyanichi/mongoid-paperclip.git', :branch => 'develop'
+ gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid', :git => 'git://github.com/jnicklas/carrierwave-mongoid.git', :branch => 'mongoid-3.0'
else
- gem 'mongoid'
- gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
+ gem 'mongoid', '~> 3.0.0'
+ gem 'mongoid-paperclip', :require => 'mongoid_paperclip', :git => 'git://github.com/meskyanichi/mongoid-paperclip.git', :branch => 'develop'
+ gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid', :git => 'git://github.com/jnicklas/carrierwave-mongoid.git', :branch => 'mongoid-3.0'
end
- gem 'mongoid-paperclip', :require => 'mongoid_paperclip', :git => 'git://github.com/mshibuya/mongoid-paperclip.git', :branch => 'fix-stop-patching-logger'
gem 'paperclip', '~> 2.7'
gem 'dragonfly'
end
Please sign in to comment.
Something went wrong with that request. Please try again.