mongoid-archivable 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/.travis.yml +9 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +7 -0
- data/lib/mongoid/archivable/process_localized_fields.rb +4 -4
- data/lib/mongoid/archivable/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: a7c3016c050d0b05f5656dc05a4c671b4493b94c460647cca7b6aba5e1c616e7
|
|
4
|
+
data.tar.gz: 5669a43af86b6e82345ba24c15bb8652513c8e02ddc9108f66e3abd93ffa0002
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 406cbfcfa10caa62b786ada7602ae6e25a7396ee2adecb6ffa1ea81932b2967cb69ed18955ba113a56993cf41fcee93e4883862823b977cc05bde6134fddb530
|
|
7
|
+
data.tar.gz: d68cdc4d87ad2bece007ad457efc58bf6d662d29f5996974ba3ec1acf2ec97116077efb3ea80092a3dd8c66e2334c12fe1281e021a18ef457b4ba00314bbcd7c
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.6.0
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
|
@@ -2,3 +2,10 @@ source 'https://rubygems.org'
|
|
|
2
2
|
|
|
3
3
|
# Specify your gem's dependencies in mongoid-archivable.gemspec
|
|
4
4
|
gemspec
|
|
5
|
+
|
|
6
|
+
case version = ENV['MONGOID_VERSION'] || '~> 7.0'
|
|
7
|
+
when /7/ then gem 'mongoid', '~> 7.0'
|
|
8
|
+
when /6/ then gem 'mongoid', '~> 6.0'
|
|
9
|
+
when /5/ then gem 'mongoid', '~> 5.1'
|
|
10
|
+
else gem 'mongoid', version
|
|
11
|
+
end
|
|
@@ -21,13 +21,13 @@ module Mongoid
|
|
|
21
21
|
# convert embeds_many
|
|
22
22
|
if attrs[relation_name].is_a?(Array)
|
|
23
23
|
attrs[relation_name] = attrs[relation_name].map do |att|
|
|
24
|
-
relation_class = att.fetch('_type', relation.class_name).constantize
|
|
25
|
-
ProcessLocalizedFields.call(relation_class, att)
|
|
24
|
+
relation_class = Hash[att].fetch('_type', relation.class_name).constantize
|
|
25
|
+
ProcessLocalizedFields.call(relation_class, Hash[att])
|
|
26
26
|
end
|
|
27
27
|
# convert embeds_one
|
|
28
28
|
elsif att = attrs[relation_name]
|
|
29
|
-
relation_class = att.fetch('_type', relation.class_name).constantize
|
|
30
|
-
attrs[relation_name] = ProcessLocalizedFields.call(relation_class, att)
|
|
29
|
+
relation_class = Hash[att].fetch('_type', relation.class_name).constantize
|
|
30
|
+
attrs[relation_name] = ProcessLocalizedFields.call(relation_class, Hash[att])
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mongoid-archivable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joost Baaij
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-01-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mongoid
|
|
@@ -127,8 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
127
127
|
- !ruby/object:Gem::Version
|
|
128
128
|
version: '0'
|
|
129
129
|
requirements: []
|
|
130
|
-
|
|
131
|
-
rubygems_version: 2.4.5.1
|
|
130
|
+
rubygems_version: 3.0.1
|
|
132
131
|
signing_key:
|
|
133
132
|
specification_version: 4
|
|
134
133
|
summary: Move Mongoid documents to an archive instead of destroying them.
|