rails-pg-extras 5.4.0 → 5.4.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: 61f5b6a2a631c8d8099b67c1c28334cbc3ce64dddd53e3977877265362a04d71
4
- data.tar.gz: ec8b4100e944153f9be8ddb8d9286441bf449f3262392129615dd0df28212a0c
3
+ metadata.gz: eae7b49e84af570a46a1442642dcc8a1f9abc78d660489d777715b7fde100224
4
+ data.tar.gz: 4fd17ae15d5dc2b0eddfd8f4770dfe062efeee119d1d797f4ffb00c4e8e369f8
5
5
  SHA512:
6
- metadata.gz: af548830ba4e66131a55a093bbc14f23907c0b9ad6335322ce6d20dedf76872f05cc40afa00eef996943044e9cc0b0b93a869b2859011e1729eb9b63f1cff311
7
- data.tar.gz: 2bcf26a2ad56ff96715a15abd276d990a312e8d1d7d643c45f315ae8629e987534f91bc18be82d9cefe7e6b08eab4fb631046dec2c38987e5ed524d5c5a77ab7
6
+ metadata.gz: f0f610b3eea483eaf8a7d2e321a0af7a805633d70e1e473905d0aae5993f5dc70055a39cee07634f3e7dc1691cd70c77d9b25440018e0b6550645378b65aadf8
7
+ data.tar.gz: e506327e15ee0d8072f74b712abb4552c0dfe34b8f6dfd53149dbd439bf4bba96064d1c61bf5dfae979a46571fb9dd776382893890740648ae8bb624a932aa9c
@@ -12,43 +12,52 @@ jobs:
12
12
  strategy:
13
13
  fail-fast: false
14
14
  matrix:
15
- ruby-version: ['3.2', '3.1', '3.0', '2.7', '2.6']
15
+ ruby-version: ['3.3', '3.2', '3.1', '3.0', '2.7', '2.6']
16
16
  steps:
17
- - uses: actions/checkout@v3
18
- - name: Run PostgreSQL 11
17
+ - uses: actions/checkout@v4
18
+ - name: Run PostgreSQL 12
19
19
  run: |
20
20
  docker run --env POSTGRES_USER=postgres \
21
21
  --env POSTGRES_DB=rails-pg-extras-test \
22
22
  --env POSTGRES_PASSWORD=secret \
23
- -d -p 5432:5432 postgres:11.18-alpine \
23
+ -d -p 5432:5432 postgres:12.20-alpine \
24
24
  postgres -c shared_preload_libraries=pg_stat_statements
25
- - name: Run PostgreSQL 12
25
+ - name: Run PostgreSQL 13
26
26
  run: |
27
27
  docker run --env POSTGRES_USER=postgres \
28
28
  --env POSTGRES_DB=rails-pg-extras-test \
29
29
  --env POSTGRES_PASSWORD=secret \
30
- -d -p 5433:5432 postgres:12.13-alpine \
30
+ -d -p 5433:5432 postgres:13.16-alpine \
31
31
  postgres -c shared_preload_libraries=pg_stat_statements
32
- - name: Run PostgreSQL 13
32
+ - name: Run PostgreSQL 14
33
33
  run: |
34
34
  docker run --env POSTGRES_USER=postgres \
35
35
  --env POSTGRES_DB=rails-pg-extras-test \
36
36
  --env POSTGRES_PASSWORD=secret \
37
- -d -p 5434:5432 postgres:13.9-alpine \
37
+ -d -p 5434:5432 postgres:14.13-alpine \
38
38
  postgres -c shared_preload_libraries=pg_stat_statements
39
- - name: Run PostgreSQL 14
39
+ - name: Run PostgreSQL 15
40
40
  run: |
41
41
  docker run --env POSTGRES_USER=postgres \
42
42
  --env POSTGRES_DB=rails-pg-extras-test \
43
43
  --env POSTGRES_PASSWORD=secret \
44
- -d -p 5435:5432 postgres:14.6-alpine \
44
+ -d -p 5435:5432 postgres:15.8-alpine \
45
45
  postgres -c shared_preload_libraries=pg_stat_statements
46
- - name: Run PostgreSQL 15
46
+ sleep 15
47
+ - name: Run PostgreSQL 16
48
+ run: |
49
+ docker run --env POSTGRES_USER=postgres \
50
+ --env POSTGRES_DB=rails-pg-extras-test \
51
+ --env POSTGRES_PASSWORD=secret \
52
+ -d -p 5436:5432 postgres:16.4-alpine \
53
+ postgres -c shared_preload_libraries=pg_stat_statements
54
+ sleep 15
55
+ - name: Run PostgreSQL 17
47
56
  run: |
48
57
  docker run --env POSTGRES_USER=postgres \
49
58
  --env POSTGRES_DB=rails-pg-extras-test \
50
59
  --env POSTGRES_PASSWORD=secret \
