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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72b8f131bed595bb673bf156b928606550291257e8aae9109fc6de77d1896fb6
4
- data.tar.gz: 3d44cef92f9ca6fe8e656ee3b0aeeb47209c866f95668d5f6c06c0a22bacd8e3
3
+ metadata.gz: e8ff8965c70e032317fe7493fa9920d50093256786947e4f067a525cbeba2335
4
+ data.tar.gz: 9a60fe177acaf1f7af17f3fb13b82609ddbca6c50e4fa07cc75360d5935d1173
5
5
  SHA512:
6
- metadata.gz: 46372ddaab387dfe89baaa342868fc7fff062235ada8baa9f6fc16e6f88edae5fb45140f370dae3f12ee39d70546a156e70c064405a7ef3db532557255592def
7
- data.tar.gz: db200cafb3c1eec8749aaf4b73b48312f0072a0dbc043f7f200839f0b69ab0a1b9093338ce14b762df6f549a3d6cb5af866e03fcbb7994956599e7df506d4826
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 => :establish_connection do
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: :establish_connection do
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: :establish_connection do
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: :establish_connection do
24
+ task index_info: :environment do
35
25
  RailsPgExtras.index_info
36
26
  end
37
27
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsPgExtras
4
- VERSION = "4.7.1"
4
+ VERSION = "4.7.2"
5
5
  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.1
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.1
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.1
26
+ version: 4.7.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement