bean_sprout 0.0.6 → 0.0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9a55ee004d73a05996d6c5469cdc295e2c59797
4
- data.tar.gz: 5bb9618364946b85e85f641d08d58dec0332e4e5
3
+ metadata.gz: 4f1cb8b063d609c6b1734ced03dea9ea338bd31f
4
+ data.tar.gz: 08c5d0e268e47b4073b41992e865a635cac595e8
5
5
  SHA512:
6
- metadata.gz: b23dbe41d7fbc541ae1c2add0fdc7805a7eb9ff10bb9306adfbef6dc3484f753a4d779ab8bbb8e8df2df7006f87f4b9467771406665d702f58681a1752f51478
7
- data.tar.gz: 4ecad1de36c155e21e678e6169af559fd095c6956bbc343c3c5ebcfbd86718982d1dceb818b47ee8df62347fe382e875cb12b9a98c857d3c61b89568a0b6727e
6
+ metadata.gz: cfd89409a85cc59d047363debe7baacdf14e3e7e9020684ae12625c4e0aec9722dbb0656dc9966345dc6fa35a35e04ba95c8ebc3f36aab82c3b4c9ca52941350
7
+ data.tar.gz: 141d728280ff6fd755c2e2aca24f56c11baf8e0388976801ab37aafffa80bda7d9ad1c3f59eae826954d09452155f1cc1b6fe1594eee567fd97fee43ee8549ba
@@ -39,12 +39,7 @@ module BeanSprout
39
39
  end
40
40
 
41
41
  def create_transaction entries, other_data: nil
42
- sprouts = entries.map do |entry| get_target entry end
43
- sprout_bunch = @sprout_bunches.store do |next_id|
44
- SproutBunch.new(next_id, sprouts)
45
- end
46
-
47
- Transaction.new(sprout_bunch, other_data)
42
+ commit_entries entries, other_data
48
43
  end
49
44
 
50
45
  def transfer from_acc, to_acc, amount, other_data: nil
@@ -109,9 +104,13 @@ module BeanSprout
109
104
  end
110
105
 
111
106
  def commit_entries entries, other_data = nil
112
- trans = create_transaction entries
107
+ sprouts = entries.map do |entry| get_target entry end
108
+ sprout_bunch = @sprout_bunches.store do |next_id|
109
+ SproutBunch.new(next_id, sprouts)
110
+ end
111
+
112
+ trans = Transaction.new(sprout_bunch, other_data)
113
113
  trans.commit
114
- trans.other_data = other_data
115
114
  trans
116
115
  end
117
116
  end
@@ -1,3 +1,3 @@
1
1
  module BeanSprout
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bean_sprout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liqing Muyi