incognia_api 0.3.1 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -2
- data/Gemfile +1 -0
- data/Gemfile.lock +8 -2
- data/README.md +1 -1
- data/bin/console +1 -1
- data/{incognia.gemspec → incognia_api.gemspec} +4 -4
- data/lib/{incognia → incognia_api}/client.rb +5 -3
- data/lib/{incognia → incognia_api}/version.rb +1 -1
- data/lib/{incognia.rb → incognia_api.rb} +12 -12
- metadata +22 -22
- /data/lib/{incognia → incognia_api}/address.rb +0 -0
- /data/lib/{incognia → incognia_api}/api.rb +0 -0
- /data/lib/{incognia → incognia_api}/constants/feedback_event.rb +0 -0
- /data/lib/{incognia → incognia_api}/resources/api_resource.rb +0 -0
- /data/lib/{incognia → incognia_api}/resources/credentials.rb +0 -0
- /data/lib/{incognia → incognia_api}/resources/login_assessment.rb +0 -0
- /data/lib/{incognia → incognia_api}/resources/signup_assessment.rb +0 -0
- /data/lib/{incognia → incognia_api}/util.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '039ed91d42e5c536f75ff457b88fd8a51c177f7a169912e9e9002ae39e99abf4'
|
4
|
+
data.tar.gz: 17573f9525b75b93cf582f293241b6e6cd3e1580d148ab85793fa34c023fb5e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16f5c0cfb0ab39808287aa91a408fe78e01fc0009c0b7ebb64acd716f389832bf8457d3d7f52d0a7f29a29bee69141bf11a607194de42318e9d9285d3cd3964d
|
7
|
+
data.tar.gz: 1ba8b8cbc6c6f35c05c72b29d96ced59bbe0cfb83b9e9e8d86ad21ae155140753dd8cac79187a352078932702c07de5bba5011cc518b2b00965170bb92a9de62
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.4.0] - 2023-04-14
|
4
|
+
|
5
|
+
- Rename main filename to match the gem name
|
6
|
+
|
3
7
|
## [0.3.1] - 2023-01-24
|
4
8
|
|
5
|
-
-
|
6
|
-
-
|
9
|
+
- Allow optional params on #register_signup
|
10
|
+
- Add Reset feedback event
|
7
11
|
|
8
12
|
## [0.3.0] - 2022-05-06
|
9
13
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
incognia_api (0.
|
4
|
+
incognia_api (0.4.1)
|
5
5
|
faraday
|
6
6
|
faraday_middleware
|
7
7
|
|
@@ -10,6 +10,7 @@ GEM
|
|
10
10
|
specs:
|
11
11
|
addressable (2.8.0)
|
12
12
|
public_suffix (>= 2.0.2, < 5.0)
|
13
|
+
coderay (1.1.3)
|
13
14
|
crack (0.4.5)
|
14
15
|
rexml
|
15
16
|
diff-lcs (1.4.4)
|
@@ -39,7 +40,11 @@ GEM
|
|
39
40
|
faraday_middleware (1.2.0)
|
40
41
|
faraday (~> 1.0)
|
41
42
|
hashdiff (1.0.1)
|
42
|
-
|
43
|
+
method_source (1.0.0)
|
44
|
+
multipart-post (2.3.0)
|
45
|
+
pry (0.14.2)
|
46
|
+
coderay (~> 1.1)
|
47
|
+
method_source (~> 1.0)
|
43
48
|
public_suffix (4.0.6)
|
44
49
|
rake (13.0.3)
|
45
50
|
rexml (3.2.5)
|
@@ -69,6 +74,7 @@ PLATFORMS
|
|
69
74
|
|
70
75
|
DEPENDENCIES
|
71
76
|
incognia_api!
|
77
|
+
pry
|
72
78
|
rake (~> 13.0)
|
73
79
|
rspec (~> 3.0)
|
74
80
|
timecop
|
data/README.md
CHANGED
@@ -148,7 +148,7 @@ For custom fraud, set the value of `event` with the corresponding code:
|
|
148
148
|
|
149
149
|
```ruby
|
150
150
|
success = api.register_feedback(
|
151
|
-
event: 'custom_fraud_name'
|
151
|
+
event: 'custom_fraud_name',
|
152
152
|
timestamp: timestamp,
|
153
153
|
account_id: account_id,
|
154
154
|
installation_id: installation_id
|
data/bin/console
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "lib/
|
3
|
+
require_relative "lib/incognia_api/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "incognia_api"
|
@@ -10,12 +10,12 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
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
|
-
spec.homepage = "https://github.com/inloco/incognia-
|
13
|
+
spec.homepage = "https://github.com/inloco/incognia-ruby"
|
14
14
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
15
15
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
-
spec.metadata["source_code_uri"] = "https://github.com/inloco/incognia-
|
18
|
-
spec.metadata["changelog_uri"] = "https://github.com/inloco/incognia-
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/inloco/incognia-ruby"
|
18
|
+
spec.metadata["changelog_uri"] = "https://github.com/inloco/incognia-ruby/blob/master/"
|
19
19
|
|
20
20
|
# Specify which files should be added to the gem when it is released.
|
21
21
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -15,16 +15,18 @@ module Incognia
|
|
15
15
|
@host = host
|
16
16
|
|
17
17
|
@connection = Faraday.new(host) do |faraday|
|
18
|
-
faraday.adapter Faraday.default_adapter
|
19
18
|
faraday.request :json
|
20
19
|
faraday.response :json, content_type: /\bjson$/
|
21
|
-
# faraday.response :logger, nil, { headers: true, bodies: true }
|
22
20
|
faraday.response :raise_error
|
21
|
+
|
22
|
+
faraday.adapter Faraday.default_adapter
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
26
|
def request(method, endpoint = nil, data = nil, headers = {})
|
27
|
-
|
27
|
+
json_data = JSON.generate(data) if data
|
28
|
+
|
29
|
+
connection.send(method, endpoint, json_data, headers) do |r|
|
28
30
|
r.headers[Faraday::Request::Authorization::KEY] ||= Faraday::Request
|
29
31
|
.lookup_middleware(:authorization)
|
30
32
|
.header(:Bearer, credentials.access_token)
|
@@ -1,17 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "
|
4
|
-
require_relative "
|
5
|
-
require_relative "
|
6
|
-
require_relative "
|
7
|
-
require_relative "
|
8
|
-
|
9
|
-
require_relative "
|
10
|
-
require_relative "
|
11
|
-
require_relative "
|
12
|
-
require_relative "
|
13
|
-
|
14
|
-
require_relative "
|
3
|
+
require_relative "incognia_api/version"
|
4
|
+
require_relative "incognia_api/client"
|
5
|
+
require_relative "incognia_api/util"
|
6
|
+
require_relative "incognia_api/address"
|
7
|
+
require_relative "incognia_api/api"
|
8
|
+
|
9
|
+
require_relative "incognia_api/resources/api_resource"
|
10
|
+
require_relative "incognia_api/resources/signup_assessment"
|
11
|
+
require_relative "incognia_api/resources/login_assessment"
|
12
|
+
require_relative "incognia_api/resources/credentials"
|
13
|
+
|
14
|
+
require_relative "incognia_api/constants/feedback_event"
|
15
15
|
|
16
16
|
module Incognia
|
17
17
|
class APIError < StandardError
|
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: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Cavalcanti
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -58,25 +58,25 @@ files:
|
|
58
58
|
- bin/console
|
59
59
|
- bin/setup
|
60
60
|
- fixtures/vcr_cassettes/token.yml
|
61
|
-
-
|
62
|
-
- lib/
|
63
|
-
- lib/
|
64
|
-
- lib/
|
65
|
-
- lib/
|
66
|
-
- lib/
|
67
|
-
- lib/
|
68
|
-
- lib/
|
69
|
-
- lib/
|
70
|
-
- lib/
|
71
|
-
- lib/
|
72
|
-
- lib/
|
73
|
-
homepage: https://github.com/inloco/incognia-
|
61
|
+
- incognia_api.gemspec
|
62
|
+
- lib/incognia_api.rb
|
63
|
+
- lib/incognia_api/address.rb
|
64
|
+
- lib/incognia_api/api.rb
|
65
|
+
- lib/incognia_api/client.rb
|
66
|
+
- lib/incognia_api/constants/feedback_event.rb
|
67
|
+
- lib/incognia_api/resources/api_resource.rb
|
68
|
+
- lib/incognia_api/resources/credentials.rb
|
69
|
+
- lib/incognia_api/resources/login_assessment.rb
|
70
|
+
- lib/incognia_api/resources/signup_assessment.rb
|
71
|
+
- lib/incognia_api/util.rb
|
72
|
+
- lib/incognia_api/version.rb
|
73
|
+
homepage: https://github.com/inloco/incognia-ruby
|
74
74
|
licenses: []
|
75
75
|
metadata:
|
76
|
-
homepage_uri: https://github.com/inloco/incognia-
|
77
|
-
source_code_uri: https://github.com/inloco/incognia-
|
78
|
-
changelog_uri: https://github.com/inloco/incognia-
|
79
|
-
post_install_message:
|
76
|
+
homepage_uri: https://github.com/inloco/incognia-ruby
|
77
|
+
source_code_uri: https://github.com/inloco/incognia-ruby
|
78
|
+
changelog_uri: https://github.com/inloco/incognia-ruby/blob/master/
|
79
|
+
post_install_message:
|
80
80
|
rdoc_options: []
|
81
81
|
require_paths:
|
82
82
|
- lib
|
@@ -91,8 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
|
-
rubygems_version: 3.1.
|
95
|
-
signing_key:
|
94
|
+
rubygems_version: 3.1.6
|
95
|
+
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Official Ruby lib for communicating with Incognia API
|
98
98
|
test_files: []
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|