belvo 0.19.3 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/generate-docs.yml +26 -0
- data/.rubocop.yml +3 -0
- data/Gemfile.lock +59 -38
- data/lib/belvo/http.rb +1 -1
- data/lib/belvo/resources.rb +6 -3
- data/lib/belvo/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05a03ab57113f17e822b4f48dd813edf5206bacfb79a757332fce693a60db786
|
4
|
+
data.tar.gz: 2676ef16eabab4fcbd553ec28cf7378539eb468387954a2754b62d1c6642fe6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 522bc53deacef6bc63010a44d837acc100560bd9cb5a3721eea94cde3b37abb3090c385c9c0c2d411ebfd39fe9c1c88fc905ba03dc6bf70cb2ed58899af0f1c8
|
7
|
+
data.tar.gz: 4bcee96d178f49fc23bac577725560f279f21e8a96670694b5d0f2918871e0ea5e332ba09b421769e24740217402e45c55f6e2bdfaaeda0c04caba00d0d92411
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: Build & deploy Ruby SDK documentation
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
jobs:
|
7
|
+
build:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
name: Update gh-pages with docs
|
10
|
+
steps:
|
11
|
+
- name: Checkout Belvo Ruby SDK repo
|
12
|
+
uses: actions/checkout@v2
|
13
|
+
- name: Set up Ruby
|
14
|
+
uses: actions/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: "2.7"
|
17
|
+
- name: Install required gem dependencies
|
18
|
+
run: gem install yard --no-document
|
19
|
+
- name: Build RUBY SDK docs with YARD
|
20
|
+
run: yardoc --output-dir docs
|
21
|
+
- name: Deploy docs to gh-pages branch
|
22
|
+
uses: peaceiris/actions-gh-pages@v3
|
23
|
+
with:
|
24
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
25
|
+
publish_dir: ./docs
|
26
|
+
publish_branch: gh-pages
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
belvo (0.
|
4
|
+
belvo (0.20.0)
|
5
5
|
faraday
|
6
6
|
faraday_middleware
|
7
7
|
typhoeus
|
@@ -11,8 +11,8 @@ GEM
|
|
11
11
|
specs:
|
12
12
|
addressable (2.8.0)
|
13
13
|
public_suffix (>= 2.0.2, < 5.0)
|
14
|
-
ast (2.4.
|
15
|
-
claide (1.0
|
14
|
+
ast (2.4.2)
|
15
|
+
claide (1.1.0)
|
16
16
|
claide-plugins (0.9.2)
|
17
17
|
cork
|
18
18
|
nap
|
@@ -20,12 +20,13 @@ GEM
|
|
20
20
|
colored2 (3.1.2)
|
21
21
|
cork (0.3.0)
|
22
22
|
colored2 (~> 3.1)
|
23
|
-
coveralls_reborn (0.
|
23
|
+
coveralls_reborn (0.24.0)
|
24
24
|
simplecov (>= 0.18.1, < 0.22.0)
|
25
25
|
term-ansicolor (~> 1.6)
|
26
26
|
thor (>= 0.20.3, < 2.0)
|
27
27
|
tins (~> 1.16)
|
28
|
-
crack (0.4.
|
28
|
+
crack (0.4.5)
|
29
|
+
rexml
|
29
30
|
danger (8.2.1)
|
30
31
|
claide (~> 1.0)
|
31
32
|
claide-plugins (>= 0.9.2)
|
@@ -39,54 +40,74 @@ GEM
|
|
39
40
|
no_proxy_fix
|
40
41
|
octokit (~> 4.7)
|
41
42
|
terminal-table (~> 1)
|
42
|
-
diff-lcs (1.
|
43
|
+
diff-lcs (1.5.0)
|
43
44
|
docile (1.4.0)
|
44
|
-
ethon (0.
|
45
|
+
ethon (0.15.0)
|
45
46
|
ffi (>= 1.15.0)
|
46
|
-
faraday (1.
|
47
|
-
|
48
|
-
|
47
|
+
faraday (1.10.0)
|
48
|
+
faraday-em_http (~> 1.0)
|
49
|
+
faraday-em_synchrony (~> 1.0)
|
50
|
+
faraday-excon (~> 1.1)
|
51
|
+
faraday-httpclient (~> 1.0)
|
52
|
+
faraday-multipart (~> 1.0)
|
53
|
+
faraday-net_http (~> 1.0)
|
54
|
+
faraday-net_http_persistent (~> 1.0)
|
55
|
+
faraday-patron (~> 1.0)
|
56
|
+
faraday-rack (~> 1.0)
|
57
|
+
faraday-retry (~> 1.0)
|
58
|
+
ruby2_keywords (>= 0.0.4)
|
59
|
+
faraday-em_http (1.0.0)
|
60
|
+
faraday-em_synchrony (1.0.0)
|
61
|
+
faraday-excon (1.1.0)
|
49
62
|
faraday-http-cache (2.2.0)
|
50
63
|
faraday (>= 0.8)
|
51
|
-
|
64
|
+
faraday-httpclient (1.0.1)
|
65
|
+
faraday-multipart (1.0.3)
|
66
|
+
multipart-post (>= 1.2, < 3)
|
67
|
+
faraday-net_http (1.0.1)
|
68
|
+
faraday-net_http_persistent (1.2.0)
|
69
|
+
faraday-patron (1.0.0)
|
70
|
+
faraday-rack (1.0.0)
|
71
|
+
faraday-retry (1.0.3)
|
72
|
+
faraday_middleware (1.2.0)
|
52
73
|
faraday (~> 1.0)
|
53
|
-
ffi (1.15.
|
54
|
-
git (1.
|
74
|
+
ffi (1.15.5)
|
75
|
+
git (1.11.0)
|
55
76
|
rchardet (~> 1.8)
|
56
77
|
hashdiff (1.0.1)
|
57
78
|
jaro_winkler (1.5.4)
|
58
|
-
kramdown (2.
|
79
|
+
kramdown (2.4.0)
|
59
80
|
rexml
|
60
81
|
kramdown-parser-gfm (1.1.0)
|
61
82
|
kramdown (~> 2.0)
|
62
83
|
multipart-post (2.1.1)
|
63
84
|
nap (1.1.0)
|
64
85
|
no_proxy_fix (0.1.2)
|
65
|
-
octokit (4.
|
86
|
+
octokit (4.22.0)
|
66
87
|
faraday (>= 0.9)
|
67
88
|
sawyer (~> 0.8.0, >= 0.5.3)
|
68
89
|
open4 (1.3.4)
|
69
|
-
parallel (1.
|
70
|
-
parser (
|
90
|
+
parallel (1.22.1)
|
91
|
+
parser (3.1.2.0)
|
71
92
|
ast (~> 2.4.1)
|
72
|
-
public_suffix (4.0.
|
73
|
-
rainbow (3.
|
93
|
+
public_suffix (4.0.7)
|
94
|
+
rainbow (3.1.1)
|
74
95
|
rake (12.3.3)
|
75
96
|
rchardet (1.8.0)
|
76
97
|
rexml (3.2.5)
|
77
|
-
rspec (3.
|
78
|
-
rspec-core (~> 3.
|
79
|
-
rspec-expectations (~> 3.
|
80
|
-
rspec-mocks (~> 3.
|
81
|
-
rspec-core (3.
|
82
|
-
rspec-support (~> 3.
|
83
|
-
rspec-expectations (3.
|
98
|
+
rspec (3.11.0)
|
99
|
+
rspec-core (~> 3.11.0)
|
100
|
+
rspec-expectations (~> 3.11.0)
|
101
|
+
rspec-mocks (~> 3.11.0)
|
102
|
+
rspec-core (3.11.0)
|
103
|
+
rspec-support (~> 3.11.0)
|
104
|
+
rspec-expectations (3.11.0)
|
84
105
|
diff-lcs (>= 1.2.0, < 2.0)
|
85
|
-
rspec-support (~> 3.
|
86
|
-
rspec-mocks (3.
|
106
|
+
rspec-support (~> 3.11.0)
|
107
|
+
rspec-mocks (3.11.1)
|
87
108
|
diff-lcs (>= 1.2.0, < 2.0)
|
88
|
-
rspec-support (~> 3.
|
89
|
-
rspec-support (3.
|
109
|
+
rspec-support (~> 3.11.0)
|
110
|
+
rspec-support (3.11.0)
|
90
111
|
rubocop (0.81.0)
|
91
112
|
jaro_winkler (~> 1.5.1)
|
92
113
|
parallel (~> 1.10)
|
@@ -97,8 +118,8 @@ GEM
|
|
97
118
|
unicode-display_width (>= 1.4.0, < 2.0)
|
98
119
|
rubocop-rspec (1.41.0)
|
99
120
|
rubocop (>= 0.68.1)
|
100
|
-
ruby-progressbar (1.
|
101
|
-
ruby2_keywords (0.0.
|
121
|
+
ruby-progressbar (1.11.0)
|
122
|
+
ruby2_keywords (0.0.5)
|
102
123
|
sawyer (0.8.2)
|
103
124
|
addressable (>= 2.3.5)
|
104
125
|
faraday (> 0.8, < 2.0)
|
@@ -107,20 +128,20 @@ GEM
|
|
107
128
|
simplecov-html (~> 0.11)
|
108
129
|
simplecov_json_formatter (~> 0.1)
|
109
130
|
simplecov-html (0.12.3)
|
110
|
-
simplecov_json_formatter (0.1.
|
131
|
+
simplecov_json_formatter (0.1.4)
|
111
132
|
sync (0.5.0)
|
112
133
|
term-ansicolor (1.7.1)
|
113
134
|
tins (~> 1.0)
|
114
135
|
terminal-table (1.8.0)
|
115
136
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
116
|
-
thor (1.1
|
117
|
-
tins (1.
|
137
|
+
thor (1.2.1)
|
138
|
+
tins (1.31.0)
|
118
139
|
sync
|
119
140
|
typhoeus (1.4.0)
|
120
141
|
ethon (>= 0.9.0)
|
121
|
-
unicode-display_width (1.
|
122
|
-
webmock (3.
|
123
|
-
addressable (>= 2.
|
142
|
+
unicode-display_width (1.8.0)
|
143
|
+
webmock (3.14.0)
|
144
|
+
addressable (>= 2.8.0)
|
124
145
|
crack (>= 0.3.2)
|
125
146
|
hashdiff (>= 0.4.0, < 2.0.0)
|
126
147
|
|
data/lib/belvo/http.rb
CHANGED
@@ -51,7 +51,7 @@ module Belvo
|
|
51
51
|
# @return [Boolean] True if credentials are valid to authenticate
|
52
52
|
# to Belvo API else False.
|
53
53
|
def authenticate
|
54
|
-
@session.basic_auth
|
54
|
+
@session.request(:basic_auth, @key_id, @key_password)
|
55
55
|
response = @session.get('api/')
|
56
56
|
response.success?
|
57
57
|
end
|
data/lib/belvo/resources.rb
CHANGED
@@ -25,11 +25,14 @@ module Belvo
|
|
25
25
|
|
26
26
|
# List all results
|
27
27
|
# @param params [Hash] Extra parameters sent as query strings.
|
28
|
-
# @return [Array]
|
28
|
+
# @return [Array] List of results when no block is passed.
|
29
|
+
# @yield [Hash] Each result to be processed individually.
|
29
30
|
# @raise [RequestError] If response code is different than 2XX
|
30
31
|
def list(params: nil)
|
31
|
-
results = []
|
32
|
-
@session.list(@endpoint, params: params)
|
32
|
+
results = block_given? ? nil : []
|
33
|
+
@session.list(@endpoint, params: params) do |item|
|
34
|
+
results.nil? ? yield(item) : results.push(item)
|
35
|
+
end
|
33
36
|
results
|
34
37
|
end
|
35
38
|
|
data/lib/belvo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: belvo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Belvo Finance S.L.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
153
153
|
- ".github/pull_request_template.md"
|
154
154
|
- ".github/workflows/danger-pr-reviews.yml"
|
155
|
+
- ".github/workflows/generate-docs.yml"
|
155
156
|
- ".gitignore"
|
156
157
|
- ".rspec"
|
157
158
|
- ".rubocop.yml"
|
@@ -194,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
195
|
- !ruby/object:Gem::Version
|
195
196
|
version: '0'
|
196
197
|
requirements: []
|
197
|
-
rubygems_version: 3.
|
198
|
+
rubygems_version: 3.3.11
|
198
199
|
signing_key:
|
199
200
|
specification_version: 4
|
200
201
|
summary: The Ruby gem for the Belvo API
|