muflax 0.3.19 → 0.3.20

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
  SHA256:
3
- metadata.gz: 1d7cf5cadb93be4cc8e7fe1ea28a03f2a69d37c9ffa0342cacf5dac56610b480
4
- data.tar.gz: 4295cf464987fd55013d8b68c569a27458b7f22e6b5bc43590389319dfe0aeab
3
+ metadata.gz: 01d4247690190fbf1c278bc99e783d3d84bcb2a90cc7a6271cd401586371afc3
4
+ data.tar.gz: 432f4827566cd828943054aca89fc2530d7d5255bb4b8e35b237240942c5affc
5
5
  SHA512:
6
- metadata.gz: 52a6f307763e7815bd3537c2ed380761bf3c40f248eb64e12af9335a04c559860be3482881901a1589d4ed40289479825970a2d195d0a2686360c25a249cd90e
7
- data.tar.gz: 30dcec504bb2950513ef8b2821f49b81b8c204c4096e637e5b95108812eeba4834c3e85769968a6d2b92d4754a9359b49e1028945e51237c615a6b007401e6f1
6
+ metadata.gz: fd240aa80cbb4f202bdcc53bdcb35d47929d040f8140d3d7630220fcc2366cef62abe39659ca3cecc3e1ec208e7ae4a6b8bfbd3b44f30fa8c308cad75bc4c925
7
+ data.tar.gz: 59d09884bd10bb45d134cbc1c438934b18cc8df1920c41ae5ee17fb7b1e554a32d63a1cf2da973e44aceb9bc12141caf1d3fd42b79c29786f9c39bcf351525fe
checksums.yaml.gz.sig CHANGED
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- muflax (0.3.19)
4
+ muflax (0.3.20)
5
5
  awesome_print (~> 1)
6
6
  debug_inspector (~> 0.0)
7
7
  highline (< 1.7)
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
- w = line[column]&.size
79
- w = nil if line.size == max_cols # treat last column as useless
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
- elem_diff = elem.to_s.length - elem.str_length # how much the element is internally longer than it appears
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "muflax"
3
- s.version = "0.3.19"
3
+ s.version = "0.3.20"
4
4
 
5
5
  s.authors = ["muflax"]
6
6
  s.summary = "muflax standard library"
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- ��gZ.�)��ݚh���"����Gi��_v��o�c��_{k�_%fxl�� H��z`7��dG�ƚ�\�!و��H-W+�J��h"T�劍�욟����<4�=�r����s�`/{ �][��X�:(}OJ���lD���ܛկd�A�O�K.
1
+ oޮw���,���9hExߏ�(e���o\M@��zlܝR��yx*�rJ��qA4oT���OWcwߖ�8i
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.19
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-11 00:00:00.000000000 Z
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