rails-pg-extras 4.4.0 → 4.4.3

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: 0a0259a817155746ae3dda5a13fd1e6c8e0421dad029dd2c6100222379dad76f
4
- data.tar.gz: 5ffdc7d923d458bab991439a65adf91ff3e752e8e90280c6e3faae57d36762a7
3
+ metadata.gz: 60e0cb1fc6dc58f8a13479b3d9f9c455c4f1f3df11fba284f60e69860d439860
4
+ data.tar.gz: febf299b937490e1580373f6ab651bb97de5f94eb313f3d63386c0dde526ff48
5
5
  SHA512:
6
- metadata.gz: a6a55fcb7e8cc126859f1f45f4ba38f9562f1bded1e4aa6287e3728926cc3eb598552d4cdcc311104e811b513f20a71f52d29964dd6f0137df68a2699e9ef7ab
7
- data.tar.gz: 305dc8c57cace4845795b051afca373103765181a1121203d9963261a0be18b50d6335355a60988be745d16d19ecd9f30ac506f4cff15c5265c38cdca039316a
6
+ metadata.gz: 64678c9cf377053cc6d8757955d18fb83f55ca8daf2ae13a684a3d4ce222f6f370379e4d226a9adaceb747bb244101f193d8cc679d7a41dbc05cf36b582ed6c1
7
+ data.tar.gz: 959b229c662273e5772ca70b21bd4d2a1422b6005494ddf8b8a743e68bc11d9aefea14c377ff8c0a673d0238baf264b4c8670f4b6007ace2b5ef068817f537c0
data/README.md CHANGED
@@ -20,7 +20,7 @@ Alternative versions:
20
20
 
21
21
  - [Elixir](https://github.com/pawurb/ecto_psql_extras)
22
22
 
23
- - [Python](https://github.com/pawurb/ecto_psql_extras)
23
+ - [Python Flask](https://github.com/nickjj/flask-pg-extras)
24
24
 
25
25
  - [Haskell](https://github.com/pawurb/haskell-pg-extras)
26
26
 
@@ -128,7 +128,7 @@ RailsPgExtras.configure do |config|
128
128
  # Rails-pg-extras does not enable all the web actions by default. You can check all available actions via `RailsPgExtras::Web::ACTIONS`.
129
129
  # For example, you may want to enable the dangerous `kill_all` action.
130
130
 
131
- config.enabled_web_actions = %i[kill_all pg_stat_statements_reset enable_extensions]
131
+ config.enabled_web_actions = %i[kill_all pg_stat_statements_reset add_extensions]
132
132
  end
133
133
  ```
134
134
 
@@ -21,7 +21,7 @@ module RailsPgExtras::Web
21
21
  private
22
22
 
23
23
  def load_queries
24
- @all_queries = (RailsPgExtras::QUERIES - ACTIONS).inject({}) do |memo, query_name|
24
+ @all_queries = (RailsPgExtras::QUERIES - RailsPgExtras::Web::ACTIONS).inject({}) do |memo, query_name|
25
25
  unless query_name.in? %i[mandelbrot]
26
26
  memo[query_name] = { disabled: query_disabled?(query_name) }
27
27
  end
@@ -5,7 +5,7 @@
5
5
  <% end %>
6
6
  </div>
7
7
 
8
- <% if RailsPgExtras::Web.action_enabled?(:enable_extensions) %>
8
+ <% if RailsPgExtras::Web.action_enabled?(:add_extensions) %>
9
9
  <%= link_to "Enable extensions", add_extensions_action_path,
10
10
  method: "post",
11
11
  data: {
@@ -1,7 +1,6 @@
1
- <%= form_with url: queries_path, id: "queries", method: :get do |f| %>
2
- <%= f.select :query_name, options_for_select(@all_queries, params[:query_name]),
3
- {prompt: "--- select query ---"},
4
- {class: "border p-2 font-bold", autofocus: true}
1
+ <%= form_tag queries_path, id: "queries", method: :get do |f| %>
2
+ <%= select_tag :query_name, options_for_select(@all_queries, params[:query_name]),
3
+ {prompt: "--- select query ---", class: "border p-2 font-bold", autofocus: true}
5
4
  %>
6
5
  <% end %>
7
6
  <script>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsPgExtras
4
- VERSION = "4.4.0"
4
+ VERSION = "4.4.3"
5
5
  end
@@ -3,5 +3,7 @@ require 'rails'
3
3
  module RailsPgExtras::Web
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace RailsPgExtras::Web
6
+
7
+ config.middleware.use ActionDispatch::Flash
6
8
  end
7
9
  end
@@ -2,7 +2,7 @@ require "rails_pg_extras/web/engine"
2
2
 
3
3
  module RailsPgExtras
4
4
  module Web
5
- ACTIONS = %i[kill_all pg_stat_statements_reset enable_extensions].freeze
5
+ ACTIONS = %i[kill_all pg_stat_statements_reset add_extensions].freeze
6
6
 
7
7
  def self.action_enabled?(action_name)
8
8
  RailsPgExtras.configuration.enabled_web_actions.include?(action_name.to_sym)
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.0
4
+ version: 4.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-12 00:00:00.000000000 Z
11
+ date: 2022-03-23 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.4.0
19
+ version: 4.4.3
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.4.0
26
+ version: 4.4.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement