mongoid-denormalize 0.3.2 → 0.4.0

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: bee7a1cf0a5f4615181f6bb6018f61ca6cc8ee1376860ae2643a6172d286bab0
4
- data.tar.gz: e3b842b6209f14f87ac48cdcc94a23af4308ebe8de7887979c6c06ce6f321fe3
3
+ metadata.gz: 7c7d7ab9d80881adaa4e262eee1326301f9e90d6e279447aef67beec3d65a0be
4
+ data.tar.gz: ad68e00030e827e28541cff160411f406dad2c69ea53ca54baf53758a16aa506
5
5
  SHA512:
6
- metadata.gz: df7533f837a55e9a3177eb13d11a5bf1fec91f1c9cd34509a646dbed69fe0ca695841e927b5523a4f9ce0b1592265e18a29213d701e30e28aedddb9f983ccc51
7
- data.tar.gz: 7d70ca109458515122ed18507256440f723e1b49d55dcff0a2422991d9ad08ac9693e257b54c8c666527c7725f7f64ba35e570f54bd80dac2d3c654f2677228a
6
+ metadata.gz: 0f765af8e61525c9609afb0da02a3c90f9a2070f4056d35731f6977a81ff0f7305ace737a1f3a16dc792da8b58e6ba0f6ffc9e93d43d0c6306fd6347cfe44eba
7
+ data.tar.gz: 37a5efcf39b2618653331ae1b416a17730ec854372f708da1b4e742b51dd7ffe72f8190c2aea7f4a6f95fe9fbb5f932ffdf9c5fd8edffff591292089260bad6c
data/.travis.yml CHANGED
@@ -1,20 +1,13 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.4
5
- before_install: gem install bundler -v 1.15.4
4
+ - 2.7
5
+ before_install: gem install bundler -v 2.2
6
6
 
7
7
  gemfile:
8
8
  - Gemfile
9
- - gemfiles/mongoid-5.0.gemfile
10
9
  - gemfiles/mongoid-6.0.gemfile
10
+ - gemfiles/mongoid-7.0.gemfile
11
11
 
12
12
  services:
13
13
  - mongodb
14
-
15
- addons:
16
- apt:
17
- sources:
18
- - mongodb-3.4-precise
19
- packages:
20
- - mongodb-org-server
data/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # Mongoid::Denormalize
2
2
  ![Build Status](https://travis-ci.org/nosolosoftware/mongoid-denormalize.svg?branch=master)
3
3
 
4
- Helper module for denormalizing association attributes in Mongoid models
4
+ Helper module for denormalizing association attributes in Mongoid models.
5
+
6
+ This gem is tested on mongoid 6.x and 7.x.
5
7
 
6
8
  ## Installation
7
9
 
@@ -131,7 +133,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
131
133
 
132
134
  ## Contributing
133
135
 
134
- Bug reports and pull requests are welcome on GitHub at https://github.com/rjurado01/mongoid-denormalize.
136
+ Bug reports and pull requests are welcome on GitHub at https://github.com/nosolosoftware/mongoid-denormalize.
135
137
 
136
138
  ## License
137
139
 
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mongoid-normalize-strings.gemspec
4
+ gemspec path: '../'
5
+
6
+ gem 'rake'
7
+ gem 'mongoid', "~> 7.0"
@@ -85,11 +85,13 @@ module Mongoid
85
85
  next if attributes.blank?
86
86
 
87
87
  case relation.relation.to_s
88
- when 'Mongoid::Relations::Referenced::One'
88
+ when 'Mongoid::Relations::Referenced::One',
89
+ 'Mongoid::Association::Referenced::HasOne::Proxy'
89
90
  if (document = send(relation.name))
90
91
  document.collection.update_one({_id: document._id}, {'$set' => attributes})
91
92
  end
92
- when 'Mongoid::Relations::Referenced::Many'
93
+ when 'Mongoid::Relations::Referenced::Many',
94
+ 'Mongoid::Association::Referenced::HasMany::Proxy'
93
95
  send(relation.name).update_all('$set' => attributes)
94
96
  else
95
97
  raise "Relation type unsupported: #{relation.relation}"
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Denormalize
3
- VERSION = "0.3.2"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -22,9 +22,9 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.add_development_dependency 'bundler', '~> 1.15'
25
+ spec.add_development_dependency 'bundler', '~> 2.2'
26
26
  spec.add_development_dependency 'mongoid-compatibility', '~> 0.5.1'
27
- spec.add_development_dependency 'rake', '~> 10.0'
27
+ spec.add_development_dependency 'rake', '~> 13.0'
28
28
  spec.add_development_dependency 'rspec', '~> 3.0'
29
- spec.add_dependency 'mongoid', ['>= 3.0', '< 7.0']
29
+ spec.add_dependency 'mongoid', ['>= 6.0', '< 8.0']
30
30
  end
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.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rjurado01
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-07 00:00:00.000000000 Z
11
+ date: 2021-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.15'
19
+ version: '2.2'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.15'
26
+ version: '2.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mongoid-compatibility
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,20 +72,20 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '3.0'
75
+ version: '6.0'
76
76
  - - "<"
77
77
  - !ruby/object:Gem::Version
78
- version: '7.0'
78
+ version: '8.0'
79
79
  type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
83
  - - ">="
84
84
  - !ruby/object:Gem::Version
85
- version: '3.0'
85
+ version: '6.0'
86
86
  - - "<"
87
87
  - !ruby/object:Gem::Version
88
- version: '7.0'
88
+ version: '8.0'
89
89
  description: Helper module for denormalizing relations attributes in Mongoid models
90
90
  email:
91
91
  - rjurado01@gmail.com
@@ -104,6 +104,7 @@ files:
104
104
  - bin/setup
105
105
  - gemfiles/mongoid-5.0.gemfile
106
106
  - gemfiles/mongoid-6.0.gemfile
107
+ - gemfiles/mongoid-7.0.gemfile
107
108
  - lib/mongoid-denormalize.rb
108
109
  - lib/mongoid-denormalize/version.rb
109
110
  - mongoid-denormalize.gemspec
@@ -126,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
127
  - !ruby/object:Gem::Version
127
128
  version: '0'
128
129
  requirements: []
129
- rubygems_version: 3.0.1
130
+ rubygems_version: 3.1.4
130
131
  signing_key:
131
132
  specification_version: 4
132
133
  summary: Denormalize fields from relations