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 +4 -4
- data/CHANGELOG +6 -1
- data/lib/rising_sun/fiscali.rb +2 -1
- data/lib/rising_sun/version.rb +1 -1
- data/spec/fiscali_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51022d669afa31ad0f293c538d6e6701b52169ec
|
4
|
+
data.tar.gz: e35e3fb6e06d9b241b0b40d0eed577868298bc1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/rising_sun/fiscali.rb
CHANGED
@@ -59,7 +59,8 @@ module RisingSun
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def beginning_of_financial_year
|
62
|
-
|
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
|
data/lib/rising_sun/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|