mongoid_rails_migrations 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8fc6474257b2d2e0046a797c410b91e3ccac8e1
|
4
|
+
data.tar.gz: aaed74adb2274149fe6dae16912cfa6f97dcf739
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9606b16b2eab7e1e73e072eabc5bc96de07cc920d0f2c4c88352d21af7f3719ed180879fc6ce0ca6a817b2b3228d1abcac99ee98687ae9f6d040b97f7bf38780
|
7
|
+
data.tar.gz: 6b1c82473b629467e43239a74ed7de02ec4704fdd3c0a9ec2aadc3c8e6f3d51e5468bcb62f849d52c15892ccb8f28baa0b9c054a2e312af0a45b6df2b68088bb
|
@@ -198,12 +198,8 @@ module Mongoid #:nodoc
|
|
198
198
|
end
|
199
199
|
end
|
200
200
|
|
201
|
-
def status(migrations_path
|
202
|
-
|
203
|
-
when target_version.nil? then new(:up, migrations_path, target_version).status
|
204
|
-
when current_version > target_version then new(:down, migrations_path, target_version).status
|
205
|
-
else new(:up, migrations_path, target_version).status
|
206
|
-
end
|
201
|
+
def status(migrations_path)
|
202
|
+
new(:up, migrations_path).status
|
207
203
|
end
|
208
204
|
|
209
205
|
def rollback(migrations_path, steps=1)
|
@@ -339,8 +335,9 @@ module Mongoid #:nodoc
|
|
339
335
|
puts "\ndatabase: #{database_name}\n\n"
|
340
336
|
puts "#{'Status'.center(8)} #{'Migration ID'.ljust(14)} Migration Name"
|
341
337
|
puts "-" * 50
|
342
|
-
|
343
|
-
|
338
|
+
up_migrations = migrated.to_set
|
339
|
+
migrations.each do |migration|
|
340
|
+
status = up_migrations.include?(migration.version.to_i) ? 'up' : 'down'
|
344
341
|
puts "#{status.center(8)} #{migration.version.to_s.ljust(14)} #{migration.name}"
|
345
342
|
end
|
346
343
|
end
|
@@ -400,16 +397,6 @@ module Mongoid #:nodoc
|
|
400
397
|
runnable
|
401
398
|
end
|
402
399
|
|
403
|
-
def to_run_migrations
|
404
|
-
runnable_migrations.select do |migration|
|
405
|
-
if up?
|
406
|
-
!migrated.include?(migration.version.to_i)
|
407
|
-
elsif down?
|
408
|
-
migrated.include?(migration.version.to_i)
|
409
|
-
end
|
410
|
-
end
|
411
|
-
end
|
412
|
-
|
413
400
|
def migrated
|
414
401
|
@migrated_versions ||= self.class.get_all_versions
|
415
402
|
end
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module MongoidRailsMigrations #:nodoc:
|
2
|
-
VERSION = '1.2.
|
3
|
-
end
|
2
|
+
VERSION = '1.2.1'
|
3
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_rails_migrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Da Costa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|