income-tax 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +4 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +60 -0
- data/LICENSE +22 -0
- data/income-tax.gemspec +12 -0
- data/lib/income-tax.rb +1 -0
- data/lib/income_tax/countries/afghanistan.rb +10 -0
- data/lib/income_tax/countries/aland.rb +10 -0
- data/lib/income_tax/countries/albania.rb +12 -0
- data/lib/income_tax/countries/algeria.rb +13 -0
- data/lib/income_tax/countries/american_samoa.rb +10 -0
- data/lib/income_tax/countries/andorra.rb +9 -0
- data/lib/income_tax/countries/angola.rb +23 -0
- data/lib/income_tax/countries/anguilla.rb +8 -0
- data/lib/income_tax/countries/antigua_and_barbuda.rb +11 -0
- data/lib/income_tax/countries/argentina.rb +16 -0
- data/lib/income_tax/countries/armenia.rb +11 -0
- data/lib/income_tax/countries/aruba.rb +23 -0
- data/lib/income_tax/countries/australia.rb +32 -0
- data/lib/income_tax/countries/austria.rb +14 -0
- data/lib/income_tax/countries/azerbaijan.rb +11 -0
- data/lib/income_tax/countries/bahamas.rb +8 -0
- data/lib/income_tax/countries/bahrain.rb +8 -0
- data/lib/income_tax/countries/bangladesh.rb +42 -0
- data/lib/income_tax/countries/barbados.rb +28 -0
- data/lib/income_tax/countries/belarus.rb +9 -0
- data/lib/income_tax/countries/belgium.rb +14 -0
- data/lib/income_tax/countries/belize.rb +11 -0
- data/lib/income_tax/countries/benin.rb +13 -0
- data/lib/income_tax/countries/bermuda.rb +8 -0
- data/lib/income_tax/countries/bhutan.rb +14 -0
- data/lib/income_tax/countries/bolivia.rb +9 -0
- data/lib/income_tax/countries/bosnia_and_herzegovina.rb +9 -0
- data/lib/income_tax/countries/botswana.rb +11 -0
- data/lib/income_tax/countries/bouvet_island.rb +10 -0
- data/lib/income_tax/countries/brazil.rb +14 -0
- data/lib/income_tax/countries/british_indian_ocean_territory.rb +10 -0
- data/lib/income_tax/countries/brunei.rb +8 -0
- data/lib/income_tax/countries/bulgaria.rb +9 -0
- data/lib/income_tax/countries/burkina_faso.rb +16 -0
- data/lib/income_tax/countries/burundi.rb +12 -0
- data/lib/income_tax/countries/cambodia.rb +14 -0
- data/lib/income_tax/countries/cameroon.rb +13 -0
- data/lib/income_tax/countries/canada.rb +13 -0
- data/lib/income_tax/countries/cape_verde.rb +14 -0
- data/lib/income_tax/countries/caribbean_netherlands.rb +15 -0
- data/lib/income_tax/countries/cayman_islands.rb +8 -0
- data/lib/income_tax/countries/central_african_republic.rb +11 -0
- data/lib/income_tax/countries/chad.rb +17 -0
- data/lib/income_tax/countries/chile.rb +20 -0
- data/lib/income_tax/countries/china.rb +17 -0
- data/lib/income_tax/countries/christmas_island.rb +8 -0
- data/lib/income_tax/countries/cocos_keeling_islands.rb +8 -0
- data/lib/income_tax/countries/colombia.rb +14 -0
- data/lib/income_tax/countries/comoros.rb +16 -0
- data/lib/income_tax/countries/congo.rb +9 -0
- data/lib/income_tax/countries/congo_republic.rb +14 -0
- data/lib/income_tax/countries/cook_islands.rb +13 -0
- data/lib/income_tax/countries/costa_rica.rb +30 -0
- data/lib/income_tax/countries/croatia.rb +12 -0
- data/lib/income_tax/countries/cuba.rb +12 -0
- data/lib/income_tax/countries/curacao.rb +15 -0
- data/lib/income_tax/countries/cyprus.rb +14 -0
- data/lib/income_tax/countries/czech_republic.rb +9 -0
- data/lib/income_tax/countries/denmark.rb +12 -0
- data/lib/income_tax/countries/djibouti.rb +14 -0
- data/lib/income_tax/countries/dominica.rb +13 -0
- data/lib/income_tax/countries/dominican_republic.rb +13 -0
- data/lib/income_tax/countries/ecuador.rb +18 -0
- data/lib/income_tax/countries/egypt.rb +14 -0
- data/lib/income_tax/countries/el_salvador.rb +9 -0
- data/lib/income_tax/countries/equatorial_guinea.rb +16 -0
- data/lib/income_tax/countries/eritrea.rb +9 -0
- data/lib/income_tax/countries/estonia.rb +9 -0
- data/lib/income_tax/countries/ethiopia.rb +16 -0
- data/lib/income_tax/countries/falkland_islands.rb +12 -0
- data/lib/income_tax/countries/faroe_islands.rb +9 -0
- data/lib/income_tax/countries/fiji.rb +20 -0
- data/lib/income_tax/countries/finland.rb +14 -0
- data/lib/income_tax/countries/france.rb +34 -0
- data/lib/income_tax/countries/french_guiana.rb +8 -0
- data/lib/income_tax/countries/french_polynesia.rb +8 -0
- data/lib/income_tax/countries/french_southern_territories.rb +8 -0
- data/lib/income_tax/countries/gabon.rb +17 -0
- data/lib/income_tax/countries/gambia.rb +15 -0
- data/lib/income_tax/countries/georgia.rb +9 -0
- data/lib/income_tax/countries/germany.rb +58 -0
- data/lib/income_tax/countries/ghana.rb +14 -0
- data/lib/income_tax/countries/gibraltar.rb +15 -0
- data/lib/income_tax/countries/greece.rb +11 -0
- data/lib/income_tax/countries/greenland.rb +9 -0
- data/lib/income_tax/countries/grenada.rb +11 -0
- data/lib/income_tax/countries/guadeloupe.rb +14 -0
- data/lib/income_tax/countries/guam.rb +10 -0
- data/lib/income_tax/countries/guatemala.rb +13 -0
- data/lib/income_tax/countries/guernsey.rb +9 -0
- data/lib/income_tax/countries/guinea.rb +13 -0
- data/lib/income_tax/countries/guinea_bissau.rb +9 -0
- data/lib/income_tax/countries/guyana.rb +11 -0
- data/lib/income_tax/countries/haiti.rb +9 -0
- data/lib/income_tax/countries/heard_and_mcdonald_islands.rb +8 -0
- data/lib/income_tax/countries/honduras.rb +9 -0
- data/lib/income_tax/countries/hong_kong.rb +15 -0
- data/lib/income_tax/countries/hungary.rb +9 -0
- data/lib/income_tax/countries/iceland.rb +12 -0
- data/lib/income_tax/countries/india.rb +14 -0
- data/lib/income_tax/countries/indonesia.rb +14 -0
- data/lib/income_tax/countries/iran.rb +14 -0
- data/lib/income_tax/countries/iraq.rb +9 -0
- data/lib/income_tax/countries/ireland.rb +24 -0
- data/lib/income_tax/countries/isle_of_man.rb +11 -0
- data/lib/income_tax/countries/israel.rb +16 -0
- data/lib/income_tax/countries/italy.rb +14 -0
- data/lib/income_tax/countries/ivory_coast.rb +14 -0
- data/lib/income_tax/countries/jamaica.rb +11 -0
- data/lib/income_tax/countries/japan.rb +15 -0
- data/lib/income_tax/countries/jersey.rb +9 -0
- data/lib/income_tax/countries/jordan.rb +14 -0
- data/lib/income_tax/countries/kazakhstan.rb +9 -0
- data/lib/income_tax/countries/kenya.rb +14 -0
- data/lib/income_tax/countries/kiribati.rb +9 -0
- data/lib/income_tax/countries/kosovo.rb +13 -0
- data/lib/income_tax/countries/kuwait.rb +8 -0
- data/lib/income_tax/countries/kyrgyzstan.rb +9 -0
- data/lib/income_tax/countries/laos.rb +15 -0
- data/lib/income_tax/countries/latvia.rb +9 -0
- data/lib/income_tax/countries/lebanon.rb +15 -0
- data/lib/income_tax/countries/lesotho.rb +13 -0
- data/lib/income_tax/countries/liberia.rb +13 -0
- data/lib/income_tax/countries/libya.rb +12 -0
- data/lib/income_tax/countries/liechtenstein.rb +9 -0
- data/lib/income_tax/countries/lithuania.rb +9 -0
- data/lib/income_tax/countries/luxembourg.rb +33 -0
- data/lib/income_tax/countries/macao.rb +19 -0
- data/lib/income_tax/countries/macedonia.rb +9 -0
- data/lib/income_tax/countries/madagascar.rb +11 -0
- data/lib/income_tax/countries/malawi.rb +12 -0
- data/lib/income_tax/countries/malaysia.rb +18 -0
- data/lib/income_tax/countries/maldives.rb +8 -0
- data/lib/income_tax/countries/mali.rb +9 -0
- data/lib/income_tax/countries/malta.rb +36 -0
- data/lib/income_tax/countries/marshall_islands.rb +11 -0
- data/lib/income_tax/countries/martinique.rb +14 -0
- data/lib/income_tax/countries/mauritania.rb +12 -0
- data/lib/income_tax/countries/mauritius.rb +9 -0
- data/lib/income_tax/countries/mayotte.rb +8 -0
- data/lib/income_tax/countries/mexico.rb +20 -0
- data/lib/income_tax/countries/micronesia.rb +9 -0
- data/lib/income_tax/countries/moldova.rb +13 -0
- data/lib/income_tax/countries/monaco.rb +9 -0
- data/lib/income_tax/countries/mongolia.rb +9 -0
- data/lib/income_tax/countries/montenegro.rb +11 -0
- data/lib/income_tax/countries/montserrat.rb +14 -0
- data/lib/income_tax/countries/morocco.rb +15 -0
- data/lib/income_tax/countries/mozambique.rb +14 -0
- data/lib/income_tax/countries/myanmar.rb +15 -0
- data/lib/income_tax/countries/namibia.rb +16 -0
- data/lib/income_tax/countries/nauru.rb +8 -0
- data/lib/income_tax/countries/nepal.rb +28 -0
- data/lib/income_tax/countries/netherlands.rb +13 -0
- data/lib/income_tax/countries/netherlands_antilles.rb +15 -0
- data/lib/income_tax/countries/new_caledonia.rb +14 -0
- data/lib/income_tax/countries/new_zealand.rb +13 -0
- data/lib/income_tax/countries/nicaragua.rb +32 -0
- data/lib/income_tax/countries/niger.rb +16 -0
- data/lib/income_tax/countries/nigeria.rb +15 -0
- data/lib/income_tax/countries/niue.rb +13 -0
- data/lib/income_tax/countries/norfolk_island.rb +9 -0
- data/lib/income_tax/countries/north_korea.rb +8 -0
- data/lib/income_tax/countries/northern_mariana_islands.rb +10 -0
- data/lib/income_tax/countries/norway.rb +13 -0
- data/lib/income_tax/countries/oman.rb +8 -0
- data/lib/income_tax/countries/pakistan.rb +21 -0
- data/lib/income_tax/countries/palau.rb +12 -0
- data/lib/income_tax/countries/palestinian_territory.rb +15 -0
- data/lib/income_tax/countries/panama.rb +12 -0
- data/lib/income_tax/countries/papua_new_guinea.rb +15 -0
- data/lib/income_tax/countries/paraguay.rb +9 -0
- data/lib/income_tax/countries/peru.rb +11 -0
- data/lib/income_tax/countries/philippines.rb +16 -0
- data/lib/income_tax/countries/pitcairn.rb +12 -0
- data/lib/income_tax/countries/poland.rb +12 -0
- data/lib/income_tax/countries/portugal.rb +14 -0
- data/lib/income_tax/countries/puerto_rico.rb +9 -0
- data/lib/income_tax/countries/qatar.rb +8 -0
- data/lib/income_tax/countries/reunion.rb +8 -0
- data/lib/income_tax/countries/romania.rb +9 -0
- data/lib/income_tax/countries/russia.rb +9 -0
- data/lib/income_tax/countries/rwanda.rb +12 -0
- data/lib/income_tax/countries/saint_barthelemy.rb +8 -0
- data/lib/income_tax/countries/saint_helena.rb +9 -0
- data/lib/income_tax/countries/saint_kitts_and_nevis.rb +8 -0
- data/lib/income_tax/countries/saint_lucia.rb +14 -0
- data/lib/income_tax/countries/saint_martin.rb +14 -0
- data/lib/income_tax/countries/saint_pierre_and_miquelon.rb +21 -0
- data/lib/income_tax/countries/saint_vincent_and_the_grenedines.rb +13 -0
- data/lib/income_tax/countries/samoa.rb +13 -0
- data/lib/income_tax/countries/san_marino.rb +17 -0
- data/lib/income_tax/countries/sao_tome_and_principe.rb +9 -0
- data/lib/income_tax/countries/saudi_arabia.rb +8 -0
- data/lib/income_tax/countries/senegal.rb +19 -0
- data/lib/income_tax/countries/serbia.rb +13 -0
- data/lib/income_tax/countries/seychelles.rb +9 -0
- data/lib/income_tax/countries/sierra_leone.rb +13 -0
- data/lib/income_tax/countries/singapore.rb +43 -0
- data/lib/income_tax/countries/sint_maarten.rb +15 -0
- data/lib/income_tax/countries/slovakia.rb +11 -0
- data/lib/income_tax/countries/slovenia.rb +13 -0
- data/lib/income_tax/countries/solomon_islands.rb +16 -0
- data/lib/income_tax/countries/somalia.rb +15 -0
- data/lib/income_tax/countries/south_africa.rb +15 -0
- data/lib/income_tax/countries/south_georgia_and_the_south_sandwich_islands.rb +10 -0
- data/lib/income_tax/countries/south_korea.rb +13 -0
- data/lib/income_tax/countries/south_sudan.rb +12 -0
- data/lib/income_tax/countries/spain.rb +14 -0
- data/lib/income_tax/countries/sri_lanka.rb +9 -0
- data/lib/income_tax/countries/sudan.rb +9 -0
- data/lib/income_tax/countries/suriname.rb +14 -0
- data/lib/income_tax/countries/svalbard_and_jan_mayen.rb +9 -0
- data/lib/income_tax/countries/swaziland.rb +9 -0
- data/lib/income_tax/countries/sweden.rb +12 -0
- data/lib/income_tax/countries/switzerland/aargau.rb +12 -0
- data/lib/income_tax/countries/switzerland/appenzell_inner.rb +12 -0
- data/lib/income_tax/countries/switzerland/appenzell_outer.rb +11 -0
- data/lib/income_tax/countries/switzerland/basel_city.rb +11 -0
- data/lib/income_tax/countries/switzerland/basel_land.rb +11 -0
- data/lib/income_tax/countries/switzerland/bern.rb +10 -0
- data/lib/income_tax/countries/switzerland/canton.rb +36 -0
- data/lib/income_tax/countries/switzerland/data/aargau.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/appenzell_inner.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/appenzell_outer.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/basel_city.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/basel_land.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/bern.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/fribourg.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/geneva.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/glarus.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/grisons.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/jura.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/lucerne.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/neuchatel.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/nidwalden.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/obwalden.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/schaffhausen.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/schwyz.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/solothurn.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/st_gallen.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/thurgau.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/ticino.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/uri.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/valais.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/vaud.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/zug.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/zurich.dat +0 -0
- data/lib/income_tax/countries/switzerland/federal.rb +46 -0
- data/lib/income_tax/countries/switzerland/fribourg.rb +11 -0
- data/lib/income_tax/countries/switzerland/geneva.rb +12 -0
- data/lib/income_tax/countries/switzerland/glarus.rb +12 -0
- data/lib/income_tax/countries/switzerland/grisons.rb +11 -0
- data/lib/income_tax/countries/switzerland/jura.rb +11 -0
- data/lib/income_tax/countries/switzerland/lucerne.rb +11 -0
- data/lib/income_tax/countries/switzerland/neuchatel.rb +12 -0
- data/lib/income_tax/countries/switzerland/nidwalden.rb +11 -0
- data/lib/income_tax/countries/switzerland/obwalden.rb +11 -0
- data/lib/income_tax/countries/switzerland/schaffhausen.rb +12 -0
- data/lib/income_tax/countries/switzerland/schwyz.rb +11 -0
- data/lib/income_tax/countries/switzerland/solothurn.rb +12 -0
- data/lib/income_tax/countries/switzerland/st_gallen.rb +12 -0
- data/lib/income_tax/countries/switzerland/thurgau.rb +12 -0
- data/lib/income_tax/countries/switzerland/ticino.rb +11 -0
- data/lib/income_tax/countries/switzerland/uri.rb +11 -0
- data/lib/income_tax/countries/switzerland/valais.rb +10 -0
- data/lib/income_tax/countries/switzerland/vaud.rb +11 -0
- data/lib/income_tax/countries/switzerland/zug.rb +12 -0
- data/lib/income_tax/countries/switzerland/zurich.rb +12 -0
- data/lib/income_tax/countries/switzerland.rb +62 -0
- data/lib/income_tax/countries/syria.rb +12 -0
- data/lib/income_tax/countries/taiwan.rb +14 -0
- data/lib/income_tax/countries/tajikistan.rb +13 -0
- data/lib/income_tax/countries/tanzania.rb +53 -0
- data/lib/income_tax/countries/thailand.rb +17 -0
- data/lib/income_tax/countries/timor_leste.rb +11 -0
- data/lib/income_tax/countries/togo.rb +9 -0
- data/lib/income_tax/countries/tokelau.rb +15 -0
- data/lib/income_tax/countries/tonga.rb +12 -0
- data/lib/income_tax/countries/trinidad_and_tobago.rb +11 -0
- data/lib/income_tax/countries/tunisia.rb +15 -0
- data/lib/income_tax/countries/turkey.rb +13 -0
- data/lib/income_tax/countries/turkmenistan.rb +9 -0
- data/lib/income_tax/countries/turks_and_caicos_islands.rb +8 -0
- data/lib/income_tax/countries/tuvalu.rb +9 -0
- data/lib/income_tax/countries/uganda.rb +13 -0
- data/lib/income_tax/countries/ukraine.rb +9 -0
- data/lib/income_tax/countries/united_arab_emirates.rb +8 -0
- data/lib/income_tax/countries/united_kingdom.rb +13 -0
- data/lib/income_tax/countries/united_states/alabama.rb +24 -0
- data/lib/income_tax/countries/united_states/alaska.rb +10 -0
- data/lib/income_tax/countries/united_states/arizona.rb +29 -0
- data/lib/income_tax/countries/united_states/arkansas.rb +29 -0
- data/lib/income_tax/countries/united_states/california.rb +39 -0
- data/lib/income_tax/countries/united_states/colorado.rb +10 -0
- data/lib/income_tax/countries/united_states/connecticut.rb +31 -0
- data/lib/income_tax/countries/united_states/dc.rb +16 -0
- data/lib/income_tax/countries/united_states/delaware.rb +31 -0
- data/lib/income_tax/countries/united_states/federal.rb +40 -0
- data/lib/income_tax/countries/united_states/florida.rb +10 -0
- data/lib/income_tax/countries/united_states/georgia.rb +32 -0
- data/lib/income_tax/countries/united_states/hawaii.rb +43 -0
- data/lib/income_tax/countries/united_states/idaho.rb +34 -0
- data/lib/income_tax/countries/united_states/illinois.rb +10 -0
- data/lib/income_tax/countries/united_states/indiana.rb +10 -0
- data/lib/income_tax/countries/united_states/iowa.rb +39 -0
- data/lib/income_tax/countries/united_states/kansas.rb +23 -0
- data/lib/income_tax/countries/united_states/kentucky.rb +31 -0
- data/lib/income_tax/countries/united_states/louisiana.rb +26 -0
- data/lib/income_tax/countries/united_states/maine.rb +23 -0
- data/lib/income_tax/countries/united_states/maryland.rb +35 -0
- data/lib/income_tax/countries/united_states/massachusetts.rb +10 -0
- data/lib/income_tax/countries/united_states/michigan.rb +10 -0
- data/lib/income_tax/countries/united_states/minnesota.rb +27 -0
- data/lib/income_tax/countries/united_states/mississippi.rb +25 -0
- data/lib/income_tax/countries/united_states/missouri.rb +40 -0
- data/lib/income_tax/countries/united_states/montana.rb +34 -0
- data/lib/income_tax/countries/united_states/nebraska.rb +27 -0
- data/lib/income_tax/countries/united_states/nevada.rb +10 -0
- data/lib/income_tax/countries/united_states/new_hampshire.rb +10 -0
- data/lib/income_tax/countries/united_states/new_jersey.rb +32 -0
- data/lib/income_tax/countries/united_states/new_mexico.rb +27 -0
- data/lib/income_tax/countries/united_states/new_york.rb +35 -0
- data/lib/income_tax/countries/united_states/north_carolina.rb +10 -0
- data/lib/income_tax/countries/united_states/north_dakota.rb +17 -0
- data/lib/income_tax/countries/united_states/ohio.rb +37 -0
- data/lib/income_tax/countries/united_states/oklahoma.rb +33 -0
- data/lib/income_tax/countries/united_states/oregon.rb +28 -0
- data/lib/income_tax/countries/united_states/pennsylvania.rb +10 -0
- data/lib/income_tax/countries/united_states/rhode_island.rb +25 -0
- data/lib/income_tax/countries/united_states/south_carolina.rb +17 -0
- data/lib/income_tax/countries/united_states/south_dakota.rb +10 -0
- data/lib/income_tax/countries/united_states/state.rb +34 -0
- data/lib/income_tax/countries/united_states/tennessee.rb +10 -0
- data/lib/income_tax/countries/united_states/texas.rb +10 -0
- data/lib/income_tax/countries/united_states/utah.rb +10 -0
- data/lib/income_tax/countries/united_states/vermont.rb +29 -0
- data/lib/income_tax/countries/united_states/virginia.rb +16 -0
- data/lib/income_tax/countries/united_states/washington.rb +10 -0
- data/lib/income_tax/countries/united_states/west_virginia.rb +29 -0
- data/lib/income_tax/countries/united_states/wisconsin.rb +27 -0
- data/lib/income_tax/countries/united_states/wyoming.rb +10 -0
- data/lib/income_tax/countries/united_states.rb +93 -0
- data/lib/income_tax/countries/united_states_minor_outlying_islands.rb +8 -0
- data/lib/income_tax/countries/uruguay.rb +16 -0
- data/lib/income_tax/countries/uzbekistan.rb +15 -0
- data/lib/income_tax/countries/vanuatu.rb +8 -0
- data/lib/income_tax/countries/vatican.rb +8 -0
- data/lib/income_tax/countries/venezuela.rb +20 -0
- data/lib/income_tax/countries/vietnam.rb +17 -0
- data/lib/income_tax/countries/virgin_islands_british.rb +9 -0
- data/lib/income_tax/countries/virgin_islands_us.rb +8 -0
- data/lib/income_tax/countries/wallis_and_futuna.rb +8 -0
- data/lib/income_tax/countries/western_sahara.rb +8 -0
- data/lib/income_tax/countries/yemen.rb +11 -0
- data/lib/income_tax/countries/zambia.rb +13 -0
- data/lib/income_tax/countries/zimbabwe.rb +17 -0
- data/lib/income_tax/countries.rb +5 -0
- data/lib/income_tax/factory.rb +66 -0
- data/lib/income_tax/helpers.rb +25 -0
- data/lib/income_tax/models/delegate.rb +30 -0
- data/lib/income_tax/models/fixed_rate.rb +14 -0
- data/lib/income_tax/models/generic.rb +212 -0
- data/lib/income_tax/models/no_taxes.rb +7 -0
- data/lib/income_tax/models/not_implemented.rb +6 -0
- data/lib/income_tax/models/progressive.rb +103 -0
- data/lib/income_tax/models.rb +10 -0
- data/lib/income_tax/rate.rb +152 -0
- data/lib/income_tax/register.rb +35 -0
- data/lib/income_tax/version.rb +3 -0
- data/lib/income_tax.rb +17 -0
- data/locations.md +1763 -0
- data/readme.md +137 -0
- data/script/generate_switzerland.rb +87 -0
- data/spec/income_tax/countries/afghanistan_spec.rb +89 -0
- data/spec/income_tax/countries/aland_spec.rb +89 -0
- data/spec/income_tax/countries/albania_spec.rb +89 -0
- data/spec/income_tax/countries/algeria_spec.rb +89 -0
- data/spec/income_tax/countries/american_samoa_spec.rb +89 -0
- data/spec/income_tax/countries/andorra_spec.rb +89 -0
- data/spec/income_tax/countries/angola_spec.rb +89 -0
- data/spec/income_tax/countries/anguilla_spec.rb +89 -0
- data/spec/income_tax/countries/antigua_and_barbuda_spec.rb +89 -0
- data/spec/income_tax/countries/argentina_spec.rb +89 -0
- data/spec/income_tax/countries/armenia_spec.rb +89 -0
- data/spec/income_tax/countries/aruba_spec.rb +89 -0
- data/spec/income_tax/countries/australia_spec.rb +89 -0
- data/spec/income_tax/countries/austria_spec.rb +89 -0
- data/spec/income_tax/countries/azerbaijan_spec.rb +89 -0
- data/spec/income_tax/countries/bahamas_spec.rb +89 -0
- data/spec/income_tax/countries/bahrain_spec.rb +89 -0
- data/spec/income_tax/countries/bangladesh_spec.rb +89 -0
- data/spec/income_tax/countries/barbados_spec.rb +89 -0
- data/spec/income_tax/countries/belarus_spec.rb +89 -0
- data/spec/income_tax/countries/belgium_spec.rb +89 -0
- data/spec/income_tax/countries/belize_spec.rb +89 -0
- data/spec/income_tax/countries/benin_spec.rb +89 -0
- data/spec/income_tax/countries/bermuda_spec.rb +89 -0
- data/spec/income_tax/countries/bhutan_spec.rb +89 -0
- data/spec/income_tax/countries/bolivia_spec.rb +89 -0
- data/spec/income_tax/countries/bosnia_and_herzegovina_spec.rb +89 -0
- data/spec/income_tax/countries/botswana_spec.rb +89 -0
- data/spec/income_tax/countries/bouvet_island_spec.rb +89 -0
- data/spec/income_tax/countries/brazil_spec.rb +89 -0
- data/spec/income_tax/countries/british_indian_ocean_territory_spec.rb +89 -0
- data/spec/income_tax/countries/brunei_spec.rb +89 -0
- data/spec/income_tax/countries/bulgaria_spec.rb +89 -0
- data/spec/income_tax/countries/burkina_faso_spec.rb +89 -0
- data/spec/income_tax/countries/burundi_spec.rb +89 -0
- data/spec/income_tax/countries/cambodia_spec.rb +89 -0
- data/spec/income_tax/countries/cameroon_spec.rb +89 -0
- data/spec/income_tax/countries/canada_spec.rb +89 -0
- data/spec/income_tax/countries/cape_verde_spec.rb +89 -0
- data/spec/income_tax/countries/caribbean_netherlands_spec.rb +89 -0
- data/spec/income_tax/countries/cayman_islands_spec.rb +89 -0
- data/spec/income_tax/countries/central_african_republic_spec.rb +89 -0
- data/spec/income_tax/countries/chad_spec.rb +89 -0
- data/spec/income_tax/countries/chile_spec.rb +89 -0
- data/spec/income_tax/countries/china_spec.rb +89 -0
- data/spec/income_tax/countries/christmas_island_spec.rb +89 -0
- data/spec/income_tax/countries/cocos_keeling_islands_spec.rb +89 -0
- data/spec/income_tax/countries/colombia_spec.rb +89 -0
- data/spec/income_tax/countries/comoros_spec.rb +89 -0
- data/spec/income_tax/countries/congo_republic_spec.rb +89 -0
- data/spec/income_tax/countries/congo_spec.rb +89 -0
- data/spec/income_tax/countries/cook_islands_spec.rb +89 -0
- data/spec/income_tax/countries/costa_rica_spec.rb +89 -0
- data/spec/income_tax/countries/croatia_spec.rb +89 -0
- data/spec/income_tax/countries/cuba_spec.rb +89 -0
- data/spec/income_tax/countries/curacao_spec.rb +89 -0
- data/spec/income_tax/countries/cyprus_spec.rb +89 -0
- data/spec/income_tax/countries/czech_republic_spec.rb +89 -0
- data/spec/income_tax/countries/denmark_spec.rb +89 -0
- data/spec/income_tax/countries/djibouti_spec.rb +89 -0
- data/spec/income_tax/countries/dominica_spec.rb +89 -0
- data/spec/income_tax/countries/dominican_republic_spec.rb +89 -0
- data/spec/income_tax/countries/ecuador_spec.rb +89 -0
- data/spec/income_tax/countries/egypt_spec.rb +89 -0
- data/spec/income_tax/countries/el_salvador_spec.rb +89 -0
- data/spec/income_tax/countries/equatorial_guinea_spec.rb +89 -0
- data/spec/income_tax/countries/eritrea_spec.rb +89 -0
- data/spec/income_tax/countries/estonia_spec.rb +89 -0
- data/spec/income_tax/countries/ethiopia_spec.rb +89 -0
- data/spec/income_tax/countries/falkland_islands_spec.rb +89 -0
- data/spec/income_tax/countries/faroe_islands_spec.rb +89 -0
- data/spec/income_tax/countries/fiji_spec.rb +89 -0
- data/spec/income_tax/countries/finland_spec.rb +89 -0
- data/spec/income_tax/countries/france_spec.rb +89 -0
- data/spec/income_tax/countries/french_guiana_spec.rb +89 -0
- data/spec/income_tax/countries/french_polynesia_spec.rb +89 -0
- data/spec/income_tax/countries/french_southern_territories_spec.rb +89 -0
- data/spec/income_tax/countries/gabon_spec.rb +89 -0
- data/spec/income_tax/countries/gambia_spec.rb +89 -0
- data/spec/income_tax/countries/georgia_spec.rb +89 -0
- data/spec/income_tax/countries/germany_spec.rb +89 -0
- data/spec/income_tax/countries/ghana_spec.rb +89 -0
- data/spec/income_tax/countries/gibraltar_spec.rb +89 -0
- data/spec/income_tax/countries/greece_spec.rb +89 -0
- data/spec/income_tax/countries/greenland_spec.rb +89 -0
- data/spec/income_tax/countries/grenada_spec.rb +89 -0
- data/spec/income_tax/countries/guadeloupe_spec.rb +89 -0
- data/spec/income_tax/countries/guam_spec.rb +89 -0
- data/spec/income_tax/countries/guatemala_spec.rb +89 -0
- data/spec/income_tax/countries/guernsey_spec.rb +89 -0
- data/spec/income_tax/countries/guinea_bissau_spec.rb +89 -0
- data/spec/income_tax/countries/guinea_spec.rb +89 -0
- data/spec/income_tax/countries/guyana_spec.rb +89 -0
- data/spec/income_tax/countries/haiti_spec.rb +89 -0
- data/spec/income_tax/countries/heard_and_mcdonald_islands_spec.rb +89 -0
- data/spec/income_tax/countries/honduras_spec.rb +89 -0
- data/spec/income_tax/countries/hong_kong_spec.rb +89 -0
- data/spec/income_tax/countries/hungary_spec.rb +89 -0
- data/spec/income_tax/countries/iceland_spec.rb +89 -0
- data/spec/income_tax/countries/india_spec.rb +89 -0
- data/spec/income_tax/countries/indonesia_spec.rb +89 -0
- data/spec/income_tax/countries/iran_spec.rb +89 -0
- data/spec/income_tax/countries/iraq_spec.rb +89 -0
- data/spec/income_tax/countries/ireland_spec.rb +89 -0
- data/spec/income_tax/countries/isle_of_man_spec.rb +89 -0
- data/spec/income_tax/countries/israel_spec.rb +89 -0
- data/spec/income_tax/countries/italy_spec.rb +89 -0
- data/spec/income_tax/countries/ivory_coast_spec.rb +89 -0
- data/spec/income_tax/countries/jamaica_spec.rb +89 -0
- data/spec/income_tax/countries/japan_spec.rb +89 -0
- data/spec/income_tax/countries/jersey_spec.rb +89 -0
- data/spec/income_tax/countries/jordan_spec.rb +89 -0
- data/spec/income_tax/countries/kazakhstan_spec.rb +89 -0
- data/spec/income_tax/countries/kenya_spec.rb +89 -0
- data/spec/income_tax/countries/kiribati_spec.rb +89 -0
- data/spec/income_tax/countries/kosovo_spec.rb +89 -0
- data/spec/income_tax/countries/kuwait_spec.rb +89 -0
- data/spec/income_tax/countries/kyrgyzstan_spec.rb +89 -0
- data/spec/income_tax/countries/laos_spec.rb +89 -0
- data/spec/income_tax/countries/latvia_spec.rb +89 -0
- data/spec/income_tax/countries/lebanon_spec.rb +89 -0
- data/spec/income_tax/countries/lesotho_spec.rb +89 -0
- data/spec/income_tax/countries/liberia_spec.rb +89 -0
- data/spec/income_tax/countries/libya_spec.rb +89 -0
- data/spec/income_tax/countries/liechtenstein_spec.rb +89 -0
- data/spec/income_tax/countries/lithuania_spec.rb +89 -0
- data/spec/income_tax/countries/luxembourg_spec.rb +89 -0
- data/spec/income_tax/countries/macao_spec.rb +89 -0
- data/spec/income_tax/countries/macedonia_spec.rb +89 -0
- data/spec/income_tax/countries/madagascar_spec.rb +89 -0
- data/spec/income_tax/countries/malawi_spec.rb +89 -0
- data/spec/income_tax/countries/malaysia_spec.rb +89 -0
- data/spec/income_tax/countries/maldives_spec.rb +89 -0
- data/spec/income_tax/countries/mali_spec.rb +89 -0
- data/spec/income_tax/countries/malta_spec.rb +89 -0
- data/spec/income_tax/countries/marshall_islands_spec.rb +89 -0
- data/spec/income_tax/countries/martinique_spec.rb +89 -0
- data/spec/income_tax/countries/mauritania_spec.rb +89 -0
- data/spec/income_tax/countries/mauritius_spec.rb +89 -0
- data/spec/income_tax/countries/mayotte_spec.rb +89 -0
- data/spec/income_tax/countries/mexico_spec.rb +89 -0
- data/spec/income_tax/countries/micronesia_spec.rb +89 -0
- data/spec/income_tax/countries/moldova_spec.rb +89 -0
- data/spec/income_tax/countries/monaco_spec.rb +89 -0
- data/spec/income_tax/countries/mongolia_spec.rb +89 -0
- data/spec/income_tax/countries/montenegro_spec.rb +89 -0
- data/spec/income_tax/countries/montserrat_spec.rb +89 -0
- data/spec/income_tax/countries/morocco_spec.rb +89 -0
- data/spec/income_tax/countries/mozambique_spec.rb +89 -0
- data/spec/income_tax/countries/myanmar_spec.rb +89 -0
- data/spec/income_tax/countries/namibia_spec.rb +89 -0
- data/spec/income_tax/countries/nauru_spec.rb +89 -0
- data/spec/income_tax/countries/nepal_spec.rb +89 -0
- data/spec/income_tax/countries/netherlands_antilles_spec.rb +89 -0
- data/spec/income_tax/countries/netherlands_spec.rb +89 -0
- data/spec/income_tax/countries/new_caledonia_spec.rb +89 -0
- data/spec/income_tax/countries/new_zealand_spec.rb +89 -0
- data/spec/income_tax/countries/nicaragua_spec.rb +89 -0
- data/spec/income_tax/countries/niger_spec.rb +89 -0
- data/spec/income_tax/countries/nigeria_spec.rb +89 -0
- data/spec/income_tax/countries/niue_spec.rb +89 -0
- data/spec/income_tax/countries/norfolk_island_spec.rb +89 -0
- data/spec/income_tax/countries/north_korea_spec.rb +89 -0
- data/spec/income_tax/countries/northern_mariana_islands_spec.rb +89 -0
- data/spec/income_tax/countries/norway_spec.rb +89 -0
- data/spec/income_tax/countries/oman_spec.rb +89 -0
- data/spec/income_tax/countries/pakistan_spec.rb +89 -0
- data/spec/income_tax/countries/palau_spec.rb +89 -0
- data/spec/income_tax/countries/palestinian_territory_spec.rb +89 -0
- data/spec/income_tax/countries/panama_spec.rb +89 -0
- data/spec/income_tax/countries/papua_new_guinea_spec.rb +89 -0
- data/spec/income_tax/countries/paraguay_spec.rb +89 -0
- data/spec/income_tax/countries/peru_spec.rb +89 -0
- data/spec/income_tax/countries/philippines_spec.rb +89 -0
- data/spec/income_tax/countries/pitcairn_spec.rb +89 -0
- data/spec/income_tax/countries/poland_spec.rb +89 -0
- data/spec/income_tax/countries/portugal_spec.rb +89 -0
- data/spec/income_tax/countries/puerto_rico_spec.rb +89 -0
- data/spec/income_tax/countries/qatar_spec.rb +89 -0
- data/spec/income_tax/countries/reunion_spec.rb +89 -0
- data/spec/income_tax/countries/romania_spec.rb +89 -0
- data/spec/income_tax/countries/russia_spec.rb +89 -0
- data/spec/income_tax/countries/rwanda_spec.rb +89 -0
- data/spec/income_tax/countries/saint_barthelemy_spec.rb +89 -0
- data/spec/income_tax/countries/saint_helena_spec.rb +89 -0
- data/spec/income_tax/countries/saint_kitts_and_nevis_spec.rb +89 -0
- data/spec/income_tax/countries/saint_lucia_spec.rb +89 -0
- data/spec/income_tax/countries/saint_martin_spec.rb +89 -0
- data/spec/income_tax/countries/saint_pierre_and_miquelon_spec.rb +89 -0
- data/spec/income_tax/countries/saint_vincent_and_the_grenedines_spec.rb +89 -0
- data/spec/income_tax/countries/samoa_spec.rb +89 -0
- data/spec/income_tax/countries/san_marino_spec.rb +89 -0
- data/spec/income_tax/countries/sao_tome_and_principe_spec.rb +89 -0
- data/spec/income_tax/countries/saudi_arabia_spec.rb +89 -0
- data/spec/income_tax/countries/senegal_spec.rb +89 -0
- data/spec/income_tax/countries/serbia_spec.rb +89 -0
- data/spec/income_tax/countries/seychelles_spec.rb +89 -0
- data/spec/income_tax/countries/sierra_leone_spec.rb +89 -0
- data/spec/income_tax/countries/singapore_spec.rb +89 -0
- data/spec/income_tax/countries/sint_maarten_spec.rb +89 -0
- data/spec/income_tax/countries/slovakia_spec.rb +89 -0
- data/spec/income_tax/countries/slovenia_spec.rb +89 -0
- data/spec/income_tax/countries/solomon_islands_spec.rb +89 -0
- data/spec/income_tax/countries/somalia_spec.rb +89 -0
- data/spec/income_tax/countries/south_africa_spec.rb +89 -0
- data/spec/income_tax/countries/south_georgia_and_the_south_sandwich_islands_spec.rb +89 -0
- data/spec/income_tax/countries/south_korea_spec.rb +89 -0
- data/spec/income_tax/countries/south_sudan_spec.rb +89 -0
- data/spec/income_tax/countries/spain_spec.rb +89 -0
- data/spec/income_tax/countries/sri_lanka_spec.rb +89 -0
- data/spec/income_tax/countries/sudan_spec.rb +89 -0
- data/spec/income_tax/countries/suriname_spec.rb +89 -0
- data/spec/income_tax/countries/svalbard_and_jan_mayen_spec.rb +89 -0
- data/spec/income_tax/countries/swaziland_spec.rb +89 -0
- data/spec/income_tax/countries/sweden_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/aargau_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/appenzell_inner_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/appenzell_outer_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/basel_city_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/basel_land_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/bern_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/fribourg_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/geneva_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/glarus_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/grisons_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/jura_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/lucerne_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/neuchatel_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/nidwalden_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/obwalden_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/schaffhausen_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/schwyz_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/solothurn_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/st_gallen_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/thurgau_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/ticino_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/uri_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/valais_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/vaud_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/zug_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/zurich_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland_spec.rb +89 -0
- data/spec/income_tax/countries/syria_spec.rb +89 -0
- data/spec/income_tax/countries/taiwan_spec.rb +89 -0
- data/spec/income_tax/countries/tajikistan_spec.rb +89 -0
- data/spec/income_tax/countries/tanzania_spec.rb +89 -0
- data/spec/income_tax/countries/thailand_spec.rb +89 -0
- data/spec/income_tax/countries/timor_leste_spec.rb +89 -0
- data/spec/income_tax/countries/togo_spec.rb +89 -0
- data/spec/income_tax/countries/tokelau_spec.rb +89 -0
- data/spec/income_tax/countries/tonga_spec.rb +89 -0
- data/spec/income_tax/countries/trinidad_and_tobago_spec.rb +89 -0
- data/spec/income_tax/countries/tunisia_spec.rb +89 -0
- data/spec/income_tax/countries/turkey_spec.rb +89 -0
- data/spec/income_tax/countries/turkmenistan_spec.rb +89 -0
- data/spec/income_tax/countries/turks_and_caicos_islands_spec.rb +89 -0
- data/spec/income_tax/countries/tuvalu_spec.rb +89 -0
- data/spec/income_tax/countries/uganda_spec.rb +89 -0
- data/spec/income_tax/countries/ukraine_spec.rb +89 -0
- data/spec/income_tax/countries/united_arab_emirates_spec.rb +89 -0
- data/spec/income_tax/countries/united_kingdom_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/alabama_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/alaska_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/arizona_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/arkansas_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/california_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/colorado_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/connecticut_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/dc_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/delaware_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/florida_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/georgia_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/hawaii_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/idaho_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/illinois_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/indiana_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/iowa_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/kansas_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/kentucky_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/louisiana_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/maine_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/maryland_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/massachusetts_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/michigan_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/minnesota_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/mississippi_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/missouri_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/montana_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/nebraska_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/nevada_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/new_hampshire_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/new_jersey_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/new_mexico_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/new_york_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/north_carolina_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/north_dakota_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/ohio_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/oklahoma_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/oregon_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/pennsylvania_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/rhode_island_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/south_carolina_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/south_dakota_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/tennessee_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/texas_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/utah_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/vermont_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/virginia_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/washington_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/west_virginia_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/wisconsin_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/wyoming_spec.rb +89 -0
- data/spec/income_tax/countries/united_states_minor_outlying_islands_spec.rb +89 -0
- data/spec/income_tax/countries/united_states_spec.rb +89 -0
- data/spec/income_tax/countries/uruguay_spec.rb +89 -0
- data/spec/income_tax/countries/uzbekistan_spec.rb +89 -0
- data/spec/income_tax/countries/vanuatu_spec.rb +89 -0
- data/spec/income_tax/countries/vatican_spec.rb +89 -0
- data/spec/income_tax/countries/venezuela_spec.rb +89 -0
- data/spec/income_tax/countries/vietnam_spec.rb +89 -0
- data/spec/income_tax/countries/virgin_islands_british_spec.rb +89 -0
- data/spec/income_tax/countries/virgin_islands_us_spec.rb +89 -0
- data/spec/income_tax/countries/wallis_and_futuna_spec.rb +89 -0
- data/spec/income_tax/countries/western_sahara_spec.rb +89 -0
- data/spec/income_tax/countries/yemen_spec.rb +89 -0
- data/spec/income_tax/countries/zambia_spec.rb +89 -0
- data/spec/income_tax/countries/zimbabwe_spec.rb +89 -0
- data/spec/income_tax/models/fixed_rate_spec.rb +24 -0
- data/spec/income_tax/models/no_taxes_spec.rb +20 -0
- data/spec/income_tax/models/progressive_spec.rb +98 -0
- data/spec/income_tax/rate_spec.rb +257 -0
- data/spec/income_tax/register_spec.rb +14 -0
- data/spec/income_tax_spec.rb +9 -0
- data/spec/support/coverage.rb +16 -0
- data/spec/support/env.rb +12 -0
- data/spec/support.rb +3 -0
- metadata +760 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
describe IncomeTax::Models::Progressive do
|
2
|
+
class ExampleModel < IncomeTax::Models::Progressive
|
3
|
+
level 100, "0%"
|
4
|
+
level 200, "10%"
|
5
|
+
level 300, "20%"
|
6
|
+
remainder "50%"
|
7
|
+
end
|
8
|
+
|
9
|
+
subject(:result) { ExampleModel.new(income: income, income_type: income_type) }
|
10
|
+
|
11
|
+
describe "from gross income" do
|
12
|
+
let(:income_type) { :gross }
|
13
|
+
|
14
|
+
describe "no income" do
|
15
|
+
let(:income) { 0 }
|
16
|
+
its(:rate) { should be == IncomeTax::Rate("0%") }
|
17
|
+
its(:gross_income) { should be == 0 }
|
18
|
+
its(:net_income) { should be == 0 }
|
19
|
+
its(:taxes) { should be == 0 }
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "first bracket" do
|
23
|
+
let(:income) { 80 }
|
24
|
+
its(:rate) { should be == IncomeTax::Rate("0%") }
|
25
|
+
its(:gross_income) { should be == 80 }
|
26
|
+
its(:net_income) { should be == 80 }
|
27
|
+
its(:taxes) { should be == 0 }
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "second bracket" do
|
31
|
+
let(:income) { 190 }
|
32
|
+
its(:rate) { should be == Rational(9, 190) }
|
33
|
+
its(:gross_income) { should be == 190 }
|
34
|
+
its(:net_income) { should be == 181 }
|
35
|
+
its(:taxes) { should be == 9 }
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "third bracket" do
|
39
|
+
let(:income) { 290 }
|
40
|
+
its(:rate) { should be == Rational(28, 290) }
|
41
|
+
its(:gross_income) { should be == 290 }
|
42
|
+
its(:net_income) { should be == 262 }
|
43
|
+
its(:taxes) { should be == 28 }
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "remainder" do
|
47
|
+
let(:income) { 5000 }
|
48
|
+
its(:rate) { should be == Rational(2380, 5000) }
|
49
|
+
its(:gross_income) { should be == 5000 }
|
50
|
+
its(:net_income) { should be == 2620 }
|
51
|
+
its(:taxes) { should be == 2380 }
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "from gross income" do
|
56
|
+
let(:income_type) { :net }
|
57
|
+
|
58
|
+
describe "no income" do
|
59
|
+
let(:income) { 0 }
|
60
|
+
its(:rate) { should be == IncomeTax::Rate("0%") }
|
61
|
+
its(:gross_income) { should be == 0 }
|
62
|
+
its(:net_income) { should be == 0 }
|
63
|
+
its(:taxes) { should be == 0 }
|
64
|
+
end
|
65
|
+
|
66
|
+
describe "first bracket" do
|
67
|
+
let(:income) { 80 }
|
68
|
+
its(:rate) { should be == IncomeTax::Rate("0%") }
|
69
|
+
its(:gross_income) { should be == 80 }
|
70
|
+
its(:net_income) { should be == 80 }
|
71
|
+
its(:taxes) { should be == 0 }
|
72
|
+
end
|
73
|
+
|
74
|
+
describe "second bracket" do
|
75
|
+
let(:income) { 181 }
|
76
|
+
its(:rate) { should be == Rational(9, 190) }
|
77
|
+
its(:gross_income) { should be == 190 }
|
78
|
+
its(:net_income) { should be == 181 }
|
79
|
+
its(:taxes) { should be == 9 }
|
80
|
+
end
|
81
|
+
|
82
|
+
describe "third bracket" do
|
83
|
+
let(:income) { 262 }
|
84
|
+
its(:rate) { should be == Rational(28, 290) }
|
85
|
+
its(:gross_income) { should be == 290 }
|
86
|
+
its(:net_income) { should be == 262 }
|
87
|
+
its(:taxes) { should be == 28 }
|
88
|
+
end
|
89
|
+
|
90
|
+
describe "remainder" do
|
91
|
+
let(:income) { 2620 }
|
92
|
+
its(:rate) { should be == Rational(2380, 5000) }
|
93
|
+
its(:gross_income) { should be == 5000 }
|
94
|
+
its(:net_income) { should be == 2620 }
|
95
|
+
its(:taxes) { should be == 2380 }
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,257 @@
|
|
1
|
+
describe IncomeTax::Rate do
|
2
|
+
subject(:rate) { IncomeTax::Rate(input) }
|
3
|
+
let(:input) { "20%" }
|
4
|
+
|
5
|
+
describe "calculating taxes" do
|
6
|
+
example { expect(rate.net(100)) .to eql(80) }
|
7
|
+
example { expect(rate.gross(80)) .to eql(100) }
|
8
|
+
example { expect(rate.gross_taxes(100)) .to eql(20) }
|
9
|
+
example { expect(rate.net_taxes(80)) .to eql(20) }
|
10
|
+
|
11
|
+
describe "with a negative tax rate" do
|
12
|
+
let(:input) { -20 }
|
13
|
+
example { expect(rate.net(100)) .to eql(120) }
|
14
|
+
example { expect(rate.gross(120)) .to eql(100) }
|
15
|
+
example { expect(rate.gross_taxes(100)) .to eql(-20) }
|
16
|
+
example { expect(rate.net_taxes(120)) .to eql(-20) }
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "with a tax rate of 0%" do
|
20
|
+
let(:input) { 0 }
|
21
|
+
example { expect(rate.net(100)) .to eql(100) }
|
22
|
+
example { expect(rate.gross(100)) .to eql(100) }
|
23
|
+
example { expect(rate.gross_taxes(100)) .to eql(0) }
|
24
|
+
example { expect(rate.net_taxes(100)) .to eql(0) }
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "with a tax rate of 100%" do
|
28
|
+
let(:input) { 1.0 }
|
29
|
+
example { expect(rate.net(100)) .to eql(0) }
|
30
|
+
example { expect(rate.net(0)) .to eql(0) }
|
31
|
+
example { expect(rate.gross_taxes(100)) .to eql(100) }
|
32
|
+
example { expect(rate.net_taxes(100)) .to eql(100) }
|
33
|
+
|
34
|
+
example { expect(rate.gross(100)).to be_infinite }
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
example { expect(rate) .to be_a(Numeric) }
|
39
|
+
example { expect(Numeric === rate) .to be }
|
40
|
+
|
41
|
+
describe "new" do
|
42
|
+
shared_examples "20%" do
|
43
|
+
its(:to_s) { should be == "20%" }
|
44
|
+
its(:to_r) { should be == 0.2r }
|
45
|
+
its(:to_f) { should be == 0.2 }
|
46
|
+
its(:to_i) { should be == 0 }
|
47
|
+
its(:to_d) { should be == "0.2".to_d }
|
48
|
+
its(:inspect) { should be == '#<IncomeTax::Rate:"20%">' }
|
49
|
+
|
50
|
+
example { String(rate) .should be == "20%" }
|
51
|
+
example { Rational(rate) .should be == 0.2r }
|
52
|
+
example { Float(rate) .should be == 0.2 }
|
53
|
+
example { Integer(rate) .should be == 0 }
|
54
|
+
example { BigDecimal(rate) .should be == "0.2".to_d }
|
55
|
+
|
56
|
+
describe "#==" do
|
57
|
+
it { should be == rate }
|
58
|
+
it { should be == IncomeTax::Rate("20%") }
|
59
|
+
it { should be == IncomeTax::Rate(0.2) }
|
60
|
+
it { should be == 0.2r }
|
61
|
+
it { should be == 0.2 }
|
62
|
+
it { should_not be == "20%" }
|
63
|
+
it { should_not be == 0.3r }
|
64
|
+
it { should_not be == 0.3 }
|
65
|
+
it { should_not be == IncomeTax::Rate("30%") }
|
66
|
+
it { should_not be == IncomeTax::Rate(0.3) }
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe "from float" do
|
71
|
+
include_examples "20%"
|
72
|
+
let(:input) { 0.2 }
|
73
|
+
end
|
74
|
+
|
75
|
+
describe "from rational" do
|
76
|
+
let(:input) { 0.2r }
|
77
|
+
include_examples "20%"
|
78
|
+
end
|
79
|
+
|
80
|
+
describe "from integer" do
|
81
|
+
let(:input) { 20 }
|
82
|
+
include_examples "20%"
|
83
|
+
end
|
84
|
+
|
85
|
+
describe "from string" do
|
86
|
+
let(:input) { "0.2" }
|
87
|
+
include_examples "20%"
|
88
|
+
end
|
89
|
+
|
90
|
+
describe "from percentage string" do
|
91
|
+
include_examples "20%"
|
92
|
+
end
|
93
|
+
|
94
|
+
describe "from two integers" do
|
95
|
+
subject(:rate) { IncomeTax::Rate(1,5) }
|
96
|
+
include_examples "20%"
|
97
|
+
end
|
98
|
+
|
99
|
+
describe "from percentage string with digits" do
|
100
|
+
let(:input) { "20.3%" }
|
101
|
+
|
102
|
+
its(:to_s) { should be == "20.3%" }
|
103
|
+
its(:to_r) { should be == 0.203r }
|
104
|
+
its(:to_f) { should be == 0.203 }
|
105
|
+
its(:to_d) { should be == "0.203".to_d }
|
106
|
+
end
|
107
|
+
|
108
|
+
describe "invalid string input" do
|
109
|
+
let(:input) { "foo" }
|
110
|
+
|
111
|
+
example do
|
112
|
+
expect { rate }.to \
|
113
|
+
raise_error(ArgumentError, 'cannot handle "foo" as rate input')
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
describe "#+" do
|
119
|
+
describe "with another rate" do
|
120
|
+
let(:other) { IncomeTax::Rate("50%") }
|
121
|
+
example { expect(rate + other).to be_eql(IncomeTax::Rate("70%")) }
|
122
|
+
example { expect(other + rate).to be_eql(IncomeTax::Rate("70%")) }
|
123
|
+
end
|
124
|
+
|
125
|
+
describe "with a float" do
|
126
|
+
let(:other) { 0.5 }
|
127
|
+
example { expect(rate + other).to be_eql(0.7) }
|
128
|
+
example { expect(other + rate).to be_eql(0.7) }
|
129
|
+
end
|
130
|
+
|
131
|
+
describe "with a rational" do
|
132
|
+
let(:other) { 0.5r }
|
133
|
+
example { expect(rate + other).to be_eql(0.7r) }
|
134
|
+
example { expect(other + rate).to be_eql(0.7r) }
|
135
|
+
end
|
136
|
+
|
137
|
+
describe "with a big decimal" do
|
138
|
+
let(:other) { "0.5".to_d }
|
139
|
+
example { expect(rate + other).to be_eql("0.7".to_d) }
|
140
|
+
example { expect(other + rate).to be_eql("0.7".to_d) }
|
141
|
+
end
|
142
|
+
|
143
|
+
describe "with an integer" do
|
144
|
+
let(:other) { 1 }
|
145
|
+
example { expect(rate + other).to be_eql(1.2r) }
|
146
|
+
example { expect(other + rate).to be_eql(1.2r) }
|
147
|
+
|
148
|
+
describe "based on rational" do
|
149
|
+
let(:input) { 0.2r }
|
150
|
+
example { expect(rate + other).to be_eql(1.2r) }
|
151
|
+
example { expect(other + rate).to be_eql(1.2r) }
|
152
|
+
end
|
153
|
+
|
154
|
+
describe "based on float" do
|
155
|
+
let(:input) { 0.2 }
|
156
|
+
example { expect(rate + other).to be_eql(1.2) }
|
157
|
+
example { expect(other + rate).to be_eql(1.2) }
|
158
|
+
end
|
159
|
+
|
160
|
+
describe "at 0%" do
|
161
|
+
let(:input) { 0 }
|
162
|
+
example { expect(rate + other).to be_eql(1) }
|
163
|
+
example { expect(other + rate).to be_eql(1) }
|
164
|
+
end
|
165
|
+
|
166
|
+
describe "at 100%" do
|
167
|
+
let(:input) { 1.0 }
|
168
|
+
example { expect(rate + other).to be_eql(2) }
|
169
|
+
example { expect(other + rate).to be_eql(2) }
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
describe "#-" do
|
175
|
+
describe "with another rate" do
|
176
|
+
let(:other) { IncomeTax::Rate("10%") }
|
177
|
+
example { expect(rate - other).to be_eql(IncomeTax::Rate("10%")) }
|
178
|
+
example { expect(other - rate).to be_eql(IncomeTax::Rate("-10%")) }
|
179
|
+
end
|
180
|
+
|
181
|
+
describe "with a float" do
|
182
|
+
let(:other) { 0.1 }
|
183
|
+
example { expect(rate - other).to be_eql(0.1) }
|
184
|
+
example { expect(other - rate).to be_eql(-0.1) }
|
185
|
+
end
|
186
|
+
|
187
|
+
describe "with a rational" do
|
188
|
+
let(:other) { 0.1r }
|
189
|
+
example { expect(rate - other).to be_eql(0.1r) }
|
190
|
+
example { expect(other - rate).to be_eql(-0.1r) }
|
191
|
+
end
|
192
|
+
|
193
|
+
describe "with a big decimal" do
|
194
|
+
let(:other) { "0.1".to_d }
|
195
|
+
example { expect(rate - other).to be_eql("0.1".to_d) }
|
196
|
+
example { expect(other - rate).to be_eql(-"0.1".to_d) }
|
197
|
+
end
|
198
|
+
|
199
|
+
describe "with an integer" do
|
200
|
+
let(:other) { 1 }
|
201
|
+
example { expect(rate - other).to be_eql(-0.8r) }
|
202
|
+
example { expect(other - rate).to be_eql(0.8r) }
|
203
|
+
|
204
|
+
describe "based on rational" do
|
205
|
+
let(:input) { 0.2r }
|
206
|
+
example { expect(rate - other).to be_eql(-0.8r) }
|
207
|
+
example { expect(other - rate).to be_eql(0.8r) }
|
208
|
+
end
|
209
|
+
|
210
|
+
describe "based on float" do
|
211
|
+
let(:input) { 0.2 }
|
212
|
+
example { expect(rate - other).to be_eql(-0.8) }
|
213
|
+
example { expect(other - rate).to be_eql(0.8) }
|
214
|
+
end
|
215
|
+
|
216
|
+
describe "at 0%" do
|
217
|
+
let(:input) { 0 }
|
218
|
+
example { expect(rate - other).to be_eql(-1) }
|
219
|
+
example { expect(other - rate).to be_eql(1) }
|
220
|
+
end
|
221
|
+
|
222
|
+
describe "at 100%" do
|
223
|
+
let(:input) { 1.0 }
|
224
|
+
example { expect(rate - other).to be_eql(0) }
|
225
|
+
example { expect(other - rate).to be_eql(0) }
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
describe "#-@" do
|
231
|
+
example { expect(-rate) .to be_eql(IncomeTax::Rate("-20%")) }
|
232
|
+
example { expect(-(-rate)) .to be_eql(IncomeTax::Rate("20%")) }
|
233
|
+
end
|
234
|
+
|
235
|
+
describe "#coerce" do
|
236
|
+
example("with a rate") { expect(rate.coerce(rate)) .to be == [ rate, rate ] }
|
237
|
+
example("with a rational") { expect(rate.coerce(0.3r)) .to be == [ 0.3r, 0.2r ] }
|
238
|
+
example("with a decirmal") { expect(rate.coerce("0.3".to_d)) .to be == [ "0.3".to_d, "0.2".to_d ] }
|
239
|
+
example("with an integer") { expect(rate.coerce(1)) .to be == [ 1.to_d, "0.2".to_d ] }
|
240
|
+
example("with a float") { expect(rate.coerce(0.3)) .to be == [ 0.3, 0.2 ] }
|
241
|
+
end
|
242
|
+
|
243
|
+
describe "as hash index" do
|
244
|
+
let(:hash) { { rate => 42 } }
|
245
|
+
|
246
|
+
# wanted to use the include matcher, but rspec uses Rate#== instead of Hash#include?
|
247
|
+
example { expect(hash[ rate ]).to be == 42 }
|
248
|
+
example { expect(hash[ IncomeTax::Rate("20%") ]).to be == 42 }
|
249
|
+
example { expect(hash[ IncomeTax::Rate(0.2r) ]).to be == 42 }
|
250
|
+
example { expect(hash[ rate.to_r ]).not_to be == 42 }
|
251
|
+
example { expect(hash[ rate.to_s ]).not_to be == 42 }
|
252
|
+
example { expect(hash[ rate.to_d ]).not_to be == 42 }
|
253
|
+
end
|
254
|
+
|
255
|
+
describe "with ranges" do
|
256
|
+
end
|
257
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
describe IncomeTax::Register do
|
2
|
+
subject(:register) { IncomeTax::Register.new("example") }
|
3
|
+
before { register.add("Foo And Bar", 42) }
|
4
|
+
|
5
|
+
example { expect(register["Foo And Bar"]) .to be == 42 }
|
6
|
+
example { expect(register["foo-bar"]) .to be == 42 }
|
7
|
+
|
8
|
+
example { expect(register) .to include("Foo And Bar") }
|
9
|
+
example { expect(register) .to include("foo and bar") }
|
10
|
+
example { expect(register) .to include("Foo Bar") }
|
11
|
+
example { expect(register) .to_not include("Foo") }
|
12
|
+
|
13
|
+
example { expect { register["Foo"] }.to raise_error(ArgumentError, 'unknown example "Foo"') }
|
14
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'money'
|
2
|
+
|
3
|
+
describe IncomeTax do
|
4
|
+
example { expect(IncomeTax.new("DE", 60000).gross_income) .to be == 60000 }
|
5
|
+
example { expect(IncomeTax.new("DE", "€5k/mo").gross_income) .to be == 60000 }
|
6
|
+
example { expect(IncomeTax.new("DE", 60000, :net).net_income) .to be == 60000 }
|
7
|
+
example { expect(IncomeTax.new("DE", Money.new(6000000, "EUR")).gross_income) .to be == 60000 }
|
8
|
+
example { expect{IncomeTax.new(:DE, 60000)} .to raise_error(ArgumentError) }
|
9
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
if ENV["SKIP_COVERAGE"].to_i == 0
|
2
|
+
require 'simplecov'
|
3
|
+
require 'coveralls'
|
4
|
+
|
5
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
6
|
+
SimpleCov::Formatter::HTMLFormatter,
|
7
|
+
Coveralls::SimpleCov::Formatter
|
8
|
+
]
|
9
|
+
|
10
|
+
SimpleCov.start do
|
11
|
+
project_name 'income-tax'
|
12
|
+
minimum_coverage 99
|
13
|
+
coverage_dir '.coverage'
|
14
|
+
add_filter '/spec/'
|
15
|
+
end
|
16
|
+
end
|
data/spec/support/env.rb
ADDED
data/spec/support.rb
ADDED