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 +4 -4
- data/lib/viaduct/api.rb +5 -0
- data/lib/viaduct/api/client.rb +1 -1
- data/lib/viaduct/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd1088c8fe5bb15a57a33efb37506caef6e9f176
|
|
4
|
+
data.tar.gz: 44b43f55ea356749e71a99dc5faafeecf6c317b2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/viaduct/api/client.rb
CHANGED
|
@@ -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, :
|
|
32
|
+
MoonropeClient::Connection.new(Viaduct::API.host, :headers => headers, :port => Viaduct::API.port)
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
data/lib/viaduct/api/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2014-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: moonrope-client
|