51
- -d -p 5436:5432 postgres:15.1-alpine \
60
+ -d -p 5437:5432 postgres:17.0-alpine \
52
61
  postgres -c shared_preload_libraries=pg_stat_statements
53
62
  sleep 15
54
63
  - name: Set up Ruby ${{ matrix.ruby-version }}
@@ -64,64 +73,58 @@ jobs:
64
73
  bundle config set --local path 'vendor/bundle'
65
74
  bundle install
66
75
  sleep 10
67
- - name: Run tests for PG 11
76
+ - name: Run tests for PG 12
68
77
  env:
69
- PG_VERSION: 11
78
+ PG_VERSION: 12
70
79
  POSTGRES_HOST: localhost
71
80
  POSTGRES_USER: postgres
72
81
  POSTGRES_DB: rails-pg-extras-test
73
82
  POSTGRES_PASSWORD: secret
74
- DATABASE_URL: postgresql://postgres:secret@localhost:5432/rails-pg-extras-test
75
83
  run: |
76
84
  bundle exec rspec spec/
77
- - name: Run tests for PG 11
85
+ - name: Run tests for PG 13
78
86
  env:
79
- PG_VERSION: 11
87
+ PG_VERSION: 13
80
88
  POSTGRES_HOST: localhost
81
89
  POSTGRES_USER: postgres
82
90
  POSTGRES_DB: rails-pg-extras-test
83
91
  POSTGRES_PASSWORD: secret
84
- DATABASE_URL: postgresql://postgres:secret@localhost:5432/rails-pg-extras-test
85
92
  run: |
86
93
  bundle exec rspec spec/
87
- - name: Run tests for PG 12
94
+ - name: Run tests for PG 14
88
95
  env:
89
- PG_VERSION: 12
96
+ PG_VERSION: 14
90
97
  POSTGRES_HOST: localhost
91
98
  POSTGRES_USER: postgres
92
99
  POSTGRES_DB: rails-pg-extras-test
93
100
  POSTGRES_PASSWORD: secret
94
- DATABASE_URL: postgresql://postgres:secret@localhost:5433/rails-pg-extras-test
95
101
  run: |
96
102
  bundle exec rspec spec/
97
- - name: Run tests for PG 13
103
+ - name: Run tests for PG 15
98
104
  env:
99
- PG_VERSION: 13
105
+ PG_VERSION: 15
100
106
  POSTGRES_HOST: localhost
101
107
  POSTGRES_USER: postgres
102
108
  POSTGRES_DB: rails-pg-extras-test
103
109
  POSTGRES_PASSWORD: secret
104
- DATABASE_URL: postgresql://postgres:secret@localhost:5434/rails-pg-extras-test
105
110
  run: |
106
111
  bundle exec rspec spec/
107
- - name: Run tests for PG 14
112
+ - name: Run tests for PG 16
108
113
  env:
109
- PG_VERSION: 14
114
+ PG_VERSION: 16
110
115
  POSTGRES_HOST: localhost
111
116
  POSTGRES_USER: postgres
112
117
  POSTGRES_DB: rails-pg-extras-test
113
118
  POSTGRES_PASSWORD: secret
114
- DATABASE_URL: postgresql://postgres:secret@localhost:5435/rails-pg-extras-test
115
119
  run: |
116
120
  bundle exec rspec spec/
117
- - name: Run tests for PG 15
121
+ - name: Run tests for PG 17
118
122
  env:
119
- PG_VERSION: 15
123
+ PG_VERSION: 17
120
124
  POSTGRES_HOST: localhost
121
125
  POSTGRES_USER: postgres
122
126
  POSTGRES_DB: rails-pg-extras-test
123
127
  POSTGRES_PASSWORD: secret
124
- DATABASE_URL: postgresql://postgres:secret@localhost:5436/rails-pg-extras-test
125
128
  run: |
126
129
  bundle exec rspec spec/
127
130
 
data/Rakefile CHANGED
@@ -5,5 +5,5 @@ 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/ && PG_VERSION=14 bundle exec rspec spec/")
8
+ system("PG_VERSION=12 bundle exec rspec spec/ && PG_VERSION=13 bundle exec rspec spec/ && PG_VERSION=14 bundle exec rspec spec/ && PG_VERSION=15 bundle exec rspec spec/ && PG_VERSION=16 bundle exec rspec spec/ && PG_VERSION=17 bundle exec rspec spec/")
9
9
  end
@@ -1,8 +1,6 @@
1
- version: '3'
2
-
3
1
  services:
4
- postgres11:
5
- image: postgres:11.16-alpine
2
+ postgres12:
3
+ image: postgres:12.20-alpine
6
4
  command: postgres -c shared_preload_libraries=pg_stat_statements
7
5
  environment:
8
6
  POSTGRES_USER: postgres
@@ -10,8 +8,8 @@ services:
10
8
  POSTGRES_PASSWORD: secret
11
9
  ports:
12
10
  - '5432:5432'
