fiscali 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f096b0e625d535cfab0ef4fb042d8a84c156d04
4
- data.tar.gz: c79a080e90633c17243feb00ca795b08cb56d8ef
3
+ metadata.gz: 51022d669afa31ad0f293c538d6e6701b52169ec
4
+ data.tar.gz: e35e3fb6e06d9b241b0b40d0eed577868298bc1d
5
5
  SHA512:
6
- metadata.gz: cdfd4a1bdfaf3db71a9beb6c45309a59c24421a2893ed7ea7fd2d25b9b0202e5cc4bf00ed90c3ded5194cf283f9c9fa46890bccb899fa0b3d5a9e072ce06762c
7
- data.tar.gz: 3ffae119410db7eb24c80d73c7059b6ee25bd498b4e25a255916eef4f7c682e9b41427ff8a1c70860ff5929ca10c1ce7212862415a411f2fd94df2506ff33ffb
6
+ metadata.gz: 5e9f04ff45ee0834b172527846a4fdf50d321aa4cf59b4f8be0498ba45cd3b6648a10149d7b281f1ae6e780cee36ad6c93e1ba5b5b4c0b18b6a4ecd87c255371
7
+ data.tar.gz: a645e61e3b16ab56cb9f55fb5ced38ee4350764b8a2bbe55288cecad98a3359527abda72ae8f30bf5400475cb6825800226a573a8ae02f42c02ee108785adb96
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ v2.2.1
2
+ =======
3
+
4
+ * Bugfix relating to uses_forward_year. Date calculations should remain the same. Only the reported year should change. (Thanks @reger Rob Eger)
5
+
1
6
  v2.2.0
2
7
  ======
3
8
 
@@ -11,4 +16,4 @@ The value can be reset using Date.reset_forward_year!
11
16
 
12
17
  * Added Changelog
13
18
 
14
- * Added Contributors
19
+ * Added Contributors
@@ -59,7 +59,8 @@ module RisingSun
59
59
  end
60
60
 
61
61
  def beginning_of_financial_year
62
- change(:year => financial_year, :month => start_month, :day => 1)
62
+ year = self.class.uses_forward_year? ? financial_year - 1 : financial_year
63
+ change(:year => year, :month => start_month, :day => 1)
63
64
  end
64
65
 
65
66
  def end_of_financial_year
@@ -1,5 +1,5 @@
1
1
  module RisingSun
2
2
  module Fiscali
3
- VERSION = "2.2.0"
3
+ VERSION = "2.2.1"
4
4
  end
5
5
  end
data/spec/fiscali_spec.rb CHANGED
@@ -44,6 +44,12 @@ describe "fiscali" do
44
44
  @d = Date.new(2009,4,1)
45
45
  @d.financial_year.should eql(2010)
46
46
  end
47
+
48
+ it "should report the correct beginning_of_financial_year when forward year is set" do
49
+ Date.use_forward_year!
50
+ @d = Date.new(2009,6,1)
51
+ @d.beginning_of_financial_year.should eql(Date.new(2009,4,1))
52
+ end
47
53
  end
48
54
 
49
55
  context "should report correct date field" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fiscali
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aditya Sanghi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-22 00:00:00.000000000 Z
11
+ date: 2014-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport