activerecord-spanner-adapter 1.4.3 → 1.4.4

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: ecc586f0beee665e45413d64af184d69ed9814b17465ab68be04767c3312d69a
4
- data.tar.gz: 061c3c4b433b673ab848b8f5e67652a0e3f991b99fdae1ed7fdc118e622e3139
3
+ metadata.gz: f1a935693a8621d55fd7f51a17ba93dcc598f97789e6b7825ca7c916fbc0c9e1
4
+ data.tar.gz: 671717a9df5b2d7b6bbf388faea2c9ec6f982906a6456271a8696c2980d62684
5
5
  SHA512:
6
- metadata.gz: 6c69f17a06d188ca69fe942756ded71f245a0398d67fa0c1e0bb915cc03a8cd51147851edcf352697670b3999539b178c1d1542d30659ef6110b096faa3c36d9
7
- data.tar.gz: 339ae0975ff7ac256cba1d98b68379a47de1d7187f82e2ebfdd83ad0c940c3ca3af52c4bc5e30f334ba63e48d001baebe373e9a121f4593ad09daf941f7e3e22
6
+ metadata.gz: 5fa701ba551c2072ad60e6a7aadde8a4c4e20e3262d091c4854fd37d3663cfa353595017a8de229404c37dc7145ef5852c4ac16f531655c54462e419b217d86b
7
+ data.tar.gz: 24733bae08d92cd3ad8c7ae4cbbdbf016dc845f3f8b1a962bdde535b8df2627c9dc8a62d4d41cad3ec58a295c22de9ccb01924f95c985d1bf6741d647a0fcf4d
@@ -20,7 +20,7 @@ jobs:
20
20
  matrix:
21
21
  # Run acceptance tests all supported combinations of Ruby and ActiveRecord.
22
22
  ruby: [2.6, 2.7, 3.0, 3.1, 3.2]
23
- ar: [6.0.0, 6.0.1, 6.0.2.2, 6.0.3.7, 6.0.4, 6.1.3.2, 6.1.4.7, 6.1.5.1, 6.1.6.1, 7.0.2.4, 7.0.3.1, 7.0.4, 7.0.5]
23
+ ar: [6.0.0, 6.0.1, 6.0.2.2, 6.0.3.7, 6.0.4, 6.1.3.2, 6.1.4.7, 6.1.5.1, 6.1.6.1, 7.0.2.4, 7.0.3.1, 7.0.4, 7.0.5, 7.0.6, 7.0.7]
24
24
  # Exclude combinations that are not supported.
25
25
  exclude:
26
26
  - ruby: 3.0
@@ -61,6 +61,10 @@ jobs:
61
61
  ar: 7.0.4
62
62
  - ruby: 2.6
63
63
  ar: 7.0.5
64
+ - ruby: 2.6
65
+ ar: 7.0.6
66
+ - ruby: 2.6
67
+ ar: 7.0.7
64
68
  env:
65
69
  AR_VERSION: ${{ matrix.ar }}
66
70
  steps:
@@ -29,7 +29,7 @@ jobs:
29
29
  - name: Install dependencies
30
30
  run: bundle install
31
31
  - name: Run acceptance tests on production
32
- run: bundle exec rake acceptance
32
+ run: bundle exec rake acceptance\[,,,"exclude cases/migration"\]
33
33
  env:
34
34
  SPANNER_TEST_PROJECT: ${{ secrets.GCP_PROJECT_ID }}
35
35
  SPANNER_TEST_INSTANCE: ruby-activerecord-test
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "1.4.3"
2
+ ".": "1.4.4"
3
3
  }
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.4.4 (2023-09-06)
4
+
5
+ #### Bug Fixes
6
+
7
+ * Support for changes in Rails 7.0.7. ([#260](https://github.com/googleapis/ruby-spanner-activerecord/issues/260))
8
+
3
9
  ### 1.4.3 (2023-06-09)
4
10
 
5
11
  #### Bug Fixes
@@ -23,21 +23,23 @@ module ActiveRecord
23
23
  skip_test_table_create!
24
24
  super
25
25
 
26
- connection.drop_table :rename_column_comments, if_exists: true
27
- connection.drop_table :rename_column_posts, if_exists: true
28
-
29
- connection.create_table(:rename_column_posts) do |t|
30
- t.string :name, limit: 128
31
- t.integer :comment_count
32
- end
33
-
34
- connection.create_table(:rename_column_comments) do |t|
35
- t.string :comment
36
- # The Spanner ActiveRecord adapter does not support creating an index on a column that also has a foreign key,
37
- # as Cloud Spanner automatically creates a managed index for the foreign key. The index is therefore created
38
- # separately.
39
- t.references :rename_column_post, foreign_key: true
40
- t.index :rename_column_post_id
26
+ connection.ddl_batch do
27
+ connection.drop_table :rename_column_comments, if_exists: true
28
+ connection.drop_table :rename_column_posts, if_exists: true
29
+
30
+ connection.create_table(:rename_column_posts) do |t|
31
+ t.string :name, limit: 128
32
+ t.integer :comment_count
33
+ end
34
+
35
+ connection.create_table(:rename_column_comments) do |t|
36
+ t.string :comment
37
+ # The Spanner ActiveRecord adapter does not support creating an index on a column that also has a foreign key,
38
+ # as Cloud Spanner automatically creates a managed index for the foreign key. The index is therefore created
39
+ # separately.
40
+ t.references :rename_column_post, foreign_key: true
41
+ t.index :rename_column_post_id
42
+ end
41
43
  end
42
44
 
43
45
  RenameColumnPost.reset_column_information
@@ -20,6 +20,7 @@ module TestHelpers
20
20
 
21
21
  def teardown
22
22
  spanner_adapter_connection.database.drop
23
+ ActiveRecord::Base.connection_pool.disconnect!
23
24
  end
24
25
 
25
26
  def connection_config
@@ -32,12 +32,15 @@ module ActiveRecord
32
32
  module ConnectionAdapters
33
33
  module Spanner
34
34
  module Quoting
35
+ QUOTED_COLUMN_NAMES = Concurrent::Map.new # :nodoc:
36
+ QUOTED_TABLE_NAMES = Concurrent::Map.new # :nodoc:
37
+
35
38
  def quote_column_name name
36
- self.class.quoted_column_names[name] ||= "`#{super.gsub '`', '``'}`".freeze
39
+ QUOTED_COLUMN_NAMES[name] ||= "`#{super.gsub '`', '``'}`".freeze
37
40
  end
38
41
 
39
42
  def quote_table_name name
40
- self.class.quoted_table_names[name] ||= super.gsub(".", "`.`").freeze
43
+ QUOTED_TABLE_NAMES[name] ||= super.gsub(".", "`.`").freeze
41
44
  end
42
45
 
43
46
  STR_ESCAPE_REGX = /[\n\r'\\]/.freeze
@@ -5,5 +5,5 @@
5
5
  # https://opensource.org/licenses/MIT.
6
6
 
7
7
  module ActiveRecordSpannerAdapter
8
- VERSION = "1.4.3".freeze
8
+ VERSION = "1.4.4".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.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-09 00:00:00.000000000 Z
11
+ date: 2023-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-spanner
@@ -539,7 +539,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
539
539
  - !ruby/object:Gem::Version
540
540
  version: '0'
541
541
  requirements: []
542
- rubygems_version: 3.4.2
542
+ rubygems_version: 3.4.19
543
543
  signing_key:
544
544
  specification_version: 4
545
545
  summary: Rails ActiveRecord connector for Google Spanner Database