lunchmoney 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +7 -0
  3. data/.github/FUNDING.yml +1 -0
  4. data/.github/workflows/check_pipeline.yml +2 -2
  5. data/.github/workflows/ci.yml +10 -2
  6. data/.github/workflows/release_pipeline.yml +1 -1
  7. data/.mdlrc +5 -0
  8. data/.rubocop.yml +1 -0
  9. data/.simplecov +30 -0
  10. data/.toys/.toys.rb +1 -0
  11. data/.toys/coverage.rb +5 -0
  12. data/.toys/mdl.rb +5 -0
  13. data/Gemfile +3 -0
  14. data/Gemfile.lock +64 -37
  15. data/LICENSE +1 -1
  16. data/README.md +7 -3
  17. data/lib/lunchmoney/objects/crypto.rb +6 -1
  18. data/lib/lunchmoney/objects/object.rb +3 -1
  19. data/lib/lunchmoney/version.rb +1 -1
  20. data/sorbet/rbi/annotations/activesupport.rbi +11 -0
  21. data/sorbet/rbi/gems/{activesupport@7.1.3.rbi → activesupport@7.1.3.2.rbi} +23 -23
  22. data/sorbet/rbi/gems/chef-utils@18.4.2.rbi +8 -0
  23. data/sorbet/rbi/gems/docile@1.4.0.rbi +376 -0
  24. data/sorbet/rbi/gems/dotenv@3.1.0.rbi +300 -0
  25. data/sorbet/rbi/gems/{i18n@1.14.1.rbi → i18n@1.14.4.rbi} +48 -43
  26. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +127 -0
  27. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +3271 -0
  28. data/sorbet/rbi/gems/mdl@0.13.0.rbi +444 -0
  29. data/sorbet/rbi/gems/{minitest@5.22.2.rbi → minitest@5.22.3.rbi} +19 -18
  30. data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +313 -0
  31. data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +580 -0
  32. data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +628 -0
  33. data/sorbet/rbi/gems/{prism@0.19.0.rbi → prism@0.24.0.rbi} +8266 -7109
  34. data/sorbet/rbi/gems/{rack@3.0.8.rbi → rack@3.0.10.rbi} +83 -83
  35. data/sorbet/rbi/gems/{rbi@0.1.6.rbi → rbi@0.1.9.rbi} +114 -13
  36. data/sorbet/rbi/gems/{rubocop-ast@1.30.0.rbi → rubocop-ast@1.31.2.rbi} +61 -50
  37. data/sorbet/rbi/gems/{rubocop-minitest@0.34.5.rbi → rubocop-minitest@0.35.0.rbi} +34 -0
  38. data/sorbet/rbi/gems/{rubocop-rails@2.23.1.rbi → rubocop-rails@2.24.1.rbi} +159 -147
  39. data/sorbet/rbi/gems/{rubocop-sorbet@0.7.7.rbi → rubocop-sorbet@0.8.0.rbi} +24 -42
  40. data/sorbet/rbi/gems/{rubocop@1.60.2.rbi → rubocop@1.62.1.rbi} +807 -646
  41. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +216 -0
  42. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2148 -0
  43. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +238 -0
  44. data/sorbet/rbi/gems/{tapioca@0.12.0.rbi → tapioca@0.13.1.rbi} +83 -62
  45. data/sorbet/rbi/gems/{thor@1.3.0.rbi → thor@1.3.1.rbi} +89 -50
  46. data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +8 -0
  47. data/sorbet/rbi/gems/{webmock@3.20.0.rbi → webmock@3.23.0.rbi} +25 -25
  48. data/sorbet/rbi/gems/{yard@0.9.34.rbi → yard@0.9.36.rbi} +194 -58
  49. data/sorbet/tapioca/require.rb +1 -0
  50. metadata +39 -23
  51. data/.DS_Store +0 -0
  52. data/.github/workflows/publish_gem.yml +0 -29
  53. data/sorbet/rbi/gems/dotenv@2.8.1.rbi +0 -234
  54. /data/sorbet/rbi/gems/{bigdecimal@3.1.6.rbi → bigdecimal@3.1.7.rbi} +0 -0
  55. /data/sorbet/rbi/gems/{drb@2.2.0.rbi → drb@2.2.1.rbi} +0 -0
  56. /data/sorbet/rbi/gems/{rubocop-shopify@2.14.0.rbi → rubocop-shopify@2.15.1.rbi} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a66d419d272f25d940cb0ad8a5f5962b85aa3cb74deee1486e3f7ed9caf9f8ac
