finapps 5.0.33 → 5.0.41

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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/release-drafter.yml +49 -0
  3. data/.github/workflows/main.yaml +38 -0
  4. data/.github/workflows/release-drafter.yml +15 -0
  5. data/.github/workflows/release.yml +43 -0
  6. data/.github/workflows/verify-pr-labeled.yml +14 -0
  7. data/.rubocop.yml +5 -12
  8. data/.rubocop_todo.yml +4 -95
  9. data/README.md +1 -0
  10. data/RELEASES.md +20 -0
  11. data/finapps.gemspec +1 -2
  12. data/lib/finapps.rb +2 -0
  13. data/lib/finapps/rest/client.rb +8 -5
  14. data/lib/finapps/rest/documents_orders.rb +1 -1
  15. data/lib/finapps/rest/documents_upload_types.rb +11 -0
  16. data/lib/finapps/rest/documents_uploads.rb +23 -0
  17. data/lib/finapps/rest/orders.rb +26 -15
  18. data/lib/finapps/rest/sessions.rb +10 -8
  19. data/lib/finapps/utils/query_builder.rb +13 -4
  20. data/lib/finapps/version.rb +1 -1
  21. data/spec/rest/alert_definitions_spec.rb +2 -6
  22. data/spec/rest/client_spec.rb +32 -40
  23. data/spec/rest/consumers_spec.rb +221 -220
  24. data/spec/rest/documents_orders_notifications_spec.rb +1 -1
  25. data/spec/rest/documents_orders_spec.rb +1 -1
  26. data/spec/rest/documents_upload_types_spec.rb +21 -0
  27. data/spec/rest/documents_uploads_spec.rb +104 -0
  28. data/spec/rest/operators_password_resets_spec.rb +49 -56
  29. data/spec/rest/operators_spec.rb +167 -178
  30. data/spec/rest/order_notifications_spec.rb +1 -1
  31. data/spec/rest/order_refreshes_spec.rb +2 -5
  32. data/spec/rest/order_reports_spec.rb +14 -14
  33. data/spec/rest/order_statuses_spec.rb +10 -10
  34. data/spec/rest/order_tokens_spec.rb +33 -32
  35. data/spec/rest/orders_spec.rb +78 -64
  36. data/spec/rest/password_resets_spec.rb +28 -28
  37. data/spec/rest/plaid/plaid_consumer_institutions_spec.rb +1 -1
  38. data/spec/rest/portfolios_alerts_spec.rb +3 -3
  39. data/spec/rest/portfolios_consumers_spec.rb +2 -2
  40. data/spec/rest/portfolios_spec.rb +6 -18
  41. data/spec/rest/products_spec.rb +16 -15
  42. data/spec/rest/sessions_spec.rb +61 -60
  43. data/spec/rest/signed_documents_downloads_spec.rb +8 -4
  44. data/spec/rest/verix/verix_documents_spec.rb +2 -2
  45. data/spec/rest/version_spec.rb +4 -4
  46. data/spec/support/fake_api.rb +16 -1
  47. data/spec/support/fixtures/upload_types.json +9 -0
  48. metadata +70 -79
  49. data/lib/tasks/releaser.rake +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bc0442f42cabf196882b3f3d0ae8f1ae5d9f36f49884169dd34c0accafa5537
4
- data.tar.gz: 75be45fb19c5f5fb86e67e683ff436cc7e213676112eb8c132517526d3fdafcd
3
+ metadata.gz: 5b293938018fe5cdcccba1a161ca630d5d1e602a634483c5b1281adf4611c76f
4
+ data.tar.gz: 2ede0f7dfe44afe57006c8d685f0b550104d3c1395e98d1cf75538f870fbd6bc
5
5
  SHA512:
6
- metadata.gz: 34ea2347a6692389744647a4143830219b0f5d9160e6e7324724f73eba7807965cc019e7000cc7621f41c34a116e6442f1279995bfac46b318936abc26cd96fc
7
- data.tar.gz: 071c55d0059d031bae2dafc12ed7d242de5afb49f03b49ea07552a0f877e7e1ad4278bed42769d44622ecb30231ea26a4de7dd42ade2f2618fe94ddf5c17e3b6
6
+ metadata.gz: e14eb4bc25a190d5803163b9cb60c2440be01b1172779c4a16d54f538a76b85e1c4650c7c98776b0185ffa5292e536142a4f899023f5fb6340ba0906f4ca2797
7
+ data.tar.gz: 0b7fe2a98897d7908657cf9579312449f236ed8611db113b5c88b46a00450ea1ffdfb9d43a2ae155c60197748ffa5a2081702caffc8b4e4a433b25a7d40e9edc
@@ -0,0 +1,49 @@
1
+ name-template: 'version $RESOLVED_VERSION'
2
+ tag-template: 'v$RESOLVED_VERSION'
3
+ categories:
4
+ - title: 'Added'
5
+ labels: 'enhancement'
6
+ - title: 'Changed'
7
+ labels: 'change'
8
+ - title: 'Deprecated'
9
+ labels: 'deprecated'
10
+ - title: 'Removed'
11
+ labels: 'removed'
12
+ - title: 'Fixed'
13
+ labels: 'bug'
14
+ - title: 'Security'
15
+ label: 'dependencies'
16
+ - title: 'Documentation updates'
17
+ label: 'documentation'
18
+ - title: 'Maintenance'
19
+ labels: 'internal'
20
+
21
+ change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
22
+
23
+ version-resolver:
24
+ major:
25
+ labels:
26
+ - 'major'
27
+ minor:
28
+ labels:
29
+ - 'minor'
30
+ patch:
31
+ labels:
32
+ - 'patch'
33
+ default: patch
34
+
35
+ exclude-labels:
36
+ - reverted
37
+ - no-changelog
38
+ - skip-changelog
39
+ - invalid
40
+
41
+ template: |
42
+ ## [$RESOLVED_VERSION](https://github.com/finapps/ruby-client/compare/$PREVIOUS_TAG...$RESOLVED_VERSION)
43
+ $CHANGES
44
+
45
+ replacers:
46
+ - search: '/CVE-(\d{4})-(\d+)/g'
47
+ replace: 'https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-$1-$2'
48
+ - search: '@dependabot-preview'
49
+ replace: '@dependabot'
@@ -0,0 +1,38 @@
1
+ name: Continuous Integration
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ ci:
7
+ if: "!contains(github.event.head_commit.message, 'skip ci')"
8
+ runs-on: ubuntu-latest
9
+
10
+ strategy:
11
+ fail-fast: true
12
+
13
+ steps:
14
+ - uses: actions/checkout@v1
15
+
16
+ - name: Use Ruby 2.6
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: '2.6'
20
+
21
+ - uses: actions/cache@v1
22
+ with:
23
+ path: vendor/bundle
24
+ key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
25
+ restore-keys: |
26
+ ${{ runner.os }}-gems-
27
+
28
+ - name: Install gems
29
+ run: |
30
+ gem install bundler
31
+ bundle config path vendor/bundle
32
+ bundle install --jobs 4 --retry 3
33
+
34
+ - name: Run rubocop
35
+ run: bundle exec rubocop
36
+
37
+ - name: Run tests
38
+ run: bundle exec rspec
@@ -0,0 +1,15 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ update_release_draft:
10
+ if: "!contains(github.event.head_commit.message, 'skip ci')"
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: release-drafter/release-drafter@v5
14
+ env:
15
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,43 @@
1
+ name: Bump version and Release
2
+ on:
3
+ release:
4
+ types: [published]
5
+
6
+ jobs:
7
+ release:
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ fail-fast: true
11
+
12
+ steps:
13
+ - uses: actions/checkout@master
14
+ with:
15
+ fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
16
+
17
+ - uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: '2.6'
20
+
21
+ - name: Get version from latest tag
22
+ id: get_version
23
+ uses: battila7/get-version-action@v2
24
+
25
+ - name: Bump version
26
+ run: |
27
+ gem install -N gem-release
28
+ git config --local user.email "action@github.com"
29
+ git config --local user.name "GitHub Action"
30
+ gem bump --skip-ci --version ${{ steps.get_version.outputs.version-without-v }}
31
+ git push origin HEAD:master
32
+
33
+ - name: Release gem to rubygems.org
34
+ run: |
35
+ set +x
36
+ mkdir -p ~/.gem
37
+ cat << EOF > ~/.gem/credentials
38
+ ---
39
+ :rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
40
+ EOF
41
+ chmod 0600 ~/.gem/credentials
42
+ set -x
43
+ gem release
@@ -0,0 +1,14 @@
1
+ name: "Require PR labels"
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, labeled, unlabeled, synchronize]
6
+ jobs:
7
+ label:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: mheap/github-action-required-labels@v1
11
+ with:
12
+ mode: exactly
13
+ count: 1
14
+ labels: "bug, change, enhancement"
@@ -10,6 +10,7 @@ AllCops:
10
10
  - "vendor/**/*"
11
11
  - "bin/**/*"
12
12
  CacheRootDirectory: tmp
13
+ NewCops: enable
13
14
 
14
15
  Layout/SpaceAroundMethodCallOperator:
15
16
  Enabled: true
@@ -69,6 +70,8 @@ Naming/PredicateName:
69
70
 
70
71
  RSpec/FilePath:
71
72
  Enabled: false
73
+ Gemspec/RequiredRubyVersion:
74
+ Enabled: false
72
75
 
73
76
  Style/RedundantRegexpCharacterClass:
74
77
  Enabled: true
@@ -138,18 +141,8 @@ Style/OneLineConditional:
138
141
  Description: Favor the ternary operator(?:) over if/then/else/end constructs.
139
142
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
140
143
  Enabled: false
141
- Style/ExponentialNotation:
142
- Enabled: true
143
- Style/HashEachMethods:
144
- Enabled: true
145
- Style/HashTransformKeys:
146
- Enabled: true
147
- Style/HashTransformValues:
148
- Enabled: true
149
- Style/RedundantFetchBlock:
150
- Enabled: true
151
- Style/SlicingWithRange:
152
- Enabled: true
144
+ Style/OptionalBooleanParameter:
145
+ Enabled: false
153
146
 
154
147
  RSpec/NestedGroups:
155
148
  Max: 5
@@ -6,115 +6,24 @@
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 12
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
12
- # URISchemes: http, https
13
- Layout/LineLength:
14
- Max: 119
15
-
16
- # Offense count: 1
17
- # Configuration parameters: IgnoredMethods.
18
- Metrics/AbcSize:
19
- Max: 16
20
-
21
9
  # Offense count: 1
22
10
  # Configuration parameters: CountComments, ExcludedMethods.
23
11
  # ExcludedMethods: refine
12
+ # finapps.gemspec - leaving as is intentionally
24
13
  Metrics/BlockLength:
25
14
  Max: 28
26
15
 
27
16
  # Offense count: 1
28
17
  # Configuration parameters: CountComments.
18
+ # fake_api.rb - leaving as is intentionally
29
19
  Metrics/ClassLength:
30
- Max: 431
31
-
32
- # Offense count: 3
33
- # Configuration parameters: CountComments, ExcludedMethods.
34
- Metrics/MethodLength:
35
- Max: 16
36
-
37
- # Offense count: 29
38
- # Configuration parameters: Prefixes.
39
- # Prefixes: when, with, without
40
- RSpec/ContextWording:
41
- Exclude:
42
- - 'spec/rest/client_spec.rb'
43
- - 'spec/rest/consumers_spec.rb'
44
- - 'spec/rest/documents_orders_notifications_spec.rb'
45
- - 'spec/rest/operators_password_resets_spec.rb'
46
- - 'spec/rest/operators_spec.rb'
47
- - 'spec/rest/order_notifications_spec.rb'
48
- - 'spec/rest/order_tokens_spec.rb'
49
- - 'spec/rest/orders_spec.rb'
50
- - 'spec/rest/portfolios_consumers_spec.rb'
51
- - 'spec/rest/sessions_spec.rb'
52
-
53
- # Offense count: 6
54
- RSpec/DescribeMethod:
55
- Exclude:
56
- - 'spec/rest/consumers_spec.rb'
57
- - 'spec/rest/operators_password_resets_spec.rb'
58
- - 'spec/rest/operators_spec.rb'
59
- - 'spec/rest/order_tokens_spec.rb'
60
- - 'spec/rest/products_spec.rb'
61
- - 'spec/rest/sessions_spec.rb'
20
+ Max: 442
62
21
 
