lunchmoney 0.10.0

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 (142) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.github/dependabot.yml +18 -0
  4. data/.github/workflows/build_and_publish_yard_docs.yml +47 -0
  5. data/.github/workflows/ci.yml +58 -0
  6. data/.github/workflows/dependabot-rbi-updater.yml +43 -0
  7. data/.github/workflows/publish_gem.yml +31 -0
  8. data/.gitignore +62 -0
  9. data/.rubocop.yml +45 -0
  10. data/.ruby-version +1 -0
  11. data/.toys/.toys.rb +10 -0
  12. data/.toys/ci.rb +22 -0
  13. data/.toys/rbi.rb +60 -0
  14. data/.toys/rubocop.rb +10 -0
  15. data/.toys/spoom.rb +15 -0
  16. data/.toys/typecheck.rb +5 -0
  17. data/.yardopts +2 -0
  18. data/Appraisals +22 -0
  19. data/Gemfile +25 -0
  20. data/Gemfile.lock +174 -0
  21. data/LICENSE +21 -0
  22. data/README.md +57 -0
  23. data/bin/console +16 -0
  24. data/bin/rubocop +27 -0
  25. data/bin/setup +8 -0
  26. data/bin/spoom +27 -0
  27. data/bin/srb +27 -0
  28. data/bin/tapioca +27 -0
  29. data/bin/toys +27 -0
  30. data/bin/yard +27 -0
  31. data/lib/lunchmoney/api.rb +147 -0
  32. data/lib/lunchmoney/api_call.rb +109 -0
  33. data/lib/lunchmoney/assets/asset.rb +89 -0
  34. data/lib/lunchmoney/assets/asset_calls.rb +96 -0
  35. data/lib/lunchmoney/budget/budget.rb +74 -0
  36. data/lib/lunchmoney/budget/budget_calls.rb +82 -0
  37. data/lib/lunchmoney/budget/config.rb +38 -0
  38. data/lib/lunchmoney/budget/data.rb +42 -0
  39. data/lib/lunchmoney/categories/category/category.rb +52 -0
  40. data/lib/lunchmoney/categories/category/child_category.rb +42 -0
  41. data/lib/lunchmoney/categories/category_calls.rb +195 -0
  42. data/lib/lunchmoney/configuration.rb +26 -0
  43. data/lib/lunchmoney/crypto/crypto/crypto.rb +43 -0
  44. data/lib/lunchmoney/crypto/crypto/crypto_base.rb +65 -0
  45. data/lib/lunchmoney/crypto/crypto_calls.rb +49 -0
  46. data/lib/lunchmoney/data_object.rb +25 -0
  47. data/lib/lunchmoney/errors.rb +19 -0
  48. data/lib/lunchmoney/exceptions.rb +19 -0
  49. data/lib/lunchmoney/plaid_accounts/plaid_account.rb +73 -0
  50. data/lib/lunchmoney/plaid_accounts/plaid_account_calls.rb +38 -0
  51. data/lib/lunchmoney/recurring_expenses/recurring_expense/recurring_expense.rb +65 -0
  52. data/lib/lunchmoney/recurring_expenses/recurring_expense/recurring_expense_base.rb +29 -0
  53. data/lib/lunchmoney/recurring_expenses/recurring_expense_calls.rb +28 -0
  54. data/lib/lunchmoney/tags/tag/tag.rb +20 -0
  55. data/lib/lunchmoney/tags/tag/tag_base.rb +21 -0
  56. data/lib/lunchmoney/tags/tag_calls.rb +20 -0
  57. data/lib/lunchmoney/transactions/transaction/child_transaction.rb +31 -0
  58. data/lib/lunchmoney/transactions/transaction/split.rb +24 -0
  59. data/lib/lunchmoney/transactions/transaction/transaction.rb +156 -0
  60. data/lib/lunchmoney/transactions/transaction/transaction_base.rb +52 -0
  61. data/lib/lunchmoney/transactions/transaction/transaction_modification_base.rb +30 -0
  62. data/lib/lunchmoney/transactions/transaction/update_transaction.rb +43 -0
  63. data/lib/lunchmoney/transactions/transaction_calls.rb +218 -0
  64. data/lib/lunchmoney/user/user.rb +36 -0
  65. data/lib/lunchmoney/user/user_calls.rb +19 -0
  66. data/lib/lunchmoney/validators.rb +43 -0
  67. data/lib/lunchmoney/version.rb +7 -0
  68. data/lib/lunchmoney.rb +54 -0
  69. data/lunchmoney.gemspec +34 -0
  70. data/sorbet/config +5 -0
  71. data/sorbet/rbi/annotations/.gitattributes +1 -0
  72. data/sorbet/rbi/annotations/activesupport.rbi +410 -0
  73. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  74. data/sorbet/rbi/annotations/mocha.rbi +34 -0
  75. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  76. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  77. data/sorbet/rbi/dsl/.gitattributes +1 -0
  78. data/sorbet/rbi/dsl/active_support/callbacks.rbi +22 -0
  79. data/sorbet/rbi/gems/.gitattributes +1 -0
  80. data/sorbet/rbi/gems/activesupport@7.1.3.rbi +18004 -0
  81. data/sorbet/rbi/gems/addressable@2.8.6.rbi +1993 -0
  82. data/sorbet/rbi/gems/appraisal@2.5.0.rbi +621 -0
  83. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  84. data/sorbet/rbi/gems/base64@0.2.0.rbi +508 -0
  85. data/sorbet/rbi/gems/bigdecimal@3.1.6.rbi +77 -0
  86. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  87. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +11590 -0
  88. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
  89. data/sorbet/rbi/gems/crack@0.4.5.rbi +144 -0
  90. data/sorbet/rbi/gems/dotenv@2.8.1.rbi +234 -0
  91. data/sorbet/rbi/gems/drb@2.2.0.rbi +1346 -0
  92. data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
  93. data/sorbet/rbi/gems/faraday-net_http@3.1.0.rbi +146 -0
  94. data/sorbet/rbi/gems/faraday@2.9.0.rbi +2911 -0
  95. data/sorbet/rbi/gems/hashdiff@1.1.0.rbi +352 -0
  96. data/sorbet/rbi/gems/i18n@1.14.1.rbi +2325 -0
  97. data/sorbet/rbi/gems/json@2.7.1.rbi +1561 -0
  98. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  99. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  100. data/sorbet/rbi/gems/minitest@5.21.2.rbi +2197 -0
  101. data/sorbet/rbi/gems/mocha@2.1.0.rbi +3934 -0
  102. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +93 -0
  103. data/sorbet/rbi/gems/net-http@0.4.1.rbi +4068 -0
  104. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  105. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  106. data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
  107. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  108. data/sorbet/rbi/gems/prism@0.19.0.rbi +29883 -0
  109. data/sorbet/rbi/gems/pry-sorbet@0.2.1.rbi +966 -0
  110. data/sorbet/rbi/gems/pry@0.14.2.rbi +10077 -0
  111. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +935 -0
  112. data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
  113. data/sorbet/rbi/gems/rack@3.0.8.rbi +5183 -0
  114. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  115. data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
  116. data/sorbet/rbi/gems/rbi@0.1.6.rbi +2922 -0
  117. data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +3771 -0
  118. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
  119. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7117 -0
  120. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +2576 -0
  121. data/sorbet/rbi/gems/rubocop-rails@2.23.1.rbi +9175 -0
  122. data/sorbet/rbi/gems/rubocop-shopify@2.14.0.rbi +8 -0
  123. data/sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi +1510 -0
  124. data/sorbet/rbi/gems/rubocop@1.60.1.rbi +57356 -0
  125. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  126. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  127. data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
  128. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
  129. data/sorbet/rbi/gems/tapioca@0.12.0.rbi +3506 -0
  130. data/sorbet/rbi/gems/thor@1.3.0.rbi +4312 -0
  131. data/sorbet/rbi/gems/toys-core@0.15.4.rbi +9462 -0
  132. data/sorbet/rbi/gems/toys@0.15.4.rbi +243 -0
  133. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
  134. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
  135. data/sorbet/rbi/gems/uri@0.13.0.rbi +2327 -0
  136. data/sorbet/rbi/gems/vcr@6.2.0.rbi +3036 -0
  137. data/sorbet/rbi/gems/webmock@3.19.1.rbi +1768 -0
  138. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  139. data/sorbet/rbi/gems/yard@0.9.34.rbi +18084 -0
  140. data/sorbet/shims/module.rbi +6 -0
  141. data/sorbet/tapioca/require.rb +10 -0
  142. metadata +228 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c0eee6d8599ca3bcc3937bff5208db6a4502029ed711940ffbe90e807c4b0bd1
