inventory_refresh 0.3.4 → 0.3.5

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
2
  SHA256:
3
- metadata.gz: c540c1d669444a0a893718325bfb3873b6a5bb226793552f621b47f1c98cfb02
4
- data.tar.gz: 48aab5996f73a6e720fd524a73d1e2df264c488a1d20b146881d1f86dcbd1b29
3
+ metadata.gz: 3857cdbe06fef13ec5e2a34a2dc53d879d64e318f3ed30ec1f9292f3f18c8806
4
+ data.tar.gz: 1186216b8f4b4dac97ac1f8ce79f561cc95bfb54760106e5a4ef14e949659ffa
5
5
  SHA512:
6
- metadata.gz: 75a5cedc2b2d4cb48e573beec12139548376b4ad660801634a50dea91ed957b3b754a07ec1e03b1e5c4302aafa0df58ec855766bf57ca755188f38a9ab2fd888
7
- data.tar.gz: 0b3cb9116bb4b216fb34f3b109cbf3c53f560d42c006276076a8975782ed9338849b6407216634b32909c14f6155fd94e96dd0bfc8f848ac9ab3c4fc2c855b10
6
+ metadata.gz: 74d98dd7e85cd8313b53126c8adbec786c1bf5f24a2f4ca73040f90798c6e025c42cc275eea824c47777c866426945f22b26fb41660781a57dfddf18ed88acd1
7
+ data.tar.gz: 05141e34f57af8b4772acb0ad239d9c311d68fe3bc709ed0c34d090697a1091ee408540bd75c2481b309798db82da4015752a505dbcb5f38d21fef67a69470cc
@@ -52,7 +52,7 @@ module InventoryRefresh
52
52
 
53
53
  # @return [Boolean] true if the model_class supports STI
54
54
  def supports_sti?
55
- @supports_sti_cache = model_class.column_names.include?("type") if @supports_sti_cache.nil?
55
+ @supports_sti_cache = model_class&.column_names.to_a.include?("type") if @supports_sti_cache.nil?
56
56
  @supports_sti_cache
57
57
  end
58
58
 
@@ -62,7 +62,7 @@ module InventoryRefresh
62
62
  @supported_cols_cache ||= {}
63
63
  return @supported_cols_cache[column_name.to_sym] unless @supported_cols_cache[column_name.to_sym].nil?
64
64
 
65
- include_col = model_class.column_names.include?(column_name.to_s)
65
+ include_col = model_class&.column_names.to_a.include?(column_name.to_s)
66
66
  if %w(created_on created_at updated_on updated_at).include?(column_name.to_s)
67
67
  include_col &&= ActiveRecord::Base.record_timestamps
68
68
  end
@@ -1,3 +1,3 @@
1
1
  module InventoryRefresh
2
- VERSION = "0.3.4".freeze
2
+ VERSION = "0.3.5".freeze
3
3
  end
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: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-18 00:00:00.000000000 Z
11
+ date: 2020-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord