finapps 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rake_tasks~ +1 -0
- data/lib/finapps/rest/orders.rb +8 -2
- data/lib/finapps/version.rb +1 -1
- data/spec/rest/orders_spec.rb +5 -4
- metadata +20 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dc62eb0450848da43d6c578898f386fe9e8b4a7
|
4
|
+
data.tar.gz: aa458d6093c67e47b5c85806adc03530a1a0753f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae9cbc757ed86be1128549f55b018825318f3b654f84cfe1a842b0529287f6d99a6801daef0c79adef6f1d3cb1854c6e7461df0962442590e4e9b82c6e3040fa
|
7
|
+
data.tar.gz: 3bc8014f197e333a0d25adfaf676440bf9e1356b109b91382ab6638dbfd1fda2b47d18b602ae533c60193a5080352ffc86e133f51175cff18a3f9b0f668d47ef
|
data/.rake_tasks~
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
release
|
data/lib/finapps/rest/orders.rb
CHANGED
@@ -63,10 +63,16 @@ module FinApps
|
|
63
63
|
def search_query(term)
|
64
64
|
{
|
65
65
|
"$or": [
|
66
|
-
{"public_id":
|
66
|
+
{"public_id": {
|
67
|
+
"$regex": "^#{term}",
|
68
|
+
"$options": 'i'
|
69
|
+
}},
|
67
70
|
{"applicant.last_name": term},
|
68
71
|
{"assignment.last_name": term},
|
69
|
-
{"requestor.reference_no":
|
72
|
+
{"requestor.reference_no": {
|
73
|
+
"$regex": "^#{term}",
|
74
|
+
"$options": 'i'
|
75
|
+
}}
|
70
76
|
]
|
71
77
|
}
|
72
78
|
end
|
data/lib/finapps/version.rb
CHANGED
data/spec/rest/orders_spec.rb
CHANGED
@@ -88,10 +88,11 @@ RSpec.describe FinApps::REST::Orders do
|
|
88
88
|
it('returns no error messages') { expect(subject[ERROR_MESSAGES]).to be_empty }
|
89
89
|
it 'builds query and sends proper request' do
|
90
90
|
subject
|
91
|
-
url = "#{FinAppsCore::REST::Defaults::DEFAULTS[:host]}/v3/orders?filter=%7B%22$or%22:%5B%7B%22public_id%22"
|
92
|
-
'
|
93
|
-
',%7B%
|
94
|
-
'
|
91
|
+
url = "#{FinAppsCore::REST::Defaults::DEFAULTS[:host]}/v3/orders?filter=%7B%22$or%22:%5B%7B%22public_id%22:" \
|
92
|
+
'%7B%22$regex%22:%22%5Eterm%22,%22$options%22:%22i%22%7D%7D,%7B%22applicant.last_name%22:%22term%22%7D' \
|
93
|
+
',%7B%22assignment.last_name%22:%22term%22%7D,%7B%22requestor.reference_no%22:%7B%22$regex%22:%22%5E' \
|
94
|
+
'term%22,%22$options%22:%22i%22%7D%7D%5D,%22status%22:%7B%22$in%22:%5B1,7%5D%7D,%22assignment.' \
|
95
|
+
'operator_id%22:%22valid_operator%22%7D&page=2&requested=25&sort=status'
|
95
96
|
expect(WebMock).to have_requested(:get, url)
|
96
97
|
end
|
97
98
|
it 'builds query and sends proper request with searchTerm/relation exclusivity' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finapps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Quintero
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- ".codeclimate.yml"
|
197
197
|
- ".gitignore"
|
198
198
|
- ".hound.yml"
|
199
|
+
- ".rake_tasks~"
|
199
200
|
- ".rspec"
|
200
201
|
- ".rubocop.yml"
|
201
202
|
- ".ruby-gemset"
|
@@ -320,29 +321,29 @@ signing_key:
|
|
320
321
|
specification_version: 4
|
321
322
|
summary: FinApps REST API ruby client.
|
322
323
|
test_files:
|
323
|
-
- spec/rest/
|
324
|
-
- spec/rest/
|
325
|
-
- spec/rest/
|
326
|
-
- spec/rest/version_spec.rb
|
324
|
+
- spec/rest/institutions_spec.rb
|
325
|
+
- spec/rest/consumer_institution_refreshes_spec.rb
|
326
|
+
- spec/rest/order_assignments_spec.rb
|
327
327
|
- spec/rest/user_institutions_forms_spec.rb
|
328
|
-
- spec/rest/consumers_spec.rb
|
329
|
-
- spec/rest/orders_spec.rb
|
330
|
-
- spec/rest/order_tokens_spec.rb
|
331
|
-
- spec/rest/institutions_forms_spec.rb
|
332
|
-
- spec/rest/operators_spec.rb
|
333
|
-
- spec/rest/user_institutions_statuses_spec.rb
|
334
328
|
- spec/rest/client_spec.rb
|
335
|
-
- spec/rest/
|
336
|
-
- spec/rest/consumer_institution_refreshes_spec.rb
|
329
|
+
- spec/rest/version_spec.rb
|
337
330
|
- spec/rest/password_resets_spec.rb
|
338
|
-
- spec/rest/
|
339
|
-
- spec/rest/institutions_spec.rb
|
331
|
+
- spec/rest/operators_spec.rb
|
340
332
|
- spec/rest/order_statuses_spec.rb
|
333
|
+
- spec/rest/order_reports_spec.rb
|
334
|
+
- spec/rest/consumers_spec.rb
|
335
|
+
- spec/rest/sessions_spec.rb
|
336
|
+
- spec/rest/user_institutions_statuses_spec.rb
|
337
|
+
- spec/rest/orders_spec.rb
|
338
|
+
- spec/rest/operators_password_resets_spec.rb
|
339
|
+
- spec/rest/institutions_forms_spec.rb
|
341
340
|
- spec/rest/order_refreshes_spec.rb
|
342
341
|
- spec/rest/order_notifications_spec.rb
|
343
|
-
- spec/rest/
|
344
|
-
- spec/rest/
|
345
|
-
- spec/
|
342
|
+
- spec/rest/statements_spec.rb
|
343
|
+
- spec/rest/order_tokens_spec.rb
|
344
|
+
- spec/rest/user_institutions_spec.rb
|
345
|
+
- spec/rest/products_spec.rb
|
346
346
|
- spec/utils/query_builder_spec.rb
|
347
|
-
- spec/
|
347
|
+
- spec/support/fake_api.rb
|
348
348
|
- spec/spec_helper.rb
|
349
|
+
- spec/spec_helpers/client.rb
|