pghero 3.6.2 → 3.8.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ddf920adafa90b3c49ff86f3abd05d23bb22ed3be2b27786dc8f755b308b90e
4
- data.tar.gz: 60758c308a9f298c54993c2118a8594ef3a56fd01ff5a7f0864821296f3d4a40
3
+ metadata.gz: 0d7711ad71025eb872742385c955bc1f991c889e2afa15eb113cf7ecf5e7727a
4
+ data.tar.gz: 457aeafacc98212f64854a1cbeb9aea145ec5ef0c26b7401c10e94961719c70b
5
5
  SHA512:
6
- metadata.gz: 1c65e4c0dc52a9312e6c832c68fccbeccd1c8307ecb747b00a640a08b7d58223cd20a3c92ad0747cf2681ff4b0fcd3003e02d5617d0a6f3d9a69ee9b0f1cf4f2
7
- data.tar.gz: e764269d546c4931fc5fd1680f2f25ad699f406830a7a3a1923174c8b9053393c6e124e4e049bccc11ab779071a3500a4e15a7db17cb8b22edfbe83d625c162d
6
+ metadata.gz: 38919815f0445a368c21785f99fdd94a16a24370ead143e41a6833f0e664e834cc7ebf91dc31d008445c026e619dcce891d32e10ce2eee95a80fa758a700f8f3
7
+ data.tar.gz: 49fcebe5ffcd7ba3921b392558ec71d1b806b9a9189a9a42cfd106d71fe8ec42945d9ed25048b04abf77f3e924a2cb0f105c13242f1acd6be384017655eed840
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 3.8.0 (2026-04-15)
2
+
3
+ - Updated tune page for latest PgTune
4
+ - Dropped support for Ruby < 3.3 and Rails < 7.2
5
+
6
+ ## 3.7.0 (2025-05-26)
7
+
8
+ - Dropped support for Linux package for Ubuntu 20.04
9
+ - Dropped support for Ruby < 3.2 and Rails < 7.1
10
+
1
11
  ## 3.6.2 (2025-03-21)
2
12
 
3
13
  - Improved query in `sequences` method
@@ -345,7 +355,7 @@ PgHero.with(:database2) { PgHero.running_queries }
345
355
  ## 1.4.0 (2016-08-24)
346
356
 
347
357
  - Updated for Rails 5
348
- - Fixed error when `pg_stat_statements` not enabled in `shared_libaries`
358
+ - Fixed error when `pg_stat_statements` not enabled in `shared_libraries`
349
359
 
350
360
  ## 1.3.2 (2016-08-03)
351
361
 
@@ -457,7 +467,7 @@ PgHero.with(:database2) { PgHero.running_queries }
457
467
 
458
468
  ## 0.1.7 (2014-11-12)
459
469
 
460
- - Added support for pg_stat_statments on Amazon RDS
470
+ - Added support for pg_stat_statements on Amazon RDS
461
471
  - Added `long_running_query_sec`, `slow_query_ms` and `slow_query_calls` options
462
472
 
463
473
  ## 0.1.6 (2014-10-09)
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2025 Andrew Kane, 2008-2014 Heroku (initial queries)
1
+ Copyright (c) 2014-2026 Andrew Kane, 2008-2014 Heroku (initial queries)
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -29,7 +29,7 @@ Select your preferred method of installation to get started.
29
29
 
30
30
  ## Credits
31
31
 
