feidee_utils 0.0.4.2 → 0.0.4.3

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
  SHA1:
3
- metadata.gz: f30f41d070995fbe8c9f6b7de1b2d777f3a6e674
4
- data.tar.gz: 82c6dbf50bf2922e6852304e0ecd699139413a64
3
+ metadata.gz: fd2d6afd486620f91184ac15f846ae7fef857b7c
4
+ data.tar.gz: d0b20dca231364ca6ee87392c9c57b69220c81d0
5
5
  SHA512:
6
- metadata.gz: 374fe584c1e52e9f0afde15512f1c1b476a8c37a3b5fbeed640e1f3058216709e5a228417196a137d32e364f1da23b789b30b3503a7dcc690d3611461109635b
7
- data.tar.gz: bacc8d82f893a130eef2a84d2ce5e4ffd07b606881a90c270343812b587d0a6be6d32ec7a124380101be599b1bbf7f491291e149ce66bf6d894202a9e7db75ef
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 buyer_deduction == seller_addition
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 => :transfer_buyer,
121
- 3 => :transfer_seller,
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
@@ -1,3 +1,3 @@
1
1
  module FeideeUtils
2
- VERSION = '0.0.4.2'
2
+ VERSION = '0.0.4.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feidee_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.2
4
+ version: 0.0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liqing Muyi