finapps 5.0.29 → 5.0.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +2 -1
  3. data/.github/workflows/main.yaml +43 -0
  4. data/.rubocop.yml +134 -61
  5. data/.rubocop_todo.yml +120 -0
  6. data/.tmuxinator.yml +1 -0
  7. data/.travis.yml +3 -1
  8. data/RELEASES.md +31 -0
  9. data/finapps.gemspec +4 -4
  10. data/lib/finapps.rb +2 -0
  11. data/lib/finapps/rest/alert_definitions.rb +1 -1
  12. data/lib/finapps/rest/alert_occurrences.rb +1 -1
  13. data/lib/finapps/rest/client.rb +2 -0
  14. data/lib/finapps/rest/consumers.rb +22 -6
  15. data/lib/finapps/rest/consumers_portfolios.rb +1 -1
  16. data/lib/finapps/rest/documents_orders.rb +43 -25
  17. data/lib/finapps/rest/documents_orders_notifications.rb +14 -0
  18. data/lib/finapps/rest/operators.rb +5 -5
  19. data/lib/finapps/rest/operators_password_resets.rb +1 -1
  20. data/lib/finapps/rest/order_assignments.rb +1 -1
  21. data/lib/finapps/rest/order_reports.rb +1 -1
  22. data/lib/finapps/rest/orders.rb +10 -10
  23. data/lib/finapps/rest/plaid/plaid_consumer_institutions.rb +1 -1
  24. data/lib/finapps/rest/portfolio_reports.rb +1 -1
  25. data/lib/finapps/rest/portfolios.rb +1 -1
  26. data/lib/finapps/rest/portfolios_available_consumers.rb +1 -1
  27. data/lib/finapps/rest/portfolios_consumers.rb +1 -1
  28. data/lib/finapps/rest/sessions.rb +1 -1
  29. data/lib/finapps/rest/signed_documents_downloads.rb +17 -0
  30. data/lib/finapps/version.rb +1 -1
  31. data/spec/rest/alert_definitions_spec.rb +10 -2
  32. data/spec/rest/alert_occurrences_spec.rb +6 -1
  33. data/spec/rest/api_request.rb +1 -0
  34. data/spec/rest/client_spec.rb +2 -2
  35. data/spec/rest/consumers_portfolios_spec.rb +7 -2
  36. data/spec/rest/consumers_spec.rb +54 -7
  37. data/spec/rest/documents_orders_notifications_spec.rb +42 -0
  38. data/spec/rest/documents_orders_spec.rb +95 -17
  39. data/spec/rest/esign_templates_spec.rb +2 -1
  40. data/spec/rest/operators_password_resets_spec.rb +6 -1
  41. data/spec/rest/operators_spec.rb +22 -2
  42. data/spec/rest/order_assignments_spec.rb +6 -1
  43. data/spec/rest/order_notifications_spec.rb +3 -1
  44. data/spec/rest/order_refreshes_spec.rb +7 -1
  45. data/spec/rest/order_reports_spec.rb +7 -1
  46. data/spec/rest/order_statuses_spec.rb +7 -3
  47. data/spec/rest/order_tokens_spec.rb +7 -1
  48. data/spec/rest/orders_spec.rb +63 -29
  49. data/spec/rest/password_resets_spec.rb +20 -10
  50. data/spec/rest/plaid/plaid_account_permissions_spec.rb +5 -4
  51. data/spec/rest/plaid/plaid_accounts_spec.rb +9 -4
  52. data/spec/rest/plaid/plaid_consumer_institutions_spec.rb +10 -10
  53. data/spec/rest/plaid/plaid_institution_logos_spec.rb +1 -1
  54. data/spec/rest/plaid/plaid_webhooks_spec.rb +3 -1
  55. data/spec/rest/portfolio_reports_spec.rb +7 -2
  56. data/spec/rest/portfolios_alerts_spec.rb +6 -1
  57. data/spec/rest/portfolios_available_consumers_spec.rb +7 -2
  58. data/spec/rest/portfolios_consumers_spec.rb +13 -2
  59. data/spec/rest/portfolios_spec.rb +20 -5
  60. data/spec/rest/products_spec.rb +3 -1
  61. data/spec/rest/sessions_spec.rb +8 -4
  62. data/spec/rest/signed_documents_downloads_spec.rb +35 -0
  63. data/spec/rest/tenant_app_settings_spec.rb +9 -3
  64. data/spec/rest/tenant_settings_spec.rb +9 -3
  65. data/spec/rest/verix/verix_documents_spec.rb +13 -20
  66. data/spec/rest/verix/verix_metadata_spec.rb +1 -1
  67. data/spec/rest/verix/verix_pdf_documents_spec.rb +14 -19
  68. data/spec/rest/verix/verix_records_spec.rb +31 -10
  69. data/spec/rest/version_spec.rb +3 -1
  70. data/spec/spec_helper.rb +2 -2
  71. data/spec/support/fake_api.rb +20 -3
  72. data/spec/support/fixtures/documents_orders_none.json +6 -0
  73. data/spec/support/fixtures/signed_document.pdf +0 -0
  74. data/spec/utils/query_builder_spec.rb +40 -14
  75. metadata +26 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f24fb86c099693e3d0f4ffb075bbaadd4886e9c165680b192a86bc79b6e6b82
