activerecord-spanner-adapter 1.3.1 → 1.4.0

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: 0b6dba891089af7c51b13f3b80ce8342b691d31cd0e31181dbd5799c240a2e9c
4
- data.tar.gz: 54a6079aa300d4e31bb8f47630857e624e94995dc713aae60aa848ac3da41ca0
3
+ metadata.gz: 499376d85989274623aa1cda4cb9197e14636b42cd5cf5d5bda4b3fbdb2a6494
4
+ data.tar.gz: 4e0f7e384b4450b28581523a79540416567aa44745e44377a1f7744e11ff95e7
5
5
  SHA512:
6
- metadata.gz: d5f05cd6a79976d974d3d5aa472d514146b5367dae7a4c334913627acc0c98154c8a247c0225a42f235c976b9d3e28cd8c29c46a3c1e876eda6c181619e11617
7
- data.tar.gz: b943df790fa40955c31b5e9df89396a84d5f9b0499e8d610758238a249de1cc693b53f87f9b5d134b6595be5677222b04685206b8ca5d28472e6f9fbdac20ad9
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.5.1, 6.1.6.1, 7.0.2.4, 7.0.3.1]
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.5.1
27
- - ruby: 2.6
28
- ar: 7.0.2.4
29
- - ruby: 2.6
30
- ar: 7.0.3.1
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:
@@ -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.4", "6.1.4", "7.0.2.4"]
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.4"
18
+ ar: "~> 6.0.6"
19
+ - ruby: "3.1"
20
+ ar: "~> 6.0.6"
19
21
  - ruby: "2.6"
20
- ar: "7.0.2.4"
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.5, 2.6, 2.7, 3.0]
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: 2.5
37
- ar: 7.0.2.4
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.5, 2.6, 2.7, 3.0]
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: 2.5
29
- ar: 7.0.2.4
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:
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "1.3.1"
2
+ ".": "1.4.0"
3
3
  }
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.4.0 (2023-01-18)
4
+
5
+ #### Features
6
+
7
+ * dropped support for Ruby 2.5 ([#236](https://github.com/googleapis/ruby-spanner-activerecord/issues/236))
8
+
3
9
  ### 1.3.1 (2022-12-15)
4
10
 
5
11
  #### Bug Fixes
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source "https://rubygems.org"
4
4
  gemspec
5
5
 
6
6
  gem "activerecord", ENV.fetch("AR_VERSION", "~> 6.1.6.1")
7
- gem "minitest", "~> 5.15.0"
7
+ gem "minitest", "~> 5.16.3"
8
8
  gem "pry", "~> 0.13.0"
9
9
  gem "pry-byebug", "~> 3.9.0"
10
10
 
@@ -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, { null: true }]
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
- @connection.expect :index_exists?, nil, [:delete_me, :bar, {}]
90
- t.index_exists?(:bar)
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
- @connection.expect :index_exists?, nil, [:delete_me, :bar, { unique: true }]
97
- t.index_exists?(:bar, unique: true)
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)
@@ -5,5 +5,5 @@
5
5
  # https://opensource.org/licenses/MIT.
6
6
 
7
7
  module ActiveRecordSpannerAdapter
8
- VERSION = "1.3.1".freeze
8
+ VERSION = "1.4.0".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.3.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-02 00:00:00.000000000 Z
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.3.14
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