darrrr 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/darrrr.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 724b524fe2080d91a5188fe250b9e18d9cef1655
|
4
|
+
data.tar.gz: f73ae47785bdb6e1a1899a97e6d9860873ac80ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fdf4cb08ed1c798713467e90de8c1a69fe308a6b343e96df90835981da8275d93d4f63bca30a53ac59bb24f065bc1f078ef448c2f00dec1e7253e5df91541e5
|
7
|
+
data.tar.gz: a7b49885e105feb036a28ae8a0d4bdba0617bd134510be8fe76ed9a32e643fa10e652ce2da5c12b1a1ba2b09f093219b7db842b3090df9527e8a31502f11ecdd
|
data/lib/darrrr.rb
CHANGED
@@ -69,7 +69,7 @@ module Darrrr
|
|
69
69
|
raise "No recovery providers configured"
|
70
70
|
end
|
71
71
|
|
72
|
-
if provider_origin == this_recovery_provider
|
72
|
+
if provider_origin == this_recovery_provider&.origin
|
73
73
|
this_recovery_provider
|
74
74
|
elsif self.recovery_providers.include?(provider_origin)
|
75
75
|
RecoveryProvider.new(provider_origin).load
|
@@ -94,7 +94,7 @@ module Darrrr
|
|
94
94
|
unless self.account_providers
|
95
95
|
raise "No account providers configured"
|
96
96
|
end
|
97
|
-
if provider_origin == this_account_provider
|
97
|
+
if provider_origin == this_account_provider&.origin
|
98
98
|
this_account_provider
|
99
99
|
elsif self.account_providers.include?(provider_origin)
|
100
100
|
AccountProvider.new(provider_origin).load
|
@@ -123,7 +123,7 @@ module Darrrr
|
|
123
123
|
|
124
124
|
# Returns a hash of all configuration values, recovery and account provider.
|
125
125
|
def account_and_recovery_provider_config
|
126
|
-
provider_data = Darrrr.this_account_provider
|
126
|
+
provider_data = Darrrr.this_account_provider&.to_h || {}
|
127
127
|
|
128
128
|
if Darrrr.this_recovery_provider
|
129
129
|
provider_data.merge!(recovery_provider_config) do |key, lhs, rhs|
|
@@ -140,12 +140,12 @@ module Darrrr
|
|
140
140
|
|
141
141
|
# returns the account provider information in hash form
|
142
142
|
def account_provider_config
|
143
|
-
this_account_provider
|
143
|
+
this_account_provider&.to_h
|
144
144
|
end
|
145
145
|
|
146
146
|
# returns the account provider information in hash form
|
147
147
|
def recovery_provider_config
|
148
|
-
this_recovery_provider
|
148
|
+
this_recovery_provider&.to_h
|
149
149
|
end
|
150
150
|
end
|
151
151
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: darrrr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil Matatall
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|