finapps 2.2.16 → 2.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/finapps.rb +1 -0
- data/lib/finapps/rest/client.rb +1 -0
- data/lib/finapps/rest/products.rb +7 -0
- data/lib/finapps/version.rb +1 -1
- data/spec/rest/client_spec.rb +4 -0
- data/spec/rest/products_spec.rb +20 -0
- data/spec/support/fake_api.rb +3 -0
- data/spec/support/fixtures/products.json +7 -0
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2060081ac7ed6cd7f597e3b6e2319d5132245e47
|
4
|
+
data.tar.gz: 4085a14172157f3474b7499ed6ce5f550ac05dd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45af42879afbbc05f45b4d40f205cbf7c8ef8bac952cc9c924011b283cf3aebacd07413d36779ba0c76f4687ab6c17af7aef516ac15651b745bf49d14df74328
|
7
|
+
data.tar.gz: 6d3a2a5eff6ff4c3f744eaead1966ab1ad12a66eeef019ffd13cee59b0bc2ae94389fa40052191ce0d5947fb6457ba153e356f8553e32bdcbca4672edd35157d
|
data/lib/finapps.rb
CHANGED
@@ -23,6 +23,7 @@ require 'finapps/rest/order_statuses'
|
|
23
23
|
require 'finapps/rest/password_resets'
|
24
24
|
require 'finapps/rest/operators'
|
25
25
|
require 'finapps/rest/operators_password_resets'
|
26
|
+
require 'finapps/rest/products'
|
26
27
|
require 'finapps/utils/query_builder'
|
27
28
|
|
28
29
|
# require 'finapps/rest/configuration'
|
data/lib/finapps/rest/client.rb
CHANGED
data/lib/finapps/version.rb
CHANGED
data/spec/rest/client_spec.rb
CHANGED
@@ -71,6 +71,10 @@ RSpec.describe FinApps::REST::Client do
|
|
71
71
|
it { expect(subject.operators).to be_an_instance_of(FinApps::REST::Operators) }
|
72
72
|
end
|
73
73
|
|
74
|
+
describe '#products' do
|
75
|
+
it { expect(subject.products).to be_an_instance_of(FinApps::REST::Products) }
|
76
|
+
end
|
77
|
+
|
74
78
|
FinApps::REST::Client::RESOURCES.each do |method|
|
75
79
|
it "memoizes the result of #{method}" do
|
76
80
|
first = subject.send(method)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'spec_helpers/client'
|
3
|
+
|
4
|
+
RSpec.describe FinApps::REST::Products, 'initialized with valid FinApps::Client object' do
|
5
|
+
include SpecHelpers::Client
|
6
|
+
subject(:products) { FinApps::REST::Products.new(client) }
|
7
|
+
|
8
|
+
describe '#list' do
|
9
|
+
context 'when called' do
|
10
|
+
let(:list) { subject.list }
|
11
|
+
let(:results) { list[0] }
|
12
|
+
let(:error_messages) { list[1] }
|
13
|
+
|
14
|
+
it { expect { list }.not_to raise_error }
|
15
|
+
it('returns an array of records') { expect(results).to be_a(Array) }
|
16
|
+
it('performs a get and returns the response') { expect(results[0]).to respond_to(:code) }
|
17
|
+
it('returns no error messages') { expect(error_messages).to be_empty }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/spec/support/fake_api.rb
CHANGED
@@ -131,6 +131,9 @@ class FakeApi < Sinatra::Base
|
|
131
131
|
end
|
132
132
|
put('/v2/tenant/invalid_user_id/password') { json_response 404, 'resource_not_found.json' }
|
133
133
|
|
134
|
+
# products
|
135
|
+
get('/v2/products') { json_response 200, 'products.json' }
|
136
|
+
|
134
137
|
# relevance
|
135
138
|
get('/v2/relevance/ruleset/names') { json_response 200, 'relevance_ruleset_names.json' }
|
136
139
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finapps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Quintero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: finapps_core
|
@@ -244,6 +244,7 @@ files:
|
|
244
244
|
- lib/finapps/rest/order_tokens.rb
|
245
245
|
- lib/finapps/rest/orders.rb
|
246
246
|
- lib/finapps/rest/password_resets.rb
|
247
|
+
- lib/finapps/rest/products.rb
|
247
248
|
- lib/finapps/rest/sessions.rb
|
248
249
|
- lib/finapps/rest/user_institutions.rb
|
249
250
|
- lib/finapps/rest/user_institutions_forms.rb
|
@@ -263,6 +264,7 @@ files:
|
|
263
264
|
- spec/rest/order_tokens_spec.rb
|
264
265
|
- spec/rest/orders_spec.rb
|
265
266
|
- spec/rest/password_resets_spec.rb
|
267
|
+
- spec/rest/products_spec.rb
|
266
268
|
- spec/rest/sessions_spec.rb
|
267
269
|
- spec/rest/user_institutions_forms_spec.rb
|
268
270
|
- spec/rest/user_institutions_spec.rb
|
@@ -289,6 +291,7 @@ files:
|
|
289
291
|
- spec/support/fixtures/order_token.json
|
290
292
|
- spec/support/fixtures/orders.json
|
291
293
|
- spec/support/fixtures/password_reset_token.json
|
294
|
+
- spec/support/fixtures/products.json
|
292
295
|
- spec/support/fixtures/resource.json
|
293
296
|
- spec/support/fixtures/resource_not_found.json
|
294
297
|
- spec/support/fixtures/resources.json
|
@@ -326,12 +329,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
326
329
|
version: '0'
|
327
330
|
requirements: []
|
328
331
|
rubyforge_project:
|
329
|
-
rubygems_version: 2.6.
|
332
|
+
rubygems_version: 2.6.12
|
330
333
|
signing_key:
|
331
334
|
specification_version: 4
|
332
335
|
summary: FinApps REST API ruby client.
|
333
336
|
test_files:
|
334
337
|
- spec/rest/operators_password_resets_spec.rb
|
338
|
+
- spec/rest/products_spec.rb
|
335
339
|
- spec/rest/version_spec.rb
|
336
340
|
- spec/rest/user_institutions_forms_spec.rb
|
337
341
|
- spec/rest/consumers_spec.rb
|