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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba062c3d0e3f8355def18ece2eab7ad2c9ee6e2eb98420473f4101d2d2945a65
4
- data.tar.gz: c3fcc1bfc13384de18fc20db6a315f8a9fa8c205153de9b21b7877a9a8e02929
3
+ metadata.gz: 614330dcc33f7041b91869447db2ed074ad70d0d22582a289ab45de42bdda9cd
4
+ data.tar.gz: 44f7cec03b86c2e14519dc88de9aba9fb060aa08f93097474b9b0c8d8148e6d1
5
5
  SHA512:
6
- metadata.gz: ae6d904a94d75f73699a614f8b3e5dd83f4c53e39874eda2df37c900856da26b16b5d0bdf93917b495de2aef599ab08ad6959c935413a1caa223a114a01c9d11
7
- data.tar.gz: 784a2b2c2e154bcf6b827a6a51ce7a09d6533dedefea0457313d0efe325284621a5a3a7988393c6b6cb5652909f5c3756269d98dfea0437cfe666e6a858462b6
6
+ metadata.gz: 6d50b13b3f88e8e810b6220f5e5bdc1d341057048afc19cfac9f453274c7816941200a313a4c2e4bc3af335faf27f4497363e0f37c0311f453845fcf86ea047c
7
+ data.tar.gz: d6b1c142c98a7272e5964a97e0d9f59033906707736d3b1e5f3f0722ccbfce6ed3e0c84530eae71d8cef8af0c1985a6477da35f8956cd9bad313a743c1e3a882
data/.codeclimate.yml CHANGED
@@ -12,7 +12,7 @@ plugins:
12
12
  rubocop:
13
13
  enabled: true
14
14
  config: ".rubocop_cc.yml"
15
- channel: rubocop-0-82
15
+ channel: rubocop-1-56-3
16
16
  brakeman:
17
17
  enabled: false
18
18
  bundler-audit:
@@ -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 == '2.7' && matrix.rails-version == '6.1' }}
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@v5
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))
@@ -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.1"
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", "~> 10.0"
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
- if ActiveRecord::Base.default_timezone == :utc
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
- logger.warn("A duplicate record was detected and destroyed, inventory_collection: "\
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
@@ -1,3 +1,3 @@
1
1
  module InventoryRefresh
2
- VERSION = "2.1.0".freeze
2
+ VERSION = "2.1.1".freeze
3
3
  end
data/renovate.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:recommended"
5
+ ]
6
+ }
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.0
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-02-08 00:00:00.000000000 Z
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.1'
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.1'
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: '10.0'
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: '10.0'
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