tell-them 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tell-them/tell-them.rb +6 -6
- data/lib/tell-them/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd833b80ab13e9c68be09f645c5aea9c05e345f4
|
4
|
+
data.tar.gz: f242dff34fad6a9fa853de1df8374175c79b2772
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6b8f7a23970f99355d534d559045b952d1381d79b0763ea737ee15d96f4495d8291e46d29282a7adceecb2c247a9ee59d7e45a69a2d2aaa93aa2b50279790bb
|
7
|
+
data.tar.gz: a8a1663ae26e503841746a1d707bdb8509d680b440959dc53bcc8a807bae8ea14bdd9b08eba38ce44f889c55fb6482d54097bdcf4967bc9ae604ce878c4b9fb5
|
data/lib/tell-them/tell-them.rb
CHANGED
@@ -39,13 +39,14 @@ module TellThem
|
|
39
39
|
box += ' </div>'
|
40
40
|
box += ' <dl class="list">'
|
41
41
|
data.each do |k,v|
|
42
|
-
box += " <
|
42
|
+
box += " <li><span class=\"list-header\">#{k}: </span>"
|
43
43
|
begin
|
44
44
|
URI::parse(v)
|
45
|
-
box += " <
|
45
|
+
box += " <span class=\"list-value\"><a href=\"#{v}\">#{shorten(v)}</a></span>"
|
46
46
|
rescue URI::InvalidURIError
|
47
|
-
box += " <
|
47
|
+
box += " <span class=\"list-header\">#{v}</span>"
|
48
48
|
end
|
49
|
+
box += " </li>"
|
49
50
|
end
|
50
51
|
box += ' </dl>'
|
51
52
|
box += ' </div>'
|
@@ -54,9 +55,8 @@ module TellThem
|
|
54
55
|
end
|
55
56
|
|
56
57
|
def self.shorten(value)
|
57
|
-
if value.length
|
58
|
-
|
59
|
-
end
|
58
|
+
return value if value.length <= MAX_URL_DISPLAY_LENGTH
|
59
|
+
value[0..MAX_URL_DISPLAY_LENGTH] + '...'
|
60
60
|
end
|
61
61
|
|
62
62
|
class TellThemStore
|
data/lib/tell-them/version.rb
CHANGED