fiscal_date 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gemspec CHANGED
@@ -4,7 +4,7 @@ require "fiscal_date"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "fiscal_date"
7
- s.version = "0.1.0"
7
+ s.version = "0.1.1"
8
8
  s.authors = ["Brian Smith"]
9
9
  s.email = ["bsmith@swig505.com"]
10
10
  s.homepage = "https://github.com/Estimize/fiscal_date"
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
1
+ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fiscal_date (0.1.0)
4
+ fiscal_date (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/lib/fiscal_date.rb CHANGED
@@ -26,4 +26,10 @@ class FiscalDate
26
26
  "Q#{quarter.to_s} #{year.to_s}"
27
27
  end
28
28
 
29
+ alias_method :eql?, :==
30
+
31
+ def hash
32
+ to_s.hash
33
+ end
34
+
29
35
  end
@@ -32,4 +32,11 @@ describe FiscalDate do
32
32
  fiscal_date.to_s.must_equal "Q1 2012"
33
33
  end
34
34
  end
35
+
36
+ it "should work as a hash key" do
37
+ hash = {}
38
+ hash[FiscalDate.new(2012, 1)] = 1
39
+ hash[FiscalDate.new(2012, 1)] = 2
40
+ hash.keys.size.must_equal 1
41
+ end
35
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fiscal_date
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-22 00:00:00.000000000 Z
12
+ date: 2013-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake