File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -23,15 +23,19 @@ def self.call(options = {})
2323 end
2424
2525 def self . validate_auth_config
26- raise Uploadcare ::Exception ::AuthError , 'Public Key is blank.' if is_blank? ( Uploadcare . config . public_key )
27- raise Uploadcare ::Exception ::AuthError , 'Secret Key is blank.' if is_blank? ( Uploadcare . config . secret_key )
26+ if empty_config_for? ( Uploadcare . config . public_key )
27+ raise Uploadcare ::Exception ::AuthError ,
28+ 'Public Key is blank.'
29+ end
30+ return unless empty_config_for? ( Uploadcare . config . secret_key )
31+
32+ raise Uploadcare ::Exception ::AuthError ,
33+ 'Secret Key is blank.'
2834 end
2935
30- # rubocop:disable Naming/PredicateName
31- def self . is_blank? ( value )
36+ def self . empty_config_for? ( value )
3237 value . nil? || value . empty?
3338 end
34- # rubocop:enable Naming/PredicateName
3539 end
3640 end
3741end
You can’t perform that action at this time.
0 commit comments