lucid_intercom 0.7.1 → 0.7.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
  SHA256:
3
- metadata.gz: 35d8670f0d2893e7a12ea625f14b0eb9d4cee566dc5462beb02fe4ac6b3802c6
4
- data.tar.gz: 1d95bf4ed8fdd9d19ea30716c3f7671241d940b52b2fe2d8ff8bd73264d77c16
3
+ metadata.gz: f8c5eb1dd6f4e9f542a89e09608df4dd41d6c6358a940021bc63f0d84715b11f
4
+ data.tar.gz: 1d38b1fa4f177e15a624628b79254f04c6502324c868d32fcd0e2e05ad9a14c1
5
5
  SHA512:
6
- metadata.gz: 25e21e7b0b4587b28ac8f698949e18f77dc09d9832785d27db98ea8d5930363a24a233ea15acbde72fceb1ee4123c41db6881691f47c7574086e913bc4d6b946
7
- data.tar.gz: 50df35c058be977a23e70a06d94eebfa32c7d4efd150b5a0eddc20b5c360edd15e5f7277f449f794e8dfd8597566fabe3915c55bb1e184023b1ee755464494a2
6
+ metadata.gz: eff0d85f08f25c14e8a7c2ab01079dbd9936d26baeb14e043c6b3a7b50f14d2d6853467577632c397503e181c9a953ad987f0e65b259811a1b74718902eda7b7
7
+ data.tar.gz: 4427213903f6731e814b0718f2692dfdcca4a6b0c95bfc27fdc0b6f5068fe0b785296eb784e8bebd08937a4f41b92d8d0856b73a210df81a48536af9bebe4656
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'dry/container'
4
+ require 'http'
4
5
 
5
6
  require 'lucid_intercom'
6
7
 
@@ -9,6 +10,7 @@ module LucidIntercom
9
10
 
10
11
  # Services only (dependencies); no value objects, entities.
11
12
  Container.register(:convert) { Convert.new }
13
+ Container.register(:http) { HTTP::Client.new }
12
14
  Container.register(:notify_changed_plan) { NotifyChangedPlan.new }
13
15
  Container.register(:notify_installed) { NotifyInstalled.new }
14
16
  Container.register(:notify_uninstalled) { NotifyUninstalled.new }
@@ -1,11 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'http'
4
-
5
3
  require 'lucid_intercom'
6
4
 
7
5
  module LucidIntercom
8
6
  class PostRequest
7
+ #
8
+ # @param http [HTTP::Client, #headers#post]
9
+ #
10
+ def initialize(http: Container[:http])
11
+ @http = http
12
+ end
13
+
9
14
  #
10
15
  # @param path [String] path relative to the domain
11
16
  # @param data [Hash]
@@ -13,7 +18,7 @@ module LucidIntercom
13
18
  # @return [Response]
14
19
  #
15
20
  def call(path, data)
16
- res = HTTP.headers(
21
+ res = @http.headers(
17
22
  'Authorization' => "Bearer #{LucidIntercom.access_token}",
18
23
  'Accept' => 'application/json',
19
24
  'Content-Type' => 'application/json'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucidIntercom
4
- VERSION = '0.7.1'
4
+ VERSION = '0.7.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucid_intercom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelsey Judson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-06 00:00:00.000000000 Z
11
+ date: 2018-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake