activerecord-spanner-adapter 2.5.1 → 2.7.0
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 +4 -4
- data/.github/workflows/acceptance-tests-on-emulator.yaml +19 -15
- data/.github/workflows/acceptance-tests-on-production.yaml +13 -6
- data/.github/workflows/ci.yaml +18 -14
- data/.github/workflows/nightly-acceptance-tests-on-emulator.yaml +19 -15
- data/.github/workflows/nightly-acceptance-tests-on-production.yaml +13 -6
- data/.github/workflows/nightly-unit-tests.yaml +18 -14
- data/.github/workflows/rubocop.yaml +9 -4
- data/.github/workflows/samples.yaml +18 -12
- data/.gitignore +0 -1
- data/.release-please-manifest.json +1 -1
- data/.rubocop.yml +2 -0
- data/Appraisals +15 -0
- data/CHANGELOG.md +19 -0
- data/Gemfile +12 -20
- data/Gemfile.lock +479 -0
- data/README.md +3 -3
- data/acceptance/cases/migration/change_table_test.rb +4 -14
- data/acceptance/cases/models/generated_column_test.rb +8 -26
- data/acceptance/test_helper.rb +10 -22
- data/activerecord-spanner-adapter.gemspec +4 -3
- data/benchmarks/db/migrate/01_create_tables.rb +1 -1
- data/examples/rails/README.md +1 -1
- data/examples/snippets/Rakefile +0 -7
- data/examples/snippets/array-data-type/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/batch-dml/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/bulk-insert/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/commit-timestamp/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/create-records/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/date-data-type/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/generated-column/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/hints/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/interleaved-tables/README.md +2 -5
- data/examples/snippets/isolation-level/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/migrations/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/mutations/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/optimistic-locking/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/query-logs/application.rb +3 -3
- data/examples/snippets/query-logs/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/quickstart/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/read-only-transactions/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/stale-reads/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/tags/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/timestamp-data-type/db/migrate/01_create_tables.rb +1 -1
- data/gemfiles/7.1.gemfile +18 -0
- data/gemfiles/7.1.gemfile.lock +389 -0
- data/gemfiles/7.2.gemfile +18 -0
- data/gemfiles/7.2.gemfile.lock +479 -0
- data/gemfiles/8.0.gemfile +18 -0
- data/gemfiles/8.0.gemfile.lock +480 -0
- data/gemfiles/8.1.gemfile +18 -0
- data/gemfiles/8.1.gemfile.lock +478 -0
- data/lib/active_record/connection_adapters/spanner/database_statements.rb +62 -95
- data/lib/active_record/connection_adapters/spanner/quoting.rb +0 -22
- data/lib/active_record/connection_adapters/spanner/schema_creation.rb +3 -15
- data/lib/active_record/connection_adapters/spanner/schema_statements.rb +0 -4
- data/lib/active_record/connection_adapters/spanner_adapter.rb +12 -14
- data/lib/active_record/type/spanner/spanner_active_record_converter.rb +33 -2
- data/lib/activerecord_spanner_adapter/base.rb +5 -27
- data/lib/activerecord_spanner_adapter/connection.rb +0 -20
- data/lib/activerecord_spanner_adapter/information_schema.rb +1 -4
- data/lib/activerecord_spanner_adapter/table.rb +0 -22
- data/lib/activerecord_spanner_adapter/version.rb +1 -1
- data/lib/arel/visitors/spanner.rb +12 -15
- data/lib/spanner_client_ext.rb +6 -2
- metadata +30 -20
- data/acceptance/cases/interleaved_associations/has_many_associations_using_interleaved_test.rb +0 -221
- data/acceptance/cases/models/interleave_test.rb +0 -113
- data/acceptance/cases/transactions/optimistic_locking_test.rb +0 -152
- data/acceptance/models/album.rb +0 -15
- data/acceptance/models/track.rb +0 -23
- data/examples/snippets/interleaved-tables-before-7.1/README.md +0 -167
- data/examples/snippets/interleaved-tables-before-7.1/Rakefile +0 -13
- data/examples/snippets/interleaved-tables-before-7.1/application.rb +0 -122
- data/examples/snippets/interleaved-tables-before-7.1/config/database.yml +0 -9
- data/examples/snippets/interleaved-tables-before-7.1/db/migrate/01_create_tables.rb +0 -44
- data/examples/snippets/interleaved-tables-before-7.1/db/seeds.rb +0 -40
- data/examples/snippets/interleaved-tables-before-7.1/models/album.rb +0 -20
- data/examples/snippets/interleaved-tables-before-7.1/models/singer.rb +0 -18
- data/examples/snippets/interleaved-tables-before-7.1/models/track.rb +0 -28
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 41dae7d478b4a4521252f61a067212b27830838b5d4a54afabc7bec93094f22a
|
|
4
|
+
data.tar.gz: 0e4a34bf22617d59d60384e8453161f3508e90bdaff903f3ca05e6e584463291
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 443363fbda3066dcc55f6630995b25c16a1ef2122c4f933ed143c53178be0d13ba7632b7b306d65b9333d52b6ff5c854eb777f5f62777254e1353b7bbb10f1f8
|
|
7
|
+
data.tar.gz: c1090b73bddf63303f339c6833fac3e8538ef1759f7455984977878d29d7d78439c0125936780b98f81af2b073e5b244a9de44d0e07e6a157393dfe97d17acb8
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
name: acceptance tests on emulator
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
1
6
|
on:
|
|
2
7
|
push:
|
|
3
8
|
branches:
|
|
4
9
|
- main
|
|
5
10
|
pull_request:
|
|
6
|
-
name: acceptance tests on emulator
|
|
7
11
|
jobs:
|
|
8
12
|
test:
|
|
9
13
|
runs-on: ubuntu-latest
|
|
10
14
|
|
|
11
15
|
services:
|
|
12
16
|
emulator:
|
|
13
|
-
image: gcr.io/cloud-spanner-emulator/emulator:
|
|
17
|
+
image: gcr.io/cloud-spanner-emulator/emulator:1.5.56
|
|
14
18
|
ports:
|
|
15
19
|
- 9010:9010
|
|
16
20
|
- 9020:9020
|
|
@@ -18,28 +22,28 @@ jobs:
|
|
|
18
22
|
strategy:
|
|
19
23
|
max-parallel: 4
|
|
20
24
|
matrix:
|
|
21
|
-
ruby: ["3.
|
|
22
|
-
ar: ["
|
|
25
|
+
ruby: ["3.2", "3.3", "3.4", "4.0"]
|
|
26
|
+
ar: ["7.1", "7.2", "8.0", "8.1"]
|
|
23
27
|
# Exclude combinations that are not supported.
|
|
24
28
|
exclude:
|
|
25
|
-
- ruby: "3.1"
|
|
26
|
-
ar: "~> 8.0.0"
|
|
27
|
-
- ruby: "3.1"
|
|
28
|
-
ar: "~> 8.1.0"
|
|
29
|
-
- ruby: "3.4"
|
|
30
|
-
ar: "~> 7.0.0"
|
|
31
29
|
- ruby: "3.4"
|
|
32
|
-
ar: "
|
|
30
|
+
ar: "7.1"
|
|
33
31
|
- ruby: "3.4"
|
|
34
|
-
ar: "
|
|
32
|
+
ar: "7.2"
|
|
33
|
+
- ruby: "4.0"
|
|
34
|
+
ar: "7.1"
|
|
35
|
+
- ruby: "4.0"
|
|
36
|
+
ar: "7.2"
|
|
35
37
|
env:
|
|
36
|
-
|
|
38
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.ar }}.gemfile
|
|
37
39
|
steps:
|
|
38
|
-
- uses: actions/checkout@
|
|
40
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
41
|
+
with:
|
|
42
|
+
persist-credentials: false
|
|
39
43
|
- name: Set up Ruby
|
|
40
44
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
|
|
41
45
|
# (see https://github.com/ruby/setup-ruby#versioning):
|
|
42
|
-
uses: ruby/setup-ruby@v1
|
|
46
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
43
47
|
with:
|
|
44
48
|
bundler-cache: false
|
|
45
49
|
ruby-version: ${{ matrix.ruby }}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
name: acceptance tests on production
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
1
6
|
on:
|
|
2
7
|
push:
|
|
3
8
|
branches:
|
|
4
9
|
- main
|
|
5
10
|
pull_request:
|
|
6
|
-
name: acceptance tests on production
|
|
7
11
|
jobs:
|
|
8
12
|
check-env:
|
|
9
13
|
outputs:
|
|
@@ -26,20 +30,23 @@ jobs:
|
|
|
26
30
|
matrix:
|
|
27
31
|
ruby: [3.3]
|
|
28
32
|
steps:
|
|
29
|
-
- uses: actions/checkout@
|
|
33
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
34
|
+
with:
|
|
35
|
+
persist-credentials: false
|
|
30
36
|
- name: Set up Ruby
|
|
31
37
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
|
|
32
38
|
# (see https://github.com/ruby/setup-ruby#versioning):
|
|
33
|
-
uses: ruby/setup-ruby@v1
|
|
39
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
34
40
|
with:
|
|
35
|
-
|
|
41
|
+
# Disable caching to avoid frozen mode errors during automated release PRs when the gemspec version is bumped.
|
|
42
|
+
bundler-cache: false
|
|
36
43
|
ruby-version: ${{ matrix.ruby }}
|
|
37
44
|
- name: Authenticate Google Cloud
|
|
38
|
-
uses: google-github-actions/auth@v3
|
|
45
|
+
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
|
|
39
46
|
with:
|
|
40
47
|
credentials_json: ${{ secrets.GCP_SA_KEY }}
|
|
41
48
|
- name: Setup GCloud
|
|
42
|
-
uses: google-github-actions/setup-gcloud@v3
|
|
49
|
+
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
|
|
43
50
|
with:
|
|
44
51
|
project_id: ${{ secrets.GCP_PROJECT_ID }}
|
|
45
52
|
- name: Install dependencies
|
data/.github/workflows/ci.yaml
CHANGED
|
@@ -1,37 +1,41 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
1
6
|
on:
|
|
2
7
|
push:
|
|
3
8
|
branches:
|
|
4
9
|
- main
|
|
5
10
|
pull_request:
|
|
6
|
-
name: ci
|
|
7
11
|
jobs:
|
|
8
12
|
test:
|
|
9
13
|
runs-on: ubuntu-latest
|
|
10
14
|
strategy:
|
|
11
15
|
max-parallel: 4
|
|
12
16
|
matrix:
|
|
13
|
-
ruby: ["3.
|
|
14
|
-
ar: ["
|
|
17
|
+
ruby: ["3.2", "3.3", "3.4", "4.0"]
|
|
18
|
+
ar: ["7.1", "7.2", "8.0", "8.1"]
|
|
15
19
|
# Exclude combinations that are not supported.
|
|
16
20
|
exclude:
|
|
17
|
-
- ruby: "3.1"
|
|
18
|
-
ar: "~> 8.0.0"
|
|
19
|
-
- ruby: "3.1"
|
|
20
|
-
ar: "~> 8.1.0"
|
|
21
21
|
- ruby: "3.4"
|
|
22
|
-
ar: "
|
|
22
|
+
ar: "7.1"
|
|
23
23
|
- ruby: "3.4"
|
|
24
|
-
ar: "
|
|
25
|
-
- ruby: "
|
|
26
|
-
ar: "
|
|
24
|
+
ar: "7.2"
|
|
25
|
+
- ruby: "4.0"
|
|
26
|
+
ar: "7.1"
|
|
27
|
+
- ruby: "4.0"
|
|
28
|
+
ar: "7.2"
|
|
27
29
|
env:
|
|
28
|
-
|
|
30
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.ar }}.gemfile
|
|
29
31
|
steps:
|
|
30
|
-
- uses: actions/checkout@
|
|
32
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
33
|
+
with:
|
|
34
|
+
persist-credentials: false
|
|
31
35
|
- name: Set up Ruby
|
|
32
36
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
|
|
33
37
|
# (see https://github.com/ruby/setup-ruby#versioning):
|
|
34
|
-
uses: ruby/setup-ruby@v1
|
|
38
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
35
39
|
with:
|
|
36
40
|
bundler-cache: false
|
|
37
41
|
ruby-version: ${{ matrix.ruby }}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
name: nightly acceptance tests on emulator
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
1
6
|
on:
|
|
2
7
|
schedule:
|
|
3
8
|
# 06:00 UTC
|
|
4
9
|
- cron: '0 6 * * *'
|
|
5
10
|
workflow_dispatch:
|
|
6
|
-
name: nightly acceptance tests on emulator
|
|
7
11
|
jobs:
|
|
8
12
|
test:
|
|
9
13
|
runs-on: ubuntu-latest
|
|
10
14
|
|
|
11
15
|
services:
|
|
12
16
|
emulator:
|
|
13
|
-
image: gcr.io/cloud-spanner-emulator/emulator:
|
|
17
|
+
image: gcr.io/cloud-spanner-emulator/emulator:1.5.56
|
|
14
18
|
ports:
|
|
15
19
|
- 9010:9010
|
|
16
20
|
- 9020:9020
|
|
@@ -18,26 +22,26 @@ jobs:
|
|
|
18
22
|
strategy:
|
|
19
23
|
max-parallel: 4
|
|
20
24
|
matrix:
|
|
21
|
-
ruby: ["3.
|
|
22
|
-
ar: ["
|
|
25
|
+
ruby: ["3.2", "3.3", "3.4", "4.0"]
|
|
26
|
+
ar: ["7.1", "7.2", "8.0", "8.1"]
|
|
23
27
|
# Exclude combinations that are not supported.
|
|
24
28
|
exclude:
|
|
25
|
-
- ruby: "3.1"
|
|
26
|
-
ar: "~> 8.0.0"
|
|
27
|
-
- ruby: "3.1"
|
|
28
|
-
ar: "~> 8.1.0"
|
|
29
|
-
- ruby: "3.4"
|
|
30
|
-
ar: "~> 7.0.0"
|
|
31
29
|
- ruby: "3.4"
|
|
32
|
-
ar: "
|
|
30
|
+
ar: "7.1"
|
|
33
31
|
- ruby: "3.4"
|
|
34
|
-
ar: "
|
|
32
|
+
ar: "7.2"
|
|
33
|
+
- ruby: "4.0"
|
|
34
|
+
ar: "7.1"
|
|
35
|
+
- ruby: "4.0"
|
|
36
|
+
ar: "7.2"
|
|
35
37
|
env:
|
|
36
|
-
|
|
38
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.ar }}.gemfile
|
|
37
39
|
steps:
|
|
38
|
-
- uses: actions/checkout@
|
|
40
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
41
|
+
with:
|
|
42
|
+
persist-credentials: false
|
|
39
43
|
- name: Set up Ruby
|
|
40
|
-
uses: ruby/setup-ruby@v1
|
|
44
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
41
45
|
with:
|
|
42
46
|
# Disable caching as we are overriding the ActiveRecord below.
|
|
43
47
|
bundler-cache: false
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
name: nightly acceptance tests on production
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
1
6
|
on:
|
|
2
7
|
schedule:
|
|
3
8
|
# 02:00 UTC
|
|
4
9
|
- cron: '0 2 * * *'
|
|
5
|
-
name: nightly acceptance tests on production
|
|
6
10
|
jobs:
|
|
7
11
|
test:
|
|
8
12
|
runs-on: ubuntu-latest
|
|
@@ -12,20 +16,23 @@ jobs:
|
|
|
12
16
|
matrix:
|
|
13
17
|
ruby: [3.3]
|
|
14
18
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
20
|
+
with:
|
|
21
|
+
persist-credentials: false
|
|
16
22
|
- name: Set up Ruby
|
|
17
23
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
|
|
18
24
|
# (see https://github.com/ruby/setup-ruby#versioning):
|
|
19
|
-
uses: ruby/setup-ruby@v1
|
|
25
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
20
26
|
with:
|
|
21
|
-
|
|
27
|
+
# Disable caching to avoid frozen mode errors during automated release PRs when the gemspec version is bumped.
|
|
28
|
+
bundler-cache: false
|
|
22
29
|
ruby-version: ${{ matrix.ruby }}
|
|
23
30
|
- name: Authenticate Google Cloud
|
|
24
|
-
uses: google-github-actions/auth@v3
|
|
31
|
+
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
|
|
25
32
|
with:
|
|
26
33
|
credentials_json: ${{ secrets.GCP_SA_KEY }}
|
|
27
34
|
- name: Setup GCloud
|
|
28
|
-
uses: google-github-actions/setup-gcloud@v3
|
|
35
|
+
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
|
|
29
36
|
with:
|
|
30
37
|
project_id: ${{ secrets.GCP_PROJECT_ID }}
|
|
31
38
|
- name: Install dependencies
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
name: nightly-unit-tests
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
1
6
|
on:
|
|
2
7
|
schedule:
|
|
3
8
|
# 05:30 UTC
|
|
4
9
|
- cron: '30 5 * * *'
|
|
5
10
|
workflow_dispatch:
|
|
6
|
-
name: nightly-unit-tests
|
|
7
11
|
jobs:
|
|
8
12
|
test:
|
|
9
13
|
runs-on: ubuntu-latest
|
|
@@ -11,26 +15,26 @@ jobs:
|
|
|
11
15
|
max-parallel: 4
|
|
12
16
|
matrix:
|
|
13
17
|
# Run acceptance tests all supported combinations of Ruby and ActiveRecord.
|
|
14
|
-
ruby: ["3.
|
|
15
|
-
ar: ["
|
|
18
|
+
ruby: ["3.2", "3.3", "3.4", "4.0"]
|
|
19
|
+
ar: ["7.1", "7.2", "8.0", "8.1"]
|
|
16
20
|
# Exclude combinations that are not supported.
|
|
17
21
|
exclude:
|
|
18
|
-
- ruby: "3.1"
|
|
19
|
-
ar: "~> 8.0.0"
|
|
20
|
-
- ruby: "3.1"
|
|
21
|
-
ar: "~> 8.1.0"
|
|
22
22
|
- ruby: "3.4"
|
|
23
|
-
ar: "
|
|
23
|
+
ar: "7.1"
|
|
24
24
|
- ruby: "3.4"
|
|
25
|
-
ar: "
|
|
26
|
-
- ruby: "
|
|
27
|
-
ar: "
|
|
25
|
+
ar: "7.2"
|
|
26
|
+
- ruby: "4.0"
|
|
27
|
+
ar: "7.1"
|
|
28
|
+
- ruby: "4.0"
|
|
29
|
+
ar: "7.2"
|
|
28
30
|
env:
|
|
29
|
-
|
|
31
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.ar }}.gemfile
|
|
30
32
|
steps:
|
|
31
|
-
- uses: actions/checkout@
|
|
33
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
34
|
+
with:
|
|
35
|
+
persist-credentials: false
|
|
32
36
|
- name: Set up Ruby
|
|
33
|
-
uses: ruby/setup-ruby@v1
|
|
37
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
34
38
|
with:
|
|
35
39
|
# Disable caching as we are overriding the ActiveRecord below.
|
|
36
40
|
bundler-cache: false
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
name: rubocop
|
|
2
2
|
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
3
6
|
on:
|
|
4
7
|
pull_request:
|
|
5
8
|
types: [opened, synchronize]
|
|
@@ -12,13 +15,15 @@ jobs:
|
|
|
12
15
|
timeout-minutes: 10
|
|
13
16
|
|
|
14
17
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
19
|
+
with:
|
|
20
|
+
persist-credentials: false
|
|
16
21
|
- name: setup ruby
|
|
17
|
-
uses: ruby/setup-ruby@v1
|
|
22
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
18
23
|
with:
|
|
19
|
-
ruby-version: '
|
|
24
|
+
ruby-version: '4.0.6'
|
|
20
25
|
- name: cache gems
|
|
21
|
-
uses: actions/cache@
|
|
26
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
22
27
|
with:
|
|
23
28
|
path: vendor/bundle
|
|
24
29
|
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
name: samples
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
1
6
|
on:
|
|
2
7
|
pull_request:
|
|
3
|
-
name: samples
|
|
4
8
|
jobs:
|
|
5
9
|
test:
|
|
6
10
|
runs-on: ubuntu-latest
|
|
@@ -8,24 +12,26 @@ jobs:
|
|
|
8
12
|
strategy:
|
|
9
13
|
max-parallel: 4
|
|
10
14
|
matrix:
|
|
11
|
-
ruby: ["3.
|
|
12
|
-
ar: ["
|
|
15
|
+
ruby: ["3.2", "3.3", "3.4", "4.0"]
|
|
16
|
+
ar: ["7.1", "7.2", "8.0"]
|
|
13
17
|
# Exclude combinations that are not supported.
|
|
14
18
|
exclude:
|
|
15
|
-
- ruby: "3.1"
|
|
16
|
-
ar: "~> 8.0.0"
|
|
17
|
-
- ruby: "3.4"
|
|
18
|
-
ar: "~> 7.0.0"
|
|
19
19
|
- ruby: "3.4"
|
|
20
|
-
ar: "
|
|
20
|
+
ar: "7.1"
|
|
21
21
|
- ruby: "3.4"
|
|
22
|
-
ar: "
|
|
22
|
+
ar: "7.2"
|
|
23
|
+
- ruby: "4.0"
|
|
24
|
+
ar: "7.1"
|
|
25
|
+
- ruby: "4.0"
|
|
26
|
+
ar: "7.2"
|
|
23
27
|
env:
|
|
24
|
-
|
|
28
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.ar }}.gemfile
|
|
25
29
|
steps:
|
|
26
|
-
- uses: actions/checkout@
|
|
30
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
31
|
+
with:
|
|
32
|
+
persist-credentials: false
|
|
27
33
|
- name: Set up Ruby
|
|
28
|
-
uses: ruby/setup-ruby@v1
|
|
34
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
29
35
|
with:
|
|
30
36
|
bundler-cache: false
|
|
31
37
|
ruby-version: ${{ matrix.ruby }}
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/Appraisals
ADDED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
### 2.7.0 (2026-08-19)
|
|
4
|
+
|
|
5
|
+
#### Features
|
|
6
|
+
|
|
7
|
+
* drop ActiveRecord 7.0 support ([#410](https://github.com/googleapis/ruby-spanner-activerecord/issues/410))
|
|
8
|
+
### Performance Improvements
|
|
9
|
+
|
|
10
|
+
* avoid method cache invalidation during Arel compilation ([#415](https://github.com/googleapis/ruby-spanner-activerecord/issues/415))
|
|
11
|
+
* fast O(1) type lookup map in SpannerActiveRecordConverter ([#418](https://github.com/googleapis/ruby-spanner-activerecord/issues/418))
|
|
12
|
+
* freeze request tag prefixes and prevent duplicate option appends ([#417](https://github.com/googleapis/ruby-spanner-activerecord/issues/417))
|
|
13
|
+
* memoize Snapshot.from_grpc method arity ([#419](https://github.com/googleapis/ruby-spanner-activerecord/issues/419))
|
|
14
|
+
* serialize query types and params in a single pass ([#416](https://github.com/googleapis/ruby-spanner-activerecord/issues/416))
|
|
15
|
+
|
|
16
|
+
### 2.6.0 (2026-07-09)
|
|
17
|
+
|
|
18
|
+
#### Features
|
|
19
|
+
|
|
20
|
+
* Ruby 3.2 minimum and Ruby 4.0 support ([#397](https://github.com/googleapis/ruby-spanner-activerecord/issues/397))
|
|
21
|
+
|
|
3
22
|
### 2.5.1 (2026-06-30)
|
|
4
23
|
|
|
5
24
|
#### Bug Fixes
|
data/Gemfile
CHANGED
|
@@ -3,27 +3,19 @@ source "https://rubygems.org"
|
|
|
3
3
|
# Specify your gem's dependencies in activerecord-spanner.gemspec
|
|
4
4
|
gemspec
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
gem "
|
|
6
|
+
unless ENV["APPRAISAL_INITIALIZED"] || ENV["APPRAISAL_UNDER_TEST"] || (ENV["BUNDLE_GEMFILE"] && ENV["BUNDLE_GEMFILE"].include?("gemfiles/"))
|
|
7
|
+
ar_version = ENV.fetch("AR_VERSION", "~> 7.1.0")
|
|
8
|
+
gem "activerecord", ar_version
|
|
9
|
+
end
|
|
10
|
+
gem "docker-api"
|
|
11
|
+
gem "irb"
|
|
9
12
|
gem "minitest", "~> 5.27.0"
|
|
10
13
|
gem "minitest-rg", "~> 5.4.0"
|
|
11
|
-
gem "pry", "~> 0.14.2"
|
|
12
|
-
gem "pry-byebug", "~> 3.11.0"
|
|
13
14
|
gem "mutex_m"
|
|
14
|
-
|
|
15
|
-
gem
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
install_if -> { ar_version.dup.to_s.sub("~>", "").strip < "7.1.0" && !ENV["SKIP_COMPOSITE_PK"] } do
|
|
19
|
-
gem "composite_primary_keys"
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
# Required for samples
|
|
23
|
-
gem "docker-api"
|
|
15
|
+
gem "ostruct"
|
|
16
|
+
gem "pry", "~> 0.16.0"
|
|
17
|
+
gem "pry-byebug", "~> 3.12.0"
|
|
18
|
+
gem "readline"
|
|
24
19
|
gem "sinatra-activerecord"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if ENV["CI"]
|
|
28
|
-
gem "google-protobuf", force_ruby_platform: true
|
|
29
|
-
end
|
|
20
|
+
# Add sqlite3 for testing for compatibility with other adapters.
|
|
21
|
+
gem "sqlite3"
|