lucarecord 0.2.21 → 0.2.22
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/CHANGELOG.md +4 -0
- data/lib/luca_record/io.rb +1 -1
- data/lib/luca_record/version.rb +1 -1
- data/lib/luca_support/code.rb +10 -6
- data/lib/luca_support/view.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 217630d4010c2341954f05600982cf641470b244440849c7816873ed8d10e8d2
|
4
|
+
data.tar.gz: f535546634069491d64b3e0359fc9a40f10059cd08d216f8a947c28d717d1c6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e69a01066562a854ebe78128ead7c7d87be1227cfbce7453edf5510fa03f7b2acfbea5b334837b1c80e49e71a8a858d2d273277769e096baf29e4c90977816b
|
7
|
+
data.tar.gz: c7caf90c504940b0533441f19cde460fbb680f69937412659ac04670f009b74ed84c5a2aa120f2554a7e4cfab8d4eba62309cd5c0ace1e057fc09400fdc05cee
|
data/CHANGELOG.md
CHANGED
data/lib/luca_record/io.rb
CHANGED
@@ -62,7 +62,7 @@ module LucaRecord # :nodoc:
|
|
62
62
|
def term(start_year, start_month, end_year, end_month, code = nil, basedir = @dirname)
|
63
63
|
return enum_for(:term, start_year, start_month, end_year, end_month, code, basedir) unless block_given?
|
64
64
|
|
65
|
-
LucaSupport::Code.encode_term(start_year, start_month, end_year, end_month).each do |subdir|
|
65
|
+
LucaSupport::Code.encode_term(start_year, start_month, end_year, end_month).each do |subdir|
|
66
66
|
open_records(basedir, subdir, nil, code) do |f, path|
|
67
67
|
if @record_type == 'raw'
|
68
68
|
yield f, path
|
data/lib/luca_record/version.rb
CHANGED
data/lib/luca_support/code.rb
CHANGED
@@ -132,14 +132,18 @@ module LucaSupport
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def readable(obj, len = LucaSupport::Config::DECIMAL_NUM)
|
135
|
-
case obj
|
136
|
-
when
|
135
|
+
case obj
|
136
|
+
when Array
|
137
137
|
obj.map { |i| readable(i) }
|
138
|
-
when
|
138
|
+
when Hash
|
139
139
|
obj.inject({}) { |h, (k, v)| h[k] = readable(v); h }
|
140
|
-
when
|
141
|
-
|
142
|
-
|
140
|
+
when BigDecimal
|
141
|
+
if len == 0
|
142
|
+
obj.round # Integer is precise
|
143
|
+
else
|
144
|
+
parts = obj.round(len).to_s('F').split('.')
|
145
|
+
"#{parts[0]}.#{parts[1][0, len]}"
|
146
|
+
end
|
143
147
|
else
|
144
148
|
obj
|
145
149
|
end
|
data/lib/luca_support/view.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lucarecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chuma Takahiro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|