restpack-core-client 0.1.18 → 0.1.19

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.
@@ -2,27 +2,28 @@ module RestPack
2
2
  module Core
3
3
  module Client
4
4
  class Cache
5
+ attr_accessor :configurations
6
+
5
7
  def initialize(api)
6
8
  @api = api
7
9
  @channel_ids = {}
8
10
  @channels = {}
9
11
  @configurations = api.root_configurations
10
12
  end
11
-
13
+
12
14
  def self.create(domain, access_key)
13
15
  api = RestPack::Core::Client::API.new(domain, access_key)
14
16
  Cache.new(api)
15
17
  end
16
-
18
+
17
19
  def get_channel(host)
18
20
  channel_id = get_channel_id(host)
19
21
  @channels[channel_id] ||= @api.get_channel(channel_id)
20
22
  end
21
-
23
+
22
24
  def get_channel_id(host)
23
25
  @channel_ids[host] ||= @api.get_domain(host)[:channel_id]
24
26
  end
25
-
26
27
  end
27
28
  end
28
29
  end
@@ -1,7 +1,7 @@
1
1
  module RestPack
2
2
  module Core
3
3
  module Client
4
- VERSION = "0.1.18"
4
+ VERSION = "0.1.19"
5
5
  end
6
6
  end
7
7
  end
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.18
4
+ version: 0.1.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: