mdhost 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/mdhost.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22a9a1e6e40bfc450770d17f2893839890787d5ac895c3b4b1e5647f8d1212b7
|
4
|
+
data.tar.gz: bc24e087846ae318ec4ab344e8018cf65a3da55460da3e976faf8e79005e2b52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb3d3b221e7a34a7103957ff446035bcc53a2b2d21d0ffd2510dfb640ccc0832754f65eaecf54d63abf5045bf6454f3ee17bf2f947cb40f63e8dbfbb33ecbee9
|
7
|
+
data.tar.gz: 233f4d030ab19dd31cfa74d85a48570def4154162b66d7d56daf50067c94208b1f7c0272059088093392beca7977b752e6d3f2005bbdef1fd94a18b23af42229
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1
|
1
|
+
0.1.1
|
data/lib/mdhost.rb
CHANGED
@@ -43,8 +43,10 @@ module MDHost
|
|
43
43
|
end
|
44
44
|
|
45
45
|
# We don't *need* to pretty format the table so precisely, but why not?
|
46
|
-
|
47
|
-
|
46
|
+
# The smallest this can be is 6 because of the length of the "Engine"
|
47
|
+
# and "Result" headers.
|
48
|
+
engine_length = [table.keys.max_by(&:length).length, 6].max
|
49
|
+
result_length = [table.values.max_by(&:length).length, 6].max
|
48
50
|
|
49
51
|
markdown_table = table.map do |e, r|
|
50
52
|
"|#{e}#{' ' * (engine_length - e.length)}|#{r}#{' ' * (result_length - r.length)}|"
|