Skip to content

Commit

Permalink
Merge pull request #151 from carrierwaveuploader/mongoid5
Browse files Browse the repository at this point in the history
Allow mongoid 5
  • Loading branch information
rmm5t committed Sep 11, 2015
2 parents 571e812 + 187eaab commit 79a9590
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion carrierwave-mongoid.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]

s.add_dependency "carrierwave", [">= 0.8.0", "< 0.11.0"]
s.add_dependency "mongoid", [">= 3.0", "< 5.0"]
s.add_dependency "mongoid", [">= 3.0", "<= 6.0"]
s.add_dependency "mongoid-grid_fs", [">= 1.3", "< 3.0"]
s.add_development_dependency "rspec", ["~> 2.14"]
s.add_development_dependency "rake", ["~> 10.0"]
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/mongoid-3.1.gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source "https://rubygems.org"

gem "mongoid", github: "mongoid/mongoid", branch: "3.1.0-stable"
gem "mongoid", "~> 3.1.0"

gemspec path: "../"
3 changes: 1 addition & 2 deletions gemfiles/mongoid-4.0.gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
source "https://rubygems.org"

gem "mongoid-grid_fs", github: "ahoward/mongoid-grid_fs", branch: "master"
gem "mongoid", github: "mongoid/mongoid", branch: "master"
gem "mongoid", "~> 4.0.0"

gemspec path: "../"
5 changes: 5 additions & 0 deletions gemfiles/mongoid-5.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source "https://rubygems.org"

gem "mongoid", "~> 5.0.0"

gemspec path: "../"
4 changes: 2 additions & 2 deletions spec/mongoid_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,13 @@ def extension_white_list

it "deletes the instance of MongoUser after save" do
@doc.save
MongoUser.count.should eql(1)
MongoUser.count.should eq(1)
@doc.destroy
end

it "deletes the instance of MongoUser after save and then re-looking up the instance" do
@doc.save
MongoUser.count.should eql(1)
MongoUser.count.should eq(1)
@doc = MongoUser.first
@doc.destroy
end
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def stub_tempfile(filename, mime_type=nil, fake_name=nil)
end

module I18nHelpers
I18n.enforce_available_locales = false if I18n.respond_to? :enforce_available_locales=

def change_locale_and_store_translations(locale, translations, &block)
current_locale = I18n.locale
current_enforce = I18n.config.enforce_available_locales
Expand Down

0 comments on commit 79a9590

Please sign in to comment.