63
22
  # Offense count: 5
64
23
  # Configuration parameters: Max.
24
+ # Leaving as is intentionally - url being tested takes up as many lines
65
25
  RSpec/ExampleLength:
66
26
  Exclude:
67
27
  - 'spec/rest/consumers_spec.rb'
68
28
  - 'spec/rest/documents_orders_spec.rb'
69
29
  - 'spec/rest/orders_spec.rb'
70
-
71
- # Offense count: 1
72
- # Configuration parameters: .
73
- # SupportedStyles: have_received, receive
74
- RSpec/MessageSpies:
75
- EnforcedStyle: receive
76
-
77
- # Offense count: 13
78
- RSpec/MultipleExpectations:
79
- Max: 3
80
-
81
- # Offense count: 114
82
- # Configuration parameters: IgnoreSharedExamples.
83
- RSpec/NamedSubject:
84
- Exclude:
85
- - 'spec/rest/client_spec.rb'
86
- - 'spec/rest/consumers_spec.rb'
87
- - 'spec/rest/documents_orders_spec.rb'
88
- - 'spec/rest/order_reports_spec.rb'
89
- - 'spec/rest/order_statuses_spec.rb'
90
- - 'spec/rest/order_tokens_spec.rb'
91
- - 'spec/rest/orders_spec.rb'
92
- - 'spec/rest/password_resets_spec.rb'
93
- - 'spec/rest/plaid/plaid_consumer_institutions_spec.rb'
94
- - 'spec/rest/sessions_spec.rb'
95
- - 'spec/rest/signed_documents_downloads_spec.rb'
96
- - 'spec/rest/verix/verix_documents_spec.rb'
97
- - 'spec/rest/verix/verix_pdf_documents_spec.rb'
98
- - 'spec/rest/version_spec.rb'
99
-
100
- # Offense count: 6
101
- RSpec/RepeatedExample:
102
- Exclude:
103
- - 'spec/rest/signed_documents_downloads_spec.rb'
104
- - 'spec/rest/verix/verix_documents_spec.rb'
105
- - 'spec/rest/verix/verix_pdf_documents_spec.rb'
106
-
107
- # Offense count: 2
108
- RSpec/RepeatedExampleGroupBody:
109
- Exclude:
110
- - 'spec/rest/client_spec.rb'
111
-
112
- # Offense count: 4
113
- RSpec/RepeatedExampleGroupDescription:
114
- Exclude:
115
- - 'spec/rest/client_spec.rb'
116
-
117
- # Offense count: 1
118
- RSpec/SubjectStub:
119
- Exclude:
120
- - 'spec/rest/orders_spec.rb'
data/README.md CHANGED
@@ -3,6 +3,7 @@ FinApps Ruby-Client
3
3
  ===================
4
4
 
