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 | 8 | gem 'actionpack', RAILS_VERSION |
9 | 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 | 13 | gem 'devise' |
16 | 14 | gem 'haml' |
17 | 15 | gem 'htmlentities' |
... | ... | @@ -78,7 +76,7 @@ group :development do |
78 | 76 | end |
79 | 77 | |
80 | 78 | group :test do |
81 | - gem 'rspec' | |
79 | + gem 'rspec', '~> 3.3' | |
82 | 80 | gem 'rspec-rails', '~> 3.0', require: false |
83 | 81 | gem 'rspec-activemodel-mocks' |
84 | 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 | 11 | GEM |
2 | 12 | remote: https://rubygems.org/ |
3 | 13 | specs: |
... | ... | @@ -81,7 +91,6 @@ GEM |
81 | 91 | coffee-script-source (1.9.1.1) |
82 | 92 | colorize (0.7.7) |
83 | 93 | columnize (0.9.0) |
84 | - connection_pool (2.2.0) | |
85 | 94 | coveralls (0.8.2) |
86 | 95 | json (~> 1.8) |
87 | 96 | rest-client (>= 1.6.8, < 2) |
... | ... | @@ -175,25 +184,13 @@ GEM |
175 | 184 | mimemagic (0.3.0) |
176 | 185 | mini_portile (0.6.2) |
177 | 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 | 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 | 194 | multi_xml (0.5.5) |
198 | 195 | multipart-post (2.0.0) |
199 | 196 | net-scp (1.2.1) |
... | ... | @@ -363,7 +360,7 @@ GEM |
363 | 360 | thread_safe (0.3.5-java) |
364 | 361 | tilt (1.4.1) |
365 | 362 | timecop (0.7.4) |
366 | - tins (1.5.4) | |
363 | + tins (1.6.0) | |
367 | 364 | tzinfo (1.2.2) |
368 | 365 | thread_safe (~> 0.1) |
369 | 366 | uglifier (2.7.1) |
... | ... | @@ -431,10 +428,8 @@ DEPENDENCIES |
431 | 428 | kaminari (>= 0.14.1) |
432 | 429 | launchy |
433 | 430 | meta_request |
434 | - mongoid (~> 4.0.0) | |
431 | + mongoid! | |
435 | 432 | mongoid-rspec |
436 | - mongoid_rails_migrations | |
437 | - moped (~> 2.0.2) | |
438 | 433 | omniauth-github |
439 | 434 | pjax_rails |
440 | 435 | poltergeist |
... | ... | @@ -447,7 +442,7 @@ DEPENDENCIES |
447 | 442 | rails_autolink |
448 | 443 | railties (~> 4.1.11) |
449 | 444 | ri_cal |
450 | - rspec | |
445 | + rspec (~> 3.3) | |
451 | 446 | rspec-activemodel-mocks |
452 | 447 | rspec-its |
453 | 448 | rspec-rails (~> 3.0) | ... | ... |
app/models/problem.rb
... | ... | @@ -135,9 +135,12 @@ class Problem |
135 | 135 | self.last_deploy_at = if (last_deploy = app.deploys.where(:environment => self.environment).last) |
136 | 136 | last_deploy.created_at.utc |
137 | 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 | 144 | end |
142 | 145 | end |
143 | 146 | ... | ... |
config/application.rb
... | ... | @@ -2,7 +2,7 @@ require File.expand_path('../boot', __FILE__) |
2 | 2 | |
3 | 3 | require 'action_controller/railtie' |
4 | 4 | require 'action_mailer/railtie' |
5 | -require 'mongoid/railtie' | |
5 | +# require 'mongoid/railtie' | |
6 | 6 | require 'sprockets/railtie' |
7 | 7 | |
8 | 8 | # Require the gems listed in Gemfile, including any gems | ... | ... |