pgreset 0.2 → 0.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: 34faaca27defbd9899bcc44b48b501a1c10e2da614bac7a44549fcebd1434aea
4
- data.tar.gz: 71f1207de1fd4e907dfab41811f3eb1cb82ffdec573ade06f1877f7450d3c3d0
3
+ metadata.gz: 97f6d30c6fcbbba220f065297f7eb6441101609a99d0b39e176e7f9a61be7637
4
+ data.tar.gz: 6d886b10d4e0da04137c0ec8086aea356228fcbe86d8702218921325e6f6b445
5
5
  SHA512:
6
- metadata.gz: 9dedf9dbffd685fd05073f9ad7a2321b98b7b40b2a043301e1160a3656ad71a0ea72edf0f842edf40f8e9a2fdfa86d9392b669a8b4c576a51681cb60f026c048
7
- data.tar.gz: 8148337cad52a15fe7a70a3cfb2a21e1003a59727db228220ef65940e6828516016bf3d137517a44917ddc1fcceb64289068df6ebd47dfddc60fb84c12e877bc
6
+ metadata.gz: f3c218c0d55321c25a5b1679902c06cfa878ce5bc51ff09fbd60325554afbecf797c258920b7cf335f8edb9524f73368de8b6e78348d7c7144d9408f6e3acb0b
7
+ data.tar.gz: d22de6723053d9306598d6689834b6855b3b43247292405a40622d085447bb511f75b3c6a2f716f3cc00fa37e9c1c3cf54cf54a9bddaa0295cc8a9aa26c9097a
data/README.md CHANGED
@@ -4,7 +4,7 @@ The pgreset gem makes it possible to run rails db:reset against a postgres datab
4
4
 
5
5
  Credit for the [original solution](https://github.com/basecamp/pow/issues/212) goes to [Manuel Meurer](https://github.com/manuelmeurer).
6
6
 
7
- Special thanks to [Emil Kampp](https://github.com/ekampp) and [Michael Yin](https://github.com/layerssss) for adding Rails 6.1 support.
7
+ Special thanks to [Emil Kampp](https://github.com/ekampp), [Michael Yin](https://github.com/layerssss), and [Kate Donaldson](https://github.com/katelovescode) for adding Rails 6.1 support.
8
8
 
9
9
  ## Installation and Usage
10
10
 
@@ -6,10 +6,11 @@ module ActiveRecord
6
6
  def drop
7
7
  establish_master_connection
8
8
 
9
+ # `configuration_hash` was introduced in 6.1.0, prior versions have the database name in `configuration`.
9
10
  database_name =
10
- begin
11
- self.configuration_hash[:database] || self.configuration_hash.fetch('database')
12
- rescue NoMethodError
11
+ if respond_to?(:configuration_hash, true)
12
+ configuration_hash.with_indifferent_access.fetch(:database)
13
+ else
13
14
  configuration['database']
14
15
  end
15
16
 
@@ -1,3 +1,3 @@
1
1
  module Pgreset
2
- VERSION = "0.2"
2
+ VERSION = "0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgreset
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Falcone
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-07 00:00:00.000000000 Z
11
+ date: 2021-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler