inventory_refresh 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +1 -1
- data/.github/workflows/ci.yaml +4 -2
- data/CHANGELOG.md +10 -0
- data/inventory_refresh.gemspec +2 -2
- data/lib/inventory_refresh/save_collection/saver/base.rb +1 -7
- data/lib/inventory_refresh/save_collection/saver/default.rb +2 -2
- data/lib/inventory_refresh/version.rb +1 -1
- data/renovate.json +6 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 614330dcc33f7041b91869447db2ed074ad70d0d22582a289ab45de42bdda9cd
|
4
|
+
data.tar.gz: 44f7cec03b86c2e14519dc88de9aba9fb060aa08f93097474b9b0c8d8148e6d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d50b13b3f88e8e810b6220f5e5bdc1d341057048afc19cfac9f453274c7816941200a313a4c2e4bc3af335faf27f4497363e0f37c0311f453845fcf86ea047c
|
7
|
+
data.tar.gz: d6b1c142c98a7272e5964a97e0d9f59033906707736d3b1e5f3f0722ccbfce6ed3e0c84530eae71d8cef8af0c1985a6477da35f8956cd9bad313a743c1e3a882
|
data/.codeclimate.yml
CHANGED
data/.github/workflows/ci.yaml
CHANGED
@@ -15,11 +15,13 @@ jobs:
|
|
15
15
|
- '2.7'
|
16
16
|
- '3.0'
|
17
17
|
- '3.1'
|
18
|
+
- '3.2'
|
18
19
|
rails-version:
|
19
20
|
# rails 6.1 supports ruby >= 2.5
|
20
21
|
# rails 7.0 supports ruby >= 2.7
|
21
22
|
- '6.1'
|
22
23
|
- '7.0'
|
24
|
+
- '7.1'
|
23
25
|
include:
|
24
26
|
# rails 6.0 (security EOL 6/23?) supports ruby < 2.8 (2.7 EOL 3/23?;)
|
25
27
|
- ruby-version: '2.6'
|
@@ -54,6 +56,6 @@ jobs:
|
|
54
56
|
- name: Run tests
|
55
57
|
run: bundle exec rake
|
56
58
|
- name: Report code coverage
|
57
|
-
if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '
|
59
|
+
if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.1' && matrix.rails-version == '7.0' }}
|
58
60
|
continue-on-error: true
|
59
|
-
uses: paambaati/codeclimate-action@
|
61
|
+
uses: paambaati/codeclimate-action@v8
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [2.1.1] - 2024-08-06
|
9
|
+
### Fixed
|
10
|
+
- Fix rails 7 deprecation on ActiveRecord::Base.default_timezone ([#124](https://github.com/ManageIQ/inventory_refresh/pull/124))
|
11
|
+
- Fix missing constant OpenStruct in tests ([#131](https://github.com/ManageIQ/inventory_refresh/pull/131))
|
12
|
+
|
13
|
+
### Added
|
14
|
+
- Test with ruby 3.2 and rails 7.1 ([#122](https://github.com/ManageIQ/inventory_refresh/pull/122))
|
15
|
+
- Log destroy result when duplicate record is found ([#120](https://github.com/ManageIQ/inventory_refresh/pull/120))
|
16
|
+
- Use ruby 3.1 and rails 7 for code coverage ([#136](https://github.com/ManageIQ/inventory_refresh/pull/136))
|
17
|
+
|
8
18
|
## [2.1.0] - 2024-02-08
|
9
19
|
### Changed
|
10
20
|
- Update GitHub Actions versions ([#117](https://github.com/ManageIQ/inventory_refresh/pull/117))
|
data/inventory_refresh.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
24
24
|
|
25
|
-
spec.add_dependency "activerecord", ">=5.0", "<7.
|
25
|
+
spec.add_dependency "activerecord", ">=5.0", "<7.2"
|
26
26
|
spec.add_dependency "more_core_extensions", ">=3.5", "< 5"
|
27
27
|
spec.add_dependency "pg", "> 0"
|
28
28
|
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency "bundler", "~> 2.0"
|
31
31
|
spec.add_development_dependency "factory_bot", "~> 4.11.1"
|
32
32
|
spec.add_development_dependency "manageiq-style"
|
33
|
-
spec.add_development_dependency "rake", "~>
|
33
|
+
spec.add_development_dependency "rake", "~> 13.2"
|
34
34
|
spec.add_development_dependency "rspec", "~> 3.0"
|
35
35
|
spec.add_development_dependency "simplecov", ">= 0.21.2"
|
36
36
|
end
|
@@ -269,14 +269,8 @@ module InventoryRefresh::SaveCollection
|
|
269
269
|
true
|
270
270
|
end
|
271
271
|
|
272
|
-
# @return [Time] A rails friendly time getting config from ActiveRecord::Base.default_timezone (can be :local
|
273
|
-
# or :utc)
|
274
272
|
def time_now
|
275
|
-
|
276
|
-
Time.now.utc
|
277
|
-
else
|
278
|
-
Time.zone.now
|
279
|
-
end
|
273
|
+
Time.current
|
280
274
|
end
|
281
275
|
|
282
276
|
# Enriches data hash with timestamp columns
|
@@ -43,9 +43,9 @@ module InventoryRefresh::SaveCollection
|
|
43
43
|
if unique_db_indexes.include?(index) # Include on Set is O(1)
|
44
44
|
# We have a duplicate in the DB, destroy it. A find_each method does automatically .order(:id => :asc)
|
45
45
|
# so we always keep the oldest record in the case of duplicates.
|
46
|
-
|
46
|
+
destroyed = record.destroy ? "and destroyed" : "but could not be destroyed"
|
47
|
+
logger.warn("A duplicate record was detected #{destroyed}, inventory_collection:" \
|
47
48
|
"'#{inventory_collection}', record: '#{record}', duplicate_index: '#{index}'")
|
48
|
-
record.destroy
|
49
49
|
return false
|
50
50
|
else
|
51
51
|
unique_db_indexes << index
|
data/renovate.json
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inventory_refresh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '5.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '7.
|
22
|
+
version: '7.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '5.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '7.
|
32
|
+
version: '7.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: more_core_extensions
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,14 +126,14 @@ dependencies:
|
|
126
126
|
requirements:
|
127
127
|
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: '
|
129
|
+
version: '13.2'
|
130
130
|
type: :development
|
131
131
|
prerelease: false
|
132
132
|
version_requirements: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
134
|
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: '
|
136
|
+
version: '13.2'
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: rspec
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,6 +233,7 @@ files:
|
|
233
233
|
- lib/inventory_refresh/target.rb
|
234
234
|
- lib/inventory_refresh/target_collection.rb
|
235
235
|
- lib/inventory_refresh/version.rb
|
236
|
+
- renovate.json
|
236
237
|
homepage: https://github.com/ManageIQ/inventory_refresh
|
237
238
|
licenses:
|
238
239
|
- Apache-2.0
|