32
- A big thanks to [Craig Kerstiens](http://www.craigkerstiens.com/2013/01/10/more-on-postgres-performance/) and [Heroku](https://blog.heroku.com/archives/2013/5/10/more_insight_into_your_database_with_pgextras) for the initial queries and [Bootswatch](https://github.com/thomaspark/bootswatch) for the theme.
32
+ A big thanks to [Craig Kerstiens](https://www.craigkerstiens.com/2013/01/10/more-on-postgres-performance/) and [Heroku](https://blog.heroku.com/archives/2013/5/10/more_insight_into_your_database_with_pgextras) for the initial queries and [Bootswatch](https://github.com/thomaspark/bootswatch) for the theme.
33
33
 
34
34
  ## History
35
35
 
@@ -1,11 +1,9 @@
1
1
  module PgHero
2
2
  class HomeController < ActionController::Base
3
- layout "pg_hero/application"
3
+ http_basic_authenticate_with name: PgHero.username, password: PgHero.password if PgHero.password
4
4
 
5
5
  protect_from_forgery with: :exception
6
6
 
7
- http_basic_authenticate_with name: PgHero.username, password: PgHero.password if PgHero.password
8
-
9
7
  before_action :check_api
10
8
  before_action :set_database
11
9
  before_action :set_query_stats_enabled
@@ -23,6 +21,8 @@ module PgHero
23
21
  end
24
22
  end
25
23
 
24
+ layout "pg_hero/application"
25
+
26
26
  def index
27
27
  @title = "Overview"
28
28
  @extended = params[:extended]
@@ -437,7 +437,7 @@ module PgHero
437
437
 
438
438
  protected
439
439
 
440
- def redirect_backward(options = {})
440
+ def redirect_backward(**options)
441
441
  redirect_back fallback_location: root_path, **options
442
442
  end
443
443
 
data/lib/pghero/engine.rb CHANGED
@@ -17,7 +17,8 @@ module PgHero
17
17
  end
18
18
  end
19
19
 
20
- PgHero.time_zone = PgHero.config["time_zone"] if PgHero.config["time_zone"]
20
+ file_config = PgHero.file_config || {}
21
+ PgHero.time_zone = file_config["time_zone"] if file_config["time_zone"]
21
22
  end
22
23
  end
23
24
  end
@@ -3,12 +3,26 @@ module PgHero
3
3
  module Settings
4
4
  def settings
5
5
  names =
6
- if server_version_num >= 100000
6
+ if server_version_num >= 180000
7
7
  %i(
8
8
  max_connections shared_buffers effective_cache_size maintenance_work_mem
9
9
  checkpoint_completion_target wal_buffers default_statistics_target
10
10
  random_page_cost effective_io_concurrency work_mem huge_pages
11
- min_wal_size max_wal_size
11
+ jit wal_compression io_method min_wal_size max_wal_size
12
+ )
13
+ elsif server_version_num >= 120000
14
+ %i(
15
+ max_connections shared_buffers effective_cache_size maintenance_work_mem
16
+ checkpoint_completion_target wal_buffers default_statistics_target
17
+ random_page_cost effective_io_concurrency work_mem huge_pages
18
+ jit wal_compression min_wal_size max_wal_size
19
+ )
20
+ elsif server_version_num >= 100000
21
+ %i(
22
+ max_connections shared_buffers effective_cache_size maintenance_work_mem
23
+ checkpoint_completion_target wal_buffers default_statistics_target
24
+ random_page_cost effective_io_concurrency work_mem huge_pages
25
+ wal_compression min_wal_size max_wal_size
12
26
  )
13
27
  elsif server_version_num >= 90500
14
28
  %i(
@@ -1,3 +1,3 @@
1
1
  module PgHero
2
- VERSION = "3.6.2"
2
+ VERSION = "3.8.0"
3
3
  end
data/lib/pghero.rb CHANGED
@@ -79,13 +79,13 @@ module PgHero
79
79
  # use method instead of attr_accessor to ensure
80
80
  # this works if variable set after PgHero is loaded
81
81
  def username
82
- @username ||= config["username"] || ENV["PGHERO_USERNAME"]
82
+ @username ||= (file_config || {})["username"] || ENV["PGHERO_USERNAME"]
83
83
  end
84
84
 
85
85
  # use method instead of attr_accessor to ensure
86
86
  # this works if variable set after PgHero is loaded
87
87
  def password
88
- @password ||= config["password"] || ENV["PGHERO_PASSWORD"]
88
+ @password ||= (file_config || {})["password"] || ENV["PGHERO_PASSWORD"]
89
89
  end
90
90
 
91
91
  # config pattern for https://github.com/ankane/pghero/issues/424
@@ -151,7 +151,7 @@ module PgHero
151
151
 
152
152
  if databases.empty?
153
153
  databases["primary"] = {
154
- "url" => ENV["PGHERO_DATABASE_URL"] || default_connection_config
154
+ "url" => ENV["PGHERO_DATABASE_URL"]
155
155
  }
156
156
  end
157
157
 
@@ -168,11 +168,6 @@ module PgHero
168
168
  }
169
169
  end
170
170
 
171
- # private
172
- def default_connection_config
173
- connection_config(ActiveRecord::Base) if ActiveRecord::VERSION::STRING.to_f < 7.1
174
- end
175
-
176
171
  # ensure we only have one copy of databases
177
172
  # so there's only one connection pool per database
178
173
  def databases
@@ -252,9 +247,8 @@ module PgHero
252
247
  end
253
248
 
254
249
  # private
255
- # Rails 7.0 deprecates `include_replicas` for `include_hidden`
256
250
  def include_replicas_key
257
- ActiveRecord::VERSION::MAJOR >= 7 ? :include_hidden : :include_replicas
251
+ :include_hidden
258
252
  end
259
253
 
260
254
  private
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pghero
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.2
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-22 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activerecord
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '6.1'
18
+ version: '7.2'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '6.1'
25
+ version: '7.2'
26
26
  email: andrew@ankane.org
27
27
  executables: []
28
28
  extensions: []
@@ -114,14 +114,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '3.1'
117
+ version: '3.3'
118
118
  required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - ">="
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubygems_version: 3.6.2
124
+ rubygems_version: 4.0.6
125
125
  specification_version: 4
126
126
  summary: A performance dashboard for Postgres
127
127
  test_files: []