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 +4 -4
- data/.github/workflows/gem-push.yml +45 -0
- data/.ruby-version +1 -1
- data/lib/tax_calculator/deductions.rb +2 -2
- data/lib/tax_calculator/federal.rb +6 -6
- data/lib/tax_calculator/ohio.rb +6 -8
- data/lib/tax_calculator/version.rb +1 -1
- data/tax_calculator.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48db1dcb36a0ec43d707ad61d185398b1bf0ca97c7e0fe5b227a73b56ee8e2b6
|
4
|
+
data.tar.gz: 3ed15adba6df43d726b188c978e80cc3ffb068b00403ed510587425784213dfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
1
|
+
3.0.1
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module TaxCalculator
|
4
4
|
class Deductions
|
5
|
-
STANDARD_DEDUCTION =
|
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 =
|
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 =>
|
9
|
-
12.0 =>
|
10
|
-
22.0 =>
|
11
|
-
24.0 =>
|
12
|
-
32.0 =>
|
13
|
-
35.0 =>
|
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
|
data/lib/tax_calculator/ohio.rb
CHANGED
@@ -10,18 +10,16 @@ module TaxCalculator
|
|
10
10
|
|
11
11
|
# 2020
|
12
12
|
def self.from_brackets(income)
|
13
|
-
if income <=
|
13
|
+
if income <= 25_000
|
14
14
|
0
|
15
15
|
elsif income <= 44_250
|
16
|
-
(income -
|
16
|
+
(income - 25_000) * 0.02765 + 346.16
|
17
17
|
elsif income <= 88_450
|
18
|
-
(income -
|
18
|
+
(income - 44_250) * 0.03226 + 878.42
|
19
19
|
elsif income <= 110_650
|
20
|
-
(income -
|
21
|
-
elsif income
|
22
|
-
(income -
|
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
|
data/tax_calculator.gemspec
CHANGED
@@ -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.
|
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.
|
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:
|
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.
|
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.
|
105
|
+
rubygems_version: 3.2.32
|
105
106
|
signing_key:
|
106
107
|
specification_version: 4
|
107
108
|
summary: Calculate estimated income tax liability
|