tax_calculator 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3c524ccb494b879d7c789ea0c9f5c447447019ec2b1352bd4d3730f5ec8d3fc
4
- data.tar.gz: 39877d5955503eac62dae6aa74249d91525ef5457a359b704940a4068486a3ab
3
+ metadata.gz: 48db1dcb36a0ec43d707ad61d185398b1bf0ca97c7e0fe5b227a73b56ee8e2b6
4
+ data.tar.gz: 3ed15adba6df43d726b188c978e80cc3ffb068b00403ed510587425784213dfc
5
5
  SHA512:
6
- metadata.gz: 03d0b3f45b1fe2949b03e0501f2d1cb48592b265dabd634c96e9e264088e9af53eb9f89aabc2fe11e4be01e9e5dd23e1b15e1190fee23ef868298190395125e1
7
- data.tar.gz: 23a76bfbeb8e36fbaf1c74afcd7d6a812c80e84d2144cee376806b4d88443c0522f6a34a85acfe878a79f0d5e781e76ad607865edd9cbcba9269da20a66a76ea
6
+ metadata.gz: dfb25c57da1948187ecf5da6e18d3aa9a4d32c9781e9a614c68cdba6e7cf6b97ad7de829b721e5e7aeb0abd7931d47262ebbc603a55071533dd12073e3a347f9
7
+ data.tar.gz: 8a99d3f80534aabf0e80f17c6a2ccec21c0fa8e2437cbb21aa69a5997fc8d5b7d6f3bf867efc63393e99026479aaaf4beedb8b81e733ead594baf3837d8884ef
@@ -0,0 +1,45 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ build:
11
+ name: Build + Publish
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read
15
+ packages: write
16
+
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+ - name: Set up Ruby 3.0
20
+ uses: actions/setup-ruby@v1
21
+ with:
22
+ ruby-version: 3.0.x
23
+
24
+ - name: Publish to GPR
25
+ run: |
26
+ mkdir -p $HOME/.gem
27
+ touch $HOME/.gem/credentials
28
+ chmod 0600 $HOME/.gem/credentials
29
+ printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
30
+ gem build *.gemspec
31
+ gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
32
+ env:
33
+ GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
34
+ OWNER: ${{ github.repository_owner }}
35
+
36
+ - name: Publish to RubyGems
37
+ run: |
38
+ mkdir -p $HOME/.gem
39
+ touch $HOME/.gem/credentials
40
+ chmod 0600 $HOME/.gem/credentials
41
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
42
+ gem build *.gemspec
43
+ gem push *.gem
44
+ env:
45
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.0
1
+ 3.0.1
@@ -2,7 +2,7 @@
2
2
 
3
3
  module TaxCalculator
4
4
  class Deductions
5
- STANDARD_DEDUCTION = 25_100
5
+ STANDARD_DEDUCTION = 25_900
6
6
 
7
7
  attr_reader :federal, :fica, :ohio, :columbus
8
8
 
@@ -23,7 +23,7 @@ module TaxCalculator
23
23
 
24
24
  def for_ohio(income, four_01_k, ira, hsa, health_premiums)
25
25
  num_exemptions = 2
26
- personal_exemption = 2_350 * num_exemptions
26
+ personal_exemption = 1_900 * num_exemptions
27
27
  (income - (four_01_k + ira + hsa + health_premiums + personal_exemption))
28
28
  end
29
29
 
@@ -5,12 +5,12 @@ module TaxCalculator
5
5
  # 2021
6
6
  BRACKETS = {
7
7
  :married => {
8
- 10.0 => 19_900.00,
9
- 12.0 => 81_050.00,
10
- 22.0 => 172_750.00,
11
- 24.0 => 329_850.00,
12
- 32.0 => 418_850.00,
13
- 35.0 => 628_300.00,
8
+ 10.0 => 20_550.00,
9
+ 12.0 => 83_550.00,
10
+ 22.0 => 178_150.00,
11
+ 24.0 => 340_100.00,
12
+ 32.0 => 431_900.00,
13
+ 35.0 => 647_850.00,
14
14
  37.0 => :remaining
15
15
  }.freeze
16
16
  }.freeze
@@ -10,18 +10,16 @@ module TaxCalculator
10
10
 
11
11
  # 2020
12
12
  def self.from_brackets(income)
13
- if income <= 22_150
13
+ if income <= 25_000
14
14
  0
15
15
  elsif income <= 44_250
16
- (income - 21_750) * 0.0285 + 310.47
16
+ (income - 25_000) * 0.02765 + 346.16
17
17
  elsif income <= 88_450
18
- (income - 43_450) * 0.03326 + 928.92
18
+ (income - 44_250) * 0.03226 + 878.42
19
19
  elsif income <= 110_650
20
- (income - 86_900) * 0.03802 + 2374.07
21
- elsif income <= 221_300
22
- (income - 108_700) * 0.04491 + 3202.91
23
- elsif income > 221_300
24
- (income - 217_400) * 0.04797 + 7999.84
20
+ (income - 88_450) * 0.03688 + 2304.31
21
+ elsif income > 110_650
22
+ (income - 110_650) * 0.03990 + 3123.05
25
23
  end
26
24
  end
27
25
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TaxCalculator
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  Please consult your CPA for anything tax related."
16
16
  spec.homepage = "https://github.com/coreycarvalho/tax_calculator.git"
17
17
  spec.license = "MIT"
18
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
18
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.8.0")
19
19
 
20
20
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
21
21
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tax_calculator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Carvalho
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-29 00:00:00.000000000 Z
11
+ date: 2022-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -62,6 +62,7 @@ executables: []
62
62
  extensions: []
63
63
  extra_rdoc_files: []
64
64
  files:
65
+ - ".github/workflows/gem-push.yml"
65
66
  - ".github/workflows/lint.yml"
66
67
  - ".github/workflows/ruby.yml"
67
68
  - ".gitignore"
@@ -94,14 +95,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
95
  requirements:
95
96
  - - ">="
96
97
  - !ruby/object:Gem::Version
97
- version: 2.3.0
98
+ version: 2.8.0
98
99
  required_rubygems_version: !ruby/object:Gem::Requirement
99
100
  requirements:
100
101
  - - ">="
101
102
  - !ruby/object:Gem::Version
102
103
  version: '0'
103
104
  requirements: []
104
- rubygems_version: 3.1.2
105
+ rubygems_version: 3.2.32
105
106
  signing_key:
106
107
  specification_version: 4
107
108
  summary: Calculate estimated income tax liability