activerecord-pg-extensions 0.2.1 → 0.2.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: 5c618a82f7b01b308540312e68b6764d975cb6e9594d619996a5ce7502a0b72c
4
- data.tar.gz: d5b9179b9b7d2761c360092e1ff9e1c8ce27f6f49c39cb7e0e9a4f1b0d7ed97f
3
+ metadata.gz: 39407cedf031029bddd4c9cae80f64da4b635388610a5ed8437cfd7bd1248abd
4
+ data.tar.gz: 52f6fe2e76431bb4ae3420256ea2a168123641df2c4a851e61e147196d271be1
5
5
  SHA512:
6
- metadata.gz: edf57be20052135e65634cb992948ce612a4a5d107d6fc5e8e3de50a420cc7de8afe61a4311981a2e4684060f25ee9ceb97a6997ee22cb80c09ea6c94b2dda24
7
- data.tar.gz: ad6a7c3da37ed59d2a110d25217e2e7dba90fec35b448f3446d91a43874c86c32eb7672f783acb0e69561d9353b950df75e78d683800b594c1d1a0193f16a9c8
6
+ metadata.gz: b67e8b140d12e4cfec7746f764daa05a613aa71bcb378b7f87a19c96ca12c7715e36ec2706e238d511bcc7377fedd4348e4657f11f1c2af47c61e17688c62ea9
7
+ data.tar.gz: 248bacb94d750ac4def26b48fb2e6c86637bd874195904153cc346b224e2b919cc3f6577a9b77637ffa788e4caa2a83244760264c27463886f159e64a71e1103
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.2] - 2021-06-22
4
+
5
+ - Fix bug in Ruby 2.6 calling format wrong.
6
+
3
7
  ## [0.2.1] - 2021-06-22
4
8
 
5
9
  - Ensure numeric is in the PG type map for Rails 6.0. So that lsn_diff will
@@ -259,7 +259,7 @@ module ActiveRecord
259
259
  end
260
260
 
261
261
  known_coder_types = coders_by_name.keys.map { |n| quote(n) }
262
- query = <<~SQL.format(known_coder_types.join(", "))
262
+ query = format(<<~SQL, *known_coder_types.join(", "))
263
263
  SELECT t.oid, t.typname
264
264
  FROM pg_type as t
265
265
  WHERE t.typname IN (%s)
@@ -10,7 +10,7 @@ module ActiveRecord
10
10
  ActiveSupport.on_load(:active_record) do
11
11
  require "active_record/pg_extensions/postgresql_adapter"
12
12
 
13
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.include(PostgreSQLAdapter)
13
+ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend(PostgreSQLAdapter)
14
14
  # if they've already require 'all', then inject now
15
15
  defined?(All) && All.inject
16
16
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveRecord
4
4
  module PGExtensions
5
- VERSION = "0.2.1"
5
+ VERSION = "0.2.2"
6
6
  end
7
7
  end
@@ -92,8 +92,8 @@ describe ActiveRecord::PGExtensions::PessimisticMigrations do
92
92
  expect(connection).to receive(:remove_index).with(:users, name: "index_users_on_name", algorithm: :concurrently)
93
93
 
94
94
  connection.add_index :users, :name, algorithm: :concurrently
95
- expect(connection.executed_statements).to eq(
96
- ['CREATE INDEX CONCURRENTLY "index_users_on_name" ON "users" ("name")']
95
+ expect(connection.executed_statements).to match(
96
+ [match(/\ACREATE +INDEX CONCURRENTLY "index_users_on_name" ON "users" +\("name"\)\z/)]
97
97
  )
98
98
  end
99
99
 
@@ -245,7 +245,7 @@ describe ActiveRecord::ConnectionAdapters::PostgreSQLAdapter do
245
245
  end
246
246
 
247
247
  describe "#select_value" do
248
- it "has casts numeric types" do
248
+ it "casts numeric types" do
249
249
  expect(connection.select_value("SELECT factorial(2)")).to eq 2
250
250
  end
251
251
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-pg-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
@@ -50,6 +50,20 @@ dependencies:
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '6.2'
53
+ - !ruby/object:Gem::Dependency
54
+ name: appraisal
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '2.4'
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '2.4'
53
67
  - !ruby/object:Gem::Dependency
54
68
  name: byebug
55
69
  requirement: !ruby/object:Gem::Requirement
@@ -190,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
204
  - !ruby/object:Gem::Version
191
205
  version: '0'
192
206
  requirements: []
193
- rubygems_version: 3.2.15
207
+ rubygems_version: 3.0.3
194
208
  signing_key:
195
209
  specification_version: 4
196
210
  summary: Several extensions to ActiveRecord's PostgreSQLAdapter.