class Jumpup::Deis::Configuration

Attributes

app[RW]
host[RW]
production_app[RW]
run_database_tasks[RW]
staging_app[RW]

Public Class Methods

new() click to toggle source
# File lib/jumpup/deis/configuration.rb, line 17
def initialize
  @run_database_tasks ||= true
end

Public Instance Methods

deploy_branch() click to toggle source
# File lib/jumpup/deis/configuration.rb, line 27
def deploy_branch
  'master'
end
deploy_to_production_branch() click to toggle source
# File lib/jumpup/deis/configuration.rb, line 31
def deploy_to_production_branch
  return 'production' if production_app
  'master'
end
valid?() click to toggle source
# File lib/jumpup/deis/configuration.rb, line 21
def valid?
  host_is_set? &&
    boolean_run_database_tasks? &&
    (only_app? || only_production_and_staging_apps?)
end

Private Instance Methods

boolean_run_database_tasks?() click to toggle source
# File lib/jumpup/deis/configuration.rb, line 50
def boolean_run_database_tasks?
  run_database_tasks.is_a?(TrueClass) || run_database_tasks.is_a?(FalseClass)
end
host_is_set?() click to toggle source
# File lib/jumpup/deis/configuration.rb, line 38
def host_is_set?
  not host.nil?
end
only_app?() click to toggle source
# File lib/jumpup/deis/configuration.rb, line 42
def only_app?
  app && staging_app.nil? && production_app.nil?
end
only_production_and_staging_apps?() click to toggle source
# File lib/jumpup/deis/configuration.rb, line 46
def only_production_and_staging_apps?
  staging_app && production_app && app.nil?
end