4
- data.tar.gz: bd656eac78fd93d9979e3a86ab639f7f880f2e74fd2fb3a0e64889a7df8e6086
3
+ metadata.gz: ade3f058472ad8a1675c50523464337634c50eecb05eac449ab10d6eddd741c1
4
+ data.tar.gz: 5aad397a6fd0f9d05caf81ba54e12e4abf0ae06c46a23dcb37587b91dd4f5cb6
5
5
  SHA512:
6
- metadata.gz: d756dda147ed0c8cb492c2be68d40772a0d182513fbef4cdc326c7a5644b16f23e8a7ee5bb0228e030d6f16b9c8b396b1fd3cedc9bdfd9d389bdd9bddef37721
7
- data.tar.gz: c9899675f397835b813d864db59db9e311cb1f99422349c901f8676a409bd22ce8be0a42e8bdc8c6ad77f341c23f7b67436966c4e10b09cc95eb9d8838dd3432
6
+ metadata.gz: 71204a77261c3820cfd769fc212a1665f370e2fce8602b74321c98bd4740d3b359ed54ee6b4988efdffc554c63d1fd65f4f458a67301e3c74d0f5a0403873f6e
7
+ data.tar.gz: 5455912322a61badb7c849ce1a47af1372d89f8ac6fb00eb3c2aa73f2ed0ab1f6b7fa1e70b84cc6ee1c37ee1a1475d990237bd8c42b6575eccbf167fa876b6d5
data/.codeclimate.yml ADDED
@@ -0,0 +1,7 @@
1
+ version: "2" # required to adjust maintainability checks
2
+ plugins:
3
+ flog:
4
+ enabled: true
5
+ channel: flog-4-6-6
6
+ config:
7
+ score_threshold: 20.0
@@ -0,0 +1 @@
1
+ custom: https://www.buymeacoffee.com/mmenanno
@@ -13,12 +13,12 @@ on:
13
13
  jobs:
14
14
  update-rbis:
15
15
  name: RBI Updater
16
- uses: mmenanno/lunchmoney/.github/workflows/dependabot-rbi-updater.yml@main
16
+ uses: ./.github/workflows/dependabot-rbi-updater.yml
17
17
  secrets: inherit
18
18
 
19
19
  ci:
20
20
  needs: update-rbis
21
21
  if: always() && contains(needs.*.result, 'skipped')
22
22
  name: "CI"
23
- uses: mmenanno/lunchmoney/.github/workflows/ci.yml@main
23
+ uses: ./.github/workflows/ci.yml
24
24
  secrets: inherit
@@ -41,15 +41,23 @@ jobs:
41
41
  -
42
42
  name: Check for DSL rbi updates
43
43
  run: bin/tapioca dsl --verify
44
+ -
45
+ name: Markdown Lint
46
+ run: bin/toys mdl
44
47
  -
45
48
  name: Run Tests (Using Cassettes)
46
49
  if: ${{ ! endsWith(matrix.ruby-version, '3.3') }}
47
50
  run: bin/toys test
48
51
  -
49
- name: Run Tests (With Remote Calls)
52
+ name: Run Tests (With Remote Calls & Coverage Report)
50
53
  if: ${{ endsWith(matrix.ruby-version, '3.3') }}
51
- run: bin/toys test
54
+ uses: paambaati/codeclimate-action@v5.0.0
52
55
  env:
56
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
53
57
  REMOTE_TESTS_ENABLED: ${{ vars.REMOTE_TESTS_ENABLED }}
54
58
  LUNCHMONEY_TOKEN: ${{ secrets.LUNCHMONEY_TOKEN }}
59
+ with:
60
+ coverageCommand: bin/toys test
61
+ coverageLocations: |
62
+ ${{ github.workspace }}/coverage/coverage.json:simplecov
55
63
 
@@ -9,7 +9,7 @@ on:
9
9
  jobs:
10
10
  ci:
11
11
  name: "CI"
12
- uses: mmenanno/lunchmoney/.github/workflows/ci.yml@main
12
+ uses: ./.github/workflows/ci.yml
13
13
  secrets: inherit
14
14
  release:
15
15
  needs: ci
data/.mdlrc ADDED
@@ -0,0 +1,5 @@
1
+ all
2
+ rule 'ol-prefix', :style => "ordered"
3
+ rule 'no-inline-html', :allowed_elements => 'a, img'
4
+
5
+ exclude_rule 'line-length'
data/.rubocop.yml CHANGED
@@ -11,6 +11,7 @@ AllCops:
11
11
  NewCops: enable
12
12
  Exclude:
13
13
  - "sorbet/**/*"
14
+ - ".mdlrc"
14
15
 
15
16
  Sorbet:
16
17
  Enabled: true
data/.simplecov ADDED
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "simplecov_json_formatter"
4
+
5
+ SimpleCov.formatter = if ENV.fetch("CI", false)
6
+ SimpleCov::Formatter::JSONFormatter
7
+ else
8
+ SimpleCov::Formatter::HTMLFormatter
9
+ end
10
+
11
+ SimpleCov.minimum_coverage(95)
12
+ SimpleCov.maximum_coverage_drop(1)
13
+ SimpleCov.start do
14
+ enable_coverage :branch
15
+ primary_coverage :branch
16
+
17
+ add_filter "/test/"
18
+
19
+ add_group "Calls", "lib/lunchmoney/calls"
20
+ add_group "Objects", "lib/lunchmoney/objects"
21
+ add_group "Core Files", [
22
+ "lib/lunchmoney.rb",
23
+ "lib/lunchmoney/api.rb",
24
+ "lib/lunchmoney/configuration.rb",
25
+ "lib/lunchmoney/errors.rb",
26
+ "lib/lunchmoney/exceptions.rb",
27
+ "lib/lunchmoney/validators.rb",
28
+ "lib/lunchmoney/version.rb",
29
+ ]
30
+ end
data/.toys/.toys.rb CHANGED
@@ -8,3 +8,4 @@ expand :gem_build, name: "release", push_gem: true
8
8
  alias_tool :style, :rubocop
9
9
  alias_tool :tapioca, :rbi
10
10
  alias_tool :tc, :typecheck
11
+ alias_tool :cov, :coverage
data/.toys/coverage.rb ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ def run
4
+ exec("open coverage/index.html")
5
+ end
data/.toys/mdl.rb ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ def run
4
+ exec("mdl -s ./.mdlrc --git-recurse --show-aliases .")
5
+ end
data/Gemfile CHANGED
@@ -23,3 +23,6 @@ gem "dotenv"
23
23
  gem "yard", require: false
24
24
  gem "yard-sorbet", require: false
25
25
  gem "appraisal", require: false
26
+ gem "simplecov", require: false
27
+ gem "simplecov_json_formatter", require: false
28
+ gem "mdl", require: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lunchmoney (1.1.1)
4
+ lunchmoney (1.2.0)
5
5
  activesupport (>= 6.1)
6
6
  faraday (>= 1.0.0)
7
7
  sorbet-runtime (>= 0.5)
@@ -9,7 +9,7 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (7.1.3)
12
+ activesupport (7.1.3.2)
13
13
  base64
14
14
  bigdecimal
15
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -27,28 +27,45 @@ GEM
27
27
  thor (>= 0.14.0)
28
28
  ast (2.4.2)
29
29
  base64 (0.2.0)
30
- bigdecimal (3.1.6)
30
+ bigdecimal (3.1.7)
31
+ chef-utils (18.4.2)
32
+ concurrent-ruby
31
33
  coderay (1.1.3)
32
34
  concurrent-ruby (1.2.3)
33
35
  connection_pool (2.4.1)
34
36
  crack (1.0.0)
35
37
  bigdecimal
36
38
  rexml
37
- dotenv (2.8.1)
38
- drb (2.2.0)
39
- ruby2_keywords
39
+ docile (1.4.0)
40
+ dotenv (3.1.0)
41
+ drb (2.2.1)
40
42
  erubi (1.12.0)
41
43
  faraday (2.9.0)
42
44
  faraday-net_http (>= 2.0, < 3.2)
43
45
  faraday-net_http (3.1.0)
44
46
  net-http
45
47
  hashdiff (1.1.0)
46
- i18n (1.14.1)
48
+ i18n (1.14.4)
47
49
  concurrent-ruby (~> 1.0)
48
50
  json (2.7.1)
51
+ kramdown (2.4.0)
52
+ rexml
53
+ kramdown-parser-gfm (1.1.0)
54
+ kramdown (~> 2.0)
49
55
  language_server-protocol (3.17.0.3)
56
+ mdl (0.13.0)
57
+ kramdown (~> 2.3)
58
+ kramdown-parser-gfm (~> 1.1)
59
+ mixlib-cli (~> 2.1, >= 2.1.1)
60
+ mixlib-config (>= 2.2.1, < 4)
61
+ mixlib-shellout
50
62
  method_source (1.0.0)
51
- minitest (5.22.2)
63
+ minitest (5.22.3)
64
+ mixlib-cli (2.1.8)
65
+ mixlib-config (3.0.27)
66
+ tomlrb
67
+ mixlib-shellout (3.2.7)
68
+ chef-utils
52
69
  mocha (2.1.0)
53
70
  ruby2_keywords (>= 0.0.5)
54
71
  mutex_m (0.2.0)
@@ -60,7 +77,7 @@ GEM
60
77
  ast (~> 2.4.1)
61
78
  racc
62
79
  prettier_print (1.2.1)
63
- prism (0.19.0)
80
+ prism (0.24.0)
64
81
  pry (0.14.2)
65
82
  coderay (~> 1.1)
66
83
  method_source (~> 1.0)
@@ -68,15 +85,15 @@ GEM
68
85
  pry
69
86
  public_suffix (5.0.4)
70
87
  racc (1.7.3)
71
- rack (3.0.8)
88
+ rack (3.0.10)
72
89
  rainbow (3.1.1)
73
90
  rake (13.1.0)
74
- rbi (0.1.6)
75
- prism (>= 0.18.0, < 0.20)
91
+ rbi (0.1.9)
92
+ prism (>= 0.18.0, < 0.25)
76
93
  sorbet-runtime (>= 0.5.9204)
77
94
  regexp_parser (2.9.0)
78
95
  rexml (3.2.6)
79
- rubocop (1.60.2)
96
+ rubocop (1.62.1)
80
97
  json (~> 2.3)
81
98
  language_server-protocol (>= 3.17.0)
82
99
  parallel (~> 1.10)
@@ -84,33 +101,39 @@ GEM
84
101
  rainbow (>= 2.2.2, < 4.0)
85
102
  regexp_parser (>= 1.8, < 3.0)
86
103
  rexml (>= 3.2.5, < 4.0)
87
- rubocop-ast (>= 1.30.0, < 2.0)
104
+ rubocop-ast (>= 1.31.1, < 2.0)
88
105
  ruby-progressbar (~> 1.7)
89
106
  unicode-display_width (>= 2.4.0, < 3.0)
90
- rubocop-ast (1.30.0)
91
- parser (>= 3.2.1.0)
92
- rubocop-minitest (0.34.5)
93
- rubocop (>= 1.39, < 2.0)
94
- rubocop-ast (>= 1.30.0, < 2.0)
95
- rubocop-rails (2.23.1)
107
+ rubocop-ast (1.31.2)
108
+ parser (>= 3.3.0.4)
109
+ rubocop-minitest (0.35.0)
110
+ rubocop (>= 1.61, < 2.0)
111
+ rubocop-ast (>= 1.31.1, < 2.0)
112
+ rubocop-rails (2.24.1)
96
113
  activesupport (>= 4.2.0)
97
114
  rack (>= 1.1)
98
115
  rubocop (>= 1.33.0, < 2.0)
99
- rubocop-ast (>= 1.30.0, < 2.0)
100
- rubocop-shopify (2.14.0)
116
+ rubocop-ast (>= 1.31.1, < 2.0)
117
+ rubocop-shopify (2.15.1)
101
118
  rubocop (~> 1.51)
102
- rubocop-sorbet (0.7.7)
119
+ rubocop-sorbet (0.8.0)
103
120
  rubocop (>= 0.90.0)
104
121
  ruby-progressbar (1.13.0)
105
122
  ruby2_keywords (0.0.5)
