diff --git a/Gemfile b/Gemfile index 01cb661..5c91341 100644 --- a/Gemfile +++ b/Gemfile @@ -8,10 +8,8 @@ gem 'actionmailer', RAILS_VERSION gem 'actionpack', RAILS_VERSION gem 'railties', RAILS_VERSION -gem 'moped', '~> 2.0.2' -gem 'mongoid', '~> 4.0.0' +gem 'mongoid', git: 'git@github.com:mongoid/mongoid.git' -gem 'mongoid_rails_migrations' gem 'devise' gem 'haml' gem 'htmlentities' @@ -78,7 +76,7 @@ group :development do end group :test do - gem 'rspec' + gem 'rspec', '~> 3.3' gem 'rspec-rails', '~> 3.0', require: false gem 'rspec-activemodel-mocks' gem 'rspec-its' diff --git a/Gemfile.lock b/Gemfile.lock index 28a0168..9c494ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,13 @@ +GIT + remote: git@github.com:mongoid/mongoid.git + revision: f56b96b75eef6d71102c1ef89f3600d35d277e69 + specs: + mongoid (5.0.0) + activemodel (~> 4.0) + mongo (~> 2.0) + origin (~> 2.1) + tzinfo (>= 0.3.37) + GEM remote: https://rubygems.org/ specs: @@ -81,7 +91,6 @@ GEM coffee-script-source (1.9.1.1) colorize (0.7.7) columnize (0.9.0) - connection_pool (2.2.0) coveralls (0.8.2) json (~> 1.8) rest-client (>= 1.6.8, < 2) @@ -175,25 +184,13 @@ GEM mimemagic (0.3.0) mini_portile (0.6.2) minitest (5.7.0) - mongoid (4.0.2) - activemodel (~> 4.0) - moped (~> 2.0.0) - origin (~> 2.1) - tzinfo (>= 0.3.37) - mongoid-rspec (2.2.0) - mongoid (~> 4.0.0) - rake - rspec (~> 3.1) - mongoid_rails_migrations (1.0.1) - activesupport (>= 3.2.0) - bundler (>= 1.0.0) - rails (>= 3.2.0) - railties (>= 3.2.0) - moped (2.0.6) + mongo (2.0.5) bson (~> 3.0) - connection_pool (~> 2.0) - optionable (~> 0.2.0) - multi_json (1.11.1) + mongoid-rspec (1.10.0) + mongoid (>= 3.0.1) + rake + rspec (>= 2.14) + multi_json (1.11.2) multi_xml (0.5.5) multipart-post (2.0.0) net-scp (1.2.1) @@ -363,7 +360,7 @@ GEM thread_safe (0.3.5-java) tilt (1.4.1) timecop (0.7.4) - tins (1.5.4) + tins (1.6.0) tzinfo (1.2.2) thread_safe (~> 0.1) uglifier (2.7.1) @@ -431,10 +428,8 @@ DEPENDENCIES kaminari (>= 0.14.1) launchy meta_request - mongoid (~> 4.0.0) + mongoid! mongoid-rspec - mongoid_rails_migrations - moped (~> 2.0.2) omniauth-github pjax_rails poltergeist @@ -447,7 +442,7 @@ DEPENDENCIES rails_autolink railties (~> 4.1.11) ri_cal - rspec + rspec (~> 3.3) rspec-activemodel-mocks rspec-its rspec-rails (~> 3.0) diff --git a/app/models/problem.rb b/app/models/problem.rb index 5a8ed32..f9a61b7 100644 --- a/app/models/problem.rb +++ b/app/models/problem.rb @@ -135,9 +135,12 @@ class Problem self.last_deploy_at = if (last_deploy = app.deploys.where(:environment => self.environment).last) last_deploy.created_at.utc end - collection.find('_id' => self.id) - .update({'$set' => {'app_name' => self.app_name, - 'last_deploy_at' => self.last_deploy_at.try(:utc)}}) + collection. + find('_id' => self.id). + update_one({'$set' => { + 'app_name' => self.app_name, + 'last_deploy_at' => self.last_deploy_at.try(:utc) + }}) end end diff --git a/config/application.rb b/config/application.rb index edb265a..6eae88d 100644 --- a/config/application.rb +++ b/config/application.rb @@ -2,7 +2,7 @@ require File.expand_path('../boot', __FILE__) require 'action_controller/railtie' require 'action_mailer/railtie' -require 'mongoid/railtie' +# require 'mongoid/railtie' require 'sprockets/railtie' # Require the gems listed in Gemfile, including any gems diff --git a/config/mongo.rb b/config/mongo.rb index 6ae18db..a8310ec 100644 --- a/config/mongo.rb +++ b/config/mongo.rb @@ -8,7 +8,7 @@ Mongoid.configure do |config| end config.load_configuration({ - sessions: { + clients: { default: { uri: uri } -- libgit2 0.21.2