activerecord-spanner-adapter 1.3.1 → 1.4.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 +8 -8
- data/.github/workflows/ci.yaml +6 -4
- data/.github/workflows/nightly-acceptance-tests-on-emulator.yaml +14 -6
- data/.github/workflows/nightly-unit-tests.yaml +14 -6
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/acceptance/cases/migration/change_table_test.rb +23 -13
- data/acceptance/cases/models/logging_test.rb +4 -0
- data/lib/activerecord_spanner_adapter/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 499376d85989274623aa1cda4cb9197e14636b42cd5cf5d5bda4b3fbdb2a6494
|
4
|
+
data.tar.gz: 4e0f7e384b4450b28581523a79540416567aa44745e44377a1f7744e11ff95e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3d5ff8b79e774c6eb6c74431162366543d2476a8f2e7eb3f3f2d81dac249b0493a773b09cd787cdf5a8dd5b287d85170021b2e7c47c2aba9d06f76a77c2b9d6
|
7
|
+
data.tar.gz: 28bebd4c40535b80239992f66aed5030744623c21c00f875b548fac2c0318280871e83c294e8b87681a2376d34446050cee60283da469ff4fe175b2ad78685a6
|
@@ -18,16 +18,16 @@ jobs:
|
|
18
18
|
strategy:
|
19
19
|
max-parallel: 4
|
20
20
|
matrix:
|
21
|
-
ruby: [2.6, 2.7, 3.0]
|
22
|
-
ar: [6.0.
|
21
|
+
ruby: ["2.6", "2.7", "3.0", "3.1"]
|
22
|
+
ar: ["~> 6.0.6", "~> 6.1.7", "~> 7.0.4"]
|
23
23
|
# Exclude combinations that are not supported.
|
24
24
|
exclude:
|
25
|
-
- ruby: 3.0
|
26
|
-
ar: 6.0.
|
27
|
-
- ruby:
|
28
|
-
ar:
|
29
|
-
- ruby: 2.6
|
30
|
-
ar: 7.0.
|
25
|
+
- ruby: "3.0"
|
26
|
+
ar: "~> 6.0.6"
|
27
|
+
- ruby: "3.1"
|
28
|
+
ar: "~> 6.0.6"
|
29
|
+
- ruby: "2.6"
|
30
|
+
ar: "~> 7.0.4"
|
31
31
|
env:
|
32
32
|
AR_VERSION: ${{ matrix.ar }}
|
33
33
|
steps:
|
data/.github/workflows/ci.yaml
CHANGED
@@ -10,14 +10,16 @@ jobs:
|
|
10
10
|
strategy:
|
11
11
|
max-parallel: 4
|
12
12
|
matrix:
|
13
|
-
ruby: ["2.6", "2.7", "3.0"]
|
14
|
-
ar: ["6.0.
|
13
|
+
ruby: ["2.6", "2.7", "3.0", "3.1"]
|
14
|
+
ar: ["~> 6.0.6", "~> 6.1.7", "~> 7.0.4"]
|
15
15
|
# Exclude combinations that are not supported.
|
16
16
|
exclude:
|
17
17
|
- ruby: "3.0"
|
18
|
-
ar: "6.0.
|
18
|
+
ar: "~> 6.0.6"
|
19
|
+
- ruby: "3.1"
|
20
|
+
ar: "~> 6.0.6"
|
19
21
|
- ruby: "2.6"
|
20
|
-
ar: "7.0.
|
22
|
+
ar: "~> 7.0.4"
|
21
23
|
env:
|
22
24
|
AR_VERSION: ${{ matrix.ar }}
|
23
25
|
steps:
|
@@ -19,8 +19,8 @@ jobs:
|
|
19
19
|
max-parallel: 4
|
20
20
|
matrix:
|
21
21
|
# Run acceptance tests all supported combinations of Ruby and ActiveRecord.
|
22
|
-
ruby: [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]
|
22
|
+
ruby: [2.6, 2.7, 3.0, 3.1]
|
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]
|
24
24
|
# Exclude combinations that are not supported.
|
25
25
|
exclude:
|
26
26
|
- ruby: 3.0
|
@@ -33,14 +33,22 @@ jobs:
|
|
33
33
|
ar: 6.0.3.7
|
34
34
|
- ruby: 3.0
|
35
35
|
ar: 6.0.4
|
36
|
-
- ruby:
|
37
|
-
ar:
|
36
|
+
- ruby: 3.1
|
37
|
+
ar: 6.0.0
|
38
|
+
- ruby: 3.1
|
39
|
+
ar: 6.0.1
|
40
|
+
- ruby: 3.1
|
41
|
+
ar: 6.0.2.2
|
42
|
+
- ruby: 3.1
|
43
|
+
ar: 6.0.3.7
|
44
|
+
- ruby: 3.1
|
45
|
+
ar: 6.0.4
|
38
46
|
- ruby: 2.6
|
39
47
|
ar: 7.0.2.4
|
40
|
-
- ruby: 2.5
|
41
|
-
ar: 7.0.3.1
|
42
48
|
- ruby: 2.6
|
43
49
|
ar: 7.0.3.1
|
50
|
+
- ruby: 2.6
|
51
|
+
ar: 7.0.4
|
44
52
|
env:
|
45
53
|
AR_VERSION: ${{ matrix.ar }}
|
46
54
|
steps:
|
@@ -11,8 +11,8 @@ jobs:
|
|
11
11
|
max-parallel: 4
|
12
12
|
matrix:
|
13
13
|
# Run unit tests all supported combinations of Ruby and ActiveRecord.
|
14
|
-
ruby: [2.
|
15
|
-
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]
|
14
|
+
ruby: [2.6, 2.7, 3.0, 3.1]
|
15
|
+
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]
|
16
16
|
# Exclude combinations that are not supported.
|
17
17
|
exclude:
|
18
18
|
- ruby: 3.0
|
@@ -25,14 +25,22 @@ jobs:
|
|
25
25
|
ar: 6.0.3.7
|
26
26
|
- ruby: 3.0
|
27
27
|
ar: 6.0.4
|
28
|
-
- ruby:
|
29
|
-
ar:
|
28
|
+
- ruby: 3.1
|
29
|
+
ar: 6.0.0
|
30
|
+
- ruby: 3.1
|
31
|
+
ar: 6.0.1
|
32
|
+
- ruby: 3.1
|
33
|
+
ar: 6.0.2.2
|
34
|
+
- ruby: 3.1
|
35
|
+
ar: 6.0.3.7
|
36
|
+
- ruby: 3.1
|
37
|
+
ar: 6.0.4
|
30
38
|
- ruby: 2.6
|
31
39
|
ar: 7.0.2.4
|
32
|
-
- ruby: 2.5
|
33
|
-
ar: 7.0.3.1
|
34
40
|
- ruby: 2.6
|
35
41
|
ar: 7.0.3.1
|
42
|
+
- ruby: 2.6
|
43
|
+
ar: 7.0.4
|
36
44
|
env:
|
37
45
|
AR_VERSION: ${{ matrix.ar }}
|
38
46
|
steps:
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -30,77 +30,87 @@ module ActiveRecord
|
|
30
30
|
|
31
31
|
def test_remove_references_column_type_with_polymorphic_removes_type
|
32
32
|
with_change_table do |t|
|
33
|
-
@connection.expect :remove_reference, nil, [:delete_me, :taggable, polymorphic: true
|
33
|
+
@connection.expect :remove_reference, nil, [:delete_me, :taggable], polymorphic: true
|
34
34
|
t.remove_references :taggable, polymorphic: true
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
def test_references_column_type_with_polymorphic_and_options_null_is_false_adds_table_flag
|
39
39
|
with_change_table do |t|
|
40
|
-
@connection.expect :add_reference, nil, [:delete_me, :taggable, polymorphic: true, null: false
|
40
|
+
@connection.expect :add_reference, nil, [:delete_me, :taggable], polymorphic: true, null: false
|
41
41
|
t.references :taggable, polymorphic: true, null: false
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
45
|
def test_remove_references_column_type_with_polymorphic_and_options_null_is_false_removes_table_flag
|
46
46
|
with_change_table do |t|
|
47
|
-
@connection.expect :remove_reference, nil, [:delete_me, :taggable, polymorphic: true, null: false
|
47
|
+
@connection.expect :remove_reference, nil, [:delete_me, :taggable], polymorphic: true, null: false
|
48
48
|
t.remove_references :taggable, polymorphic: true, null: false
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
52
|
def test_references_column_type_with_polymorphic_and_type
|
53
53
|
with_change_table do |t|
|
54
|
-
@connection.expect :add_reference, nil, [:delete_me, :taggable, polymorphic: true, type: :string
|
54
|
+
@connection.expect :add_reference, nil, [:delete_me, :taggable], polymorphic: true, type: :string
|
55
55
|
t.references :taggable, polymorphic: true, type: :string
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
59
|
def test_remove_references_column_type_with_polymorphic_and_type
|
60
60
|
with_change_table do |t|
|
61
|
-
@connection.expect :remove_reference, nil, [:delete_me, :taggable, polymorphic: true, type: :string
|
61
|
+
@connection.expect :remove_reference, nil, [:delete_me, :taggable], polymorphic: true, type: :string
|
62
62
|
t.remove_references :taggable, polymorphic: true, type: :string
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
66
|
def test_timestamps_creates_updated_at_and_created_at
|
67
67
|
with_change_table do |t|
|
68
|
-
@connection.expect :add_timestamps, nil, [:delete_me, null: true
|
68
|
+
@connection.expect :add_timestamps, nil, [:delete_me], null: true
|
69
69
|
t.timestamps null: true
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
73
|
def test_remove_timestamps_creates_updated_at_and_created_at
|
74
74
|
with_change_table do |t|
|
75
|
-
@connection.expect :remove_timestamps, nil, [:delete_me,
|
75
|
+
@connection.expect :remove_timestamps, nil, [:delete_me], null: true
|
76
76
|
t.remove_timestamps(null: true)
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
80
|
def test_primary_key_creates_primary_key_column
|
81
81
|
with_change_table do |t|
|
82
|
-
@connection.expect :add_column, nil, [:delete_me, :id, :primary_key, primary_key: true, first: true
|
82
|
+
@connection.expect :add_column, nil, [:delete_me, :id, :primary_key], primary_key: true, first: true
|
83
83
|
t.primary_key :id, first: true
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
87
|
def test_index_exists
|
88
88
|
with_change_table do |t|
|
89
|
-
|
90
|
-
|
89
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3")
|
90
|
+
@connection.expect :index_exists?, nil, [:delete_me, :bar, {}]
|
91
|
+
t.index_exists?(:bar, {})
|
92
|
+
else
|
93
|
+
@connection.expect :index_exists?, nil, [:delete_me, :bar]
|
94
|
+
t.index_exists?(:bar)
|
95
|
+
end
|
91
96
|
end
|
92
97
|
end
|
93
98
|
|
94
99
|
def test_index_exists_with_options
|
95
100
|
with_change_table do |t|
|
96
|
-
|
97
|
-
|
101
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3")
|
102
|
+
@connection.expect :index_exists?, nil, [:delete_me, :bar, {unique: true}]
|
103
|
+
t.index_exists?(:bar, {unique: true})
|
104
|
+
else
|
105
|
+
@connection.expect :index_exists?, nil, [:delete_me, :bar], unique: true
|
106
|
+
t.index_exists?(:bar, unique: true)
|
107
|
+
end
|
98
108
|
end
|
99
109
|
end
|
100
110
|
|
101
111
|
def test_remove_drops_multiple_columns_when_column_options_are_given
|
102
112
|
with_change_table do |t|
|
103
|
-
@connection.expect :remove_columns, nil, [:delete_me, :bar, :baz, type: :string, null: false
|
113
|
+
@connection.expect :remove_columns, nil, [:delete_me, :bar, :baz], type: :string, null: false
|
104
114
|
t.remove :bar, :baz, type: :string, null: false
|
105
115
|
end
|
106
116
|
end
|
@@ -20,6 +20,8 @@ module ActiveRecord
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def test_logs_without_binds
|
23
|
+
skip "This test sometimes fails because nothing is logged (or marked as logged by the test logger)"
|
24
|
+
|
23
25
|
published_time = Time.new(2016, 05, 11, 19, 0, 0)
|
24
26
|
Post.where(published_time: published_time, title: 'Title - 1').first
|
25
27
|
|
@@ -30,6 +32,8 @@ module ActiveRecord
|
|
30
32
|
end
|
31
33
|
|
32
34
|
def test_logs_with_binds
|
35
|
+
skip "This test sometimes fails because nothing is logged (or marked as logged by the test logger)"
|
36
|
+
|
33
37
|
ActiveRecord::ConnectionAdapters::SpannerAdapter.log_statement_binds = true
|
34
38
|
|
35
39
|
published_time = Time.new(2016, 05, 11, 19, 0, 0)
|
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
|
+
version: 1.4.0
|
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-01-
|
11
|
+
date: 2023-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-spanner
|
@@ -536,7 +536,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
536
536
|
- !ruby/object:Gem::Version
|
537
537
|
version: '0'
|
538
538
|
requirements: []
|
539
|
-
rubygems_version: 3.
|
539
|
+
rubygems_version: 3.4.2
|
540
540
|
signing_key:
|
541
541
|
specification_version: 4
|
542
542
|
summary: Rails ActiveRecord connector for Google Spanner Database
|