106
- sorbet (0.5.11247)
107
- sorbet-static (= 0.5.11247)
108
- sorbet-runtime (0.5.11247)
109
- sorbet-static (0.5.11247-universal-darwin)
110
- sorbet-static (0.5.11247-x86_64-linux)
111
- sorbet-static-and-runtime (0.5.11247)
112
- sorbet (= 0.5.11247)
113
- sorbet-runtime (= 0.5.11247)
123
+ simplecov (0.22.0)
124
+ docile (~> 1.1)
125
+ simplecov-html (~> 0.11)
126
+ simplecov_json_formatter (~> 0.1)
127
+ simplecov-html (0.12.3)
128
+ simplecov_json_formatter (0.1.4)
129
+ sorbet (0.5.11305)
130
+ sorbet-static (= 0.5.11305)
131
+ sorbet-runtime (0.5.11305)
132
+ sorbet-static (0.5.11305-universal-darwin)
133
+ sorbet-static (0.5.11305-x86_64-linux)
134
+ sorbet-static-and-runtime (0.5.11305)
135
+ sorbet (= 0.5.11305)
136
+ sorbet-runtime (= 0.5.11305)
114
137
  spoom (1.2.4)
115
138
  erubi (>= 1.10.0)
116
139
  sorbet-static-and-runtime (>= 0.5.10187)
@@ -118,16 +141,17 @@ GEM
118
141
  thor (>= 0.19.2)
119
142
  syntax_tree (6.2.0)
120
143
  prettier_print (>= 1.2.0)
121
- tapioca (0.12.0)
144
+ tapioca (0.13.1)
122
145
  bundler (>= 2.2.25)
123
146
  netrc (>= 0.11.0)
124
147
  parallel (>= 1.21.0)
125
148
  rbi (>= 0.1.4, < 0.2)
126
- sorbet-static-and-runtime (>= 0.5.10820)
127
- spoom (~> 1.2.0, >= 1.2.0)
149
+ sorbet-static-and-runtime (>= 0.5.11087)
150
+ spoom (>= 1.2.0)
128
151
  thor (>= 1.2.0)
129
152
  yard-sorbet
130
- thor (1.3.0)
153
+ thor (1.3.1)
154
+ tomlrb (2.0.3)
131
155
  toys (0.15.5)
132
156
  toys-core (= 0.15.5)
133
157
  toys-core (0.15.5)
@@ -136,11 +160,11 @@ GEM
136
160
  unicode-display_width (2.5.0)
137
161
  uri (0.13.0)
138
162
  vcr (6.2.0)
139
- webmock (3.20.0)
163
+ webmock (3.23.0)
140
164
  addressable (>= 2.8.0)
141
165
  crack (>= 0.3.2)
142
166
  hashdiff (>= 0.4.0, < 2.0.0)
143
- yard (0.9.34)
167
+ yard (0.9.36)
144
168
  yard-sorbet (0.8.1)
145
169
  sorbet-runtime (>= 0.5)
146
170
  yard (>= 0.9)
@@ -155,6 +179,7 @@ DEPENDENCIES
155
179
  appraisal
156
180
  dotenv
157
181
  lunchmoney!
182
+ mdl
158
183
  minitest (~> 5.22)
159
184
  mocha (~> 2.1.0)
160
185
  pry-sorbet (~> 0.2)
@@ -162,6 +187,8 @@ DEPENDENCIES
162
187
  rubocop-rails
163
188
  rubocop-shopify
164
189
  rubocop-sorbet
190
+ simplecov
191
+ simplecov_json_formatter
165
192
  sorbet-static-and-runtime
166
193
  spoom
