activerecord-spanner-adapter 1.6.1 → 1.6.2

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: 931e6b17bf3e6d6b068c57ca879bc0dbb06933790101aa05415514c6448fd004
4
- data.tar.gz: c4981e814899be433830e0380f69060dfa589ec39dfa7e831aad616e224030ec
3
+ metadata.gz: 2daeef21393399532473625549d008d1a4cfcf791be1a347c98909c3e3973dde
4
+ data.tar.gz: 16caacb8cde7a9dfd2d2e22a8500d9a25b21f22fe392bb3c2631af892d35168a
5
5
  SHA512:
6
- metadata.gz: a989bdd8195d98206802a05294b09a53fe76c0684fba781d22dc15aaa5a38106ee3f193555cbe83e5f65254e3b39d95ed1cfb6445ded245ad80683d9752fdfd2
7
- data.tar.gz: 0dbe1209ccad8da313fafb110bbb4fb2c1ef9ff9209230e88673f031ad02c0c372a13422fd2a5756fb0bc97a2318c003433350e071f64bcef37ba5a7754e868e
6
+ metadata.gz: da334e1c10da6bbd60c6ececee046889b33e045df31838b8a0939f56cf93240b44c20002aa2b61bbcb6b961907b1f1ed73aa0fc9de8b1283faef427db84fce94
7
+ data.tar.gz: 52c05cfca494e311aa7049591a2258acf93880434d548834667742440ba9a7ddc283183dedb16227fc5b469fbc2b1cd50ed333c30f86e6f2fda0bf3ae1473e72
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "1.6.1"
2
+ ".": "1.6.2"
3
3
  }
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.6.2 (2024-02-19)
4
+
5
+ #### Bug Fixes
6
+
7
+ * failed to convert active model type to spanner type under certain condition ([#299](https://github.com/googleapis/ruby-spanner-activerecord/issues/299))
8
+
3
9
  ### 1.6.1 (2024-02-05)
4
10
 
5
11
  #### Bug Fixes
@@ -23,6 +23,9 @@ module ActiveRecord
23
23
  ##
24
24
  # Converts an ActiveModel::Type to a Spanner type code.
25
25
  def self.convert_active_model_type_to_spanner type # rubocop:disable Metrics/CyclomaticComplexity
26
+ # Unwrap the underlying object if the type is a DelegateClass.
27
+ type = type.__getobj__ if type.respond_to? :__getobj__
28
+
26
29
  case type
27
30
  when NilClass then nil
28
31
  when ActiveModel::Type::Integer, ActiveModel::Type::BigInteger then :INT64
@@ -5,5 +5,5 @@
5
5
  # https://opensource.org/licenses/MIT.
6
6
 
7
7
  module ActiveRecordSpannerAdapter
8
- VERSION = "1.6.1".freeze
8
+ VERSION = "1.6.2".freeze
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-spanner-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-06 00:00:00.000000000 Z
11
+ date: 2024-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-spanner