thefox-wallet 0.17.0 → 0.17.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
  SHA1:
3
- metadata.gz: f1d2d7b98050da769b3220c1b93ae33fa2d66732
4
- data.tar.gz: 901db16b1cc71053ccbe69b11a71b03f27e460a0
3
+ metadata.gz: 54d22dd7375ab5d853142bd46bb4abb8a34b652c
4
+ data.tar.gz: 6ec6de3481a67d3dcb4ad2817e9236685adf2f8d
5
5
  SHA512:
6
- metadata.gz: 0102a8e412d49f20f5b2123c45c4834546b82037cdbecd564f44fb696734f174bae911e802fb6d297c7b379b7fc9ff091b4ac1d706a5eef4f1fb37f3461f50c0
7
- data.tar.gz: bbf235d00f3b8aad963226867ee385c713ffa02ee77c6e49fbbf58e9a5186e1b09e75ef82637e45bf3c39b8e0e3c658aaa8fe6395a4923104707b8b792ecf592
6
+ metadata.gz: 9477cffe182a79d0297a1f549fdfef756660952471d5906ecfcf9a0d11f12d904c75b3c092e49c84daeca1e2d9a50a844db25bef7cf39e545a85d8e9b9be3e28
7
+ data.tar.gz: 2306c77008b56bc704ed1ece8b76d655673a9037699a1c37ef3e60363461f820f0879385f1ef2909b190234fbc3403bdc97560a25d3f8b8394eb04ec309cf087
@@ -2,8 +2,8 @@
2
2
  module TheFox
3
3
  module Wallet
4
4
  NAME = 'Wallet'
5
- VERSION = '0.17.0'
6
- DATE = '2017-08-12'
5
+ VERSION = '0.17.1'
6
+ DATE = '2017-08-13'
7
7
  HOMEPAGE = 'https://github.com/TheFox/wallet'
8
8
 
9
9
  NUMBER_FORMAT = '%.2f'
data/lib/wallet/wallet.rb CHANGED
@@ -450,14 +450,18 @@ module TheFox
450
450
  year_total = Hash.new
451
451
 
452
452
  @logger.info("generate year #{year}")
453
- @data_path.each_child do |file_path|
453
+
454
+ month_files = @data_path
455
+ .children
456
+ .sort
457
+ .keep_if{ |a|
458
+ a.extname == '.yml' && Regexp.new("^month_#{year}_").match(a.basename.to_s)
459
+ }
460
+
461
+ month_files.each do |file_path|
454
462
  file_name_p = file_path.basename
455
463
  file_name_s = file_name_p.to_s
456
464
 
457
- if file_path.extname != '.yml' || Regexp.new("^month_#{year}_").match(file_name_s).nil?
458
- next
459
- end
460
-
461
465
  month_n = file_name_s[11, 2]
462
466
  month_file_name_s = "month_#{year}_#{month_n}.html"
463
467
  month_file_name_p = Pathname.new(month_file_name_s)
@@ -620,7 +624,11 @@ module TheFox
620
624
  year_file.write('</tr>')
621
625
  end
622
626
 
623
- year_total.sort.inject(0.0){ |sum, item| item[1].balance_total = (sum + item[1].balance).round(NUMBER_ROUND) }
627
+ year_total
628
+ .sort
629
+ .inject(0.0){ |sum, item|
630
+ item[1].balance_total = (sum + item[1].balance).round(NUMBER_ROUND)
631
+ }
624
632
 
625
633
  year_file.write('
626
634
  <tr>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thefox-wallet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-12 00:00:00.000000000 Z
11
+ date: 2017-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry