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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 921a26dc194f7addd2eaff0e4f094f86962a44e5
4
- data.tar.gz: 66c9c7d076d1488661ea55ea7e1c60d97713f7bf
2
+ SHA256:
3
+ metadata.gz: a7c3016c050d0b05f5656dc05a4c671b4493b94c460647cca7b6aba5e1c616e7
4
+ data.tar.gz: 5669a43af86b6e82345ba24c15bb8652513c8e02ddc9108f66e3abd93ffa0002
5
5
  SHA512:
6
- metadata.gz: cee5339dcbbc3861ab1c9335009d95dd82cfeec196a2c439b8fb071895383f301b7376e1556b988ae54ce9414d07d53da7591ebfc70319330cba280d5efed994
7
- data.tar.gz: 92e3a9d9687e44c1bc8ef5b9ad02fe7bfb44286f6ce3a8c13604ebfc6df269cf9d4f39ae88e90b41d2ea89c72bb13ae8d0acdc6ac8a2773b0cf3cf1639c5bb45
6
+ metadata.gz: 406cbfcfa10caa62b786ada7602ae6e25a7396ee2adecb6ffa1ea81932b2967cb69ed18955ba113a56993cf41fcee93e4883862823b977cc05bde6134fddb530
7
+ data.tar.gz: d68cdc4d87ad2bece007ad457efc58bf6d662d29f5996974ba3ec1acf2ec97116077efb3ea80092a3dd8c66e2334c12fe1281e021a18ef457b4ba00314bbcd7c
@@ -1 +1 @@
1
- 2.2.5
1
+ 2.6.0
@@ -13,3 +13,12 @@ notifications:
13
13
  - tomas.celizna@gmail.com
14
14
  on_failure: change
15
15
  on_success: never
16
+
17
+ matrix:
18
+ include:
19
+ - rvm: 2.3.3
20
+ env: MONGOID_VERSION=5
21
+ - rvm: 2.3.3
22
+ env: MONGOID_VERSION=6
23
+ - rvm: 2.5.0
24
+ env: MONGOID_VERSION=7
@@ -1,3 +1,7 @@
1
+ # 1.7.1
2
+
3
+ * FIX: BSON 4+ returns BSON::Document instead of Hash, [#15](https://github.com/Sign2Pay/mongoid-archivable/pull/15)
4
+
1
5
  # 1.7.0
2
6
 
3
7
  * `restore` returns nil if save unsuccessful, [#14](https://github.com/Sign2Pay/mongoid-archivable/pull/14)
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
 
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Archivable
3
- VERSION = '1.7.0'.freeze
3
+ VERSION = '1.7.1'.freeze
4
4
  end
5
5
  end
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.0
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: 2017-08-30 00:00:00.000000000 Z
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
- rubyforge_project:
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.