lib/stormglass.rb in stormglass-0.1.1 vs lib/stormglass.rb in stormglass-0.2.0
- old
+ new
@@ -85,10 +85,10 @@
# - if set in configuration block
# - if defined in Rails secrets
# - when passed directly to parameters
def self.api_key
key = Stormglass.settings.api_key
- key ||= Rails.application.secrets[:stormglass_api_key] if Gem.loaded_specs.has_key?('rails')
+ key ||= Rails.application.credentials[:stormglass_api_key] if Gem.loaded_specs.has_key?('rails')
key
end
def self.hours_offset(start_time, hours=12)
(start_time + (Rational(1,24) * hours))