4
+ data.tar.gz: e8f7d58fbf604cf59c60111963c063273f04b7bab3e7d3ddf1e0684213cab1d2
5
+ SHA512:
6
+ metadata.gz: a6a0af1c49bac3eccbaaa802dc7c4d9c59122083e69ae19efdeda3bf322e3f5c290b1f207d4805cc4b9fcff62ae317fb2249cd2340ce3186fef0b930b9132a20
7
+ data.tar.gz: 971503cc33d3bec22fc0e643141d85d49ba5a5295fc85f2f7e3d37f40216c57368f05e394293a86184f6052696c9aed1efc58104b177c5614194b8b3a970dcd5
data/.DS_Store ADDED
Binary file
@@ -0,0 +1,18 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: bundler
9
+ directory: "/"
10
+ insecure-external-code-execution: allow
11
+ open-pull-requests-limit: 100
12
+ schedule:
13
+ interval: weekly
14
+ - package-ecosystem: github-actions
15
+ directory: "/"
16
+ open-pull-requests-limit: 100
17
+ schedule:
18
+ interval: weekly
@@ -0,0 +1,47 @@
1
+ name: Build and Publish Yard Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ concurrency:
14
+ group: "pages"
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ build:
19
+ name: Build and Publish Yard Docs
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - name: Set up Ruby
26
+ uses: ruby/setup-ruby@v1.165.1
27
+ with:
28
+ ruby-version: 3.3.0
29
+ bundler-cache: true
30
+
31
+ - name: Install YARD
32
+ run: gem install yard yard-sorbet
33
+
34
+ - name: Generate docs
35
+ run: yard doc -o doc
36
+
37
+ - name: Setup Github Pages
38
+ uses: actions/configure-pages@v4
39
+
40
+ - name: Upload Artifact
41
+ uses: actions/upload-pages-artifact@v3
42
+ with:
43
+ path: "doc"
44
+
45
+ - name: Publish to Github Pages
46
+ id: deployment
47
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,58 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ paths-ignore:
6
+ - ".gitignore"
7
+ - "README.md"
8
+ workflow_dispatch:
9
+ schedule:
10
+ # Every day at 9pm
11
+ - cron: '0 21 * * *'
12
+
13
+ jobs:
14
+ validate:
15
+ name: Validate code
16
+ runs-on: ubuntu-latest
17
+
18
+ strategy:
19
+ matrix:
20
+ ruby-version: [3.1, 3.2, 3.3, head]
21
+ continue-on-error: ${{ endsWith(matrix.ruby-version, 'head') }}
22
+
23
+ steps:
24
+ -
25
+ name: Checkout
26
+ uses: actions/checkout@v4
27
+ -
28
+ name: Setup Ruby
29
+ uses: ruby/setup-ruby@v1
30
+ with:
31
+ bundler-cache: true
32
+ ruby-version: ${{ matrix.ruby-version }}
33
+ -
34
+ name: RuboCop
35
+ run: bin/rubocop
36
+ -
37
+ name: Typecheck
38
+ run: bin/srb tc
39
+ -
40
+ name: Check for Updatable Sigils
41
+ run: |
42
+ bin/spoom bump --from false --to true --dry
43
+ bin/spoom bump --from true --to strict --dry
44
+ -
45
+ name: Check for DSL rbi updates
46
+ run: bin/tapioca dsl --verify
47
+ -
48
+ name: Run Tests (Using Cassettes)
49
+ if: ${{ ! endsWith(matrix.ruby-version, '3.3') }}
50
+ run: bin/toys test
51
+ -
52
+ name: Run Tests (With Remote Calls)
53
+ if: ${{ endsWith(matrix.ruby-version, '3.3') }}
54
+ run: bin/toys test
55
+ env:
56
+ REMOTE_TESTS_ENABLED: ${{ vars.REMOTE_TESTS_ENABLED }}
57
+ LUNCHMONEY_TOKEN: ${{ secrets.LUNCHMONEY_TOKEN }}
58
+
@@ -0,0 +1,43 @@
1
+ name: Dependabot RBI Updater
2
+ on:
3
+ pull_request:
4
+ paths:
5
+ - 'Gemfile.lock'
6
+ - 'Gemfile'
7
+
8
+ jobs:
9
+ update-rbis:
10
+ runs-on: ubuntu-latest
11
+ if: ${{ github.triggering_actor == 'dependabot[bot]' }}
12
+
13
+ steps:
14
+ -
15
+ name: Checkout
16
+ uses: actions/checkout@v4
17
+ with:
18
+ ref: ${{ github.event.pull_request.head.sha }}
19
+ token: ${{ secrets.LUNCHMONEY_PAT_TOKEN }}
20
+ fetch-depth: 0
21
+ -
22
+ name: Setup Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ bundler-cache: true
26
+ -
27
+ name: Update RBIs
28
+ run: bin/toys rbi all_types
29
+ -
30
+ name: Commit RBIs
31
+ run: |
32
+ git config --local user.name "Dependabot RBI Updater"
33
+ git config --local user.email action@github.com
34
+ git add sorbet/*
35
+ git commit -m "[dependabot skip] Update RBIs"
36
+ -
37
+ name: Push changes
38
+ uses: ad-m/github-push-action@v0.8.0
39
+ with:
40
+ github_token: ${{ secrets.LUNCHMONEY_PAT_TOKEN }}
41
+ branch: ${{ github.head_ref }}
42
+
43
+
@@ -0,0 +1,31 @@
1
+ name: Publish Gem
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - v*
7
+ jobs:
8
+ build:
9
+ name: Build & Release Gem
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Set up Ruby
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: 3.3.0
19
+ bundler-cache: true
20
+ - name: Release Gem
21
+ if: contains(github.ref, 'refs/tags/v')
22
+ run: |
23
+ mkdir -p $HOME/.gem
24
+ touch $HOME/.gem/credentials
25
+ chmod 0600 $HOME/.gem/credentials
26
+ printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
27
+ gem build *.gemspec
28
+ gem push *.gem
29
+ env:
30
+ RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
31
+
data/.gitignore ADDED
@@ -0,0 +1,62 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ ## Environment normalization:
42
+ /.bundle/
43
+ /vendor/bundle
44
+ /lib/bundler/man/
45
+
46
+ # for a library or gem, you might want to ignore these files since the code is
47
+ # intended to run in multiple environments; otherwise, check them in:
48
+ # Gemfile.lock
49
+ # .ruby-version
50
+ # .ruby-gemset
51
+
52
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
+ .rvmrc
54
+
55
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
+ # .rubocop-https?--*
57
+
58
+ # Ignore dotenv file
59
+ .env
60
+
61
+ # macOS Files
62
+ .DS_Store
data/.rubocop.yml ADDED
@@ -0,0 +1,45 @@
1
+ inherit_gem:
2
+ rubocop-shopify: rubocop.yml
3
+
4
+ require:
5
+ - rubocop-sorbet
6
+ - rubocop-minitest
7
+ - rubocop-rails
8
+
9
+ AllCops:
10
+ TargetRubyVersion: 3.1
11
+ NewCops: enable
12
+ Exclude:
13
+ - "sorbet/**/*"
14
+
15
+ Sorbet:
16
+ Enabled: true
17
+
18
+ Sorbet/FalseSigil:
19
+ Exclude:
20
+ - ".toys/**/*"
21
+
22
+ Sorbet/StrictSigil:
23
+ Enabled: true
24
+ Exclude:
25
+ - "test/*"
26
+ - ".toys/**/*"
27
+
28
+ Sorbet/ForbidTStruct:
29
+ Enabled: true
30
+ # Context for why this is preferable https://github.com/Shopify/rubocop-sorbet/pull/178#issuecomment-1739924189
31
+
32
+ Sorbet/RedundantExtendTSig:
33
+ Enabled: true
34
+
35
+ Minitest:
36
+ Enabled: true
37
+
38
+ Minitest/MultipleAssertions:
39
+ Max: 6
40
+
41
+ Rails:
42
+ Enabled: true
43
+
44
+ Rails/RefuteMethods:
45
+ EnforcedStyle: refute
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.3.0
data/.toys/.toys.rb ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ expand :minitest, files: ["test/**/*_test.rb"], libs: ["test", "lib"]
4
+ expand :gem_build
5
+ expand :gem_build, name: "install", install_gem: true
6
+ expand :gem_build, name: "release", push_gem: true
7
+
8
+ alias_tool :style, :rubocop
9
+ alias_tool :tapioca, :rbi
10
+ alias_tool :tc, :typecheck
data/.toys/ci.rb ADDED
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ include :exec
4
+ include :terminal
5
+
6
+ def run_stage(name, tool)
7
+ if exec_tool(tool).success?
8
+ puts("** #{name} passed **", :green, :bold)
9
+ puts
10
+ else
11
+ puts("** CI terminated: #{name} failed!", :red, :bold)
12
+ exit(1)
13
+ end
14
+ end
15
+
16
+ def run
17
+ run_stage("Style Checker", ["rubocop"])
18
+ run_stage("Typecheck", ["tc"])
19
+ run_stage("Verify Sigils", ["spoom", "verify"])
20
+ run_stage("Verify Sorbet DSL RBIs", ["rbi", "dsl", "--verify"])
21
+ run_stage("Tests", ["test"])
22
+ end
data/.toys/rbi.rb ADDED
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ tool :gem do
4
+ optional_arg :gem_name
5
+
6
+ def run
7
+ exec("bin/tapioca gem #{gem_name}")
8
+ end
9
+ end
10
+
11
+ tool :gems do
12
+ flag :all, "--all"
13
+ def run
14
+ if all
15
+ exec("bin/tapioca gems --all")
16
+ else
17
+ exec("bin/tapioca gems")
18
+ end
19
+ end
20
+ end
21
+
22
+ tool :dsl do
23
+ flag :verify, "--verify"
24
+ def run
25
+ if verify
26
+ exec("bin/tapioca dsl --verify")
27
+ else
28
+ exec("bin/tapioca dsl")
29
+ end
30
+ end
31
+ end
32
+
33
+ tool :all_types do
34
+ include :exec
35
+ include :terminal
36
+
37
+ def run_stage(name, tool)
38
+ puts("** #{name} started **", :blue, :bold)
39
+
40
+ if exec_tool(tool).success?
41
+ puts("** #{name} succeeded **", :green, :bold)
42
+ puts
43
+ else
44
+ puts("** CI terminated: #{name} failed!", :red, :bold)
45
+ exit(1)
46
+ end
47
+ end
48
+
49
+ def run
50
+ run_stage("Update Gem RBIs", ["rbi", "gems"])
51
+ run_stage("Update DSL RBIs", ["rbi", "dsl"])
52
+ run_stage("Update Annotations RBIs", ["rbi", "annotations"])
53
+ end
54
+ end
55
+
56
+ remaining_args :commands
57
+
58
+ def run
59
+ exec("bin/tapioca #{commands.join("")}")
60
+ end
data/.toys/rubocop.rb ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc "Run the rubocop linter and perform safe autocorrections, use -A to auto correct all"
4
+ flag :autocorrect_all, "-A", "--autocorrect-all", "--all"
5
+
6
+ include :exec, exit_on_nonzero_status: true
7
+
8
+ def run
9
+ autocorrect_all ? exec("bin/rubocop -A") : exec("bin/rubocop -a")
10
+ end
data/.toys/spoom.rb ADDED
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ tool :bump do
4
+ def run
5
+ exec("bin/spoom bump --from false --to true ;" \
6
+ "bin/spoom bump --from true --to strict")
7
+ end
8
+ end
9
+
10
+ tool :verify do
11
+ def run
12
+ exec("bin/spoom bump --from false --to true --dry ;" \
13
+ "bin/spoom bump --from true --to strict --dry")
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ def run
4
+ exec("bin/srb tc")
5
+ end
data/.yardopts ADDED
@@ -0,0 +1,2 @@
1
+ --plugin yard-sorbet
2
+ --markup markdown
data/Appraisals ADDED
@@ -0,0 +1,22 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ appraise "activesupport-6-1" do
5
+ gem "activesupport", "~> 6.1"
6
+ end
7
+
8
+ appraise "activesupport-7-0" do
9
+ gem "activesupport", "~> 7.0"
10
+ end
11
+
12
+ appraise "faraday-1-0" do
13
+ gem "faraday", "~> 1.0"
14
+ end
15
+
16
+ appraise "faraday-2-0" do
17
+ gem "faraday", "~> 2.0"
18
+ end
19
+
20
+ appraise "faraday-2-9" do
21
+ gem "faraday", "~> 2.9"
22
+ end
data/Gemfile ADDED
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify runtime dependencies in the gemspec
6
+ gemspec
7
+
8
+ # Specify development dependencies here
9
+ gem "toys"
10
+ gem "minitest", "~> 5.21", require: false
11
+ gem "mocha", "~> 2.1.0", require: false
12
+ gem "webmock", require: false
13
+ gem "vcr", require: false
14
+ gem "pry-sorbet", "~> 0.2", require: false
15
+ gem "rubocop-shopify", require: false
16
+ gem "rubocop-sorbet", require: false
17
+ gem "rubocop-minitest", require: false
18
+ gem "rubocop-rails", require: false
19
+ gem "sorbet-static-and-runtime", require: false
20
+ gem "spoom", require: false
21
+ gem "tapioca", require: false
22
+ gem "dotenv"
23
+ gem "yard", require: false
24
+ gem "yard-sorbet", require: false
25
+ gem "appraisal", require: false
data/Gemfile.lock ADDED
@@ -0,0 +1,174 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lunchmoney (0.10.0)
5
+ activesupport (>= 6.1)
6
+ faraday (>= 1.0.0)
7
+ sorbet-runtime (>= 0.5)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activesupport (7.1.3)
13
+ base64
14
+ bigdecimal
15
+ concurrent-ruby (~> 1.0, >= 1.0.2)
16
+ connection_pool (>= 2.2.5)
17
+ drb
18
+ i18n (>= 1.6, < 2)
19
+ minitest (>= 5.1)
20
+ mutex_m
21
+ tzinfo (~> 2.0)
22
+ addressable (2.8.6)
23
+ public_suffix (>= 2.0.2, < 6.0)
24
+ appraisal (2.5.0)
25
+ bundler
26
+ rake
27
+ thor (>= 0.14.0)
28
+ ast (2.4.2)
29
+ base64 (0.2.0)
30
+ bigdecimal (3.1.6)
31
+ coderay (1.1.3)
32
+ concurrent-ruby (1.2.3)
33
+ connection_pool (2.4.1)
34
+ crack (0.4.5)
35
+ rexml
36
+ dotenv (2.8.1)
37
+ drb (2.2.0)
38
+ ruby2_keywords
39
+ erubi (1.12.0)
40
+ faraday (2.9.0)
41
+ faraday-net_http (>= 2.0, < 3.2)
42
+ faraday-net_http (3.1.0)
43
+ net-http
44
+ hashdiff (1.1.0)
45
+ i18n (1.14.1)
46
+ concurrent-ruby (~> 1.0)
47
+ json (2.7.1)
48
+ language_server-protocol (3.17.0.3)
49
+ method_source (1.0.0)
50
+ minitest (5.21.2)
51
+ mocha (2.1.0)
52
+ ruby2_keywords (>= 0.0.5)
53
+ mutex_m (0.2.0)
54
+ net-http (0.4.1)
55
+ uri
56
+ netrc (0.11.0)
57
+ parallel (1.24.0)
58
+ parser (3.3.0.5)
59
+ ast (~> 2.4.1)
60
+ racc
61
+ prettier_print (1.2.1)
62
+ prism (0.19.0)
63
+ pry (0.14.2)
64
+ coderay (~> 1.1)
65
+ method_source (~> 1.0)
66
+ pry-sorbet (0.2.1)
67
+ pry
68
+ public_suffix (5.0.4)
69
+ racc (1.7.3)
70
+ rack (3.0.8)
71
+ rainbow (3.1.1)
72
+ rake (13.1.0)
73
+ rbi (0.1.6)
74
+ prism (>= 0.18.0, < 0.20)
75
+ sorbet-runtime (>= 0.5.9204)
76
+ regexp_parser (2.9.0)
77
+ rexml (3.2.6)
78
+ rubocop (1.60.1)
79
+ json (~> 2.3)
80
+ language_server-protocol (>= 3.17.0)
81
+ parallel (~> 1.10)
82
+ parser (>= 3.3.0.2)
83
+ rainbow (>= 2.2.2, < 4.0)
84
+ regexp_parser (>= 1.8, < 3.0)
85
+ rexml (>= 3.2.5, < 4.0)
86
+ rubocop-ast (>= 1.30.0, < 2.0)
87
+ ruby-progressbar (~> 1.7)
88
+ unicode-display_width (>= 2.4.0, < 3.0)
89
+ rubocop-ast (1.30.0)
90
+ parser (>= 3.2.1.0)
91
+ rubocop-minitest (0.34.5)
92
+ rubocop (>= 1.39, < 2.0)
93
+ rubocop-ast (>= 1.30.0, < 2.0)
94
+ rubocop-rails (2.23.1)
95
+ activesupport (>= 4.2.0)
96
+ rack (>= 1.1)
97
+ rubocop (>= 1.33.0, < 2.0)
98
+ rubocop-ast (>= 1.30.0, < 2.0)
99
+ rubocop-shopify (2.14.0)
100
+ rubocop (~> 1.51)
101
+ rubocop-sorbet (0.7.6)
102
+ rubocop (>= 0.90.0)
103
+ ruby-progressbar (1.13.0)
104
+ ruby2_keywords (0.0.5)
105
+ sorbet (0.5.11219)
106
+ sorbet-static (= 0.5.11219)
107
+ sorbet-runtime (0.5.11219)
108
+ sorbet-static (0.5.11219-universal-darwin)
109
+ sorbet-static (0.5.11219-x86_64-linux)
110
+ sorbet-static-and-runtime (0.5.11219)
111
+ sorbet (= 0.5.11219)
112
+ sorbet-runtime (= 0.5.11219)
113
+ spoom (1.2.4)
114
+ erubi (>= 1.10.0)
115
+ sorbet-static-and-runtime (>= 0.5.10187)
116
+ syntax_tree (>= 6.1.1)
117
+ thor (>= 0.19.2)
118
+ syntax_tree (6.2.0)
119
+ prettier_print (>= 1.2.0)
120
+ tapioca (0.12.0)
121
+ bundler (>= 2.2.25)
122
+ netrc (>= 0.11.0)
123
+ parallel (>= 1.21.0)
124
+ rbi (>= 0.1.4, < 0.2)
125
+ sorbet-static-and-runtime (>= 0.5.10820)
126
+ spoom (~> 1.2.0, >= 1.2.0)
127
+ thor (>= 1.2.0)
128
+ yard-sorbet
129
+ thor (1.3.0)
130
+ toys (0.15.4)
131
+ toys-core (= 0.15.4)
132
+ toys-core (0.15.4)
133
+ tzinfo (2.0.6)
134
+ concurrent-ruby (~> 1.0)
135
+ unicode-display_width (2.5.0)
136
+ uri (0.13.0)
137
+ vcr (6.2.0)
138
+ webmock (3.19.1)
139
+ addressable (>= 2.8.0)
140
+ crack (>= 0.3.2)
141
+ hashdiff (>= 0.4.0, < 2.0.0)
142
+ yard (0.9.34)
143
+ yard-sorbet (0.8.1)
144
+ sorbet-runtime (>= 0.5)
145
+ yard (>= 0.9)
146
+
147
+ PLATFORMS
148
+ arm64-darwin-22
149
+ arm64-darwin-23
150
+ x86_64-darwin-20
151
+ x86_64-linux
152
+
153
+ DEPENDENCIES
154
+ appraisal
155
+ dotenv
156
+ lunchmoney!
157
+ minitest (~> 5.21)
158
+ mocha (~> 2.1.0)
159
+ pry-sorbet (~> 0.2)
160
+ rubocop-minitest
161
+ rubocop-rails
162
+ rubocop-shopify
163
+ rubocop-sorbet
164
+ sorbet-static-and-runtime
165
+ spoom
166
+ tapioca
167
+ toys
168
+ vcr
169
+ webmock
170
+ yard
171
+ yard-sorbet
172
+
173
+ BUNDLED WITH
174
+ 2.5.3