feidee_utils 0.0.4.2 → 0.0.4.3
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 +4 -4
- data/Rakefile +0 -15
- data/lib/feidee_utils/transaction.rb +5 -5
- data/lib/feidee_utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd2d6afd486620f91184ac15f846ae7fef857b7c
|
4
|
+
data.tar.gz: d0b20dca231364ca6ee87392c9c57b69220c81d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: addacf49613d3cfb3be9a830046046abc84ace8091a514589bdbd46c01f09437dbeee95c00f2ba147e1986096e64b077171f3f2105a782df9821e63de998860b
|
7
|
+
data.tar.gz: 0fb69c197627fc5ddacf43bf956fe2649aaacd18159812fd8f0cb903be5de9755faf6489e141e4bdb06f5cc72d8ec84e5a8cd106d7f2540728f46e6f8e0a9e58
|
data/Rakefile
CHANGED
@@ -1,24 +1,9 @@
|
|
1
1
|
require 'rake/testtask'
|
2
|
-
require 'fileutils'
|
3
2
|
|
4
3
|
Rake::TestTask.new do |t|
|
5
4
|
t.libs << 'test'
|
6
5
|
t.pattern = 'test/**/*_test.rb'
|
7
6
|
end
|
8
7
|
|
9
|
-
namespace :sync do
|
10
|
-
desc "Sync source file with the main project."
|
11
|
-
task :source do
|
12
|
-
puts "copying source code..."
|
13
|
-
FileUtils.cp_r Dir.glob("lib/*"), "/Users/muyiliqing/Git/cloud-ruby-dev/lib/"
|
14
|
-
end
|
15
|
-
task :scallion do
|
16
|
-
puts "copying source code..."
|
17
|
-
FileUtils.cp_r Dir.glob("lib/*"), "/Users/muyiliqing/Git/scallion/lib/"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
8
|
desc "Run tests"
|
22
9
|
task :default => :test
|
23
|
-
task :deploy => :'sync:source'
|
24
|
-
task :scallion => :'sync:scallion'
|
@@ -53,7 +53,7 @@ module FeideeUtils
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
unless
|
56
|
+
unless raw_buyer_deduction == raw_seller_addition
|
57
57
|
raise InconsistentAmountException,
|
58
58
|
"Buyer and seller should have the same amount set. " +
|
59
59
|
"Buyer deduction: #{buyer_deduction}, seller_addition: #{seller_addition}.\n" +
|
@@ -117,8 +117,8 @@ module FeideeUtils
|
|
117
117
|
define_type_enum({
|
118
118
|
0 => :expenditure,
|
119
119
|
1 => :income,
|
120
|
-
2 => :
|
121
|
-
3 => :
|
120
|
+
2 => :transfer_seller,
|
121
|
+
3 => :transfer_buyer,
|
122
122
|
8 => :positive_initial_balance,
|
123
123
|
9 => :negative_initial_balance,
|
124
124
|
})
|
@@ -148,11 +148,11 @@ module FeideeUtils
|
|
148
148
|
# Amount accessors
|
149
149
|
|
150
150
|
def buyer_deduction
|
151
|
-
sign_by_type(raw_buyer_deduction)
|
151
|
+
to_bigdecimal sign_by_type(raw_buyer_deduction)
|
152
152
|
end
|
153
153
|
|
154
154
|
def seller_addition
|
155
|
-
sign_by_type(raw_seller_addition)
|
155
|
+
to_bigdecimal sign_by_type(raw_seller_addition)
|
156
156
|
end
|
157
157
|
|
158
158
|
def amount
|
data/lib/feidee_utils/version.rb
CHANGED