4
- data.tar.gz: 65255650d2ac2cf388f83b9be35b9b9d838ae4c2d85d850e2b25352c73e95227
3
+ metadata.gz: 6958de8a43a73230709100da8c2ddc2c2eef53d2ae74f546c37dbab8d6790b6a
4
+ data.tar.gz: 4af6e7780029881e968ef5551d3b24c965471a65080b9b45fda47ceb0e57d424
5
5
  SHA512:
6
- metadata.gz: 254d4ceb173bb18759b6aed0c6b1fd3144656e516376b7c559bdc1e9836d0782d227e35508ac032b8fb3d03d268b171e8f357ceb6c191fc1d57a9e68bca9829d
7
- data.tar.gz: 15a9340a7550212b940e16fb22890cd8ff22a99b1bc05bac3cd46435acd1f2aefa93d4118418c47c3abd2e720a27091c39b3f6b9b1376e002f49ade74f546df9
6
+ metadata.gz: 06c98f429646d29272d6a5b4d7f3f9d9bb38ca20e9e5d4fbce6db76d86200eab81acb64476170f05c705eee82c4cfa44f83f4f3b783777ccb13e962b458be7c3
7
+ data.tar.gz: fdaa7e5508c7d0f7929f15d8a68ba4137180ce56b1e4be46dcd83d7230d1f2d796d40ef1949d082309e55d7e9a78433ae927f9ec13785ec49dc80d345e8cfb6a
@@ -12,7 +12,8 @@ plugins:
12
12
  enabled: true
13
13
  config:
14
14
  languages:
15
- - ruby
15
+ ruby:
16
+ mass_threshold: 30
16
17
 
17
18
  ratings:
18
19
  paths:
@@ -0,0 +1,43 @@
1
+ name: Main
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
10
+
11
+ jobs:
12
+ ci:
13
+ runs-on: ubuntu-latest
14
+
15
+ strategy:
16
+ fail-fast: true
17
+
18
+ steps:
19
+ - uses: actions/checkout@v1
20
+
21
+ - name: Use Ruby 2.6
22
+ uses: actions/setup-ruby@v1
23
+ with:
24
+ ruby-version: '2.6'
25
+
26
+ - uses: actions/cache@v1
27
+ with:
28
+ path: vendor/bundle
29
+ key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
30
+ restore-keys: |
31
+ ${{ runner.os }}-gems-
32
+
33
+ - name: Install gems
34
+ run: |
35
+ gem install bundler
36
+ bundle config path vendor/bundle
37
+ bundle install --jobs 4 --retry 3
38
+
39
+ - name: Run rubocop
40
+ run: bundle exec rubocop
41
+
42
+ - name: Run tests
43
+ run: bundle exec rspec
@@ -1,26 +1,59 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ require:
4
+ - rubocop-rspec
5
+ - rubocop-performance
6
+
1
7
  AllCops:
2
- DisplayCopNames: true
8
+ TargetRubyVersion: 2.6
3
9
  Exclude:
4
- - "finapps.gemspec"
5
- UseCache: false
10
+ - "vendor/**/*"
11
+ - "bin/**/*"
12
+ CacheRootDirectory: tmp
6
13
 
