mongoid-denormalize 0.3.1 → 0.3.2

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
  SHA256:
3
- metadata.gz: 305306418eb9b932560215ef74e6aee0ea803444310dd9a36b82bc601026a268
4
- data.tar.gz: 2ca4400f0e00dc5fa365637cd2002cd132b1c9e36f14f37f94e8716a5d4ae332
3
+ metadata.gz: bee7a1cf0a5f4615181f6bb6018f61ca6cc8ee1376860ae2643a6172d286bab0
4
+ data.tar.gz: e3b842b6209f14f87ac48cdcc94a23af4308ebe8de7887979c6c06ce6f321fe3
5
5
  SHA512:
6
- metadata.gz: 6f245dfef2f06c8d07f472225751257f6173787ab6ee4baacccec67caee4d9fe422acd732374055d52c38eb161d2ea7725078f4406a0c8c38b8a6126fb98bacc
7
- data.tar.gz: 2255a8d098dbf6796aa0e3de5586ec38bc34a79c317098a928d5e757c2c9c6ec21e15e7917d38203a1c0ec4adbfa19337cc40df32bf0f4bb6a13252f62cb1ffc
6
+ metadata.gz: df7533f837a55e9a3177eb13d11a5bf1fec91f1c9cd34509a646dbed69fe0ca695841e927b5523a4f9ce0b1592265e18a29213d701e30e28aedddb9f983ccc51
7
+ data.tar.gz: 7d70ca109458515122ed18507256440f723e1b49d55dcff0a2422991d9ad08ac9693e257b54c8c666527c7725f7f64ba35e570f54bd80dac2d3c654f2677228a
data/.gitignore CHANGED
@@ -7,6 +7,7 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
10
11
 
11
12
  # rspec failure tracking
12
13
  .rspec_status
@@ -4,7 +4,7 @@ rvm:
4
4
  - 2.3.4
5
5
  before_install: gem install bundler -v 1.15.4
6
6
 
7
- gemfiles:
7
+ gemfile:
8
8
  - Gemfile
9
9
  - gemfiles/mongoid-5.0.gemfile
10
10
  - gemfiles/mongoid-6.0.gemfile
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Mongoid::Denormalize
2
- ![Build Status](https://travis-ci.org/rjurado01/mongoid-denormalize.svg?branch=master)
2
+ ![Build Status](https://travis-ci.org/nosolosoftware/mongoid-denormalize.svg?branch=master)
3
3
 
4
4
  Helper module for denormalizing association attributes in Mongoid models
5
5
 
@@ -55,9 +55,9 @@ module Mongoid
55
55
  from = options[:from].to_s
56
56
 
57
57
  child_class.send(options[:child_callback] || 'before_save') do
58
- if send(from) && send("#{from}_id_changed?")
58
+ if send("#{from}_id_changed?")
59
59
  fields.each do |field|
60
- send("#{field[:as]}=", send(from).send(field[:name]))
60
+ send("#{field[:as]}=", send(from)&.send(field[:name]))
61
61
  end
62
62
  end
63
63
  end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Denormalize
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ['lib']
24
24
 
25
25
  spec.add_development_dependency 'bundler', '~> 1.15'
26
+ spec.add_development_dependency 'mongoid-compatibility', '~> 0.5.1'
26
27
  spec.add_development_dependency 'rake', '~> 10.0'
27
28
  spec.add_development_dependency 'rspec', '~> 3.0'
28
29
  spec.add_dependency 'mongoid', ['>= 3.0', '< 7.0']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-denormalize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - rjurado01
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-21 00:00:00.000000000 Z
11
+ date: 2019-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.15'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mongoid-compatibility
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.5.1
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.5.1
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -112,8 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
126
  - !ruby/object:Gem::Version
113
127
  version: '0'
114
128
  requirements: []
115
- rubyforge_project:
116
- rubygems_version: 2.7.6
129
+ rubygems_version: 3.0.1
117
130
  signing_key:
118
131
  specification_version: 4
119
132
  summary: Denormalize fields from relations