muflax 0.3.14 → 0.3.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Gemfile.lock +7 -7
- data/lib/muflax/align.rb +9 -6
- data/lib/muflax/blank.rb +1 -1
- data/lib/muflax/deep_dup.rb +1 -1
- data/lib/muflax/math.rb +1 -1
- data/lib/muflax/num.rb +1 -1
- data/lib/muflax/panes.rb +1 -1
- data/lib/muflax/table.rb +1 -1
- data/lib/muflax/time.rb +1 -1
- data/muflax.gemspec +2 -2
- data.tar.gz.sig +4 -1
- metadata +7 -8
- 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: b2362750efcc12a5b41659e48539b59c982447f84e6232f00cbc1b6ecdca097e
|
4
|
+
data.tar.gz: 45e9c2d5129d56735b12c700db6d9b3d803dfdeac1bb2f57554180d6363c189a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45446bf74fd5e90ab524a4b0a5f2888e7d871e19c38f753b1d506422f26bab7fdcaf6f5fe76921dba3b82b5c3de0468fafdc7c79993a89ef0b062d105a1b0442
|
7
|
+
data.tar.gz: 0c4cb51cf2a444eb1bfebd9f92fb687751fef72b59b6c6954b5387b5108db287daf2f1179ed1ec22d2225d52b32427b68a996f78b507578f7249a9dd3d4307cf
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
muflax (0.3.
|
4
|
+
muflax (0.3.16)
|
5
5
|
awesome_print (~> 1)
|
6
6
|
debug_inspector (~> 0.0)
|
7
|
-
highline (
|
7
|
+
highline (< 1.7)
|
8
8
|
pry (~> 0.10)
|
9
9
|
range_math (~> 1)
|
10
10
|
trollop (~> 2.1.3)
|
@@ -15,12 +15,12 @@ GEM
|
|
15
15
|
awesome_print (1.8.0)
|
16
16
|
coderay (1.1.2)
|
17
17
|
debug_inspector (0.0.3)
|
18
|
-
highline (1.
|
19
|
-
method_source (0.9.
|
20
|
-
pry (0.
|
18
|
+
highline (1.6.21)
|
19
|
+
method_source (0.9.2)
|
20
|
+
pry (0.12.2)
|
21
21
|
coderay (~> 1.1.0)
|
22
22
|
method_source (~> 0.9.0)
|
23
|
-
rake (12.3.
|
23
|
+
rake (12.3.2)
|
24
24
|
range_math (1.0.1)
|
25
25
|
trollop (2.1.3)
|
26
26
|
|
@@ -32,4 +32,4 @@ DEPENDENCIES
|
|
32
32
|
rake (~> 12)
|
33
33
|
|
34
34
|
BUNDLED WITH
|
35
|
-
1.
|
35
|
+
1.17.3
|
data/lib/muflax/align.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# -*- encoding: utf-8 -*-
|
3
|
-
# Copyright
|
3
|
+
# Copyright Steffie Dorn <mail@muflax.com>, 2017
|
4
4
|
# License: GNU APGLv3 (or later) <http://www.gnu.org/copyleft/gpl.html>
|
5
5
|
|
6
6
|
module Enumerable
|
@@ -37,11 +37,12 @@ class Object
|
|
37
37
|
end
|
38
38
|
|
39
39
|
class Array
|
40
|
-
def align str="
|
40
|
+
def align str="\t", alignment: :left, force: false
|
41
41
|
just_function = case alignment
|
42
|
-
when :left ;
|
43
|
-
when :right ;
|
44
|
-
when :center ;
|
42
|
+
when :left ; Proc.new{|e,l,_c| e.ljust(l) }
|
43
|
+
when :right ; Proc.new{|e,l,_c| e.rjust(l) }
|
44
|
+
when :center ; Proc.new{|e,l,_c| e.center(l) }
|
45
|
+
when Proc ; alignment
|
45
46
|
else
|
46
47
|
raise "invalid alignment: #{alignment}"
|
47
48
|
end
|
@@ -49,8 +50,10 @@ class Array
|
|
49
50
|
# split all lines
|
50
51
|
lines = []
|
51
52
|
columns = 0
|
53
|
+
rx = /[ ]#{str}/ if force
|
52
54
|
|
53
55
|
self.each do |line|
|
56
|
+
line .gsub! rx, str if force
|
54
57
|
line = line.split(str, -1)
|
55
58
|
lines << line
|
56
59
|
columns = [columns, line.size].max
|
@@ -67,7 +70,7 @@ class Array
|
|
67
70
|
# how much the element is internally longer than it appears
|
68
71
|
elem_diff = elem.to_s.length - elem.str_length
|
69
72
|
|
70
|
-
|
73
|
+
just_function.call(elem, lengths[column] + elem_diff, column)
|
71
74
|
end
|
72
75
|
|
73
76
|
# join line back together
|
data/lib/muflax/blank.rb
CHANGED
data/lib/muflax/deep_dup.rb
CHANGED
data/lib/muflax/math.rb
CHANGED
data/lib/muflax/num.rb
CHANGED
data/lib/muflax/panes.rb
CHANGED
data/lib/muflax/table.rb
CHANGED
data/lib/muflax/time.rb
CHANGED
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.
|
3
|
+
s.version = "0.3.16"
|
4
4
|
|
5
5
|
s.authors = ["muflax"]
|
6
6
|
s.summary = "muflax standard library"
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.add_dependency "awesome_print", "~> 1"
|
16
16
|
s.add_dependency "debug_inspector", "~> 0.0"
|
17
|
-
s.add_dependency "highline", "
|
17
|
+
s.add_dependency "highline", "< 1.7"
|
18
18
|
s.add_dependency "pry", "~> 0.10"
|
19
19
|
s.add_dependency "range_math", "~> 1"
|
20
20
|
s.add_dependency "trollop", "~> 2.1.3"
|
data.tar.gz.sig
CHANGED
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.16
|
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:
|
31
|
+
date: 2019-02-07 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: awesome_print
|
@@ -62,16 +62,16 @@ dependencies:
|
|
62
62
|
name: highline
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "
|
65
|
+
- - "<"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '1.
|
67
|
+
version: '1.7'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - "<"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '1.
|
74
|
+
version: '1.7'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: pry
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,8 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: '0'
|
183
183
|
requirements: []
|
184
|
-
|
185
|
-
rubygems_version: 2.7.7
|
184
|
+
rubygems_version: 3.0.1
|
186
185
|
signing_key:
|
187
186
|
specification_version: 4
|
188
187
|
summary: muflax standard library
|
metadata.gz.sig
CHANGED
Binary file
|