7
- # Commonly used screens these days easily fit more than 80 characters.
14
+ Layout/SpaceAroundMethodCallOperator:
15
+ Enabled: true
16
+ Layout/EmptyLinesAroundAttributeAccessor:
17
+ Enabled: true
18
+ Layout/SpaceInsideBlockBraces:
19
+ # The space here provides no real gain in readability while consuming
20
+ # horizontal space that could be used for a better parameter name.
21
+ # Also {| differentiates better from a hash than { | does.
22
+ SpaceBeforeBlockParameters: false
23
+ Layout/SpaceInsideHashLiteralBraces:
24
+ EnforcedStyle: no_space
25
+ Layout/DotPosition:
26
+ Description: Checks the position of the dot in multi-line method calls.
27
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
28
+ Enabled: true
29
+ EnforcedStyle: leading
30
+ SupportedStyles:
31
+ - leading
32
+ - trailing
8
33
  Layout/LineLength:
9
- Max: 120
34
+ Max: 110
10
35
 
11
- Style/CollectionMethods:
12
- Description: Preferred collection methods.
13
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
36
+ Lint/DeprecatedOpenSSLConstant:
14
37
  Enabled: true
15
- PreferredMethods:
16
- collect: map
17
- collect!: map!
18
- find: detect
19
- find_all: select
20
- reduce: inject
21
- Style/OptionHash:
22
- Description: Don't use option hashes when you can use keyword arguments.
23
- Enabled: false
38
+ Lint/MixedRegexpCaptureTypes:
39
+ Enabled: true
40
+ Lint/RaiseException:
41
+ Enabled: true
42
+ Lint/StructNewOverride:
43
+ Enabled: true
44
+
45
+ Metrics/ClassLength:
46
+ Exclude:
47
+ - app/controllers/orders_controller.rb
48
+ - app/models/order.rb
49
+ Metrics/BlockLength:
50
+ ExcludedMethods: ['describe', 'context']
51
+ Exclude:
52
+ - config/environments/**/**
53
+ - Guardfile
54
+ - config/routes.rb
55
+ - config/Guardfile
56
+
24
57
  Naming/PredicateName:
25
58
  Description: Check the names of predicate methods.
26
59
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
@@ -33,54 +66,94 @@ Naming/PredicateName:
33
66
  - is_
34
67
  Exclude:
35
68
  - spec/**/*
36
- Metrics/AbcSize:
37
- Description: A calculated magnitude based on number of assignments, branches, and
38
- conditions.
39
- Enabled: false
40
- Max: 15
41
- Metrics/BlockLength:
42
- ExcludedMethods: ['describe', 'context']
43
- Metrics/ClassLength:
44
- Description: Avoid classes longer than 100 lines of code.
45
- Enabled: false
46
- CountComments: false
47
- Max: 100
48
- Metrics/ModuleLength:
49
- CountComments: false
50
- Max: 100
51
- Description: Avoid modules longer than 100 lines of code.
52
- Enabled: false
53
- Metrics/CyclomaticComplexity:
54
- Description: A complexity metric that is strongly correlated to the number of test
55
- cases needed to validate a method.
56
- Enabled: false
57
- Max: 6
58
- Metrics/MethodLength:
59
- Description: Avoid methods longer than 10 lines of code.
60
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
69
+
70
+ RSpec/FilePath:
61
71
  Enabled: false
62
- CountComments: false
63
- Max: 10
64
- Metrics/ParameterLists:
65
- Description: Avoid parameter lists longer than three or four parameters.
66
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
72
+
73
+ Style/RedundantRegexpCharacterClass:
74
+ Enabled: true
75
+ Style/RedundantRegexpEscape:
76
+ Enabled: true
77
+ Style/CollectionMethods:
78
+ Description: Preferred collection methods.
79
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
80
+ Enabled: true
81
+ PreferredMethods:
82
+ collect: map
83
+ collect!: map!
84
+ find: detect
85
+ find_all: select
86
+ reduce: inject
87
+ Style/GuardClause:
88
+ Description: Check for conditionals that can be replaced with guard clauses
89
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
90
+ Enabled: true
91
+ MinBodyLength: 1
92
+ Style/OptionHash:
93
+ Description: Don't use option hashes when you can use keyword arguments.
67
94
  Enabled: false
68
- Max: 5
69
- CountKeywordArgs: true
70
- Metrics/PerceivedComplexity:
71
- Description: A complexity metric geared towards measuring complexity for a human
72
- reader.
95
+ Style/PercentLiteralDelimiters:
96
+ Description: Use `%`-literal delimiters consistently
97
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
73
98
  Enabled: false