5
5
  [![Gem Version](https://img.shields.io/gem/v/finapps.svg)](https://rubygems.org/gems/finapps)
6
+ ![Main](https://github.com/finapps/ruby-client/workflows/Main/badge.svg)
6
7
  [![Build Status](https://travis-ci.org/finapps/ruby-client.svg?branch=master)](https://travis-ci.org/finapps/ruby-client)
7
8
  [![Code Climate](https://codeclimate.com/github/finapps/ruby-client/badges/gpa.svg)](https://codeclimate.com/github/finapps/ruby-client)
8
9
  [![Test Coverage](https://codeclimate.com/github/finapps/ruby-client/badges/coverage.svg)](https://codeclimate.com/github/finapps/ruby-client/coverage)
@@ -1,3 +1,23 @@
1
+ ## [5.0.36] - 2020-08-05
2
+
3
+ ### Changed
4
+ * Add upload endpoints to support dashboard ([#309][i309])
5
+
6
+ [i309]: https://github.com/finapps/tenant-dashboard-react/issues/309
7
+
8
+ [5.0.36]: https://github.com/finapps/ruby-client/compare/5.0.35...5.0.36
9
+
10
+ ## [5.0.35] - 2020-07-09
11
+
12
+ ### Changed
13
+ * Change code to match rubocop suggestions ([#232][i232])
14
+ * Add support for first name order search with space ([#404][i404])
15
+
16
+ [i232]: https://github.com/finapps/ruby-client/issues/232
17
+ [i404]: https://github.com/finapps/tenant-dashboard-react/issues/404
18
+
19
+ [5.0.35]: https://github.com/finapps/ruby-client/compare/5.0.34...5.0.35
20
+
1
21
  ## [5.0.32] - 2020-06-11
2
22
 
3
23
  ### Fixed
@@ -20,11 +20,10 @@ Gem::Specification.new do |spec|
20
20
  spec.test_files = Dir['spec/**/*.rb']
21
21
  spec.require_paths = ['lib']
22
22
 
23
- spec.add_runtime_dependency 'finapps_core', '~> 5.0', '>= 5.0.7'
23
+ spec.add_runtime_dependency 'finapps_core', '~> 5.0', '>= 5.0.10'
24
24
 
25
25
  spec.add_development_dependency 'bundler', '~> 2.0', '>= 2.0.2'
26
26
  spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0', '>= 1.0.9'
27
- spec.add_development_dependency 'gem-release', '~> 2.1', '>= 2.1.1'
28
27
  spec.add_development_dependency 'guard', '~> 2.16', '>= 2.16.1'
29
28
  spec.add_development_dependency 'guard-rspec', '~> 4.7', '>= 4.7.3'
30
29
  spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.1'
@@ -30,7 +30,9 @@ require 'finapps/rest/portfolios_consumers'
30
30
  require 'finapps/rest/consumers_portfolios'
31
31
  require 'finapps/rest/portfolio_reports'
32
32
  require 'finapps/rest/documents_orders'
33
+ require 'finapps/rest/documents_uploads'
33
34
  require 'finapps/rest/esign_templates'
35
+ require 'finapps/rest/documents_upload_types'
34
36
  require 'finapps/rest/signed_documents_downloads'
35
37
  require 'finapps/rest/documents_orders_notifications'
36
38
 
@@ -13,6 +13,8 @@ module FinApps
13
13
  consumers_portfolios
14
14
  documents_orders
15
15
  documents_orders_notifications
16
+ documents_upload_types
17
+ documents_uploads
16
18
  esign_templates
17
19
  orders
18
20
  order_assignments
@@ -60,17 +62,18 @@ module FinApps
60
62
  if RESOURCES.include? symbol
61
63
  class_name = camelize(symbol.to_s)
62
64
  variable = "@#{class_name.downcase}"
63
- unless instance_variable_defined? variable
64
- klass =
65
- Object.const_get('FinApps').const_get('REST').const_get class_name
66
- instance_variable_set(variable, klass.new(self))
67
- end
65
+ set_variable(class_name, variable) unless instance_variable_defined? variable
68
66
  instance_variable_get(variable)
69
67
  else
70
68
  super
71
69
  end
72
70
  end
73
71
 
72
+ def set_variable(class_name, variable)
73
+ klass = Object.const_get('FinApps').const_get('REST').const_get class_name
74
+ instance_variable_set(variable, klass.new(self))
75
+ end
76
+
74
77
  def respond_to_missing?(method_sym, include_private = false)
75
78
  RESOURCES.include?(method_sym) ? true : super
76
79
  end
@@ -33,7 +33,7 @@ module FinApps
33
33
 
34
34
  def destroy(id)
35
35
  not_blank(id, :order_id)
36
- super(id, "documents/orders/#{id}")
36
+ super(nil, "documents/orders/#{id}")
37
37
  end
38
38
 
39
39
  def show_signing_url(order_id, signature_id)
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FinApps
4
+ module REST
5
+ class DocumentsUploadTypes < FinAppsCore::REST::Resources
6
+ def list
7
+ super('documents/upload_types')
8
+ end
9
+ end
10
+ end
11
+ end