rails-pg-extras 4.6.0 → 4.7.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/.circleci/config.yml +4 -3
- data/README.md +8 -8
- data/lib/rails_pg_extras/tasks/all.rake +4 -14
- data/lib/rails_pg_extras/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8ff8965c70e032317fe7493fa9920d50093256786947e4f067a525cbeba2335
|
|
4
|
+
data.tar.gz: 9a60fe177acaf1f7af17f3fb13b82609ddbca6c50e4fa07cc75360d5935d1173
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 42cddd0263993de94149b63ebb5b6deba395a0b1962881ddecda38a7d52f842b812ed65a30c1825e8f6c5f1667475961a22a9597c270f51139ba71f750dc67e7
|
|
7
|
+
data.tar.gz: 3f73876c3a17b116dd995ab3af09622e7262db6e533e28108170015fdf369aad41b190cabab7b2f54aa64b034a1ea49bacc1816995a953a3ea495d15de719bfd
|
data/.circleci/config.yml
CHANGED
|
@@ -2,7 +2,7 @@ version: 2
|
|
|
2
2
|
jobs:
|
|
3
3
|
test:
|
|
4
4
|
docker:
|
|
5
|
-
- image: cimg/ruby:2.6
|
|
5
|
+
- image: cimg/ruby:2.7.6
|
|
6
6
|
environment:
|
|
7
7
|
DATABASE_URL: postgresql://postgres:secret@localhost:5432/rails-pg-extras-test
|
|
8
8
|
- image: cimg/postgres:11.15
|
|
@@ -38,10 +38,11 @@ jobs:
|
|
|
38
38
|
- checkout
|
|
39
39
|
- run: gem update --system
|
|
40
40
|
- run: gem install bundler
|
|
41
|
-
- run: bundle config set --local path 'vendor/bundle'
|
|
42
|
-
- run: bundle install
|
|
43
41
|
- run: sudo apt-get update --allow-releaseinfo-change
|
|
44
42
|
- run: sudo apt install postgresql-client
|
|
43
|
+
- run: sudo apt install libpq-dev
|
|
44
|
+
- run: bundle config set --local path 'vendor/bundle'
|
|
45
|
+
- run: bundle install
|
|
45
46
|
- run: dockerize -wait tcp://postgres11:5432 -timeout 1m
|
|
46
47
|
- run:
|
|
47
48
|
name: Run specs for PG 11
|
data/README.md
CHANGED
|
@@ -286,14 +286,14 @@ RailsPgExtras.locks
|
|
|
286
286
|
|
|
287
287
|
$ rake pg_extras:locks
|
|
288
288
|
|
|
289
|
-
procpid | relname | transactionid | granted | query_snippet | mode | age
|
|
290
|
-
|
|
291
|
-
31776 | | | t | <IDLE> in transaction | ExclusiveLock | 00:19:29.837898
|
|
292
|
-
31776 | | 1294 | t | <IDLE> in transaction | RowExclusiveLock | 00:19:29.837898
|
|
293
|
-
31912 | | | t | select * from hello; | ExclusiveLock | 00:19:17.94259
|
|
294
|
-
3443 | | | t | +| ExclusiveLock | 00:00:00
|
|
295
|
-
| | | | select +| |
|
|
296
|
-
| | | | pg_stat_activi | |
|
|
289
|
+
procpid | relname | transactionid | granted | query_snippet | mode | age | application |
|
|
290
|
+
---------+---------+---------------+---------+-----------------------+------------------------------------------------------
|
|
291
|
+
31776 | | | t | <IDLE> in transaction | ExclusiveLock | 00:19:29.837898 | bin/rails
|
|
292
|
+
31776 | | 1294 | t | <IDLE> in transaction | RowExclusiveLock | 00:19:29.837898 | bin/rails
|
|
293
|
+
31912 | | | t | select * from hello; | ExclusiveLock | 00:19:17.94259 | bin/rails
|
|
294
|
+
3443 | | | t | +| ExclusiveLock | 00:00:00 | bin/sidekiq
|
|
295
|
+
| | | | select +| | |
|
|
296
|
+
| | | | pg_stat_activi | | |
|
|
297
297
|
(4 rows)
|
|
298
298
|
```
|
|
299
299
|
|
|
@@ -3,35 +3,25 @@
|
|
|
3
3
|
require 'rails-pg-extras'
|
|
4
4
|
|
|
5
5
|
namespace :pg_extras do
|
|
6
|
-
task :establish_connection do
|
|
7
|
-
if ENV['DATABASE_URL'].present?
|
|
8
|
-
ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'])
|
|
9
|
-
else
|
|
10
|
-
db_config_file = File.read('config/database.yml')
|
|
11
|
-
db_config = YAML::load(ERB.new(db_config_file).result, aliases: true)
|
|
12
|
-
ActiveRecord::Base.establish_connection(db_config[Rails.env])
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
|
|
16
6
|
RailsPgExtras::QUERIES.each do |query_name|
|
|
17
7
|
desc RubyPgExtras.description_for(query_name: query_name)
|
|
18
|
-
task query_name.to_sym => :
|
|
8
|
+
task query_name.to_sym => :environment do
|
|
19
9
|
RailsPgExtras.public_send(query_name)
|
|
20
10
|
end
|
|
21
11
|
end
|
|
22
12
|
|
|
23
13
|
desc "Generate a PostgreSQL healthcheck report"
|
|
24
|
-
task diagnose: :
|
|
14
|
+
task diagnose: :environment do
|
|
25
15
|
RailsPgExtras.diagnose
|
|
26
16
|
end
|
|
27
17
|
|
|
28
18
|
desc "Display tables metadata metrics"
|
|
29
|
-
task table_info: :
|
|
19
|
+
task table_info: :environment do
|
|
30
20
|
RailsPgExtras.table_info
|
|
31
21
|
end
|
|
32
22
|
|
|
33
23
|
desc "Display indexes metadata metrics"
|
|
34
|
-
task index_info: :
|
|
24
|
+
task index_info: :environment do
|
|
35
25
|
RailsPgExtras.index_info
|
|
36
26
|
end
|
|
37
27
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-pg-extras
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- pawurb
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-07-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ruby-pg-extras
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 4.
|
|
19
|
+
version: 4.7.2
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - '='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 4.
|
|
26
|
+
version: 4.7.2
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rails
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|