74
- Max: 7
99
+ PreferredDelimiters:
100
+ "%": "()"
101
+ "%i": "()"
102
+ "%q": "()"
103
+ "%Q": "()"
104
+ "%r": "{}"
105
+ "%s": "()"
106
+ "%w": "()"
107
+ "%W": "()"
108
+ "%x": "()"
109
+ Style/SignalException:
110
+ Description: Checks for proper usage of fail and raise.
111
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
112
+ Enabled: true
113
+ EnforcedStyle: semantic
114
+ SupportedStyles:
115
+ - only_raise
116
+ - only_fail
117
+ - semantic
118
+ Style/StringLiterals:
119
+ Description: Checks if uses of quotes match the configured preference.
120
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
121
+ Enabled: true
122
+ EnforcedStyle: single_quotes
123
+ SupportedStyles:
124
+ - single_quotes
125
+ - double_quotes
126
+ Style/StringLiteralsInInterpolation:
127
+ Description: Checks if uses of quotes inside expressions in interpolated strings
128
+ match the configured preference.
129
+ Enabled: true
130
+ EnforcedStyle: single_quotes
131
+ SupportedStyles:
132
+ - single_quotes
133
+ - double_quotes
75
134
  Style/Documentation:
76
135
  Description: Document classes and non-namespace modules.
77
136
  Enabled: false
78
- Style/EmptyLiteral:
79
- Description: Prefer literals to Array.new/Hash.new/String.new.
80
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
81
- Enabled: false
82
- Style/VariableInterpolation:
83
- Description: Don't interpolate global, instance and class variables directly in
84
- strings.
85
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
137
+ Style/OneLineConditional:
138
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
139
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
86
140
  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
153
+
154
+ RSpec/NestedGroups:
155
+ Max: 5
156
+ RSpec/DescribeClass:
157
+ Exclude:
158
+ - spec/system/*
159
+ - spec/factories_spec.rb
@@ -0,0 +1,120 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2020-06-24 14:28:46 UTC using RuboCop version 0.86.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
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
+ # Offense count: 1
22
+ # Configuration parameters: CountComments, ExcludedMethods.
23
+ # ExcludedMethods: refine
24
+ Metrics/BlockLength:
25
+ Max: 28
26
+
27
+ # Offense count: 1
28
+ # Configuration parameters: CountComments.
29
+ 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'
62
+
63
+ # Offense count: 5
64
+ # Configuration parameters: Max.
65
+ RSpec/ExampleLength:
66
+ Exclude:
67
+ - 'spec/rest/consumers_spec.rb'
68
+ - 'spec/rest/documents_orders_spec.rb'
69
+ - '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'
@@ -11,6 +11,7 @@ windows:
11
11
  - git pull
12
12
  - git status
13
13
  - bundle
14
+ - bundle outdated
14
15
  -
15
16
  guard:
16
17
  layout: even-horizontal
@@ -1,5 +1,7 @@
1
- sudo: false
2
1
  language: ruby
2
+ os: ["linux"]
3
+ dist: "xenial"
4
+
3
5
  cache:
4
6
  bundler: true
5
7
 
@@ -1,3 +1,34 @@
1
+ ## [5.0.32] - 2020-06-11
2
+
3
+ ### Fixed
4
+ * Argument error resulting from space search ([#225][i225])
5
+
6
+ [i225]: https://github.com/finapps/ruby-client/issues/225
7
+
8
+ [5.0.32]: https://github.com/finapps/ruby-client/compare/5.0.31...5.0.32
9
+
10
+ ## [5.0.31] - 2020-06-11
11
+
12
+ ### Changed
13
+ * Consumer and Doc-order search to query names on spaces ([#224][i224])
14
+
15
+ [i224]: https://github.com/finapps/ruby-client/issues/224
16
+
17
+ [5.0.31]: https://github.com/finapps/ruby-client/compare/5.0.30...5.0.31
18
+
19
+ ## [5.0.30] - 2020-05-28
20
+
21
+ ### Added
22
+ * New esign endpoints ([#222][i222])
23
+
24
+ ### Changed
25
+ * Search query for documents orders ([#221][i221])
26
+
27
+ [i221]: https://github.com/finapps/ruby-client/issues/221
28
+ [i222]: https://github.com/finapps/ruby-client/issues/222
29
+
30
+ [5.0.30]: https://github.com/finapps/ruby-client/compare/5.0.29...5.0.30
31
+
1
32
  ## [5.0.29] - 2020-05-08
2
33
 
3
34
  ### Added