cpiu 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +15 -2
  4. data/lib/cpiu/version.rb +1 -1
  5. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51a7cb3a1996baef1fdf93d9ff21455f8074a26f
4
- data.tar.gz: 3c13af4b28743a60824d703fb88584f9b00c66b0
3
+ metadata.gz: 08754880d4836a6a52da792056b753777be58ebd
4
+ data.tar.gz: cdc4f25b46e756c484a54b65123b05062554078d
5
5
  SHA512:
6
- metadata.gz: d05b50acb1ae1acb17cc7e01eac772af5f6f3986fb5a94e5af57bf6b29734182685d99f326a9121973640d48ee8a2375a2ad9bedc283fd81acc12b5c4c59a185
7
- data.tar.gz: b2e294c471770e0166306517c82d5d0a07963a61d0ae422c9b941cf6d9c65db3bce70e422deecf4630db3b42dc998eda80acc3140f1d3ac3ac63ca2f729b2ef8
6
+ metadata.gz: 5cf78f1f8a0f46590fb84963c26e949f445963824c62902f1fd7452afbe3827760bc58187d0964dbd436a5f1b49787c6a6d3bfd34201e36ec674cc98cc90ea77
7
+ data.tar.gz: 79c64e6dc219cb006ecddb5a3fe753e54186b075bfa66bb7edff640ce9d1913b633d5df97a7d719084e6bfe5b2ac8f28294171ae9c3c3c6dada3d1d217f478b4
@@ -0,0 +1,19 @@
1
+ # CPIU
2
+
3
+ ## 0.2.1
4
+
5
+ * Add information on `.env` file to documentation
6
+
7
+ ## 0.2.0
8
+
9
+ * Added two new methods to CPIU::Data:
10
+ * cpiu_year(year): get the annual average CPI of a given year
11
+ * cpiu_month(year, month): get the CPI of a given month and year
12
+
13
+ ## 0.1.1
14
+
15
+ * Fixed gem homepage link in gemspec
16
+
17
+ ## 0.1.0
18
+
19
+ * Initial release
data/README.md CHANGED
@@ -13,7 +13,7 @@ Neither I nor BLS.gov can vouch for the data or analyses derived from these data
13
13
  Add this line to your application's Gemfile:
14
14
 
15
15
  ```ruby
16
- gem 'cpiu', '~> 0.1'
16
+ gem 'cpiu', '~> 0.2'
17
17
  ```
18
18
 
19
19
  And then execute:
@@ -36,6 +36,8 @@ Add the following to your program:
36
36
  require 'cpiu'
37
37
  ```
38
38
 
39
+ In order to get the most out of the BLS API, you will need a registration key, which can be obtained [here](https://data.bls.gov/registrationEngine/). Create a file named `.env` in the root of your project folder with the contents `BLS_API_KEY=<your key here>`. The API can still be queried without a key, but there are [restrictions](https://www.bls.gov/developers/api_faqs.htm#register1) on what data will be returned.
40
+
39
41
  The following methods will retrieve JSON objects containing CPI-U data:
40
42
 
41
43
  * `CPIU::Data.single_year(year)` - data for a single year
@@ -56,6 +58,11 @@ The data is returned in an array of hashes:
56
58
  ]
57
59
  ```
58
60
 
61
+ If you just want CPI-U values:
62
+
63
+ * `CPIU::Data.cpiu_year(year)` - the annual average CPI value for a year
64
+ * `CPIU::Data.cpiu_month(year, month)` - the CPI value for a particular month
65
+
59
66
  A raw API call method is available too:
60
67
 
61
68
  * `CPIU::API.request_data(startyear, endyear, ann_avg, calcs)`
@@ -111,4 +118,10 @@ Bug reports and pull requests are welcome on GitHub at <https://github.com/clpo1
111
118
 
112
119
  ## License
113
120
 
114
- This code is licensed under [GPLv3](LICENSE.txt).
121
+ Copyright &copy; 2017 Cody Logan
122
+
123
+ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
124
+
125
+ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
126
+
127
+ A copy of the GNU General Public License can be found in [LICENSE.txt](LICENSE.txt) and at <http://www.gnu.org/licenses/>.
@@ -18,5 +18,5 @@
18
18
 
19
19
  module CPIU
20
20
  # Current CPIU gem version
21
- VERSION = '0.2.0'.freeze
21
+ VERSION = '0.2.1'.freeze
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpiu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Logan
@@ -147,6 +147,7 @@ files:
147
147
  - ".rspec"
148
148
  - ".rubocop.yml"
149
149
  - ".travis.yml"
150
+ - CHANGELOG.md
150
151
  - Gemfile
151
152
  - LICENSE.txt
152
153
  - README.md