viaduct-api 1.0.1 → 1.0.2

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: 3f8cd0bf76fcf8778b0c7e857a86c66b0ab2bc7b
4
- data.tar.gz: c9a80ff9cda9a469c9a588a35123c75fcc62820b
3
+ metadata.gz: fd1088c8fe5bb15a57a33efb37506caef6e9f176
4
+ data.tar.gz: 44b43f55ea356749e71a99dc5faafeecf6c317b2
5
5
  SHA512:
6
- metadata.gz: ae43e1fc71a58204303d79b92bb93ab553406ecf0afa46d2ef86f96f9cc6d583879f707fc6cb4845b9ce8b9e597863b94338d42cfbfb00106f8f4ccf94b2b7ad
7
- data.tar.gz: 686c1c0630dc383f9ceba22beccccbff7330d4ed43f30e6398420508dfc2ee0c1d66461c2c8cafca85791e02941d650e6e0c66aa6f1815a1a645a088d09b11ba
6
+ metadata.gz: c167eb3faba2ff66f7d9dbae3af5ecd1d2b9000cbaa39d137c13dc897902a71c0e02e037d46b8026742b79bcf729d1a19d70ee9c2818c71f7f9e7984528428f2
7
+ data.tar.gz: 28fff9aa2ebb821d0d29a5846c29ce2c4422ce9d2d0a519794b797eb06d0bab1965c0b9977d669b07151f0bac05211408939967bbec993886f75e0da8bb499a2
data/lib/viaduct/api.rb CHANGED
@@ -7,12 +7,17 @@ module Viaduct
7
7
 
8
8
  attr_accessor :application_token
9
9
  attr_accessor :host
10
+ attr_accessor :port
10
11
  attr_accessor :ssl
11
12
 
12
13
  def host
13
14
  @host || ENV['VIADUCT_API_HOST'] || 'api.viaduct.io'
14
15
  end
15
16
 
17
+ def port
18
+ @port || ENV['VIADUCT_API_PORT'] || (self.ssl? ? 443 : 80)
19
+ end
20
+
16
21
  def application_token
17
22
  @application_token || ENV['VIADUCT_API_APP']
18
23
  end
@@ -29,7 +29,7 @@ module Viaduct
29
29
  headers['X-Auth-Token'] = @token
30
30
  headers['X-Auth-Secret'] = @secret
31
31
  end
32
- MoonropeClient::Connection.new(Viaduct::API.host, :headers => headers, :ssl => Viaduct::API.ssl == false ? false : true)
32
+ MoonropeClient::Connection.new(Viaduct::API.host, :headers => headers, :port => Viaduct::API.port)
33
33
  end
34
34
  end
35
35
 
@@ -1,5 +1,5 @@
1
1
  module Viaduct
2
2
  module API
3
- VERSION = '1.0.1'
3
+ VERSION = '1.0.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viaduct-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-15 00:00:00.000000000 Z
11
+ date: 2014-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: moonrope-client