acts_as_account 3.4.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/VERSION +1 -1
- data/acts_as_account.gemspec +2 -2
- data/acts_as_account.sqlite +0 -0
- data/features/step_definitions/account_steps.rb +2 -2
- data/lib/acts_as_account/journal.rb +3 -1
- data/lib/acts_as_account/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f273511f34e3a338870be2d7f3c1337917913b210b70f4237f4c206cc13a380e
|
4
|
+
data.tar.gz: e472770750dd7277e8d7343dc057ae1c289d19abc80ca0c812d9ca22efeaf9a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4e102e34de51ac78effb0d97fb80c4af26d37c3749de3545acf0ea6566e560720bdbfc7ec64572e2cdc811bc7db23681ceb4f9cc323dffab024056bd3feb31e
|
7
|
+
data.tar.gz: fe1dabd0b53ff1f8a06e23b046794b7c504ed2e862d454f430174643386aaa51cae1c33faf19ffa14a2d3f5d7df3063b331bca74c9c43b376ae58b905392916d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
+
## 2024-10-28 v3.4.1
|
4
|
+
|
5
|
+
* Improved account management features:
|
6
|
+
* Update `Journal.current.transfer` to return a boolean value indicating success.
|
7
|
+
* Modify `transfer()` method in `lib/acts_as_account/journal.rb` to
|
8
|
+
check the result of `postings.model.insert_all`.
|
9
|
+
* Validate the transfer result in `german_date_time_to_local` and `When /^I
|
10
|
+
transfer ...$` step definitions.
|
11
|
+
|
3
12
|
## 2024-10-28 v3.4.0
|
4
13
|
|
5
14
|
* Improve Journaling for Transfer Operations:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.4.
|
1
|
+
3.4.1
|
data/acts_as_account.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: acts_as_account 3.4.
|
2
|
+
# stub: acts_as_account 3.4.1 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "acts_as_account".freeze
|
6
|
-
s.version = "3.4.
|
6
|
+
s.version = "3.4.1".freeze
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
data/acts_as_account.sqlite
CHANGED
Binary file
|
@@ -74,13 +74,13 @@ When /^I transfer (-?\d+) € from (\w+)'s account to (\w+)'s account$/ do |amou
|
|
74
74
|
@from_account = User.find_by_name(from).account
|
75
75
|
@to_account = User.find_by_name(to).account
|
76
76
|
@previous_account_attributes = [@from_account.attributes, @to_account.attributes]
|
77
|
-
Journal.current.transfer(amount.to_i, @from_account, @to_account, @reference, @valuta)
|
77
|
+
Journal.current.transfer(amount.to_i, @from_account, @to_account, @reference, @valuta) == true
|
78
78
|
end
|
79
79
|
|
80
80
|
When /^I transfer (\d+) € from global (\w+) account to global (\w+) account$/ do |amount, from, to|
|
81
81
|
from_account = Account.for(from)
|
82
82
|
to_account = Account.for(to)
|
83
|
-
Journal.current.transfer(amount.to_i, from_account, to_account, @reference, @valuta)
|
83
|
+
Journal.current.transfer(amount.to_i, from_account, to_account, @reference, @valuta) == true
|
84
84
|
end
|
85
85
|
|
86
86
|
Then /^the balance\-sheet should be:$/ do |table|
|
@@ -52,10 +52,12 @@ module ActsAsAccount
|
|
52
52
|
posting1 = build_posting(-amount, from_account, to_account, reference, valuta)
|
53
53
|
posting2 = build_posting( amount, to_account, from_account, reference, valuta)
|
54
54
|
|
55
|
-
postings.model.insert_all([ posting1.attributes, posting2.attributes ])
|
55
|
+
result = postings.model.insert_all([ posting1.attributes, posting2.attributes ])
|
56
56
|
|
57
57
|
update_attributes_on(from_account, -amount)
|
58
58
|
update_attributes_on(to_account, amount)
|
59
|
+
|
60
|
+
!!result
|
59
61
|
end
|
60
62
|
end
|
61
63
|
|