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 +4 -4
- data/README.md +2 -2
- data/app/controllers/rails_pg_extras/web/queries_controller.rb +1 -1
- data/app/views/rails_pg_extras/web/queries/_unavailable_extensions_warning.html.erb +1 -1
- data/app/views/rails_pg_extras/web/shared/_queries_selector.html.erb +3 -4
- data/lib/rails_pg_extras/version.rb +1 -1
- data/lib/rails_pg_extras/web/engine.rb +2 -0
- data/lib/rails_pg_extras/web.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: 60e0cb1fc6dc58f8a13479b3d9f9c455c4f1f3df11fba284f60e69860d439860
|
4
|
+
data.tar.gz: febf299b937490e1580373f6ab651bb97de5f94eb313f3d63386c0dde526ff48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
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
|
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
|
@@ -1,7 +1,6 @@
|
|
1
|
-
<%=
|
2
|
-
<%=
|
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>
|
data/lib/rails_pg_extras/web.rb
CHANGED
@@ -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
|
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.
|
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-
|
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.
|
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.
|
26
|
+
version: 4.4.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|