13
- postgres12:
14
- image: postgres:12.11-alpine
11
+ postgres13:
12
+ image: postgres:13.16-alpine
15
13
  command: postgres -c shared_preload_libraries=pg_stat_statements
16
14
  environment:
17
15
  POSTGRES_USER: postgres
@@ -19,8 +17,8 @@ services:
19
17
  POSTGRES_PASSWORD: secret
20
18
  ports:
21
19
  - '5433:5432'
22
- postgres13:
23
- image: postgres:13.7-alpine
20
+ postgres14:
21
+ image: postgres:14.13-alpine
24
22
  command: postgres -c shared_preload_libraries=pg_stat_statements
25
23
  environment:
26
24
  POSTGRES_USER: postgres
@@ -28,8 +26,8 @@ services:
28
26
  POSTGRES_PASSWORD: secret
29
27
  ports:
30
28
  - '5434:5432'
31
- postgres14:
32
- image: postgres:14.3-alpine
29
+ postgres15:
30
+ image: postgres:15.8-alpine
33
31
  command: postgres -c shared_preload_libraries=pg_stat_statements
34
32
  environment:
35
33
  POSTGRES_USER: postgres
@@ -37,3 +35,22 @@ services:
37
35
  POSTGRES_PASSWORD: secret
38
36
  ports:
39
37
  - '5435:5432'
38
+ postgres16:
39
+ image: postgres:16.4-alpine
40
+ command: postgres -c shared_preload_libraries=pg_stat_statements
41
+ environment:
42
+ POSTGRES_USER: postgres
43
+ POSTGRES_DB: rails-pg-extras-test
44
+ POSTGRES_PASSWORD: secret
45
+ ports:
46
+ - '5436:5432'
47
+ postgres17:
48
+ image: postgres:17.0-alpine
49
+ command: postgres -c shared_preload_libraries=pg_stat_statements
50
+ environment:
51
+ POSTGRES_USER: postgres
52
+ POSTGRES_DB: rails-pg-extras-test
53
+ POSTGRES_PASSWORD: secret
54
+ ports:
55
+ - '5437:5432'
56
+
@@ -13,6 +13,7 @@ module RailsPgExtras
13
13
  QUERIES = RubyPgExtras::QUERIES
14
14
  DEFAULT_ARGS = RubyPgExtras::DEFAULT_ARGS
15
15
  NEW_PG_STAT_STATEMENTS = RubyPgExtras::NEW_PG_STAT_STATEMENTS
16
+ PG_STAT_STATEMENTS_17 = RubyPgExtras::PG_STAT_STATEMENTS_17
16
17
 
17
18
  QUERIES.each do |query_name|
18
19
  define_singleton_method query_name do |options = {}|
@@ -33,6 +34,8 @@ module RailsPgExtras
33
34
  .to_a[0].fetch("installed_version", nil))
34
35
  if Gem::Version.new(version) < Gem::Version.new(NEW_PG_STAT_STATEMENTS)
35
36
  query_name = "#{query_name}_legacy".to_sym
37
+ elsif Gem::Version.new(version) >= Gem::Version.new(PG_STAT_STATEMENTS_17)
38
+ query_name = "#{query_name}_17".to_sym
36
39
  end
37
40
  end
38
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsPgExtras
4
- VERSION = "5.4.0"
4
+ VERSION = "5.4.1"
5
5
  end
data/spec/smoke_spec.rb CHANGED
@@ -36,6 +36,7 @@ describe RailsPgExtras do
36
36
 
37
37
  it "supports custom RAILS_PG_EXTRAS_DATABASE_URL" do
38
38
  ENV["RAILS_PG_EXTRAS_DATABASE_URL"] = ENV["DATABASE_URL"]
39
+ puts ENV["RAILS_PG_EXTRAS_DATABASE_URL"]
39
40
 
40
41
  expect do
41
42
  RailsPgExtras.calls
data/spec/spec_helper.rb CHANGED
@@ -7,14 +7,18 @@ require_relative "../lib/rails-pg-extras"
7
7
 
8
8
  pg_version = ENV["PG_VERSION"]
9
9
 
10
- port = if pg_version == "11"
10
+ port = if pg_version == "12"
11
11
  "5432"
12
- elsif pg_version == "12"
13
- "5433"
14
12
  elsif pg_version == "13"
15
- "5434"
13
+ "5433"
16
14
  elsif pg_version == "14"
15
+ "5434"
16
+ elsif pg_version == "15"
17
17
  "5435"
18
+ elsif pg_version == "16"
19
+ "5436"
20
+ elsif pg_version == "17"
21
+ "5437"
18
22
  else
19
23
  "5432"
20
24
  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: 5.4.0
4
+ version: 5.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-19 00:00:00.000000000 Z
11
+ date: 2024-10-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: 5.4.0
19
+ version: 5.4.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: 5.4.0
26
+ version: 5.4.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement