Module: Gith::Init

Included in:
Gith
Defined in:
lib/gith/init.rb

Constant Summary collapse

DEPLOYS =
'C02ECF0LD'
GITH_TEST =
'C03T7EBJ3'
GITH_REPO =
'hired/gith'
HIRED_REPO =
'hired/hired'

Instance Method Summary collapse

Instance Method Details

#dev?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/gith/init.rb', line 18

def dev?
  ENV["GITH_ENV"] == 'dev'
end

#load_envObject



10
11
12
13
14
15
16
# File 'lib/gith/init.rb', line 10

def load_env
  Dotenv.load
  ENV["GITH_ENV"] ||= 'production'

  $repo    ||= dev? ? GITH_REPO : HIRED_REPO
  $channel ||= dev? ? GITH_TEST : DEPLOYS
end