darrrr 0.1.0 → 0.1.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/darrrr.rb +5 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29975ab5312f2fef2ceceac4fe40abe1f011ca64
4
- data.tar.gz: 30001607c84a89388bf5b19690cd092638e895a7
3
+ metadata.gz: 724b524fe2080d91a5188fe250b9e18d9cef1655
4
+ data.tar.gz: f73ae47785bdb6e1a1899a97e6d9860873ac80ea
5
5
  SHA512:
6
- metadata.gz: 84d5112ca262d1575d46faf457227e0e5aa1532799f746af80be60721aee888ae31d52b5dd19618a3ac525129211145901444491f2a73b76b71e27387aaf4878
7
- data.tar.gz: 5acf83a5071edcf20085dcda3c87732ae72e5caffea20c82e577577895a3186ee7d9ed4ab5636c324c42477b893424f030a5db119cc6a71bdf1486a5368b9747
6
+ metadata.gz: 8fdf4cb08ed1c798713467e90de8c1a69fe308a6b343e96df90835981da8275d93d4f63bca30a53ac59bb24f065bc1f078ef448c2f00dec1e7253e5df91541e5
7
+ data.tar.gz: a7b49885e105feb036a28ae8a0d4bdba0617bd134510be8fe76ed9a32e643fa10e652ce2da5c12b1a1ba2b09f093219b7db842b3090df9527e8a31502f11ecdd
@@ -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.origin
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.origin
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.try(:to_h) || {}
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.to_h
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.to_h
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.0
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-19 00:00:00.000000000 Z
11
+ date: 2017-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake