inflation_db 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/.DS_Store +0 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +6 -0
- data/bin/console +7 -0
- data/bin/setup +8 -0
- data/inflation_db.gemspec +34 -0
- data/lib/inflation_db.rb +393 -0
- data/lib/inflation_db/version.rb +3 -0
- metadata +101 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 12183d8428864a15c76c665e453253a1d92226981e1179a4793a405fe1aed828
|
4
|
+
data.tar.gz: 8a13afaf6f0b6ef3d7c593e36d3ff123c141ca7f486e4423ad5c8d064ee37229
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 846545788a620caf8b904725808eaddfab8739ba64c3303c8f8f4316e1ff4c7581b7651cb9d4eea22265cab745e983763fff3cfcee1b6d7d0a5a5defa1bd2f70
|
7
|
+
data.tar.gz: 63c11b1360f8e8a8d3dbbb6bca2a0d242390ed6033528c38bdb653678eb45c0500d117878e7fdf9ca62d2cba9d49686ad424a2dd829e01c06fa5e22650b66939
|
data/.DS_Store
ADDED
Binary file
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at dybushnell@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Dave Bushnell
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# InflationDb
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/inflation_db`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'inflation_db'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install inflation_db
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/<github username>/inflation_db. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the InflationDb project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/<github username>/inflation_db/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
data/bin/setup
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "inflation_db/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "inflation_db"
|
7
|
+
spec.version = "0.1.0"
|
8
|
+
spec.authors = ["Dave Bushnell"]
|
9
|
+
spec.email = ["dybushnell@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = %q{A gem that calculates the inflation of a US dollar amount from any year from 1635 to the present.}
|
12
|
+
spec.description = %q{Enter a dollar amount and the year, and this gem will calculate that value in 2019 dollars}
|
13
|
+
spec.homepage = "https://github.com/dybushnell/inflation_db"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
17
|
+
|
18
|
+
# spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
# spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
|
20
|
+
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
end
|
27
|
+
spec.bindir = "exe"
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ["lib"]
|
30
|
+
|
31
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
32
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
33
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
34
|
+
end
|
data/lib/inflation_db.rb
ADDED
@@ -0,0 +1,393 @@
|
|
1
|
+
|
2
|
+
@inflation_hash = {
|
3
|
+
"1635" => 1.000000000,
|
4
|
+
"1636" => 1.795180723,
|
5
|
+
"1637" => 1.542168675,
|
6
|
+
"1638" => 0.807228916,
|
7
|
+
"1639" => 1.325301205,
|
8
|
+
"1640" => 1.156626506,
|
9
|
+
"1641" => 1.156626506,
|
10
|
+
"1642" => 1.156626506,
|
11
|
+
"1643" => 1.674698795,
|
12
|
+
"1644" => 1.204819277,
|
13
|
+
"1645" => 1.060240964,
|
14
|
+
"1646" => 0.662650602,
|
15
|
+
"1647" => 0.493975904,
|
16
|
+
"1648" => 0.879518072,
|
17
|
+
"1649" => 1.289156627,
|
18
|
+
"1650" => 0.686746988,
|
19
|
+
"1651" => 0.915662651,
|
20
|
+
"1652" => 0.722891566,
|
21
|
+
"1653" => 0.939759036,
|
22
|
+
"1654" => 0.939759036,
|
23
|
+
"1655" => 0.903614458,
|
24
|
+
"1656" => 0.891566265,
|
25
|
+
"1657" => 0.722891566,
|
26
|
+
"1658" => 0.469879518,
|
27
|
+
"1659" => 0.530120482,
|
28
|
+
"1660" => 0.602409639,
|
29
|
+
"1661" => 0.506024096,
|
30
|
+
"1662" => 0.542168675,
|
31
|
+
"1663" => 0.542168675,
|
32
|
+
"1664" => 0.542168675,
|
33
|
+
"1665" => 0.457831325,
|
34
|
+
"1666" => 0.457831325,
|
35
|
+
"1667" => 0.493975904,
|
36
|
+
"1668" => 0.518072289,
|
37
|
+
"1669" => 0.481927711,
|
38
|
+
"1670" => 0.481927711,
|
39
|
+
"1671" => 0.481927711,
|
40
|
+
"1672" => 0.481927711,
|
41
|
+
"1673" => 0.469879518,
|
42
|
+
"1674" => 0.493975904,
|
43
|
+
"1675" => 0.433734940,
|
44
|
+
"1676" => 0.445783133,
|
45
|
+
"1677" => 0.457831325,
|
46
|
+
"1678" => 0.433734940,
|
47
|
+
"1679" => 0.433734940,
|
48
|
+
"1680" => 0.506024096,
|
49
|
+
"1681" => 0.530120482,
|
50
|
+
"1682" => 0.445783133,
|
51
|
+
"1683" => 0.445783133,
|
52
|
+
"1684" => 0.445783133,
|
53
|
+
"1685" => 0.493975904,
|
54
|
+
"1686" => 0.457831325,
|
55
|
+
"1687" => 0.457831325,
|
56
|
+
"1688" => 0.421686747,
|
57
|
+
"1689" => 0.433734940,
|
58
|
+
"1690" => 0.445783133,
|
59
|
+
"1691" => 0.469879518,
|
60
|
+
"1692" => 0.433734940,
|
61
|
+
"1693" => 0.409638554,
|
62
|
+
"1694" => 0.433734940,
|
63
|
+
"1695" => 0.409638554,
|
64
|
+
"1696" => 0.481927711,
|
65
|
+
"1697" => 0.481927711,
|
66
|
+
"1698" => 0.457831325,
|
67
|
+
"1699" => 0.506024096,
|
68
|
+
"1700" => 0.493975904,
|
69
|
+
"1701" => 0.518072289,
|
70
|
+
"1702" => 0.469879518,
|
71
|
+
"1703" => 0.469879518,
|
72
|
+
"1704" => 0.554216867,
|
73
|
+
"1705" => 0.506024096,
|
74
|
+
"1706" => 0.542168675,
|
75
|
+
"1707" => 0.518072289,
|
76
|
+
"1708" => 0.433734940,
|
77
|
+
"1709" => 0.542168675,
|
78
|
+
"1710" => 0.493975904,
|
79
|
+
"1711" => 0.481927711,
|
80
|
+
"1712" => 0.457831325,
|
81
|
+
"1713" => 0.493975904,
|
82
|
+
"1714" => 0.445783133,
|
83
|
+
"1715" => 0.530120482,
|
84
|
+
"1716" => 0.493975904,
|
85
|
+
"1717" => 0.542168675,
|
86
|
+
"1718" => 0.493975904,
|
87
|
+
"1719" => 0.542168675,
|
88
|
+
"1720" => 0.506024096,
|
89
|
+
"1721" => 0.481927711,
|
90
|
+
"1722" => 0.493975904,
|
91
|
+
"1723" => 0.506024096,
|
92
|
+
"1724" => 0.518072289,
|
93
|
+
"1725" => 0.602409639,
|
94
|
+
"1726" => 0.566265060,
|
95
|
+
"1727" => 0.602409639,
|
96
|
+
"1728" => 0.554216867,
|
97
|
+
"1729" => 0.554216867,
|
98
|
+
"1730" => 0.554216867,
|
99
|
+
"1731" => 0.506024096,
|
100
|
+
"1732" => 0.457831325,
|
101
|
+
"1733" => 0.469879518,
|
102
|
+
"1734" => 0.457831325,
|
103
|
+
"1735" => 0.481927711,
|
104
|
+
"1736" => 0.457831325,
|
105
|
+
"1737" => 0.481927711,
|
106
|
+
"1738" => 0.493975904,
|
107
|
+
"1739" => 0.445783133,
|
108
|
+
"1740" => 0.469879518,
|
109
|
+
"1741" => 0.783132530,
|
110
|
+
"1742" => 0.698795181,
|
111
|
+
"1743" => 0.626506024,
|
112
|
+
"1744" => 0.578313253,
|
113
|
+
"1745" => 0.554216867,
|
114
|
+
"1746" => 0.578313253,
|
115
|
+
"1747" => 0.638554217,
|
116
|
+
"1748" => 0.759036145,
|
117
|
+
"1749" => 0.771084337,
|
118
|
+
"1750" => 0.771084337,
|
119
|
+
"1751" => 0.771084337,
|
120
|
+
"1752" => 0.795180723,
|
121
|
+
"1753" => 0.771084337,
|
122
|
+
"1754" => 0.734939759,
|
123
|
+
"1755" => 0.722891566,
|
124
|
+
"1756" => 0.698795181,
|
125
|
+
"1757" => 0.746987952,
|
126
|
+
"1758" => 0.807228916,
|
127
|
+
"1759" => 0.951807229,
|
128
|
+
"1760" => 0.915662651,
|
129
|
+
"1761" => 0.831325301,
|
130
|
+
"1762" => 0.903614458,
|
131
|
+
"1763" => 0.903614458,
|
132
|
+
"1764" => 0.843373494,
|
133
|
+
"1765" => 0.867469880,
|
134
|
+
"1766" => 0.927710843,
|
135
|
+
"1767" => 0.915662651,
|
136
|
+
"1768" => 0.867469880,
|
137
|
+
"1769" => 0.915662651,
|
138
|
+
"1770" => 0.987951807,
|
139
|
+
"1771" => 0.939759036,
|
140
|
+
"1772" => 1.096385542,
|
141
|
+
"1773" => 1.036144578,
|
142
|
+
"1774" => 0.975903614,
|
143
|
+
"1775" => 0.927710843,
|
144
|
+
"1776" => 1.048192771,
|
145
|
+
"1777" => 1.277108434,
|
146
|
+
"1778" => 1.662650602,
|
147
|
+
"1779" => 1.469879518,
|
148
|
+
"1780" => 1.650602410,
|
149
|
+
"1781" => 1.337349398,
|
150
|
+
"1782" => 1.457831325,
|
151
|
+
"1783" => 1.277108434,
|
152
|
+
"1784" => 1.228915663,
|
153
|
+
"1785" => 1.168674699,
|
154
|
+
"1786" => 1.144578313,
|
155
|
+
"1787" => 1.120481928,
|
156
|
+
"1788" => 1.072289157,
|
157
|
+
"1789" => 1.060240964,
|
158
|
+
"1790" => 1.108433735,
|
159
|
+
"1791" => 1.132530120,
|
160
|
+
"1792" => 1.156626506,
|
161
|
+
"1793" => 1.192771084,
|
162
|
+
"1794" => 1.325301205,
|
163
|
+
"1795" => 1.518072289,
|
164
|
+
"1796" => 1.590361446,
|
165
|
+
"1797" => 1.530120482,
|
166
|
+
"1798" => 1.481927711,
|
167
|
+
"1799" => 1.481927711,
|
168
|
+
"1800" => 1.518072289,
|
169
|
+
"1801" => 1.530120482,
|
170
|
+
"1802" => 1.289156627,
|
171
|
+
"1803" => 1.361445783,
|
172
|
+
"1804" => 1.421686747,
|
173
|
+
"1805" => 1.409638554,
|
174
|
+
"1806" => 1.469879518,
|
175
|
+
"1807" => 1.397590361,
|
176
|
+
"1808" => 1.518072289,
|
177
|
+
"1809" => 1.481927711,
|
178
|
+
"1810" => 1.481927711,
|
179
|
+
"1811" => 1.578313253,
|
180
|
+
"1812" => 1.602409639,
|
181
|
+
"1813" => 1.927710843,
|
182
|
+
"1814" => 2.120481928,
|
183
|
+
"1815" => 1.855421687,
|
184
|
+
"1816" => 1.698795181,
|
185
|
+
"1817" => 1.602409639,
|
186
|
+
"1818" => 1.530120482,
|
187
|
+
"1819" => 1.530120482,
|
188
|
+
"1820" => 1.409638554,
|
189
|
+
"1821" => 1.361445783,
|
190
|
+
"1822" => 1.409638554,
|
191
|
+
"1823" => 1.265060241,
|
192
|
+
"1824" => 1.168674699,
|
193
|
+
"1825" => 1.192771084,
|
194
|
+
"1826" => 1.192771084,
|
195
|
+
"1827" => 1.204819277,
|
196
|
+
"1828" => 1.144578313,
|
197
|
+
"1829" => 1.120481928,
|
198
|
+
"1830" => 1.108433735,
|
199
|
+
"1831" => 1.048192771,
|
200
|
+
"1832" => 1.036144578,
|
201
|
+
"1833" => 1.012048193,
|
202
|
+
"1834" => 1.036144578,
|
203
|
+
"1835" => 1.060240964,
|
204
|
+
"1836" => 1.120481928,
|
205
|
+
"1837" => 1.156626506,
|
206
|
+
"1838" => 1.120481928,
|
207
|
+
"1839" => 1.120481928,
|
208
|
+
"1840" => 1.048192771,
|
209
|
+
"1841" => 1.048192771,
|
210
|
+
"1842" => 0.987951807,
|
211
|
+
"1843" => 0.891566265,
|
212
|
+
"1844" => 0.903614458,
|
213
|
+
"1845" => 0.915662651,
|
214
|
+
"1846" => 0.927710843,
|
215
|
+
"1847" => 0.987951807,
|
216
|
+
"1848" => 0.951807229,
|
217
|
+
"1849" => 0.927710843,
|
218
|
+
"1850" => 0.939759036,
|
219
|
+
"1851" => 0.927710843,
|
220
|
+
"1852" => 0.927710843,
|
221
|
+
"1853" => 0.927710843,
|
222
|
+
"1854" => 1.012048193,
|
223
|
+
"1855" => 1.048192771,
|
224
|
+
"1856" => 1.024096386,
|
225
|
+
"1857" => 1.048192771,
|
226
|
+
"1858" => 0.987951807,
|
227
|
+
"1859" => 1.000000000,
|
228
|
+
"1860" => 1.000000000,
|
229
|
+
"1861" => 1.060240964,
|
230
|
+
"1862" => 1.216867470,
|
231
|
+
"1863" => 1.518072289,
|
232
|
+
"1864" => 1.891566265,
|
233
|
+
"1865" => 1.963855422,
|
234
|
+
"1866" => 1.915662651,
|
235
|
+
"1867" => 1.783132530,
|
236
|
+
"1868" => 1.710843373,
|
237
|
+
"1869" => 1.638554217,
|
238
|
+
"1870" => 1.578313253,
|
239
|
+
"1871" => 1.469879518,
|
240
|
+
"1872" => 1.469879518,
|
241
|
+
"1873" => 1.445783133,
|
242
|
+
"1874" => 1.373493976,
|
243
|
+
"1875" => 1.325301205,
|
244
|
+
"1876" => 1.289156627,
|
245
|
+
"1877" => 1.265060241,
|
246
|
+
"1878" => 1.204819277,
|
247
|
+
"1879" => 1.204819277,
|
248
|
+
"1880" => 1.228915663,
|
249
|
+
"1881" => 1.228915663,
|
250
|
+
"1882" => 1.228915663,
|
251
|
+
"1883" => 1.216867470,
|
252
|
+
"1884" => 1.180722892,
|
253
|
+
"1885" => 1.168674699,
|
254
|
+
"1886" => 1.132530120,
|
255
|
+
"1887" => 1.144578313,
|
256
|
+
"1888" => 1.144578313,
|
257
|
+
"1889" => 1.108433735,
|
258
|
+
"1890" => 1.096385542,
|
259
|
+
"1891" => 1.096385542,
|
260
|
+
"1892" => 1.096385542,
|
261
|
+
"1893" => 1.084337349,
|
262
|
+
"1894" => 1.036144578,
|
263
|
+
"1895" => 1.012048193,
|
264
|
+
"1896" => 1.012048193,
|
265
|
+
"1897" => 1.000000000,
|
266
|
+
"1898" => 1.000000000,
|
267
|
+
"1899" => 1.000000000,
|
268
|
+
"1900" => 1.012048193,
|
269
|
+
"1901" => 1.024096386,
|
270
|
+
"1902" => 1.036144578,
|
271
|
+
"1903" => 1.060240964,
|
272
|
+
"1904" => 1.072289157,
|
273
|
+
"1905" => 1.060240964,
|
274
|
+
"1906" => 1.084337349,
|
275
|
+
"1907" => 1.132530120,
|
276
|
+
"1908" => 1.108433735,
|
277
|
+
"1909" => 1.096385542,
|
278
|
+
"1910" => 1.144578313,
|
279
|
+
"1911" => 1.144578313,
|
280
|
+
"1912" => 1.168674699,
|
281
|
+
"1913" => 1.192771084,
|
282
|
+
"1914" => 1.204819277,
|
283
|
+
"1915" => 1.216867470,
|
284
|
+
"1916" => 1.313253012,
|
285
|
+
"1917" => 1.542168675,
|
286
|
+
"1918" => 1.819277108,
|
287
|
+
"1919" => 2.084337349,
|
288
|
+
"1920" => 2.409638554,
|
289
|
+
"1921" => 2.156626506,
|
290
|
+
"1922" => 2.024096386,
|
291
|
+
"1923" => 2.060240964,
|
292
|
+
"1924" => 2.060240964,
|
293
|
+
"1925" => 2.108433735,
|
294
|
+
"1926" => 2.132530120,
|
295
|
+
"1927" => 2.096385542,
|
296
|
+
"1928" => 2.060240964,
|
297
|
+
"1929" => 2.060240964,
|
298
|
+
"1930" => 2.012048193,
|
299
|
+
"1931" => 1.831325301,
|
300
|
+
"1932" => 1.650602410,
|
301
|
+
"1933" => 1.566265060,
|
302
|
+
"1934" => 1.614457831,
|
303
|
+
"1935" => 1.650602410,
|
304
|
+
"1936" => 1.674698795,
|
305
|
+
"1937" => 1.734939759,
|
306
|
+
"1938" => 1.698795181,
|
307
|
+
"1939" => 1.674698795,
|
308
|
+
"1940" => 1.686746988,
|
309
|
+
"1941" => 1.771084337,
|
310
|
+
"1942" => 1.963855422,
|
311
|
+
"1943" => 2.084337349,
|
312
|
+
"1944" => 2.120481928,
|
313
|
+
"1945" => 2.168674699,
|
314
|
+
"1946" => 2.349397590,
|
315
|
+
"1947" => 2.686746988,
|
316
|
+
"1948" => 2.903614458,
|
317
|
+
"1949" => 2.867469880,
|
318
|
+
"1950" => 2.903614458,
|
319
|
+
"1951" => 3.132530120,
|
320
|
+
"1952" => 3.192771084,
|
321
|
+
"1953" => 3.216867470,
|
322
|
+
"1954" => 3.240963855,
|
323
|
+
"1955" => 3.228915663,
|
324
|
+
"1956" => 3.277108434,
|
325
|
+
"1957" => 3.385542169,
|
326
|
+
"1958" => 3.481927711,
|
327
|
+
"1959" => 3.506024096,
|
328
|
+
"1960" => 3.566265060,
|
329
|
+
"1961" => 3.602409639,
|
330
|
+
"1962" => 3.638554217,
|
331
|
+
"1963" => 3.686746988,
|
332
|
+
"1964" => 3.734939759,
|
333
|
+
"1965" => 3.795180723,
|
334
|
+
"1966" => 3.903614458,
|
335
|
+
"1967" => 4.024096386,
|
336
|
+
"1968" => 4.192771084,
|
337
|
+
"1969" => 4.421686747,
|
338
|
+
"1970" => 4.674698795,
|
339
|
+
"1971" => 4.879518072,
|
340
|
+
"1972" => 5.036144578,
|
341
|
+
"1973" => 5.349397590,
|
342
|
+
"1974" => 5.939759036,
|
343
|
+
"1975" => 6.481927711,
|
344
|
+
"1976" => 6.855421687,
|
345
|
+
"1977" => 7.301204819,
|
346
|
+
"1978" => 7.855421687,
|
347
|
+
"1979" => 8.746987952,
|
348
|
+
"1980" => 9.927710843,
|
349
|
+
"1981" => 10.95180723,
|
350
|
+
"1982" => 11.62650602,
|
351
|
+
"1983" => 12.00000000,
|
352
|
+
"1984" => 12.51807229,
|
353
|
+
"1985" => 12.96385542,
|
354
|
+
"1986" => 13.20481928,
|
355
|
+
"1987" => 13.68674699,
|
356
|
+
"1988" => 14.25301205,
|
357
|
+
"1989" => 14.93975904,
|
358
|
+
"1990" => 15.74698795,
|
359
|
+
"1991" => 16.40963855,
|
360
|
+
"1992" => 16.90361446,
|
361
|
+
"1993" => 17.40963855,
|
362
|
+
"1994" => 17.85542169,
|
363
|
+
"1995" => 18.36144578,
|
364
|
+
"1996" => 18.90361446,
|
365
|
+
"1997" => 19.33734940,
|
366
|
+
"1998" => 19.63855422,
|
367
|
+
"1999" => 20.07228916,
|
368
|
+
"2000" => 20.74698795,
|
369
|
+
"2001" => 21.33734940,
|
370
|
+
"2002" => 21.67469880,
|
371
|
+
"2003" => 22.16867470,
|
372
|
+
"2004" => 22.75903614,
|
373
|
+
"2005" => 23.53012048,
|
374
|
+
"2006" => 24.28915663,
|
375
|
+
"2007" => 24.98096386,
|
376
|
+
"2008" => 25.94012048,
|
377
|
+
"2009" => 25.84783133,
|
378
|
+
"2010" => 26.27180723,
|
379
|
+
"2011" => 27.10108434,
|
380
|
+
"2012" => 27.66192771,
|
381
|
+
"2013" => 28.06710843,
|
382
|
+
"2014" => 28.52240964,
|
383
|
+
"2015" => 28.55626506,
|
384
|
+
"2016" => 28.91650602,
|
385
|
+
"2017" => 29.53253012,
|
386
|
+
"2018" => 30.25383534,
|
387
|
+
"2019" => 30.86060241,
|
388
|
+
}
|
389
|
+
|
390
|
+
def calculate_inflation(year, then_amount)
|
391
|
+
amount_with_inflation = "%.2f" % (then_amount * 30.86060241 / @inflation_hash.fetch(year.to_s))
|
392
|
+
amount_with_inflation
|
393
|
+
end
|
metadata
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: inflation_db
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dave Bushnell
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-07-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description: Enter a dollar amount and the year, and this gem will calculate that
|
56
|
+
value in 2019 dollars
|
57
|
+
email:
|
58
|
+
- dybushnell@gmail.com
|
59
|
+
executables: []
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".DS_Store"
|
64
|
+
- ".gitignore"
|
65
|
+
- ".rspec"
|
66
|
+
- ".travis.yml"
|
67
|
+
- CODE_OF_CONDUCT.md
|
68
|
+
- Gemfile
|
69
|
+
- LICENSE.txt
|
70
|
+
- README.md
|
71
|
+
- Rakefile
|
72
|
+
- bin/console
|
73
|
+
- bin/setup
|
74
|
+
- inflation_db.gemspec
|
75
|
+
- lib/inflation_db.rb
|
76
|
+
- lib/inflation_db/version.rb
|
77
|
+
homepage: https://github.com/dybushnell/inflation_db
|
78
|
+
licenses:
|
79
|
+
- MIT
|
80
|
+
metadata: {}
|
81
|
+
post_install_message:
|
82
|
+
rdoc_options: []
|
83
|
+
require_paths:
|
84
|
+
- lib
|
85
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
requirements: []
|
96
|
+
rubygems_version: 3.0.4
|
97
|
+
signing_key:
|
98
|
+
specification_version: 4
|
99
|
+
summary: A gem that calculates the inflation of a US dollar amount from any year from
|
100
|
+
1635 to the present.
|
101
|
+
test_files: []
|