temporal_tables 0.6.3 → 0.6.4

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: d3769a9624f0d50658cde81f3275a273cc026ae4a5c19b37fdc86031727df2b1
4
- data.tar.gz: 64c02f0431cc68a44149f64088dec31b2fee7c0e78ddfdb51e36ecb85f546f5b
3
+ metadata.gz: 88bfbf7be5f376ec00be153d24f1bb3630866cbb2f59ca254287a8c24577522d
4
+ data.tar.gz: eec871934adc29b3c86cf318edc561099c02e48d72217bd2c3b8c38bb8c4dbb3
5
5
  SHA512:
6
- metadata.gz: 2c64cc0fa0c02b4f7c622e1e1fa3b94c1701525720586a56e864fc7b4ada9744cc278defd276dea5dcdb6f1a98b673e7af1816661584eec82ebe1f5832818393
7
- data.tar.gz: 59e1cd19d8ea5c12c5afd890093dab74c98c7fc1a34203e84a3021d07fa325fb5ec913de0daf96beb9a87d442f1c28fdf2f01a87c7d4bd3f96c87925e3061482
6
+ metadata.gz: 12f89717b5c1318aa61afd4915d16aab4f6ad2869cf365cd30fe3cee424a4b3ecb1f802065af4897b7b24eadd1cd2bf86158c8f1b02e4bb5d065148fa773ff77
7
+ data.tar.gz: 1ffac0c09abbe0b31cdc86722d318478a6fa61a788b51e334fa2727ccfead8389daf2383c99c9276e665fe2f32fb197a2bd5551d996e21339f21dcedf145405e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- temporal_tables (0.6.2)
4
+ temporal_tables (0.6.4)
5
5
  rails (~> 5.2)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- temporal_tables (0.6.2)
4
+ temporal_tables (0.6.4)
5
5
  rails (~> 5.2)
6
6
 
7
7
  GEM
@@ -75,7 +75,6 @@ module TemporalTables
75
75
 
76
76
  if historical?
77
77
  # Store the at value on each record returned
78
- # TODO: traverse preloaded associations too
79
78
  @records.each do |r|
80
79
  r.at_value = at_value
81
80
  end
@@ -92,7 +91,10 @@ module TemporalTables
92
91
  # made to associations.
93
92
  module AssociationExtensions
94
93
  def target_scope
95
- if @owner.respond_to?(:at_value)
94
+ # Kludge: Check +public_methods+ instead of using +responds_to?+ to
95
+ # bypass +delegate_missing_to+ calls, as in +ActiveStorage::Attachment+.
96
+ # Using responds_to? results in an infinite loop stack overflow.
97
+ if @owner.public_methods.include?(:at_value)
96
98
  # If this is a history record but no at time was given,
97
99
  # assume the record's effective to date
98
100
  super.at(@owner.at_value || @owner.eff_to)
@@ -1,3 +1,3 @@
1
1
  module TemporalTables
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: temporal_tables
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brent Kroeker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-09 00:00:00.000000000 Z
11
+ date: 2018-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails