fractal_api 0.1.4 → 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: 83b8fbaf1c2dc16331bc43504fc5b9748f2f1947998081c890376dae66198b93
4
- data.tar.gz: 98cea142b107367f31f439b3fffc17f4e22913fe27d8c32cafdf1ebc957a18b8
3
+ metadata.gz: f19bb727916a63c40d8e65f0071e8e11e62339ad3bffb0e491e63029c41d644c
4
+ data.tar.gz: 8e5ba76f447e53d6ec54cfec83ad648c17bbcd22be458ea4d75e036c24e3ad2e
5
5
  SHA512:
6
- metadata.gz: 253f7357eb116e28ed42a41cb9378368a83feefb5c8646a4958f85419672397ec5eb2da8bc6567a8b5908922ee51e235237467a1c1b6de2812d5c1767503a878
7
- data.tar.gz: 93d66f69913bed7385bd8603067619b3dca01c71421c105375f323a8c94beb4f4afb4d9e5e4d1bed6b768ade1911b20e03cfc8e2d0d4ba58c96f316215247cc6
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.4)
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,28 +15,13 @@ GEM
17
15
  rexml
18
16
  diff-lcs (1.4.4)
19
17
  dotenv (2.7.6)
20
- faraday (1.4.2)
21
- faraday-em_http (~> 1.0)
22
- faraday-em_synchrony (~> 1.0)
23
- faraday-excon (~> 1.1)
24
- faraday-net_http (~> 1.0)
25
- faraday-net_http_persistent (~> 1.1)
26
- multipart-post (>= 1.2, < 3)
18
+ faraday (2.7.4)
19
+ faraday-net_http (>= 2.0, < 3.1)
27
20
  ruby2_keywords (>= 0.0.4)
28
- faraday-em_http (1.0.0)
29
- faraday-em_synchrony (1.0.0)
30
- faraday-excon (1.1.0)
31
- faraday-net_http (1.0.1)
32
- faraday-net_http_persistent (1.1.0)
33
- faraday_middleware (1.0.0)
34
- faraday (~> 1.0)
35
- faraday_middleware-multi_json (0.0.6)
36
- faraday_middleware
37
- multi_json
21
+ faraday-net_http (3.0.2)
38
22
  hashdiff (1.0.1)
39
23
  method_source (1.0.0)
40
24
  multi_json (1.15.0)
41
- multipart-post (2.1.1)
42
25
  pry (0.13.1)
43
26
  coderay (~> 1.1)
44
27
  method_source (~> 1.0)
@@ -58,7 +41,7 @@ GEM
58
41
  diff-lcs (>= 1.2.0, < 2.0)
59
42
  rspec-support (~> 3.10.0)
60
43
  rspec-support (3.10.2)
61
- ruby2_keywords (0.0.4)
44
+ ruby2_keywords (0.0.5)
62
45
  vcr (6.0.0)
63
46
  webmock (3.12.1)
64
47
  addressable (>= 2.3.6)
@@ -66,11 +49,11 @@ GEM
66
49
  hashdiff (>= 0.4.0, < 2.0.0)
67
50
 
68
51
  PLATFORMS
52
+ -darwin-21
69
53
  x86_64-darwin-19
70
54
  x86_64-linux
71
55
 
72
56
  DEPENDENCIES
73
- bundler (~> 2.2)
74
57
  dotenv
75
58
  fractal_api!
76
59
  pry
@@ -80,4 +63,4 @@ DEPENDENCIES
80
63
  webmock
81
64
 
82
65
  BUNDLED WITH
83
- 2.2.11
66
+ 2.3.10
data/fractal_api.gemspec CHANGED
@@ -23,17 +23,8 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ['lib']
25
25
 
26
- spec.required_ruby_version = '~> 2.0'
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.4'
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.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Finpoint
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-31 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
@@ -209,13 +83,13 @@ files:
209
83
  homepage: https://www.finpoint.co.uk
210
84
  licenses: []
211
85
  metadata: {}
212
- post_install_message:
86
+ post_install_message:
213
87
  rdoc_options: []
214
88
  require_paths:
215
89
  - lib
216
90
  required_ruby_version: !ruby/object:Gem::Requirement
217
91
  requirements:
218
- - - "~>"
92
+ - - ">"
219
93
  - !ruby/object:Gem::Version
220
94
  version: '2.0'
221
95
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -224,8 +98,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
98
  - !ruby/object:Gem::Version
225
99
  version: '0'
226
100
  requirements: []
227
- rubygems_version: 3.2.11
228
- signing_key:
101
+ rubygems_version: 3.2.3
102
+ signing_key:
229
103
  specification_version: 4
230
104
  summary: FractalApi client
231
105
  test_files: []