activerecord-pg-extensions 0.2.1 → 0.2.2
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/CHANGELOG.md +4 -0
- data/lib/active_record/pg_extensions/postgresql_adapter.rb +1 -1
- data/lib/active_record/pg_extensions/railtie.rb +1 -1
- data/lib/active_record/pg_extensions/version.rb +1 -1
- data/spec/pessimistic_migrations_spec.rb +2 -2
- data/spec/postgresql_adapter_spec.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39407cedf031029bddd4c9cae80f64da4b635388610a5ed8437cfd7bd1248abd
|
4
|
+
data.tar.gz: 52f6fe2e76431bb4ae3420256ea2a168123641df2c4a851e61e147196d271be1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b67e8b140d12e4cfec7746f764daa05a613aa71bcb378b7f87a19c96ca12c7715e36ec2706e238d511bcc7377fedd4348e4657f11f1c2af47c61e17688c62ea9
|
7
|
+
data.tar.gz: 248bacb94d750ac4def26b48fb2e6c86637bd874195904153cc346b224e2b919cc3f6577a9b77637ffa788e4caa2a83244760264c27463886f159e64a71e1103
|
data/CHANGELOG.md
CHANGED
@@ -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
|
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.
|
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
|
@@ -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
|
96
|
-
[
|
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 "
|
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.
|
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.
|
207
|
+
rubygems_version: 3.0.3
|
194
208
|
signing_key:
|
195
209
|
specification_version: 4
|
196
210
|
summary: Several extensions to ActiveRecord's PostgreSQLAdapter.
|