annotato 0.2.2 → 0.2.3
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/Gemfile.lock +1 -1
- data/lib/annotato/column_formatter.rb +6 -6
- data/lib/annotato/version.rb +1 -1
- 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: d46bed9c8d25cf14624fc0381d1742eead5efd0777705e8a55044ac797e0625a
|
|
4
|
+
data.tar.gz: af4276aea78359e7feb0dff649b5a185fb6074e81cb287ee5dd724b329c2dbe1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f430a13536edb3f88e2bfcb414c08c7fa38e369cd78b17957940ff7f0366a5b2da4846814e21a65c11b208cff1874850a53180634a142a885e2834b3f6a56fdc
|
|
7
|
+
data.tar.gz: 7a8cca116a125eff5e994905bb2f2947a567a4146fe9f9a48b6116217d009eb3441ac5e3c109e008fb78c6db9fa439c63756cb5893bf642a4fa5c50ce837d0ac
|
data/Gemfile.lock
CHANGED
|
@@ -26,11 +26,12 @@ module Annotato
|
|
|
26
26
|
type = col.sql_type
|
|
27
27
|
|
|
28
28
|
# Build the left-hand side and calculate indent.
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
# Strip trailing padding spaces immediately — output must never have trailing whitespace.
|
|
30
|
+
left = ("# %-#{name_width}s :%-#{type_width}s" % [name, type]).rstrip
|
|
31
|
+
# indent_size aligns multiline default content under the opening "default(" token.
|
|
31
32
|
indent_size = left.length + 1
|
|
32
33
|
indent_str = " " * indent_size
|
|
33
|
-
closing_indent_str
|
|
34
|
+
closing_indent_str = " " * (indent_size - 2)
|
|
34
35
|
|
|
35
36
|
# Gather all options, pulling out default_lines if multiline.
|
|
36
37
|
opts = []
|
|
@@ -64,10 +65,9 @@ module Annotato
|
|
|
64
65
|
opts_str = opts.join(", ")
|
|
65
66
|
line = opts_str.empty? ? left : "#{left} #{opts_str}"
|
|
66
67
|
if line.length > WrapHelper::MAX_LINE && !opts_str.empty?
|
|
67
|
-
|
|
68
|
-
[left, "# #{cont_indent}#{opts_str}"]
|
|
68
|
+
[left, "# #{opts_str}"]
|
|
69
69
|
else
|
|
70
|
-
[line
|
|
70
|
+
[line]
|
|
71
71
|
end
|
|
72
72
|
end
|
|
73
73
|
end
|
data/lib/annotato/version.rb
CHANGED