incognia_api 2.2.0 → 3.0.0
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/CHANGELOG.md +4 -0
- data/Gemfile.lock +13 -30
- data/fixtures/vcr_cassettes/token.yml +2 -2
- data/incognia_api.gemspec +2 -3
- data/lib/incognia_api/api.rb +0 -1
- data/lib/incognia_api/client.rb +3 -6
- data/lib/incognia_api/version.rb +1 -1
- metadata +5 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 823c5ab4bca2a8fd1d856482906971073d95a1f55e378c6d812da69d205f689e
|
4
|
+
data.tar.gz: 26e4f368b891e14cab04a69b1de02342bf48e2b5f0eea474a1947bf5103fd773
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e34fe28af027501b6e4f907d4c9973c930fc86b2ce3ae565fce72979c3a55098a0c3700b91f62d00d7c8ab2d350440e89caf11b0a716c053d6e5f7f89ca2731
|
7
|
+
data.tar.gz: 07ece7a29b0fe8dcb88b1e7df6817d83ab13c42c751bdcb83877912df9f4c94c54d401368c549e0f4cce3e28ffcdfb19a28df5abb27823d9f012ecd6a0f8ec2b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
incognia_api (
|
5
|
-
faraday (~>
|
6
|
-
faraday_middleware (~> 1.2)
|
4
|
+
incognia_api (3.0.0)
|
5
|
+
faraday (~> 2.13)
|
7
6
|
|
8
7
|
GEM
|
9
8
|
remote: https://rubygems.org/
|
@@ -14,34 +13,18 @@ GEM
|
|
14
13
|
crack (0.4.5)
|
15
14
|
rexml
|
16
15
|
diff-lcs (1.4.4)
|
17
|
-
faraday (
|
18
|
-
faraday-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
faraday-net_http (~> 1.0)
|
24
|
-
faraday-net_http_persistent (~> 1.0)
|
25
|
-
faraday-patron (~> 1.0)
|
26
|
-
faraday-rack (~> 1.0)
|
27
|
-
faraday-retry (~> 1.0)
|
28
|
-
ruby2_keywords (>= 0.0.4)
|
29
|
-
faraday-em_http (1.0.0)
|
30
|
-
faraday-em_synchrony (1.0.0)
|
31
|
-
faraday-excon (1.1.0)
|
32
|
-
faraday-httpclient (1.0.1)
|
33
|
-
faraday-multipart (1.0.4)
|
34
|
-
multipart-post (~> 2)
|
35
|
-
faraday-net_http (1.0.1)
|
36
|
-
faraday-net_http_persistent (1.2.0)
|
37
|
-
faraday-patron (1.0.0)
|
38
|
-
faraday-rack (1.0.0)
|
39
|
-
faraday-retry (1.0.3)
|
40
|
-
faraday_middleware (1.2.0)
|
41
|
-
faraday (~> 1.0)
|
16
|
+
faraday (2.13.4)
|
17
|
+
faraday-net_http (>= 2.0, < 3.5)
|
18
|
+
json
|
19
|
+
logger
|
20
|
+
faraday-net_http (3.4.1)
|
21
|
+
net-http (>= 0.5.0)
|
42
22
|
hashdiff (1.0.1)
|
23
|
+
json (2.14.0)
|
24
|
+
logger (1.7.0)
|
43
25
|
method_source (1.0.0)
|
44
|
-
|
26
|
+
net-http (0.6.0)
|
27
|
+
uri
|
45
28
|
pry (0.14.2)
|
46
29
|
coderay (~> 1.1)
|
47
30
|
method_source (~> 1.0)
|
@@ -61,8 +44,8 @@ GEM
|
|
61
44
|
diff-lcs (>= 1.2.0, < 2.0)
|
62
45
|
rspec-support (~> 3.10.0)
|
63
46
|
rspec-support (3.10.2)
|
64
|
-
ruby2_keywords (0.0.5)
|
65
47
|
timecop (0.9.4)
|
48
|
+
uri (1.0.3)
|
66
49
|
webmock (3.14.0)
|
67
50
|
addressable (>= 2.8.0)
|
68
51
|
crack (>= 0.3.2)
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday
|
11
|
+
- Faraday v2.13.4
|
12
12
|
Authorization:
|
13
13
|
- Basic R1BXSzFMQ1paSW8xRkxPQ0NuTExNcU44UWkxSHYzazQ6RUxHOV8yazU5T0hkMUdiVXhIaGRTdGtqZUI3TXlQZ21vRjhlR2YxM0xBMU1scmZRZ1Q1bkhFMmFIaVNobVc0WA==
|
14
14
|
Content-Type:
|
@@ -58,7 +58,7 @@ http_interactions:
|
|
58
58
|
string: '{"installation_id":"xyz"}'
|
59
59
|
headers:
|
60
60
|
User-Agent:
|
61
|
-
- Faraday
|
61
|
+
- Faraday v2.13.4
|
62
62
|
Authorization:
|
63
63
|
- Bearer access_token
|
64
64
|
Content-Type:
|
data/incognia_api.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.summary = "Official Ruby lib for communicating with Incognia API"
|
12
12
|
spec.description = "Official Ruby lib for communicating with Incognia API"
|
13
13
|
spec.homepage = "https://github.com/inloco/incognia-ruby"
|
14
|
-
spec.required_ruby_version = Gem::Requirement.new(">=
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
|
15
15
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
17
17
|
spec.metadata["source_code_uri"] = "https://github.com/inloco/incognia-ruby"
|
@@ -28,8 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
|
29
29
|
# Uncomment to register a new dependency of your gem
|
30
30
|
# spec.add_dependency "example-gem", "~> 1.0"
|
31
|
-
spec.add_dependency('faraday', '~>
|
32
|
-
spec.add_dependency('faraday_middleware', '~> 1.2')
|
31
|
+
spec.add_dependency('faraday', '~> 2.13')
|
33
32
|
|
34
33
|
# For more information and examples about making a new gem, checkout our
|
35
34
|
# guide at: https://bundler.io/guides/creating_gem.html
|
data/lib/incognia_api/api.rb
CHANGED
data/lib/incognia_api/client.rb
CHANGED
@@ -14,9 +14,7 @@ module Incognia
|
|
14
14
|
json_data = JSON.generate(data) if data
|
15
15
|
|
16
16
|
connection.send(method, endpoint, json_data, headers) do |r|
|
17
|
-
r.headers[Faraday::Request::Authorization::KEY] ||=
|
18
|
-
.lookup_middleware(:authorization)
|
19
|
-
.header(:Bearer, credentials.access_token)
|
17
|
+
r.headers[Faraday::Request::Authorization::KEY] ||= "Bearer #{credentials.access_token}"
|
20
18
|
end
|
21
19
|
rescue Faraday::ClientError, Faraday::ServerError => e
|
22
20
|
raise APIError.new(e.to_s, e.response)
|
@@ -50,9 +48,8 @@ module Incognia
|
|
50
48
|
protected
|
51
49
|
|
52
50
|
def request_credentials
|
53
|
-
basic_auth = Faraday::
|
54
|
-
.
|
55
|
-
.header(Incognia.config.client_id, Incognia.config.client_secret)
|
51
|
+
basic_auth = Faraday::Utils
|
52
|
+
.basic_header_from(Incognia.config.client_id, Incognia.config.client_secret)
|
56
53
|
|
57
54
|
response = connection.send(:post, 'v2/token') do |r|
|
58
55
|
r.headers[Faraday::Request::Authorization::KEY] = basic_auth
|
data/lib/incognia_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: incognia_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Cavalcanti
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,28 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.13'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: faraday_middleware
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.2'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.2'
|
26
|
+
version: '2.13'
|
41
27
|
description: Official Ruby lib for communicating with Incognia API
|
42
28
|
email:
|
43
29
|
- guiocavalcanti@gmail.com
|
@@ -88,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
74
|
requirements:
|
89
75
|
- - ">="
|
90
76
|
- !ruby/object:Gem::Version
|
91
|
-
version:
|
77
|
+
version: 3.0.0
|
92
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
80
|
- - ">="
|