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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82e0a5a2dcd250ad8d0aa7231550b853a20afa4a74f93676099cdcf756826516
4
- data.tar.gz: 0fdacf00679d364e12680d1862fad056fc7c8334c1c4b0078dce9a6d23219b19
3
+ metadata.gz: f273511f34e3a338870be2d7f3c1337917913b210b70f4237f4c206cc13a380e
4
+ data.tar.gz: e472770750dd7277e8d7343dc057ae1c289d19abc80ca0c812d9ca22efeaf9a1
5
5
  SHA512:
6
- metadata.gz: 58987a63a27f2d97fe7e1d961431981e79846c213806c3364dd5ea0e42944d334b7b41d47188e361157736f341308174dd6b5f41a29ffc9e59fc63262cad8daa
7
- data.tar.gz: d16e37c26e92810328ee1e60fa16135f4a6740b51e931d10bba3bdb6b56e6fed30b8610191c439570c0473bae2b441844c731b71d935993d18c25d2612c75f06
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.0
1
+ 3.4.1
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: acts_as_account 3.4.0 ruby lib
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.0".freeze
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]
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
 
@@ -1,6 +1,6 @@
1
1
  module ActsAsAccount
2
2
  # ActsAsAccount version
3
- VERSION = '3.4.0'
3
+ VERSION = '3.4.1'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_account
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thies C. Arntzen, Norman Timmler, Matthias Frick, Phillip Oertel