lucid_intercom 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lucid_intercom/container.rb +2 -0
- data/lib/lucid_intercom/post_request.rb +8 -3
- data/lib/lucid_intercom/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8c5eb1dd6f4e9f542a89e09608df4dd41d6c6358a940021bc63f0d84715b11f
|
4
|
+
data.tar.gz: 1d38b1fa4f177e15a624628b79254f04c6502324c868d32fcd0e2e05ad9a14c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
21
|
+
res = @http.headers(
|
17
22
|
'Authorization' => "Bearer #{LucidIntercom.access_token}",
|
18
23
|
'Accept' => 'application/json',
|
19
24
|
'Content-Type' => 'application/json'
|
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.
|
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-
|
11
|
+
date: 2018-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|