rails-pg-extras 4.5.1 → 4.7.1

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: 01e21b5ec266f43a65743724925d94da40d0b1a07da0748ea33c0e37e324a0f3
4
- data.tar.gz: f1661f0407ad8b0ff8b53f12981d1d6e673d1a23d427634ccc951a37b3b2e236
3
+ metadata.gz: 72b8f131bed595bb673bf156b928606550291257e8aae9109fc6de77d1896fb6
4
+ data.tar.gz: 3d44cef92f9ca6fe8e656ee3b0aeeb47209c866f95668d5f6c06c0a22bacd8e3
5
5
  SHA512:
6
- metadata.gz: ad13eed3eac2655d3956c1900bd3f29ead1ef26273e95ffcc44a71aaca8e6285668b71437a846ff4ba530bde2025638bbadc34c2d385ee16780d6de29eed3ab4
7
- data.tar.gz: 5869aae0dc086ce4faa365772d95db3da1340b2027ee27740f7ee502c18d26386e3ad767728364e3db6ddc5b29b1088bf744bfc5f7deadecf8737ca92fc9cf07
6
+ metadata.gz: 46372ddaab387dfe89baaa342868fc7fff062235ada8baa9f6fc16e6f88edae5fb45140f370dae3f12ee39d70546a156e70c064405a7ef3db532557255592def
7
+ data.tar.gz: db200cafb3c1eec8749aaf4b73b48312f0072a0dbc043f7f200839f0b69ab0a1b9093338ce14b762df6f549a3d6cb5af866e03fcbb7994956599e7df506d4826
data/.circleci/config.yml CHANGED
@@ -2,39 +2,47 @@ version: 2
2
2
  jobs:
3
3
  test:
4
4
  docker:
5
- - image: circleci/ruby:2.6.5
5
+ - image: cimg/ruby:2.7.6
6
6
  environment:
7
7
  DATABASE_URL: postgresql://postgres:secret@localhost:5432/rails-pg-extras-test
8
- - image: circleci/postgres:11.5
8
+ - image: cimg/postgres:11.15
9
9
  command: postgres -c shared_preload_libraries=pg_stat_statements
10
10
  name: postgres11
11
11
  environment:
12
12
  POSTGRES_USER: postgres
13
13
  POSTGRES_DB: rails-pg-extras-test
14
14
  POSTGRES_PASSWORD: secret
15
- - image: circleci/postgres:12.7
15
+ - image: cimg/postgres:12.10
16
16
  command: postgres -c shared_preload_libraries=pg_stat_statements
17
17
  name: postgres12
18
18
  environment:
19
19
  POSTGRES_USER: postgres
20
20
  POSTGRES_DB: rails-pg-extras-test
21
21
  POSTGRES_PASSWORD: secret
22
- - image: circleci/postgres:13.3
22
+ - image: cimg/postgres:13.6
23
23
  command: postgres -c shared_preload_libraries=pg_stat_statements
24
24
  name: postgres13
25
25
  environment:
26
26
  POSTGRES_USER: postgres
27
27
  POSTGRES_DB: rails-pg-extras-test
28
28
  POSTGRES_PASSWORD: secret
29
+ - image: cimg/postgres:14.2
30
+ command: postgres -c shared_preload_libraries=pg_stat_statements
31
+ name: postgres14
32
+ environment:
33
+ POSTGRES_USER: postgres
34
+ POSTGRES_DB: rails-pg-extras-test
35
+ POSTGRES_PASSWORD: secret
29
36
  parallelism: 1
30
37
  steps:
31
38
  - checkout
32
39
  - run: gem update --system
33
40
  - run: gem install bundler
34
- - run: bundle config set --local path 'vendor/bundle'
35
- - run: bundle install
36
41
  - run: sudo apt-get update --allow-releaseinfo-change
37
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
38
46
  - run: dockerize -wait tcp://postgres11:5432 -timeout 1m
39
47
  - run:
40
48
  name: Run specs for PG 11
@@ -51,6 +59,11 @@ jobs:
51
59
  environment:
52
60
  DATABASE_URL: postgresql://postgres:secret@postgres13:5432/rails-pg-extras-test
53
61
  command: bundle exec rspec spec/
62
+ - run:
63
+ name: Run specs for PG 14
64
+ environment:
65
+ DATABASE_URL: postgresql://postgres:secret@postgres14:5432/rails-pg-extras-test
66
+ command: bundle exec rspec spec/
54
67
  workflows:
55
68
  version: 2
56
69
  test:
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
 
data/Rakefile CHANGED
@@ -5,6 +5,6 @@ RSpec::Core::RakeTask.new(:spec)
5
5
 
6
6
  desc 'Test all PG versions'
7
7
  task :test_all do
8
- system("PG_VERSION=11 bundle exec rspec spec/ && PG_VERSION=12 bundle exec rspec spec/ && PG_VERSION=13 bundle exec rspec spec/")
8
+ system("PG_VERSION=11 bundle exec rspec spec/ && PG_VERSION=12 bundle exec rspec spec/ && PG_VERSION=13 bundle exec rspec spec/ && PG_VERSION=14 bundle exec rspec spec/")
9
9
  end
10
10
 
@@ -2,7 +2,7 @@ version: '3'
2
2
 
3
3
  services:
4
4
  postgres11:
5
- image: postgres:11.5-alpine
5
+ image: postgres:11.16-alpine
6
6
  command: postgres -c shared_preload_libraries=pg_stat_statements
7
7
  environment:
8
8
  POSTGRES_USER: postgres
@@ -11,7 +11,7 @@ services:
11
11
  ports:
12
12
  - '5432:5432'
13
13
  postgres12:
14
- image: postgres:12.7-alpine
14
+ image: postgres:12.11-alpine
15
15
  command: postgres -c shared_preload_libraries=pg_stat_statements
16
16
  environment:
17
17
  POSTGRES_USER: postgres
@@ -20,7 +20,7 @@ services:
20
20
  ports:
21
21
  - '5433:5432'
22
22
  postgres13:
23
- image: postgres:13.3-alpine
23
+ image: postgres:13.7-alpine
24
24
  command: postgres -c shared_preload_libraries=pg_stat_statements
25
25
  environment:
26
26
  POSTGRES_USER: postgres
@@ -28,3 +28,12 @@ services:
28
28
  POSTGRES_PASSWORD: secret
29
29
  ports:
30
30
  - '5434:5432'
31
+ postgres14:
32
+ image: postgres:14.3-alpine
33
+ command: postgres -c shared_preload_libraries=pg_stat_statements
34
+ environment:
35
+ POSTGRES_USER: postgres
36
+ POSTGRES_DB: rails-pg-extras-test
37
+ POSTGRES_PASSWORD: secret
38
+ ports:
39
+ - '5435:5432'
@@ -8,7 +8,7 @@ namespace :pg_extras do
8
8
  ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'])
9
9
  else
10
10
  db_config_file = File.read('config/database.yml')
11
- db_config = YAML::load(ERB.new(db_config_file).result, aliases: true)
11
+ db_config = YAML.safe_load(ERB.new(db_config_file).result, aliases: true)
12
12
  ActiveRecord::Base.establish_connection(db_config[Rails.env])
13
13
  end
14
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsPgExtras
4
- VERSION = "4.5.1"
4
+ VERSION = "4.7.1"
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -13,6 +13,8 @@ elsif pg_version == "12"
13
13
  "5433"
14
14
  elsif pg_version == "13"
15
15
  "5434"
16
+ elsif pg_version == "14"
17
+ "5435"
16
18
  else
17
19
  "5432"
18
20
  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.5.1
4
+ version: 4.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-13 00:00:00.000000000 Z
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.5.1
19
+ version: 4.7.1
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.5.1
26
+ version: 4.7.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement