rails-pg-extras 4.7.1 → 4.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_pg_extras/tasks/all.rake +4 -14
- data/lib/rails_pg_extras/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8ff8965c70e032317fe7493fa9920d50093256786947e4f067a525cbeba2335
|
4
|
+
data.tar.gz: 9a60fe177acaf1f7af17f3fb13b82609ddbca6c50e4fa07cc75360d5935d1173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42cddd0263993de94149b63ebb5b6deba395a0b1962881ddecda38a7d52f842b812ed65a30c1825e8f6c5f1667475961a22a9597c270f51139ba71f750dc67e7
|
7
|
+
data.tar.gz: 3f73876c3a17b116dd995ab3af09622e7262db6e533e28108170015fdf369aad41b190cabab7b2f54aa64b034a1ea49bacc1816995a953a3ea495d15de719bfd
|
@@ -3,35 +3,25 @@
|
|
3
3
|
require 'rails-pg-extras'
|
4
4
|
|
5
5
|
namespace :pg_extras do
|
6
|
-
task :establish_connection do
|
7
|
-
if ENV['DATABASE_URL'].present?
|
8
|
-
ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'])
|
9
|
-
else
|
10
|
-
db_config_file = File.read('config/database.yml')
|
11
|
-
db_config = YAML.safe_load(ERB.new(db_config_file).result, aliases: true)
|
12
|
-
ActiveRecord::Base.establish_connection(db_config[Rails.env])
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
6
|
RailsPgExtras::QUERIES.each do |query_name|
|
17
7
|
desc RubyPgExtras.description_for(query_name: query_name)
|
18
|
-
task query_name.to_sym => :
|
8
|
+
task query_name.to_sym => :environment do
|
19
9
|
RailsPgExtras.public_send(query_name)
|
20
10
|
end
|
21
11
|
end
|
22
12
|
|
23
13
|
desc "Generate a PostgreSQL healthcheck report"
|
24
|
-
task diagnose: :
|
14
|
+
task diagnose: :environment do
|
25
15
|
RailsPgExtras.diagnose
|
26
16
|
end
|
27
17
|
|
28
18
|
desc "Display tables metadata metrics"
|
29
|
-
task table_info: :
|
19
|
+
task table_info: :environment do
|
30
20
|
RailsPgExtras.table_info
|
31
21
|
end
|
32
22
|
|
33
23
|
desc "Display indexes metadata metrics"
|
34
|
-
task index_info: :
|
24
|
+
task index_info: :environment do
|
35
25
|
RailsPgExtras.index_info
|
36
26
|
end
|
37
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-pg-extras
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.7.
|
4
|
+
version: 4.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.7.
|
19
|
+
version: 4.7.2
|
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.7.
|
26
|
+
version: 4.7.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|