fractal_api 0.1.5 → 0.1.6

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: f781155e5457786b5cf172c0c1fd926254844c371c8e939ea7709c3cb0765448
4
- data.tar.gz: d79fa1c0a523af63f9b33093407e2ceb45beaa678b2838a3d8deeb4986b423db
3
+ metadata.gz: f19bb727916a63c40d8e65f0071e8e11e62339ad3bffb0e491e63029c41d644c
4
+ data.tar.gz: 8e5ba76f447e53d6ec54cfec83ad648c17bbcd22be458ea4d75e036c24e3ad2e
5
5
  SHA512:
6
- metadata.gz: 001da6b43019dc64e7f28a8bf86c6ebe10c8637a4e9fe2ca5a91641c0db9e747cc6569eddcbf94eb3c1b60ab8430d6a5ec890692ba06091303133e13cbacb7fb
7
- data.tar.gz: bf4706fa8fe13df32d990a947d7349830213bcaa7b6a0ed0afeac2af79177cbd51afd2588186c7a569b7df54499ac3a077df46d8e39a38a0ad2db1ed29ede4ca
6
+ metadata.gz: 804fbd053e0f1feb3eef21fddddf6f48a4c545c652205834c4292f722e99055a81dc7e4eac3fac2c50db5640f461da257e56c63299c3134eddf52d9b47538cfd
7
+ data.tar.gz: d775aa277bbd3d98024757c41a3d9ae765002cb6b0c101485f95f135f8ccfbc101df4ae6abb095ecb19c79642e1e2bedfc3445bfd012d926121c2177a5c741cc
data/Gemfile CHANGED
@@ -6,3 +6,11 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
7
  # Specify your gem's dependencies in fractal_api.gemspec
8
8
  gemspec
9
+
10
+ # Development dependencies
11
+ gem 'dotenv'
12
+ gem 'pry'
13
+ gem 'rake'
14
+ gem 'rspec'
15
+ gem 'vcr'
16
+ gem 'webmock'
data/Gemfile.lock CHANGED
@@ -1,10 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fractal_api (0.1.5)
4
+ fractal_api (0.1.6)
5
5
  faraday
6
- faraday_middleware
7
- faraday_middleware-multi_json
8
6
  multi_json
9
7
 
10
8
  GEM
@@ -17,38 +15,13 @@ GEM
17
15
  rexml
18
16
  diff-lcs (1.4.4)
19
17
  dotenv (2.7.6)
20
- faraday (1.10.0)
21
- faraday-em_http (~> 1.0)
22
- faraday-em_synchrony (~> 1.0)
23
- faraday-excon (~> 1.1)
24
- faraday-httpclient (~> 1.0)
25
- faraday-multipart (~> 1.0)
26
- faraday-net_http (~> 1.0)
27
- faraday-net_http_persistent (~> 1.0)
28
- faraday-patron (~> 1.0)
29
- faraday-rack (~> 1.0)
30
- faraday-retry (~> 1.0)
18
+ faraday (2.7.4)
19
+ faraday-net_http (>= 2.0, < 3.1)
31
20
  ruby2_keywords (>= 0.0.4)
32
- faraday-em_http (1.0.0)
33
- faraday-em_synchrony (1.0.0)
34
- faraday-excon (1.1.0)
35
- faraday-httpclient (1.0.1)
36
- faraday-multipart (1.0.4)
37
- multipart-post (~> 2)
38
- faraday-net_http (1.0.1)
39
- faraday-net_http_persistent (1.2.0)
40
- faraday-patron (1.0.0)
41
- faraday-rack (1.0.0)
42
- faraday-retry (1.0.3)
43
- faraday_middleware (1.2.0)
44
- faraday (~> 1.0)
45
- faraday_middleware-multi_json (0.0.6)
46
- faraday_middleware
47
- multi_json
21
+ faraday-net_http (3.0.2)
48
22
  hashdiff (1.0.1)
49
23
  method_source (1.0.0)
50
24
  multi_json (1.15.0)
51
- multipart-post (2.2.3)
52
25
  pry (0.13.1)
53
26
  coderay (~> 1.1)
54
27
  method_source (~> 1.0)
@@ -81,7 +54,6 @@ PLATFORMS
81
54
  x86_64-linux
82
55
 
83
56
  DEPENDENCIES
84
- bundler (~> 2.2)
85
57
  dotenv
86
58
  fractal_api!
87
59
  pry
data/fractal_api.gemspec CHANGED
@@ -26,14 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.required_ruby_version = '> 2.0'
27
27
 
28
28
  spec.add_dependency 'faraday'
29
- spec.add_dependency 'faraday_middleware'
30
- spec.add_dependency 'faraday_middleware-multi_json'
31
29
  spec.add_dependency 'multi_json'
32
- spec.add_development_dependency 'bundler', '~> 2.2'
33
- spec.add_development_dependency 'dotenv'
34
- spec.add_development_dependency 'pry'
35
- spec.add_development_dependency 'rake'
36
- spec.add_development_dependency 'rspec'
37
- spec.add_development_dependency 'vcr'
38
- spec.add_development_dependency 'webmock'
39
30
  end
@@ -36,7 +36,7 @@ module FractalApi
36
36
  content_type: 'application/json',
37
37
  user_agent: "finpoint/#{FractalApi::VERSION}"
38
38
  )
39
- conn.response :multi_json, symbolize_keys: true
39
+ conn.response :json, parser_options: { symbolize_names: true }
40
40
  conn.response :logger if FractalApi.configuration.debug
41
41
  conn.adapter Faraday.default_adapter
42
42
  end
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'faraday'
4
- require 'faraday_middleware/multi_json'
4
+ require 'multi_json'
5
+
5
6
  require 'fractal_api/configuration'
6
7
  require 'fractal_api/faraday_auth'
7
8
 
@@ -34,7 +35,7 @@ module FractalApi
34
35
  conn.request :fractal_api_auth,
35
36
  FractalApi.configuration.api_key,
36
37
  FractalApi.configuration.partner_id
37
- conn.response :multi_json, symbolize_keys: true
38
+ conn.response :json, parser_options: { symbolize_names: true }
38
39
  conn.response :logger if FractalApi.configuration.debug
39
40
  conn.adapter Faraday.default_adapter
40
41
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'time'
4
4
  require 'base64'
5
- require 'json'
5
+ require 'multi_json'
6
6
  require 'fractal_api/base_model'
7
7
 
8
8
  module FractalApi
@@ -24,14 +24,14 @@ module FractalApi
24
24
  end
25
25
 
26
26
  def self.build_from_state(state)
27
- decoded = JSON.parse(Base64.decode64(state), symbolize_names: true)
27
+ decoded = MultiJson.load(Base64.decode64(state), symbolize_names: true)
28
28
 
29
29
  new(
30
30
  consent_id: decoded[:accReq],
31
31
  company_id: decoded[:cId],
32
32
  bank_id: decoded[:bId]
33
33
  )
34
- rescue JSON::ParserError
34
+ rescue MultiJson::ParseError
35
35
  nil
36
36
  end
37
37
 
@@ -47,7 +47,7 @@ module FractalApi
47
47
  headers: { 'X-Company-Id' => company_id }
48
48
  )
49
49
 
50
- result.body
50
+ result.body || ''
51
51
  end
52
52
  end
53
53
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FractalApi
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fractal_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Finpoint
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-19 00:00:00.000000000 Z
11
+ date: 2023-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -24,34 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
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: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: faraday_middleware-multi_json
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: multi_json
57
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,104 +38,6 @@ dependencies:
66
38
  - - ">="
67
39
  - !ruby/object:Gem::Version
68
40
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: bundler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '2.2'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '2.2'
83
- - !ruby/object:Gem::Dependency
84
- name: dotenv
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: pry
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rake
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: rspec
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: vcr
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: webmock
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
41
  description: Client for FractalApi https://docs.askfractal.com
168
42
  email:
169
43
  - nenad@finpoint.co.uk
@@ -224,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
98
  - !ruby/object:Gem::Version
225
99
  version: '0'
226
100
  requirements: []
227
- rubygems_version: 3.0.3
101
+ rubygems_version: 3.2.3
228
102
  signing_key:
229
103
  specification_version: 4
230
104
  summary: FractalApi client