restpack-core-client 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -24,6 +24,9 @@ module RestPack
|
|
24
24
|
p "API.get_domain(#{host})"
|
25
25
|
json = RestClient.get("http://:#{@access_key}@#{@domain}/api/v1/domains/search.json?host=#{host}")
|
26
26
|
result = JSON.parse(json, :symbolize_keys => true)
|
27
|
+
|
28
|
+
raise "host is not configured: #{host}" if result.empty?
|
29
|
+
|
27
30
|
result[:domains].first
|
28
31
|
end
|
29
32
|
|
@@ -14,12 +14,14 @@ module RestPack
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def get_channel(host)
|
17
|
+
p "get_channel(#{host})"
|
17
18
|
channel_id = get_channel_id(host)
|
18
|
-
|
19
|
+
p "channel_id = #{channel_id}"
|
19
20
|
@channels[channel_id] ||= @api.get_channel(channel_id)
|
20
21
|
end
|
21
22
|
|
22
23
|
def get_channel_id(host)
|
24
|
+
p "get_channel_id(#{host})"
|
23
25
|
@channel_ids[host] ||= @api.get_domain(host)[:channel_id]
|
24
26
|
end
|
25
27
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restpack-core-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|