Class: CommitLive::Endpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/commit-live/endpoint.rb

Constant Summary collapse

END_POINTS =
{
  "PROD" => 'https://api2.commit.live',
  "DEV" => 'http://api.greyatom.com', 
  "LOCAL" => 'http://api.greyatom.com'
}

Instance Method Summary collapse

Instance Method Details

#getObject



8
9
10
# File 'lib/commit-live/endpoint.rb', line 8

def get()
  return END_POINTS[getEnv()]
end

#getEnvObject



11
12
13
14
15
16
17
# File 'lib/commit-live/endpoint.rb', line 11

def getEnv()
  env = ENV["COMMIT_LIVE_ENV"]
  if !env.nil?
    return env
  end
  return "PROD"
end