lib/vault-tools/config.rb in vault-tools-1.0.1 vs lib/vault-tools/config.rb in vault-tools-2.0.0

- old
+ new

@@ -30,34 +30,16 @@ var_name = name.to_s.upcase default_name = name.to_s.downcase.to_sym ENV[var_name] || @@shared[var_name] || @@defaults[default_name] end - # Loads config from another app. - def self.load_shared!(app = nil) - heroku = Heroku::API.new - @@shared = heroku.get_config_vars(app).body - end - # Reset defaults and shared values def self.reset! @@defaults = {} @@shared = {} end - # An environment variable from another app. - # - # @param app [String] The name of the app to get the value from. - # @param name [String] The name of the environment variable to fetch a - # value for. - # @return [String] The value of an environment variable from another - # Heroku app or nil if no match is available. - def self.remote_env(app, name) - heroku = Heroku::API.new - heroku.get_config_vars(app).body[name] - end - # An environment variable. # # @param name [String] The name of the environment variable to fetch a # value for. # @return [String] The value of the environment variable or nil if no @@ -124,11 +106,11 @@ env("APP_DEPLOY") end # The port to listen on for web requests. # - # @return [Fixnum] The port to listen on for web requests. + # @return [Integer] The port to listen on for web requests. def self.port env!("PORT").to_i end # The database URL from the environment. @@ -146,16 +128,16 @@ # @return [Bool] True if SSL is enforced, otherwise false. def self.enable_ssl? !bool?('VAULT_TOOLS_DISABLE_SSL') end - # An environment variable converted to a Fixnum. + # An environment variable converted to a Integer. # # @param name [String] The name of the environment variable to fetch a - # Fixnum for. - # @return [Fixnum] The number or nil if the value couldn't be coerced to a - # Fixnum. + # Integer for. + # @return [Integer] The number or nil if the value couldn't be coerced to a + # Integer. def self.int(name) self[name] && self[name].to_i end # Comma-separated words converted to an array. @@ -192,10 +174,10 @@ self[name] && URI.parse(self[name]) end # The number of threads to use in Sidekiq workers. # - # @return [Fixnum] The number of threads from the `SIDEKIQ_CONCURRENCY` + # @return [Integer] The number of threads from the `SIDEKIQ_CONCURRENCY` # environment variable or 25 if no variable is defined. def self.sidekiq_concurrency int('SIDEKIQ_CONCURRENCY') || 25 end