167
194
  tapioca
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright (c) 2021 mmenanno
3
+ Copyright (c) Michael Menanno
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,12 +1,16 @@
1
1
  # lunchmoney
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/lunchmoney.svg)](https://badge.fury.io/rb/lunchmoney)
4
- [![CI](https://github.com/halorrr/lunchmoney/actions/workflows/ci.yml/badge.svg)](https://github.com/halorrr/lunchmoney/actions/workflows/ci.yml)
5
- [![Yard Docs](https://github.com/halorrr/lunchmoney/actions/workflows/build_and_publish_yard_docs.yml/badge.svg)](https://github.com/halorrr/lunchmoney/actions/workflows/build_and_publish_yard_docs.yml)
4
+ [![CI](https://github.com/mmenanno/lunchmoney/actions/workflows/ci.yml/badge.svg)](https://github.com/mmenanno/lunchmoney/actions/workflows/ci.yml)
5
+ [![Yard Docs](https://github.com/mmenanno/lunchmoney/actions/workflows/build_and_publish_yard_docs.yml/badge.svg)](https://github.com/mmenanno/lunchmoney/actions/workflows/build_and_publish_yard_docs.yml)
6
+ [![Maintainability](https://api.codeclimate.com/v1/badges/6e84458e8cf831e6a6fa/maintainability)](https://codeclimate.com/github/mmenanno/lunchmoney/maintainability)
7
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/6e84458e8cf831e6a6fa/test_coverage)](https://codeclimate.com/github/mmenanno/lunchmoney/test_coverage)
8
+
9
+ <a href="https://www.buymeacoffee.com/mmenanno" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
6
10
 
7
11
  This gem is a API client library of the [LunchMoney API](https://lunchmoney.dev/) for the wonderful [LunchMoney](http://lunchmoney.app/) web app for personal finance & budgeting.
8
12
 
9
- Documentation is still a work in process, but you can find the yard docs for this gem [here](https://halorrr.github.io/lunchmoney/) as well as some write ups of the basics below. An example of every call is listed on the [Api class in the yard docs](https://halorrr.github.io/lunchmoney/LunchMoney/Api.html).
13
+ Documentation is still a work in process, but you can find the yard docs for this gem [here](https://mmenanno.github.io/lunchmoney/) as well as some write ups of the basics below. An example of every call is listed on the [Api class in the yard docs](https://mmenanno.github.io/lunchmoney/LunchMoney/Api.html).
10
14
 
11
15
  ## Usage
12
16
 
@@ -14,6 +14,9 @@ module LunchMoney
14
14
  sig { returns(String) }
15
15
  attr_accessor :currency, :status
16
16
 
17
+ sig { returns(T.nilable(Number)) }
18
+ attr_accessor :to_base
19
+
17
20
  sig do
18
21
  params(
19
22
  created_at: String,
@@ -27,14 +30,16 @@ module LunchMoney
27
30
  id: T.nilable(Integer),
28
31
  zabo_account_id: T.nilable(Integer),
29
32
  display_name: T.nilable(String),
33
+ to_base: T.nilable(Number),
30
34
  ).void
31
35
  end
32
36
  def initialize(created_at:, source:, name:, balance:, balance_as_of:, currency:,
33
- status:, institution_name: nil, id: nil, zabo_account_id: nil, display_name: nil)
37
+ status:, institution_name: nil, id: nil, zabo_account_id: nil, display_name: nil, to_base: nil)
34
38
  super(created_at:, source:, name:, balance:, institution_name:, id:, zabo_account_id:, display_name:)
35
39
  @balance_as_of = T.let(validate_iso8601!(balance_as_of), String)
36
40
  @currency = currency
37
41
  @status = status
42
+ @to_base = to_base
38
43
  end
39
44
 
40
45
  sig { params(time: String).void }
@@ -6,7 +6,7 @@ module LunchMoney
6
6
  module Objects
7
7
  # Base data object for the objects returned and used when calling the LunchMoney API
8
8
  class Object
9
- sig { params(symbolize_keys: T::Boolean).returns(T::Hash[String, T.untyped]) }
9
+ sig { params(symbolize_keys: T::Boolean).returns(T::Hash[T.any(String, Symbol), T.untyped]) }
10
10
  def serialize(symbolize_keys: false)
11
11
  ivars = instance_variables
12
12
 
@@ -23,6 +23,8 @@ module LunchMoney
23
23
 
24
24
  output
25
25
  end
26
+
27
+ delegate :to_h, to: :serialize
26
28
  end
27
29
  end
28
30
  end
@@ -3,5 +3,5 @@
3
3
 
4
4
  module LunchMoney
5
5
  # Current version of the gem
6
- VERSION = "1.1.1"
6
+ VERSION = "1.2.0"
7
7
  end
@@ -408,3 +408,14 @@ class String
408
408
  sig { returns(String) }
409
409
  def upcase_first; end
410
410
  end
411
+
412
+ class ActiveSupport::ErrorReporter
413
+ sig { type_parameters(:Block, :Fallback).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), fallback: T.nilable(T.proc.returns(T.type_parameter(:Fallback))), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.any(T.type_parameter(:Block), T.type_parameter(:Fallback))) }
414
+ def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil), &blk); end
415
+
416
+ sig { type_parameters(:Block).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.type_parameter(:Block)) }
417
+ def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil), &blk); end
418
+
419
+ sig { params(error: Exception, handled: T::Boolean, severity: T.nilable(Symbol), context: T::Hash[Symbol, T.untyped], source: T.nilable(String)).void }
420
+ def report(error, handled: true, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end
421
+ end
@@ -10908,43 +10908,43 @@ class ActiveSupport::TestCase < ::Minitest::Test
10908
10908
  # source://activesupport//lib/active_support/callbacks.rb#963
10909
10909
  def _teardown_callbacks; end
10910
10910
 
10911
- # source://minitest/5.21.2/lib/minitest/assertions.rb#736
10911
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#736
10912
10912
  def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end
10913
10913
 
10914
- # source://minitest/5.21.2/lib/minitest/assertions.rb#665
10914
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#665
10915
10915
  def assert_not_empty(obj, msg = T.unsafe(nil)); end
10916
10916
 
10917
- # source://minitest/5.21.2/lib/minitest/assertions.rb#676
10917
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#676
10918
10918
  def assert_not_equal(exp, act, msg = T.unsafe(nil)); end
10919
10919
 
10920
- # source://minitest/5.21.2/lib/minitest/assertions.rb#688
10920
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#688
10921
10921
  def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
10922
10922
 
10923
- # source://minitest/5.21.2/lib/minitest/assertions.rb#700
10923
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#700
10924
10924
  def assert_not_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
10925
10925
 
10926
- # source://minitest/5.21.2/lib/minitest/assertions.rb#707
10926
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#707
10927
10927
  def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end
10928
10928
 
10929
- # source://minitest/5.21.2/lib/minitest/assertions.rb#718
10929
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#718
10930
10930
  def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end
10931
10931
 
10932
- # source://minitest/5.21.2/lib/minitest/assertions.rb#728
10932
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#728
10933
10933
  def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end
10934
10934
 
10935
- # source://minitest/5.21.2/lib/minitest/assertions.rb#746
10935
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#746
10936
10936
  def assert_not_nil(obj, msg = T.unsafe(nil)); end
10937
10937
 
10938
- # source://minitest/5.21.2/lib/minitest/assertions.rb#781
10938
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#781
10939
10939
  def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
10940
10940
 
10941
- # source://minitest/5.21.2/lib/minitest/assertions.rb#804
10941
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#804
10942
10942
  def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end
10943
10943
 
10944
- # source://minitest/5.21.2/lib/minitest/assertions.rb#813
10944
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#813
10945
10945
  def assert_not_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end
10946
10946
 
10947
- # source://minitest/5.21.2/lib/minitest/assertions.rb#822
10947
+ # source://minitest/5.22.2/lib/minitest/assertions.rb#822
10948
10948
  def assert_not_same(exp, act, msg = T.unsafe(nil)); end
10949
10949
 
10950
10950
  # source://activesupport//lib/active_support/testing/file_fixtures.rb#20
@@ -10956,7 +10956,7 @@ class ActiveSupport::TestCase < ::Minitest::Test
10956
10956
  # source://activesupport//lib/active_support/test_case.rb#298
10957
10957
  def inspect; end
10958
10958
 
10959
- # source://minitest/5.21.2/lib/minitest.rb#311
10959
+ # source://minitest/5.22.2/lib/minitest.rb#332
10960
10960
  def method_name; end
10961
10961
 
10962
10962
  class << self
@@ -13175,7 +13175,7 @@ ActiveSupport::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
13175
13175
  ActiveSupport::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
13176
13176
 
13177
13177
  # source://activesupport//lib/active_support/gem_version.rb#13
13178
- ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), T.untyped)
13178
+ ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), String)
13179
13179
 
13180
13180
  # source://activesupport//lib/active_support/gem_version.rb#15
13181
13181
  ActiveSupport::VERSION::STRING = T.let(T.unsafe(nil), String)
@@ -13364,7 +13364,7 @@ end
13364
13364
  # source://activesupport//lib/active_support/xml_mini/rexml.rb#11
13365
13365
  ActiveSupport::XmlMini_REXML::CONTENT_KEY = T.let(T.unsafe(nil), String)
13366
13366
 
13367
- # source://activesupport//lib/active_support/core_ext/object/to_query.rb#39
13367
+ # source://activesupport//lib/active_support/core_ext/object/blank.rb#83
13368
13368
  class Array
13369
13369
  include ::Enumerable
13370
13370
 
@@ -15260,7 +15260,7 @@ class Exception
15260
15260
  def as_json(options = T.unsafe(nil)); end
15261
15261
  end
15262
15262
 
15263
- # source://activesupport//lib/active_support/core_ext/object/to_query.rb#32
15263
+ # source://activesupport//lib/active_support/core_ext/object/blank.rb#61
15264
15264
  class FalseClass
15265
15265
  # source://activesupport//lib/active_support/core_ext/object/json.rb#89
15266
15266
  def as_json(options = T.unsafe(nil)); end
@@ -16404,7 +16404,7 @@ class NameError < ::StandardError
16404
16404
  include ::DidYouMean::Correctable
16405
16405
  end
16406
16406
 
16407
- # source://activesupport//lib/active_support/core_ext/object/to_query.rb#18
16407
+ # source://activesupport//lib/active_support/core_ext/object/blank.rb#50
16408
16408
  class NilClass
16409
16409
  # source://activesupport//lib/active_support/core_ext/object/json.rb#95
16410
16410
  def as_json(options = T.unsafe(nil)); end
@@ -16445,7 +16445,7 @@ class NilClass
16445
16445
  def try!(*_arg0); end
16446
16446
  end
16447
16447
 
16448
- # source://activesupport//lib/active_support/core_ext/numeric/time.rb#9
16448
+ # source://activesupport//lib/active_support/core_ext/object/blank.rb#134
16449
16449
  class Numeric
16450
16450
  include ::Comparable
16451
16451
 
@@ -16713,7 +16713,7 @@ Numeric::ZETTABYTE = T.let(T.unsafe(nil), Integer)
16713
16713
  # using that rescue idiom.
16714
16714
  # ++
16715
16715
  #
16716
- # source://activesupport//lib/active_support/core_ext/object/to_query.rb#5
16716
+ # source://activesupport//lib/active_support/core_ext/object/blank.rb#5
16717
16717
  class Object < ::BasicObject
16718
16718
  include ::ActiveSupport::ToJsonWithActiveSupportEncoder
16719
16719
  include ::ActiveSupport::Dependencies::RequireDependency
@@ -16920,7 +16920,7 @@ end
16920
16920
  #
16921
16921
  # 'ScaleScore'.tableize # => "scale_scores"
16922
16922
  #
16923
- # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#5
16923
+ # source://activesupport//lib/active_support/core_ext/object/blank.rb#103
16924
16924
  class String
16925
16925
  include ::Comparable
16926
16926
 
@@ -17577,7 +17577,7 @@ class Thread
17577
17577
  def active_support_execution_state=(_arg0); end
17578
17578
  end
17579
17579
 
17580
- # source://activesupport//lib/active_support/core_ext/time/conversions.rb#7
17580
+ # source://activesupport//lib/active_support/core_ext/object/blank.rb#146
17581
17581
  class Time
17582
17582
  include ::Comparable
17583
17583
  include ::DateAndTime::Zones
@@ -18074,7 +18074,7 @@ Time::COMMON_YEAR_DAYS_IN_MONTH = T.let(T.unsafe(nil), Array)
18074
18074
  # source://activesupport//lib/active_support/core_ext/time/conversions.rb#8
18075
18075
  Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash)
18076
18076
 
18077
- # source://activesupport//lib/active_support/core_ext/object/to_query.rb#25
18077
+ # source://activesupport//lib/active_support/core_ext/object/blank.rb#72
18078
18078
  class TrueClass
18079
18079
  # source://activesupport//lib/active_support/core_ext/object/json.rb#83
18080
18080
  def as_json(options = T.unsafe(nil)); end
@@ -0,0 +1,8 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `chef-utils` gem.
5
+ # Please instead update this file by running `bin/tapioca gem chef-utils`.
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem