inflation 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.email = ["dmastylo@codequarry.net"]
11
11
  gem.description = %q{ Find out how much money was worth any year from 1800 to now. }
12
12
  gem.summary = %q{ Find out how much your dollar used to be worth. }
13
- gem.homepage = ""
13
+ gem.homepage = "https://github.com/dmastylo/Inflation"
14
14
 
15
15
  gem.add_development_dependency "rspec"
16
16
 
@@ -41,6 +41,6 @@ class Numeric
41
41
 
42
42
  private
43
43
  def calculate_inflation
44
- (self * (@to_year_cpi / @from_year_cpi)).round(2)
44
+ (self * (@to_year_cpi / @from_year_cpi))
45
45
  end
46
46
  end
@@ -1,3 +1,3 @@
1
1
  module Inflation
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -30,22 +30,22 @@ describe "Inflation" do
30
30
 
31
31
  context "#to" do
32
32
  it "should calculate the inflation rate of the number" do
33
- 1.from_1850.to_2012.should == 27.50
34
- 100.from_2012.to_2000.should == 75.27
35
- 75.27.from_2000.to_2012.should == 100
33
+ 1.from_1850.to_2012.round(2).should == 27.50
34
+ 100.from_2012.to_2000.round(2).should == 75.27
35
+ 75.27.from_2000.to_2012.round(2).should == 100
36
36
  end
37
37
  end
38
38
 
39
39
  context "#from_now" do
40
40
  it "should calculate the inflation rate of the number from current year values" do
41
- 100.from_now.to_2000.should == 75.27
41
+ 100.from_now.to_2000.round(2).should == 75.27
42
42
  end
43
43
  end
44
44
 
45
45
  context "#to_now" do
46
46
  it "should calculate the inflation rate of the number to current year values" do
47
- 1.from_1850.to_now.should == 27.50
48
- 75.27.from_2000.to_now.should == 100
47
+ 1.from_1850.to_now.round(2).should == 27.50
48
+ 75.27.from_2000.to_now.round(2).should == 100
49
49
  end
50
50
  end
51
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inflation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -45,7 +45,7 @@ files:
45
45
  - lib/inflation/inflation.rb
46
46
  - lib/inflation/version.rb
47
47
  - spec/inflation_spec.rb
48
- homepage: ''
48
+ homepage: https://github.com/dmastylo/Inflation
49
49
  licenses: []
50
50
  post_install_message:
51
51
  rdoc_options: []