Commit 816110d7953ec58e0a607112c0b4c718ead86a13
1 parent
81dc85c0
Exists in
master
and in
1 other branch
upgrade to early mongoid5 gem preview
Showing
5 changed files
with
29 additions
and
33 deletions
Show diff stats
Gemfile
@@ -8,10 +8,8 @@ gem 'actionmailer', RAILS_VERSION | @@ -8,10 +8,8 @@ gem 'actionmailer', RAILS_VERSION | ||
8 | gem 'actionpack', RAILS_VERSION | 8 | gem 'actionpack', RAILS_VERSION |
9 | gem 'railties', RAILS_VERSION | 9 | gem 'railties', RAILS_VERSION |
10 | 10 | ||
11 | -gem 'moped', '~> 2.0.2' | ||
12 | -gem 'mongoid', '~> 4.0.0' | 11 | +gem 'mongoid', git: 'git@github.com:mongoid/mongoid.git' |
13 | 12 | ||
14 | -gem 'mongoid_rails_migrations' | ||
15 | gem 'devise' | 13 | gem 'devise' |
16 | gem 'haml' | 14 | gem 'haml' |
17 | gem 'htmlentities' | 15 | gem 'htmlentities' |
@@ -78,7 +76,7 @@ group :development do | @@ -78,7 +76,7 @@ group :development do | ||
78 | end | 76 | end |
79 | 77 | ||
80 | group :test do | 78 | group :test do |
81 | - gem 'rspec' | 79 | + gem 'rspec', '~> 3.3' |
82 | gem 'rspec-rails', '~> 3.0', require: false | 80 | gem 'rspec-rails', '~> 3.0', require: false |
83 | gem 'rspec-activemodel-mocks' | 81 | gem 'rspec-activemodel-mocks' |
84 | gem 'rspec-its' | 82 | gem 'rspec-its' |
Gemfile.lock
1 | +GIT | ||
2 | + remote: git@github.com:mongoid/mongoid.git | ||
3 | + revision: f56b96b75eef6d71102c1ef89f3600d35d277e69 | ||
4 | + specs: | ||
5 | + mongoid (5.0.0) | ||
6 | + activemodel (~> 4.0) | ||
7 | + mongo (~> 2.0) | ||
8 | + origin (~> 2.1) | ||
9 | + tzinfo (>= 0.3.37) | ||
10 | + | ||
1 | GEM | 11 | GEM |
2 | remote: https://rubygems.org/ | 12 | remote: https://rubygems.org/ |
3 | specs: | 13 | specs: |
@@ -81,7 +91,6 @@ GEM | @@ -81,7 +91,6 @@ GEM | ||
81 | coffee-script-source (1.9.1.1) | 91 | coffee-script-source (1.9.1.1) |
82 | colorize (0.7.7) | 92 | colorize (0.7.7) |
83 | columnize (0.9.0) | 93 | columnize (0.9.0) |
84 | - connection_pool (2.2.0) | ||
85 | coveralls (0.8.2) | 94 | coveralls (0.8.2) |
86 | json (~> 1.8) | 95 | json (~> 1.8) |
87 | rest-client (>= 1.6.8, < 2) | 96 | rest-client (>= 1.6.8, < 2) |
@@ -175,25 +184,13 @@ GEM | @@ -175,25 +184,13 @@ GEM | ||
175 | mimemagic (0.3.0) | 184 | mimemagic (0.3.0) |
176 | mini_portile (0.6.2) | 185 | mini_portile (0.6.2) |
177 | minitest (5.7.0) | 186 | minitest (5.7.0) |
178 | - mongoid (4.0.2) | ||
179 | - activemodel (~> 4.0) | ||
180 | - moped (~> 2.0.0) | ||
181 | - origin (~> 2.1) | ||
182 | - tzinfo (>= 0.3.37) | ||
183 | - mongoid-rspec (2.2.0) | ||
184 | - mongoid (~> 4.0.0) | ||
185 | - rake | ||
186 | - rspec (~> 3.1) | ||
187 | - mongoid_rails_migrations (1.0.1) | ||
188 | - activesupport (>= 3.2.0) | ||
189 | - bundler (>= 1.0.0) | ||
190 | - rails (>= 3.2.0) | ||
191 | - railties (>= 3.2.0) | ||
192 | - moped (2.0.6) | 187 | + mongo (2.0.5) |
193 | bson (~> 3.0) | 188 | bson (~> 3.0) |
194 | - connection_pool (~> 2.0) | ||
195 | - optionable (~> 0.2.0) | ||
196 | - multi_json (1.11.1) | 189 | + mongoid-rspec (1.10.0) |
190 | + mongoid (>= 3.0.1) | ||
191 | + rake | ||
192 | + rspec (>= 2.14) | ||
193 | + multi_json (1.11.2) | ||
197 | multi_xml (0.5.5) | 194 | multi_xml (0.5.5) |
198 | multipart-post (2.0.0) | 195 | multipart-post (2.0.0) |
199 | net-scp (1.2.1) | 196 | net-scp (1.2.1) |
@@ -363,7 +360,7 @@ GEM | @@ -363,7 +360,7 @@ GEM | ||
363 | thread_safe (0.3.5-java) | 360 | thread_safe (0.3.5-java) |
364 | tilt (1.4.1) | 361 | tilt (1.4.1) |
365 | timecop (0.7.4) | 362 | timecop (0.7.4) |
366 | - tins (1.5.4) | 363 | + tins (1.6.0) |
367 | tzinfo (1.2.2) | 364 | tzinfo (1.2.2) |
368 | thread_safe (~> 0.1) | 365 | thread_safe (~> 0.1) |
369 | uglifier (2.7.1) | 366 | uglifier (2.7.1) |
@@ -431,10 +428,8 @@ DEPENDENCIES | @@ -431,10 +428,8 @@ DEPENDENCIES | ||
431 | kaminari (>= 0.14.1) | 428 | kaminari (>= 0.14.1) |
432 | launchy | 429 | launchy |
433 | meta_request | 430 | meta_request |
434 | - mongoid (~> 4.0.0) | 431 | + mongoid! |
435 | mongoid-rspec | 432 | mongoid-rspec |
436 | - mongoid_rails_migrations | ||
437 | - moped (~> 2.0.2) | ||
438 | omniauth-github | 433 | omniauth-github |
439 | pjax_rails | 434 | pjax_rails |
440 | poltergeist | 435 | poltergeist |
@@ -447,7 +442,7 @@ DEPENDENCIES | @@ -447,7 +442,7 @@ DEPENDENCIES | ||
447 | rails_autolink | 442 | rails_autolink |
448 | railties (~> 4.1.11) | 443 | railties (~> 4.1.11) |
449 | ri_cal | 444 | ri_cal |
450 | - rspec | 445 | + rspec (~> 3.3) |
451 | rspec-activemodel-mocks | 446 | rspec-activemodel-mocks |
452 | rspec-its | 447 | rspec-its |
453 | rspec-rails (~> 3.0) | 448 | rspec-rails (~> 3.0) |
app/models/problem.rb
@@ -135,9 +135,12 @@ class Problem | @@ -135,9 +135,12 @@ class Problem | ||
135 | self.last_deploy_at = if (last_deploy = app.deploys.where(:environment => self.environment).last) | 135 | self.last_deploy_at = if (last_deploy = app.deploys.where(:environment => self.environment).last) |
136 | last_deploy.created_at.utc | 136 | last_deploy.created_at.utc |
137 | end | 137 | end |
138 | - collection.find('_id' => self.id) | ||
139 | - .update({'$set' => {'app_name' => self.app_name, | ||
140 | - 'last_deploy_at' => self.last_deploy_at.try(:utc)}}) | 138 | + collection. |
139 | + find('_id' => self.id). | ||
140 | + update_one({'$set' => { | ||
141 | + 'app_name' => self.app_name, | ||
142 | + 'last_deploy_at' => self.last_deploy_at.try(:utc) | ||
143 | + }}) | ||
141 | end | 144 | end |
142 | end | 145 | end |
143 | 146 |
config/application.rb
@@ -2,7 +2,7 @@ require File.expand_path('../boot', __FILE__) | @@ -2,7 +2,7 @@ require File.expand_path('../boot', __FILE__) | ||
2 | 2 | ||
3 | require 'action_controller/railtie' | 3 | require 'action_controller/railtie' |
4 | require 'action_mailer/railtie' | 4 | require 'action_mailer/railtie' |
5 | -require 'mongoid/railtie' | 5 | +# require 'mongoid/railtie' |
6 | require 'sprockets/railtie' | 6 | require 'sprockets/railtie' |
7 | 7 | ||
8 | # Require the gems listed in Gemfile, including any gems | 8 | # Require the gems listed in Gemfile, including any gems |
config/mongo.rb