Permalink
Browse files

[MODEL] Tighten up Bundler specifications for ActiveRecord/Mongoid 3 …

…and 4
  • Loading branch information...
1 parent df9e70c commit c0c8fc21de5bcf3a39f6b2d26709c9e83423f618 @karmi karmi committed Feb 14, 2014
@@ -37,6 +37,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "oj"
s.add_development_dependency "kaminari"
+ # NOTE: Do not add Mongoid here, keep only in 3/4 files
s.add_development_dependency "shoulda-context"
s.add_development_dependency "mocha"
@@ -5,7 +5,8 @@
source 'https://rubygems.org'
+gemspec path: '../'
+
+gem 'activemodel', '>= 3.0'
gem 'activerecord', '~> 3.2'
gem 'mongoid', '>= 3.0'
-
-gemspec path: '../'
@@ -5,7 +5,8 @@
source 'https://rubygems.org'
-gem 'activerecord', '~> 4'
-gem 'mongoid', '~> 4.0.0.alpha1'
-
gemspec path: '../'
+
+gem 'activemodel', '~> 4'
+gem 'activerecord', '~> 4'
+gem 'mongoid', '~> 4.0.0.beta1'
@@ -1,17 +1,18 @@
require 'test_helper'
begin
- require "mongoid"
+ require 'mongoid'
session = Moped::Connection.new("localhost", 27017, 0.5)
session.connect
ENV["MONGODB_AVAILABLE"] = 'yes'
rescue LoadError, Moped::Errors::ConnectionFailure => e
+ $stderr.puts "MongoDB not installed or running: #{e}"
end
if ENV["MONGODB_AVAILABLE"]
- puts "Mongoid #{Mongoid::VERSION}", '-'*80
+ $stderr.puts "Mongoid #{Mongoid::VERSION}", '-'*80
- logger = ::Logger.new(STDERR)
+ logger = ::Logger.new($stderr)
logger.formatter = lambda { |s, d, p, m| " #{m.ansi(:faint, :cyan)}\n" }
logger.level = ::Logger::DEBUG

0 comments on commit c0c8fc2

Please sign in to comment.