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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4670f0fda3487b76490802caef76aa02c9ef037c552d4fab1e970871d07498f
4
- data.tar.gz: b8286fe8ba8130ad7512bc8bf2acb065409195ed326a72c9c0a4fb27b9e7cfb0
3
+ metadata.gz: '039ed91d42e5c536f75ff457b88fd8a51c177f7a169912e9e9002ae39e99abf4'
4
+ data.tar.gz: 17573f9525b75b93cf582f293241b6e6cd3e1580d148ab85793fa34c023fb5e9
5
5
  SHA512:
6
- metadata.gz: 191d5b1ee6963347a37a752bedda18bd293a04b7adc245c037b67e5ac6f08e629d36dbe5701c5bb13b6f5e180a2d7e6153b3913da730a2418fcd66d972eb866e
7
- data.tar.gz: 118a7ea43a3f35709383c24c1b5d372b92152fea8041894666fdeb8839c2b6c472b8ced28bb3b654bbbf9ecd2fa7b6367d37174acc1f434508070937880420c9
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
- - Allows optional params on #register_signup
6
- - Adds Reset feedback event
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
@@ -12,4 +12,5 @@ gem "rspec", "~> 3.0"
12
12
  group :test do
13
13
  gem "webmock"
14
14
  gem "timecop"
15
+ gem "pry"
15
16
  end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- incognia_api (0.3.1)
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
- multipart-post (2.2.3)
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
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "bundler/setup"
5
- require "incognia"
5
+ require "incognia_api"
6
6
 
7
7
  # You can add fixtures and/or initialization code here to make experimenting
8
8
  # with your gem easier. You can also use a different console, if you like.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "lib/incognia/version"
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-api-ruby"
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-api-ruby"
18
- spec.metadata["changelog_uri"] = "https://github.com/inloco/incognia-api-ruby/blob/master/"
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
- connection.send(method, endpoint, data, headers) do |r|
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,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Incognia
4
- VERSION = "0.3.1"
4
+ VERSION = "0.4.1"
5
5
  end
@@ -1,17 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "incognia/version"
4
- require_relative "incognia/client"
5
- require_relative "incognia/util"
6
- require_relative "incognia/address"
7
- require_relative "incognia/api"
8
-
9
- require_relative "incognia/resources/api_resource"
10
- require_relative "incognia/resources/signup_assessment"
11
- require_relative "incognia/resources/login_assessment"
12
- require_relative "incognia/resources/credentials"
13
-
14
- require_relative "incognia/constants/feedback_event"
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.3.1
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-01-24 00:00:00.000000000 Z
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
- - incognia.gemspec
62
- - lib/incognia.rb
63
- - lib/incognia/address.rb
64
- - lib/incognia/api.rb
65
- - lib/incognia/client.rb
66
- - lib/incognia/constants/feedback_event.rb
67
- - lib/incognia/resources/api_resource.rb
68
- - lib/incognia/resources/credentials.rb
69
- - lib/incognia/resources/login_assessment.rb
70
- - lib/incognia/resources/signup_assessment.rb
71
- - lib/incognia/util.rb
72
- - lib/incognia/version.rb
73
- homepage: https://github.com/inloco/incognia-api-ruby
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-api-ruby
77
- source_code_uri: https://github.com/inloco/incognia-api-ruby
78
- changelog_uri: https://github.com/inloco/incognia-api-ruby/blob/master/
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.4
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