Class: PopulateEnv::Heroku::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/populate_env/heroku/options.rb

Constant Summary collapse

DEFAULTS =
{
  manifest_environment: 'production',
  manifest: 'app.json',
  destination: '.env',
  generate_secrets: true,
  secret_generator: SecureRandom.method(:hex),
  use_heroku_config: true,
  heroku_app: nil,
  heroku_remote: nil,
  skip_local_env: true,
  prompt_missing: true,
  export: false,
  output: $stdout,
  input: $stdin,
  local_env: ENV
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(**attrs) ⇒ Options

Returns a new instance of Options.



25
26
27
28
# File 'lib/populate_env/heroku/options.rb', line 25

def initialize(**attrs)
  attrs = DEFAULTS.merge(attrs)
  attrs.each { |attr, value| public_send("#{attr}=", value) }
end

Instance Method Details

#destination=(value) ⇒ Object



34
35
36
# File 'lib/populate_env/heroku/options.rb', line 34

def destination=(value)
  @destination = Pathname(value)
end

#manifest=(value) ⇒ Object



30
31
32
# File 'lib/populate_env/heroku/options.rb', line 30

def manifest=(value)
  @manifest = Pathname(value)
end

#manifest_environment=(value) ⇒ Object



38
39
40
# File 'lib/populate_env/heroku/options.rb', line 38

def manifest_environment=(value)
  @manifest_environment = value.to_sym
end