muflax 0.3.19 → 0.3.20
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
- checksums.yaml.gz.sig +0 -0
- data/Gemfile.lock +1 -1
- data/lib/muflax/align.rb +5 -4
- data/muflax.gemspec +1 -1
- data.tar.gz.sig +2 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01d4247690190fbf1c278bc99e783d3d84bcb2a90cc7a6271cd401586371afc3
|
4
|
+
data.tar.gz: 432f4827566cd828943054aca89fc2530d7d5255bb4b8e35b237240942c5affc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd240aa80cbb4f202bdcc53bdcb35d47929d040f8140d3d7630220fcc2366cef62abe39659ca3cecc3e1ec208e7ae4a6b8bfbd3b44f30fa8c308cad75bc4c925
|
7
|
+
data.tar.gz: 59d09884bd10bb45d134cbc1c438934b18cc8df1920c41ae5ee17fb7b1e554a32d63a1cf2da973e44aceb9bc12141caf1d3fd42b79c29786f9c39bcf351525fe
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Gemfile.lock
CHANGED
data/lib/muflax/align.rb
CHANGED
@@ -37,7 +37,7 @@ class Object
|
|
37
37
|
end
|
38
38
|
|
39
39
|
class Array
|
40
|
-
def align str="\t", alignment: :left, force: false
|
40
|
+
def align str="\t", alignment: :left, force: false, ansi: false
|
41
41
|
just_function = case alignment
|
42
42
|
when :left ; Proc.new{|e,l,_c| e.ljust l }
|
43
43
|
when :right ; Proc.new{|e,l,_c| e.rjust l }
|
@@ -75,8 +75,8 @@ class Array
|
|
75
75
|
width = 0
|
76
76
|
end
|
77
77
|
|
78
|
-
|
79
|
-
w
|
78
|
+
# treat last column and missing columns as useless
|
79
|
+
w = line.size == max_cols ? nil : line[column]&.size
|
80
80
|
|
81
81
|
if w.nil? # block done
|
82
82
|
wants << [first, cur, width] unless width == 0
|
@@ -91,7 +91,8 @@ class Array
|
|
91
91
|
wants.each do |from, to, width|
|
92
92
|
lines[from...to].each do |line|
|
93
93
|
if elem = line[column]
|
94
|
-
|
94
|
+
# take into account how much the element is internally longer than it appears
|
95
|
+
elem_diff = ansi ? elem.to_s.length - elem.str_length : 0
|
95
96
|
line[column] = just_function.call(elem, width + elem_diff, column)
|
96
97
|
end
|
97
98
|
end
|
data/muflax.gemspec
CHANGED
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
oޮw���,���9hExߏ�(e���o\M@��zlܝR��yx*�rJ��qA4oT���O�Wcwߖ�8�i�
|
2
|
+
�����?���ɀi�a9��ЊҊ3y�o���fD�y)��r�/з��/��n����<LxON���ʞx/��9�m!�j`*����Ջ}��wIQuR/�,� ���C�e�YD*o�;�a��Rn�� Ⱦ^�Qn�����_�%:y�0�=�{�~q�|�>�xtd�~�ϳ��΄+)T�1��R@�[�T7�
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muflax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- muflax
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
jj4QBQUG5hER1ZAFf+RXdy4RSimjXedOgvebDGeTafOJyhtLsxsh6UKCViHVGzkw
|
29
29
|
fhGEJ1deAR/i8RPCblyBDtl7Ved3uX8izfU9LItVY+HOAzl69Qp0fe2TYH+y4uCO
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2019-02-
|
31
|
+
date: 2019-02-22 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: awesome_print
|
metadata.gz.sig
CHANGED
Binary file
|