yodlee_wrap 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +15 -0
- data/.rspec +4 -0
- data/Gemfile +16 -0
- data/Guardfile +16 -0
- data/LICENSE.txt +22 -0
- data/README.md +176 -0
- data/Rakefile +2 -0
- data/lib/yodlee_wrap/config.rb +14 -0
- data/lib/yodlee_wrap/parameter_translator.rb +27 -0
- data/lib/yodlee_wrap/response.rb +20 -0
- data/lib/yodlee_wrap/version.rb +3 -0
- data/lib/yodlee_wrap/yodlee_api.rb +183 -0
- data/lib/yodlee_wrap.rb +27 -0
- data/log/.gitkeep +0 -0
- data/spec/integration/integration_spec.rb +534 -0
- data/spec/spec_helper.rb +22 -0
- data/spec/unit/yodleeicious/config_spec.rb +65 -0
- data/spec/unit/yodleeicious/parameter_translator_spec.rb +80 -0
- data/spec/unit/yodleeicious/response_spec.rb +61 -0
- data/spec/unit/yodleeicious/yodlee_api_spec.rb +341 -0
- data/todo.md +8 -0
- data/yodlee_wrap.gemspec +31 -0
- data/yodlicious.png +0 -0
- metadata +156 -0
@@ -0,0 +1,80 @@
|
|
1
|
+
require "yodleeicious/parameter_translator"
|
2
|
+
|
3
|
+
describe 'parameter translator' do
|
4
|
+
subject { Yodleeicious::ParameterTranslator.new }
|
5
|
+
context 'converting login params json to add site params' do
|
6
|
+
let (:login_form) {
|
7
|
+
{
|
8
|
+
'componentList' => [
|
9
|
+
{
|
10
|
+
'valueIdentifier' => 'LOGIN',
|
11
|
+
'valueMask' => 'LOGIN_FIELD',
|
12
|
+
'fieldType' => {
|
13
|
+
'typeName' => 'IF_LOGIN'
|
14
|
+
},
|
15
|
+
'size' => 20,
|
16
|
+
'maxlength' => 32,
|
17
|
+
'name' => 'LOGIN',
|
18
|
+
'displayName' => 'User ID',
|
19
|
+
'isEditable' => true,
|
20
|
+
'isOptional' => false,
|
21
|
+
'isEscaped' => false,
|
22
|
+
'helpText' => 4710,
|
23
|
+
'isOptionalMFA' => false,
|
24
|
+
'isMFA' => false,
|
25
|
+
'fieldValue' => 'kanyewest'
|
26
|
+
},
|
27
|
+
{
|
28
|
+
'valueIdentifier' => 'PASSWORD',
|
29
|
+
'valueMask' => 'LOGIN_FIELD',
|
30
|
+
'fieldType' => {
|
31
|
+
'typeName' => 'IF_PASSWORD'
|
32
|
+
},
|
33
|
+
'size' => 20,
|
34
|
+
'maxlength' => 40,
|
35
|
+
'name' => 'PASSWORD',
|
36
|
+
'displayName' => 'Password',
|
37
|
+
'isEditable' => true,
|
38
|
+
'isOptional' => false,
|
39
|
+
'isEscaped' => false,
|
40
|
+
'helpText' => 11976,
|
41
|
+
'isOptionalMFA' => false,
|
42
|
+
'isMFA' => false,
|
43
|
+
'fieldValue' => 'iLoveTheGrammys'
|
44
|
+
}
|
45
|
+
]
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
let (:add_site_params) {
|
50
|
+
{
|
51
|
+
"credentialFields.enclosedType" => "com.yodlee.common.FieldInfoSingle",
|
52
|
+
"credentialFields[0].displayName" => "User ID",
|
53
|
+
"credentialFields[0].fieldType.typeName" => "IF_LOGIN",
|
54
|
+
"credentialFields[0].helpText" => 4710,
|
55
|
+
"credentialFields[0].maxlength" => 32,
|
56
|
+
"credentialFields[0].name" => "LOGIN",
|
57
|
+
"credentialFields[0].size" => 20,
|
58
|
+
"credentialFields[0].value" => 'kanyewest',
|
59
|
+
"credentialFields[0].valueIdentifier" => "LOGIN",
|
60
|
+
"credentialFields[0].valueMask" => "LOGIN_FIELD",
|
61
|
+
"credentialFields[0].isEditable" => true,
|
62
|
+
"credentialFields[1].displayName" => "Password",
|
63
|
+
"credentialFields[1].fieldType.typeName" => "IF_PASSWORD",
|
64
|
+
"credentialFields[1].helpText" => 11976,
|
65
|
+
"credentialFields[1].maxlength" => 40,
|
66
|
+
"credentialFields[1].name" => "PASSWORD",
|
67
|
+
"credentialFields[1].size" => 20,
|
68
|
+
"credentialFields[1].value" => 'iLoveTheGrammys',
|
69
|
+
"credentialFields[1].valueIdentifier" => "PASSWORD",
|
70
|
+
"credentialFields[1].valueMask" => "LOGIN_FIELD",
|
71
|
+
"credentialFields[1].isEditable" => true
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
it "converts correctly to params hash" do
|
76
|
+
expect(subject.site_login_form_to_add_site_account_params(login_form)).to be == add_site_params
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require "yodleeicious"
|
2
|
+
|
3
|
+
describe Yodleeicious::Response do
|
4
|
+
let(:error_response_1) {
|
5
|
+
{
|
6
|
+
"errorOccurred"=>"true",
|
7
|
+
"exceptionType"=>"com.yodlee.core.IllegalArgumentValueException",
|
8
|
+
"referenceCode"=>"_3932d208-345a-400f-a273-83619b8b548b",
|
9
|
+
"message"=>"Multiple exceptions encapsulated within: invoke getWrappedExceptions for details"
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
let(:error_response_2) {
|
14
|
+
{ "Error" => [ {"errorDetail" => "Invalid User Credentials"} ] }
|
15
|
+
}
|
16
|
+
|
17
|
+
let(:success_hash_response) {
|
18
|
+
{}
|
19
|
+
}
|
20
|
+
|
21
|
+
let(:success_array_response) {
|
22
|
+
[{}]
|
23
|
+
}
|
24
|
+
|
25
|
+
context 'When the error_response is the errorOccured syntax' do
|
26
|
+
subject { Yodleeicious::Response.new error_response_1 }
|
27
|
+
it { is_expected.not_to be_success }
|
28
|
+
it { is_expected.to be_fail }
|
29
|
+
it "is expected to return error of InvalidArgumentValueException" do
|
30
|
+
expect(subject.error).to eq('com.yodlee.core.IllegalArgumentValueException')
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'When the error_response is the Error : ["errorDetail"] syntax' do
|
35
|
+
subject { Yodleeicious::Response.new error_response_2 }
|
36
|
+
it { is_expected.not_to be_success }
|
37
|
+
it { is_expected.to be_fail }
|
38
|
+
it "is expected to return error of Invalid User Credentials" do
|
39
|
+
expect(subject.error).to eq('Invalid User Credentials')
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
context 'When operation is a success and returns hash' do
|
44
|
+
subject { Yodleeicious::Response.new success_hash_response }
|
45
|
+
it { is_expected.to be_success }
|
46
|
+
it { is_expected.not_to be_fail }
|
47
|
+
it 'is expected to return nil for error' do
|
48
|
+
expect(subject.error).to be_nil
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
context 'When operation is a success and return array' do
|
53
|
+
subject { Yodleeicious::Response.new success_array_response }
|
54
|
+
it { is_expected.to be_success }
|
55
|
+
it { is_expected.not_to be_fail }
|
56
|
+
it 'is expected to return nil for error' do
|
57
|
+
expect(subject.error).to be_nil
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
@@ -0,0 +1,341 @@
|
|
1
|
+
require "yodleeicious"
|
2
|
+
require "yodleeicious/config"
|
3
|
+
|
4
|
+
describe Yodleeicious::YodleeApi do
|
5
|
+
|
6
|
+
context 'Given a new uninitialized YodleeApi object' do
|
7
|
+
before {
|
8
|
+
Yodleeicious::Config.base_url=nil
|
9
|
+
Yodleeicious::Config.cobranded_username=nil
|
10
|
+
Yodleeicious::Config.cobranded_password=nil
|
11
|
+
Yodleeicious::Config.proxy_url=nil
|
12
|
+
}
|
13
|
+
subject { Yodleeicious::YodleeApi.new }
|
14
|
+
|
15
|
+
it 'should return nil for cobranded_auth' do
|
16
|
+
expect(subject.cobranded_auth).to be_nil
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should return nil for user_auth' do
|
20
|
+
expect(subject.user_auth).to be_nil
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should return nil for session_token' do
|
24
|
+
expect(subject.cobranded_session_token).to be_nil
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'should return nil for user_session_token' do
|
28
|
+
expect(subject.user_session_token).to be_nil
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should return a translator' do
|
32
|
+
expect(subject.translator).not_to be_nil
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context 'Given a Yodleeicious::Config with nil configuration' do
|
37
|
+
context 'When a new YodleeApi instance is created with no configuration' do
|
38
|
+
before {
|
39
|
+
Yodleeicious::Config.base_url=nil
|
40
|
+
Yodleeicious::Config.cobranded_username=nil
|
41
|
+
Yodleeicious::Config.cobranded_password=nil
|
42
|
+
Yodleeicious::Config.proxy_url=nil
|
43
|
+
}
|
44
|
+
subject { Yodleeicious::YodleeApi.new }
|
45
|
+
|
46
|
+
it 'no base_url set' do
|
47
|
+
expect(subject.base_url).to be_nil
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'no cobranded_username is set' do
|
51
|
+
expect(subject.cobranded_username).to be_nil
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'no cobranded_password is set' do
|
55
|
+
expect(subject.cobranded_password).to be_nil
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'no proxy_url is set' do
|
59
|
+
expect(subject.proxy_url).to be_nil
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'empty proxy_opts are created' do
|
63
|
+
expect(subject.proxy_opts).to eq({})
|
64
|
+
end
|
65
|
+
|
66
|
+
it 'no socks proxy is used' do
|
67
|
+
expect(subject.use_socks?).to eq(false)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
context 'Given a Yodleeicious::Config with a configuration' do
|
73
|
+
context 'When a new YodleeApi instance is created with the global configuration set' do
|
74
|
+
before {
|
75
|
+
Yodleeicious::Config.base_url='base url'
|
76
|
+
Yodleeicious::Config.cobranded_username='user name'
|
77
|
+
Yodleeicious::Config.cobranded_password='password'
|
78
|
+
Yodleeicious::Config.proxy_url='socks5h://somehostname'
|
79
|
+
}
|
80
|
+
subject { Yodleeicious::YodleeApi.new }
|
81
|
+
|
82
|
+
it 'base_url set' do
|
83
|
+
expect(subject.base_url).to eq('base url')
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'cobranded_username is set' do
|
87
|
+
expect(subject.cobranded_username).to eq('user name')
|
88
|
+
end
|
89
|
+
|
90
|
+
it 'cobranded_password is set' do
|
91
|
+
expect(subject.cobranded_password).to eq('password')
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'proxy_url is set' do
|
95
|
+
expect(subject.proxy_url).to eq('socks5h://somehostname')
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'proxy_opts are created' do
|
99
|
+
expect(subject.proxy_opts).to eq({ socks: true, uri: URI.parse('socks5h://somehostname') })
|
100
|
+
end
|
101
|
+
|
102
|
+
it 'socks proxy is used' do
|
103
|
+
expect(subject.use_socks?).to eq(true)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
context 'Given a Yodleeicious::Config with nil configuration' do
|
109
|
+
context 'When a new YodleeApi instance is created and provided a configuration' do
|
110
|
+
before {
|
111
|
+
Yodleeicious::Config.base_url=nil
|
112
|
+
Yodleeicious::Config.cobranded_username=nil
|
113
|
+
Yodleeicious::Config.cobranded_password=nil
|
114
|
+
Yodleeicious::Config.proxy_url=nil
|
115
|
+
}
|
116
|
+
let(:config) {
|
117
|
+
{
|
118
|
+
base_url: "https://rest.developer.yodlee.com/services/srest/restserver/v1.0",
|
119
|
+
cobranded_username: "some_username",
|
120
|
+
cobranded_password: "some_password",
|
121
|
+
proxy_url: "socks5h://127.0.0.1:1080"
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
subject { Yodleeicious::YodleeApi.new(config) }
|
126
|
+
|
127
|
+
it 'the provided base url is set' do
|
128
|
+
expect(subject.base_url).to eq(config[:base_url])
|
129
|
+
end
|
130
|
+
|
131
|
+
it 'the provided cobranded_username is set' do
|
132
|
+
expect(subject.cobranded_username).to eq(config[:cobranded_username])
|
133
|
+
end
|
134
|
+
|
135
|
+
it 'the provided cobranded_password is set' do
|
136
|
+
expect(subject.cobranded_password).to eq(config[:cobranded_password])
|
137
|
+
end
|
138
|
+
|
139
|
+
it 'the provided proxy_url is set' do
|
140
|
+
expect(subject.proxy_url).to eq(config[:proxy_url])
|
141
|
+
end
|
142
|
+
|
143
|
+
it 'the provided proxy_opts are created' do
|
144
|
+
proxy_opts = {
|
145
|
+
socks: true,
|
146
|
+
uri: URI.parse(config[:proxy_url])
|
147
|
+
}
|
148
|
+
expect(subject.proxy_opts).to eq(proxy_opts)
|
149
|
+
end
|
150
|
+
|
151
|
+
it 'the provided socks proxy is used' do
|
152
|
+
expect(subject.use_socks?).to eq(true)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
context 'Given a Yodleeicious::Config with set config values' do
|
158
|
+
context 'When a new YodleeApi instance is created and provided a configuration' do
|
159
|
+
before {
|
160
|
+
Yodleeicious::Config.base_url='base url'
|
161
|
+
Yodleeicious::Config.cobranded_username='user name'
|
162
|
+
Yodleeicious::Config.cobranded_password='password'
|
163
|
+
Yodleeicious::Config.proxy_url='socks5h://somehostname'
|
164
|
+
}
|
165
|
+
let(:config) {
|
166
|
+
{
|
167
|
+
base_url: "https://rest.developer.yodlee.com/services/srest/restserver/v1.0",
|
168
|
+
cobranded_username: "some_username",
|
169
|
+
cobranded_password: "some_password",
|
170
|
+
proxy_url: "socks5h://127.0.0.1:1080"
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
subject { Yodleeicious::YodleeApi.new(config) }
|
175
|
+
|
176
|
+
it 'the provided base url is set' do
|
177
|
+
expect(subject.base_url).to eq(config[:base_url])
|
178
|
+
end
|
179
|
+
|
180
|
+
it 'the provided cobranded_username is set' do
|
181
|
+
expect(subject.cobranded_username).to eq(config[:cobranded_username])
|
182
|
+
end
|
183
|
+
|
184
|
+
it 'the provided cobranded_password is set' do
|
185
|
+
expect(subject.cobranded_password).to eq(config[:cobranded_password])
|
186
|
+
end
|
187
|
+
|
188
|
+
it 'the provided proxy_url is set' do
|
189
|
+
expect(subject.proxy_url).to eq(config[:proxy_url])
|
190
|
+
end
|
191
|
+
|
192
|
+
it 'the provided proxy_opts are created' do
|
193
|
+
proxy_opts = {
|
194
|
+
socks: true,
|
195
|
+
uri: URI.parse(config[:proxy_url])
|
196
|
+
}
|
197
|
+
expect(subject.proxy_opts).to eq(proxy_opts)
|
198
|
+
end
|
199
|
+
|
200
|
+
it 'the provided socks proxy is used' do
|
201
|
+
expect(subject.use_socks?).to eq(true)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
context 'Given a Yodleeicious::Config with nil config values' do
|
207
|
+
context 'When a new YodleeApi instance is configured with no proxy_url' do
|
208
|
+
before {
|
209
|
+
Yodleeicious::Config.base_url=nil
|
210
|
+
Yodleeicious::Config.cobranded_username=nil
|
211
|
+
Yodleeicious::Config.cobranded_password=nil
|
212
|
+
Yodleeicious::Config.proxy_url=nil
|
213
|
+
}
|
214
|
+
let(:config) {
|
215
|
+
{
|
216
|
+
base_url: "https://rest.developer.yodlee.com/services/srest/restserver/v1.0",
|
217
|
+
cobranded_username: "some_username",
|
218
|
+
cobranded_password: "some_password"
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
222
|
+
subject { Yodleeicious::YodleeApi.new(config) }
|
223
|
+
|
224
|
+
it 'no proxy_url is set' do
|
225
|
+
expect(subject.proxy_url).to be_nil
|
226
|
+
end
|
227
|
+
|
228
|
+
it 'no proxy_opts are created' do
|
229
|
+
expect(subject.proxy_opts).to eq({})
|
230
|
+
end
|
231
|
+
|
232
|
+
it 'the socks proxy is not used' do
|
233
|
+
expect(subject.use_socks?).to eq(false)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
describe '#should_retry_get_mfa_response?' do
|
239
|
+
let (:api) { Yodleeicious::YodleeApi.new }
|
240
|
+
let (:response) { instance_double("Yodleeicious::Response") }
|
241
|
+
|
242
|
+
context 'Given get mfa response has failed' do
|
243
|
+
before { allow(response).to receive(:success?).and_return(false) }
|
244
|
+
before { allow(response).to receive(:body).and_return({}) }
|
245
|
+
subject { api.should_retry_get_mfa_response?(response,0,1) }
|
246
|
+
it { is_expected.to be_falsy }
|
247
|
+
end
|
248
|
+
|
249
|
+
context 'Given get mfa response is success' do
|
250
|
+
before { allow(response).to receive(:success?).and_return(true) }
|
251
|
+
|
252
|
+
context 'Given an error code is returned' do
|
253
|
+
before { allow(response).to receive(:body).and_return({ 'errorCode' => 100 }) }
|
254
|
+
subject { api.should_retry_get_mfa_response?(response,0,1) }
|
255
|
+
it { is_expected.to be_falsy }
|
256
|
+
end
|
257
|
+
|
258
|
+
context 'Given no error code is returned' do
|
259
|
+
context 'Given the MFA message is available' do
|
260
|
+
before { allow(response).to receive(:body).and_return({ 'isMessageAvailable' => true }) }
|
261
|
+
subject { api.should_retry_get_mfa_response?(response,0,1) }
|
262
|
+
it { is_expected.to be_falsy }
|
263
|
+
end
|
264
|
+
|
265
|
+
context 'Given the MFA message is not available' do
|
266
|
+
before { allow(response).to receive(:body).and_return({ 'isMessageAvailable' => false }) }
|
267
|
+
context 'Given all the trys have been used up' do
|
268
|
+
subject { api.should_retry_get_mfa_response?(response,1,1) }
|
269
|
+
it { is_expected.to be_falsy }
|
270
|
+
end
|
271
|
+
|
272
|
+
context 'Given the trys have not been used up' do
|
273
|
+
subject { api.should_retry_get_mfa_response?(response,0,2) }
|
274
|
+
it { is_expected.to be_truthy }
|
275
|
+
end
|
276
|
+
end
|
277
|
+
end
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
describe '#should_retry_get_site_refresh_info' do
|
282
|
+
let (:api) { Yodleeicious::YodleeApi.new }
|
283
|
+
let (:response) { double("response") }
|
284
|
+
|
285
|
+
context 'Given get mfa response has failed' do
|
286
|
+
before { allow(response).to receive(:success?).and_return(false) }
|
287
|
+
subject { api.should_retry_get_site_refresh_info?(response,0,1) }
|
288
|
+
it { is_expected.to be_falsy }
|
289
|
+
end
|
290
|
+
|
291
|
+
context 'Given get mfa response is success' do
|
292
|
+
before { allow(response).to receive(:success?).and_return(true) }
|
293
|
+
|
294
|
+
context 'Given an code 801 is returned' do
|
295
|
+
before { allow(response).to receive(:body).and_return({ 'code' => 801 }) }
|
296
|
+
subject { api.should_retry_get_site_refresh_info?(response,0,1) }
|
297
|
+
it { is_expected.to be_truthy }
|
298
|
+
end
|
299
|
+
|
300
|
+
context 'Given not 801 and not 0 code is returned' do
|
301
|
+
before { allow(response).to receive(:body).and_return({ 'code' => 5 }) }
|
302
|
+
subject { api.should_retry_get_site_refresh_info?(response,0,1) }
|
303
|
+
it { is_expected.to be_falsy }
|
304
|
+
end
|
305
|
+
|
306
|
+
context 'Given a code 0 is returned' do
|
307
|
+
context 'Given a siteRefreshStatus of REFRESH_COMPLETED' do
|
308
|
+
before { allow(response).to receive(:body).and_return({ 'code' => 0, "siteRefreshStatus" => { "siteRefreshStatus" => "REFRESH_COMPLETED" }}) }
|
309
|
+
subject { api.should_retry_get_site_refresh_info?(response,0,1) }
|
310
|
+
it { is_expected.to be_falsy }
|
311
|
+
end
|
312
|
+
|
313
|
+
context 'Given a siteRefreshStatus of REFRESH_TIMED_OUT' do
|
314
|
+
before { allow(response).to receive(:body).and_return({ 'code' => 0, "siteRefreshStatus" => { "siteRefreshStatus" => "REFRESH_TIMED_OUT" }}) }
|
315
|
+
subject { api.should_retry_get_site_refresh_info?(response,0,1) }
|
316
|
+
it { is_expected.to be_falsy }
|
317
|
+
end
|
318
|
+
|
319
|
+
context 'Given a siteRefreshStatus of LOGIN_SUCCESS' do
|
320
|
+
before { allow(response).to receive(:body).and_return({ 'code' => 0, "siteRefreshStatus" => { "siteRefreshStatus" => "LOGIN_SUCCESS" }}) }
|
321
|
+
subject { api.should_retry_get_site_refresh_info?(response,0,1) }
|
322
|
+
it { is_expected.to be_falsy }
|
323
|
+
end
|
324
|
+
|
325
|
+
context 'Given a siteRefreshStatus of REFRESH_TRIGGERED' do
|
326
|
+
before { allow(response).to receive(:body).and_return({ 'code' => 0, "siteRefreshStatus" => { "siteRefreshStatus" => "REFRESH_TRIGGERED" }}) }
|
327
|
+
subject { api.should_retry_get_site_refresh_info?(response,0,1) }
|
328
|
+
it { is_expected.to be_truthy }
|
329
|
+
end
|
330
|
+
|
331
|
+
context 'Given a siteRefreshStatus of REFRESH_TRIGGERED' do
|
332
|
+
before { allow(response).to receive(:body).and_return({ 'code' => 0, "siteRefreshStatus" => { "siteRefreshStatus" => "REFRESH_TRIGGERED" }}) }
|
333
|
+
context 'Given trys have been used up' do
|
334
|
+
subject { api.should_retry_get_site_refresh_info?(response,1,1) }
|
335
|
+
it { is_expected.to be_falsy }
|
336
|
+
end
|
337
|
+
end
|
338
|
+
end
|
339
|
+
end
|
340
|
+
end
|
341
|
+
end
|
data/todo.md
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
|
2
|
+
TODOs
|
3
|
+
- [ ] document more api methods
|
4
|
+
- [ ] speed up integration test runs with vcr
|
5
|
+
- [ ] complete remaining api methods
|
6
|
+
- [ ] improve error parsing can capture
|
7
|
+
- [ ] allow for configuration of faraday's logging
|
8
|
+
- [ ] figure out work around for faraday monkey patch
|
data/yodlee_wrap.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'yodlee_wrap/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "yodlee_wrap"
|
8
|
+
spec.version = YodleeWrap::VERSION
|
9
|
+
spec.authors = ["Shannon Byrne"]
|
10
|
+
spec.email = ["shannon@studentloangenius.com"]
|
11
|
+
spec.summary = "Yodlee API Client Gem for 2016 developer.yodlee gem"
|
12
|
+
spec.description = "Yodlee is a pain. This makes it a bit easier."
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ["lib"]
|
19
|
+
|
20
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
21
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
22
|
+
spec.add_development_dependency "rspec", "~> 3.2"
|
23
|
+
|
24
|
+
spec.add_runtime_dependency "faraday", '~> 0.9.1', '>= 0.9.1'
|
25
|
+
spec.add_runtime_dependency "socksify", '~> 1.6.0', '>= 1.6.0'
|
26
|
+
|
27
|
+
# gem 'faraday', '0.9.0'
|
28
|
+
# gem 'socksify', '1.5.0'
|
29
|
+
|
30
|
+
spec.required_ruby_version = '>= 1.9.3'
|
31
|
+
end
|
data/yodlicious.png
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: yodlee_wrap
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Shannon Byrne
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.2'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.2'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: faraday
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.9.1
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 0.9.1
|
65
|
+
type: :runtime
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - "~>"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: 0.9.1
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 0.9.1
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: socksify
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 1.6.0
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 1.6.0
|
85
|
+
type: :runtime
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: 1.6.0
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 1.6.0
|
95
|
+
description: Yodlee is a pain. This makes it a bit easier.
|
96
|
+
email:
|
97
|
+
- shannon@studentloangenius.com
|
98
|
+
executables: []
|
99
|
+
extensions: []
|
100
|
+
extra_rdoc_files: []
|
101
|
+
files:
|
102
|
+
- ".DS_Store"
|
103
|
+
- ".gitignore"
|
104
|
+
- ".rspec"
|
105
|
+
- Gemfile
|
106
|
+
- Guardfile
|
107
|
+
- LICENSE.txt
|
108
|
+
- README.md
|
109
|
+
- Rakefile
|
110
|
+
- lib/yodlee_wrap.rb
|
111
|
+
- lib/yodlee_wrap/config.rb
|
112
|
+
- lib/yodlee_wrap/parameter_translator.rb
|
113
|
+
- lib/yodlee_wrap/response.rb
|
114
|
+
- lib/yodlee_wrap/version.rb
|
115
|
+
- lib/yodlee_wrap/yodlee_api.rb
|
116
|
+
- log/.gitkeep
|
117
|
+
- spec/integration/integration_spec.rb
|
118
|
+
- spec/spec_helper.rb
|
119
|
+
- spec/unit/yodleeicious/config_spec.rb
|
120
|
+
- spec/unit/yodleeicious/parameter_translator_spec.rb
|
121
|
+
- spec/unit/yodleeicious/response_spec.rb
|
122
|
+
- spec/unit/yodleeicious/yodlee_api_spec.rb
|
123
|
+
- todo.md
|
124
|
+
- yodlee_wrap.gemspec
|
125
|
+
- yodlicious.png
|
126
|
+
homepage: ''
|
127
|
+
licenses:
|
128
|
+
- MIT
|
129
|
+
metadata: {}
|
130
|
+
post_install_message:
|
131
|
+
rdoc_options: []
|
132
|
+
require_paths:
|
133
|
+
- lib
|
134
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 1.9.3
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
requirements: []
|
145
|
+
rubyforge_project:
|
146
|
+
rubygems_version: 2.4.5.1
|
147
|
+
signing_key:
|
148
|
+
specification_version: 4
|
149
|
+
summary: Yodlee API Client Gem for 2016 developer.yodlee gem
|
150
|
+
test_files:
|
151
|
+
- spec/integration/integration_spec.rb
|
152
|
+
- spec/spec_helper.rb
|
153
|
+
- spec/unit/yodleeicious/config_spec.rb
|
154
|
+
- spec/unit/yodleeicious/parameter_translator_spec.rb
|
155
|
+
- spec/unit/yodleeicious/response_spec.rb
|
156
|
+
- spec/unit/yodleeicious/yodlee_api_spec.rb
|