commit-live-cli 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76f8617f84423b4c64126be14e2aeca1e124e930
4
- data.tar.gz: 8c4b4949aad04cbdd8724cc1e55a7147ff2347b1
3
+ metadata.gz: '094ef290ddb865c1bdd5942e432031ed897ac209'
4
+ data.tar.gz: fe88388cf5c7f52b32312ca14a59df59b1d76083
5
5
  SHA512:
6
- metadata.gz: c943c8eae4980504dd4eb4716ee19cc0ad7927a5316a9ae7d74967ccc01a89bfdc35bf5b580593584a3bb58f9e8128d47053a5faae33f92459ffcd941718d9ff
7
- data.tar.gz: 511257c92df794e97893ee0aa04e95090189709dffca74a6565384b82acc96ee5291ff18fa33ced003aa89f41c7b7245fd09525fcf943d51d9b84dc289169ab9
6
+ metadata.gz: 36aea0f118082903a2d2b6f0988eb11d75049a9c3607a49531826193c7afe3ca1e8a229957f5c0730bfdfbe5d78ad2c023c8da6f1b3618e34733380725f0880a
7
+ data.tar.gz: 5ef0995d1f99091139dfaa950d5821139bfc27102ce04a02a1a98580212edb2356be6af316638da8c402ae4d15b517b9ef5e43d55537aa9b7905ed03f04410a6
@@ -1,14 +1,13 @@
1
1
  require "faraday"
2
+ require "commit-live/endpoint"
2
3
 
3
4
  module CommitLive
4
5
  class API
5
6
  attr_reader :conn
6
7
 
7
- URL = 'http://api.greyatom.com'
8
- API_ROOT = '/api/v1'
9
-
10
8
  def initialize()
11
- @conn = Faraday.new(url: URL) do |faraday|
9
+ endpoint = CommitLive::Endpoint.new.get()
10
+ @conn = Faraday.new(url: endpoint) do |faraday|
12
11
  faraday.adapter Faraday.default_adapter
13
12
  end
14
13
  end
@@ -0,0 +1,19 @@
1
+ module CommitLive
2
+ class Endpoint
3
+ END_POINTS = {
4
+ "PROD" => 'https://api.commit.live',
5
+ "DEV" => 'http://api.greyatom.com',
6
+ "LOCAL" => 'http://api.greyatom.com'
7
+ }
8
+ def get()
9
+ return END_POINTS[getEnv()]
10
+ end
11
+ def getEnv()
12
+ env = ENV["COMMIT_LIVE_ENV"]
13
+ if !env.nil?
14
+ return env
15
+ end
16
+ return "PROD"
17
+ end
18
+ end
19
+ end
@@ -1,5 +1,5 @@
1
1
  module CommitLive
2
2
  module Cli
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commit-live-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - greyatom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-07 00:00:00.000000000 Z
11
+ date: 2017-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -173,6 +173,7 @@ files:
173
173
  - lib/commit-live.rb
174
174
  - lib/commit-live/api.rb
175
175
  - lib/commit-live/cli.rb
176
+ - lib/commit-live/endpoint.rb
176
177
  - lib/commit-live/github.rb
177
178
  - lib/commit-live/lesson/current.rb
178
179
  - lib/commit-live/lesson/git-helper.rb