onebox 1.8.76 → 1.8.77
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/.gitignore +0 -1
- data/.rspec +0 -0
- data/.rubocop.yml +0 -0
- data/.ruby-gemset +0 -0
- data/.travis.yml +0 -0
- data/CHANGELOG.md +0 -0
- data/Gemfile +0 -0
- data/Gemfile.lock +152 -0
- data/Guardfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/lib/onebox.rb +0 -0
- data/lib/onebox/engine.rb +0 -0
- data/lib/onebox/engine/amazon_onebox.rb +0 -0
- data/lib/onebox/engine/asciinema_onebox.rb +0 -0
- data/lib/onebox/engine/audio_onebox.rb +0 -0
- data/lib/onebox/engine/audioboom_onebox.rb +0 -0
- data/lib/onebox/engine/bandcamp_onebox.rb +0 -0
- data/lib/onebox/engine/cloudapp_onebox.rb +0 -0
- data/lib/onebox/engine/coub_onebox.rb +0 -0
- data/lib/onebox/engine/douban_onebox.rb +0 -0
- data/lib/onebox/engine/five_hundred_px_onebox.rb +0 -0
- data/lib/onebox/engine/flickr_onebox.rb +0 -0
- data/lib/onebox/engine/flickr_shortened_onebox.rb +0 -0
- data/lib/onebox/engine/gfycat_onebox.rb +0 -0
- data/lib/onebox/engine/giphy_onebox.rb +0 -0
- data/lib/onebox/engine/github_blob_onebox.rb +0 -0
- data/lib/onebox/engine/github_commit_onebox.rb +0 -0
- data/lib/onebox/engine/github_gist_onebox.rb +0 -0
- data/lib/onebox/engine/github_issue_onebox.rb +0 -0
- data/lib/onebox/engine/github_pullrequest_onebox.rb +0 -0
- data/lib/onebox/engine/gitlab_blob_onebox.rb +0 -0
- data/lib/onebox/engine/google_calendar_onebox.rb +0 -0
- data/lib/onebox/engine/google_docs_onebox.rb +1 -1
- data/lib/onebox/engine/google_maps_onebox.rb +0 -0
- data/lib/onebox/engine/google_photos_onebox.rb +0 -0
- data/lib/onebox/engine/google_play_app_onebox.rb +0 -0
- data/lib/onebox/engine/html.rb +0 -0
- data/lib/onebox/engine/image_onebox.rb +0 -0
- data/lib/onebox/engine/imgur_onebox.rb +1 -1
- data/lib/onebox/engine/instagram_onebox.rb +1 -1
- data/lib/onebox/engine/json.rb +0 -0
- data/lib/onebox/engine/mixcloud_onebox.rb +0 -0
- data/lib/onebox/engine/opengraph_image.rb +0 -0
- data/lib/onebox/engine/pastebin_onebox.rb +0 -0
- data/lib/onebox/engine/pdf_onebox.rb +0 -0
- data/lib/onebox/engine/pubmed_onebox.rb +0 -0
- data/lib/onebox/engine/replit_onebox.rb +0 -0
- data/lib/onebox/engine/sketchfab_onebox.rb +0 -0
- data/lib/onebox/engine/slides_onebox.rb +0 -0
- data/lib/onebox/engine/soundcloud_onebox.rb +0 -0
- data/lib/onebox/engine/stack_exchange_onebox.rb +0 -0
- data/lib/onebox/engine/standard_embed.rb +0 -0
- data/lib/onebox/engine/steam_store_onebox.rb +0 -0
- data/lib/onebox/engine/trello_onebox.rb +0 -0
- data/lib/onebox/engine/twitch_clips_onebox.rb +0 -0
- data/lib/onebox/engine/twitch_stream_onebox.rb +0 -0
- data/lib/onebox/engine/twitch_video_onebox.rb +0 -0
- data/lib/onebox/engine/twitter_status_onebox.rb +0 -0
- data/lib/onebox/engine/video_onebox.rb +0 -0
- data/lib/onebox/engine/vimeo_onebox.rb +0 -0
- data/lib/onebox/engine/wechat_mp_onebox.rb +0 -0
- data/lib/onebox/engine/whitelisted_generic_onebox.rb +10 -10
- data/lib/onebox/engine/wikimedia_onebox.rb +0 -0
- data/lib/onebox/engine/wikipedia_onebox.rb +0 -0
- data/lib/onebox/engine/wistia_onebox.rb +0 -0
- data/lib/onebox/engine/xkcd_onebox.rb +0 -0
- data/lib/onebox/engine/youku_onebox.rb +0 -0
- data/lib/onebox/engine/youtube_onebox.rb +1 -1
- data/lib/onebox/file_type_finder.rb +0 -0
- data/lib/onebox/helpers.rb +12 -2
- data/lib/onebox/layout.rb +0 -0
- data/lib/onebox/layout_support.rb +0 -0
- data/lib/onebox/matcher.rb +0 -0
- data/lib/onebox/mixins/git_blob_onebox.rb +0 -0
- data/lib/onebox/mixins/twitch_onebox.rb +0 -0
- data/lib/onebox/preview.rb +0 -0
- data/lib/onebox/sanitize_config.rb +0 -0
- data/lib/onebox/status_check.rb +0 -0
- data/lib/onebox/template_support.rb +0 -0
- data/lib/onebox/version.rb +1 -1
- data/lib/onebox/view.rb +0 -0
- data/lib/onebox/web.rb +0 -0
- data/lib/onebox/web_helpers.rb +0 -0
- data/onebox.gemspec +0 -0
- data/templates/_layout.mustache +0 -0
- data/templates/amazon.mustache +0 -0
- data/templates/douban.mustache +0 -0
- data/templates/githubblob.mustache +0 -0
- data/templates/githubcommit.mustache +0 -0
- data/templates/githubgist.mustache +0 -0
- data/templates/githubissue.mustache +0 -0
- data/templates/githubpullrequest.mustache +0 -0
- data/templates/gitlabblob.mustache +0 -0
- data/templates/googledocs.mustache +0 -0
- data/templates/googleplayapp.mustache +0 -0
- data/templates/instagram.mustache +0 -0
- data/templates/pastebin.mustache +0 -0
- data/templates/pdf.mustache +0 -0
- data/templates/pubmed.mustache +0 -0
- data/templates/stackexchange.mustache +0 -0
- data/templates/twitterstatus.mustache +0 -0
- data/templates/wechatmp.mustache +0 -0
- data/templates/whitelistedgeneric.mustache +0 -0
- data/templates/wikimedia.mustache +0 -0
- data/templates/wikipedia.mustache +0 -0
- data/templates/xkcd.mustache +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '08c3a640785331288e85c9998707a13f7cc2179cb2cc319535123595c5c52ef4'
|
|
4
|
+
data.tar.gz: b2e3f75c91844b7ee42cb41f874ed4d65387db2d33a74b9ff931aaf7dccfd608
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 47bf5de643663053b206d7309bfaa47c1e87e7970452a3afd9eccf83cdbe70a3078ffc72e2b8d248a1e145a7dd9a976bb105ffd84d31676f20b7870ad7b973ce
|
|
7
|
+
data.tar.gz: 2c6b8430d91bb83994c756f28ebf18ff31313e24f6bd5b64e6ec42f1d0b907438ec6112224cc2d8f7fd75f408eb370f6d617bc44fa10f5573e484df1369d1e2d
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
|
File without changes
|
data/.rubocop.yml
CHANGED
|
File without changes
|
data/.ruby-gemset
CHANGED
|
File without changes
|
data/.travis.yml
CHANGED
|
File without changes
|
data/CHANGELOG.md
CHANGED
|
File without changes
|
data/Gemfile
CHANGED
|
File without changes
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
onebox (1.8.76)
|
|
5
|
+
htmlentities (~> 4.3)
|
|
6
|
+
moneta (~> 1.0)
|
|
7
|
+
multi_json (~> 1.11)
|
|
8
|
+
mustache
|
|
9
|
+
nokogiri (~> 1.7)
|
|
10
|
+
sanitize
|
|
11
|
+
|
|
12
|
+
GEM
|
|
13
|
+
remote: https://rubygems.org/
|
|
14
|
+
specs:
|
|
15
|
+
ast (2.4.0)
|
|
16
|
+
backports (3.11.4)
|
|
17
|
+
celluloid (0.16.0)
|
|
18
|
+
timers (~> 4.0.0)
|
|
19
|
+
coderay (1.1.2)
|
|
20
|
+
crass (1.0.4)
|
|
21
|
+
diff-lcs (1.3)
|
|
22
|
+
fakeweb (1.3.0)
|
|
23
|
+
faraday (0.9.2)
|
|
24
|
+
multipart-post (>= 1.2, < 3)
|
|
25
|
+
ffi (1.10.0)
|
|
26
|
+
formatador (0.2.5)
|
|
27
|
+
guard (2.15.0)
|
|
28
|
+
formatador (>= 0.2.4)
|
|
29
|
+
listen (>= 2.7, < 4.0)
|
|
30
|
+
lumberjack (>= 1.0.12, < 2.0)
|
|
31
|
+
nenv (~> 0.1)
|
|
32
|
+
notiffany (~> 0.0)
|
|
33
|
+
pry (>= 0.9.12)
|
|
34
|
+
shellany (~> 0.0)
|
|
35
|
+
thor (>= 0.18.1)
|
|
36
|
+
guard-rspec (4.2.10)
|
|
37
|
+
guard (~> 2.1)
|
|
38
|
+
rspec (>= 2.14, < 4.0)
|
|
39
|
+
haml (4.0.7)
|
|
40
|
+
tilt
|
|
41
|
+
hitimes (1.3.0)
|
|
42
|
+
htmlentities (4.3.4)
|
|
43
|
+
jaro_winkler (1.5.2)
|
|
44
|
+
listen (2.10.1)
|
|
45
|
+
celluloid (~> 0.16.0)
|
|
46
|
+
rb-fsevent (>= 0.9.3)
|
|
47
|
+
rb-inotify (>= 0.9)
|
|
48
|
+
lumberjack (1.0.13)
|
|
49
|
+
metaclass (0.0.4)
|
|
50
|
+
method_source (0.9.2)
|
|
51
|
+
mini_portile2 (2.4.0)
|
|
52
|
+
mocha (1.8.0)
|
|
53
|
+
metaclass (~> 0.0.1)
|
|
54
|
+
moneta (1.0.0)
|
|
55
|
+
multi_json (1.13.1)
|
|
56
|
+
multipart-post (2.0.0)
|
|
57
|
+
mustache (1.1.0)
|
|
58
|
+
nenv (0.3.0)
|
|
59
|
+
nokogiri (1.10.1)
|
|
60
|
+
mini_portile2 (~> 2.4.0)
|
|
61
|
+
nokogumbo (2.0.1)
|
|
62
|
+
nokogiri (~> 1.8, >= 1.8.4)
|
|
63
|
+
notiffany (0.1.1)
|
|
64
|
+
nenv (~> 0.1)
|
|
65
|
+
shellany (~> 0.0)
|
|
66
|
+
parallel (1.13.0)
|
|
67
|
+
parser (2.6.0.0)
|
|
68
|
+
ast (~> 2.4.0)
|
|
69
|
+
powerpack (0.1.2)
|
|
70
|
+
pry (0.12.2)
|
|
71
|
+
coderay (~> 1.1.0)
|
|
72
|
+
method_source (~> 0.9.0)
|
|
73
|
+
rack (1.6.11)
|
|
74
|
+
rack-protection (1.5.5)
|
|
75
|
+
rack
|
|
76
|
+
rack-test (1.1.0)
|
|
77
|
+
rack (>= 1.0, < 3)
|
|
78
|
+
rainbow (3.0.0)
|
|
79
|
+
rake (10.5.0)
|
|
80
|
+
rb-fsevent (0.10.3)
|
|
81
|
+
rb-inotify (0.10.0)
|
|
82
|
+
ffi (~> 1.0)
|
|
83
|
+
rspec (3.8.0)
|
|
84
|
+
rspec-core (~> 3.8.0)
|
|
85
|
+
rspec-expectations (~> 3.8.0)
|
|
86
|
+
rspec-mocks (~> 3.8.0)
|
|
87
|
+
rspec-core (3.8.0)
|
|
88
|
+
rspec-support (~> 3.8.0)
|
|
89
|
+
rspec-expectations (3.8.2)
|
|
90
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
91
|
+
rspec-support (~> 3.8.0)
|
|
92
|
+
rspec-mocks (3.8.0)
|
|
93
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
94
|
+
rspec-support (~> 3.8.0)
|
|
95
|
+
rspec-support (3.8.0)
|
|
96
|
+
rubocop (0.63.0)
|
|
97
|
+
jaro_winkler (~> 1.5.1)
|
|
98
|
+
parallel (~> 1.10)
|
|
99
|
+
parser (>= 2.5, != 2.5.1.1)
|
|
100
|
+
powerpack (~> 0.1)
|
|
101
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
102
|
+
ruby-progressbar (~> 1.7)
|
|
103
|
+
unicode-display_width (~> 1.4.0)
|
|
104
|
+
ruby-progressbar (1.10.0)
|
|
105
|
+
sanitize (5.0.0)
|
|
106
|
+
crass (~> 1.0.2)
|
|
107
|
+
nokogiri (>= 1.8.0)
|
|
108
|
+
nokogumbo (~> 2.0)
|
|
109
|
+
shellany (0.0.1)
|
|
110
|
+
simple_oauth (0.3.1)
|
|
111
|
+
sinatra (1.4.8)
|
|
112
|
+
rack (~> 1.5)
|
|
113
|
+
rack-protection (~> 1.4)
|
|
114
|
+
tilt (>= 1.3, < 3)
|
|
115
|
+
sinatra-contrib (1.4.7)
|
|
116
|
+
backports (>= 2.0)
|
|
117
|
+
multi_json
|
|
118
|
+
rack-protection
|
|
119
|
+
rack-test
|
|
120
|
+
sinatra (~> 1.4.0)
|
|
121
|
+
tilt (>= 1.3, < 3)
|
|
122
|
+
thor (0.20.3)
|
|
123
|
+
tilt (2.0.9)
|
|
124
|
+
timers (4.0.4)
|
|
125
|
+
hitimes
|
|
126
|
+
twitter (4.8.1)
|
|
127
|
+
faraday (~> 0.8, < 0.10)
|
|
128
|
+
multi_json (~> 1.0)
|
|
129
|
+
simple_oauth (~> 0.2)
|
|
130
|
+
unicode-display_width (1.4.1)
|
|
131
|
+
|
|
132
|
+
PLATFORMS
|
|
133
|
+
ruby
|
|
134
|
+
|
|
135
|
+
DEPENDENCIES
|
|
136
|
+
bundler (~> 2.0)
|
|
137
|
+
fakeweb (~> 1.3)
|
|
138
|
+
guard-rspec (~> 4.2.8)
|
|
139
|
+
haml (~> 4.0)
|
|
140
|
+
listen (~> 2.10.0)
|
|
141
|
+
mocha (~> 1.1)
|
|
142
|
+
onebox!
|
|
143
|
+
pry (~> 0.10)
|
|
144
|
+
rake (~> 10.4)
|
|
145
|
+
rspec (~> 3.2)
|
|
146
|
+
rubocop (~> 0.50)
|
|
147
|
+
sinatra (~> 1.4)
|
|
148
|
+
sinatra-contrib (~> 1.4)
|
|
149
|
+
twitter (~> 4.8)
|
|
150
|
+
|
|
151
|
+
BUNDLED WITH
|
|
152
|
+
2.0.1
|
data/Guardfile
CHANGED
|
File without changes
|
data/LICENSE.txt
CHANGED
|
File without changes
|
data/README.md
CHANGED
|
File without changes
|
data/Rakefile
CHANGED
|
File without changes
|
data/lib/onebox.rb
CHANGED
|
File without changes
|
data/lib/onebox/engine.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -26,7 +26,7 @@ module Onebox
|
|
|
26
26
|
og_data = get_og_data
|
|
27
27
|
result = { link: link,
|
|
28
28
|
title: og_data[:title] || "Google #{shorttype.to_s.capitalize}",
|
|
29
|
-
description:
|
|
29
|
+
description: Onebox::Helpers.truncate(og_data[:description], 250) || "This #{shorttype.to_s.chop.capitalize} is private",
|
|
30
30
|
type: shorttype
|
|
31
31
|
}
|
|
32
32
|
result
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/onebox/engine/html.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -31,7 +31,7 @@ module Onebox
|
|
|
31
31
|
def album_html(og)
|
|
32
32
|
escaped_url = ::Onebox::Helpers.normalize_url_for_output(url)
|
|
33
33
|
escaped_src = ::Onebox::Helpers.normalize_url_for_output(get_secure_link(og[:image]))
|
|
34
|
-
album_title = "[Album] #{Onebox::Helpers.truncate(og[:title]
|
|
34
|
+
album_title = "[Album] #{Onebox::Helpers.truncate(og[:title], 80)}"
|
|
35
35
|
|
|
36
36
|
<<-HTML
|
|
37
37
|
<div class='onebox imgur-album'>
|
|
@@ -20,7 +20,7 @@ module Onebox
|
|
|
20
20
|
|
|
21
21
|
result = { link: og[:url],
|
|
22
22
|
title: html_entities.decode(Onebox::Helpers.truncate(title, 80)),
|
|
23
|
-
description: html_entities.decode(
|
|
23
|
+
description: html_entities.decode(Onebox::Helpers.truncate(og[:description], 250))
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
if !Onebox::Helpers.blank?(og[:image])
|
data/lib/onebox/engine/json.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -202,16 +202,16 @@ module Onebox
|
|
|
202
202
|
d = { link: link }.merge(raw)
|
|
203
203
|
|
|
204
204
|
if !Onebox::Helpers.blank?(d[:title])
|
|
205
|
-
d[:title] = html_entities.decode(Onebox::Helpers.truncate(d[:title]
|
|
205
|
+
d[:title] = html_entities.decode(Onebox::Helpers.truncate(d[:title], 80))
|
|
206
206
|
end
|
|
207
207
|
|
|
208
208
|
d[:description] ||= d[:summary]
|
|
209
209
|
if !Onebox::Helpers.blank?(d[:description])
|
|
210
|
-
d[:description] = html_entities.decode(
|
|
210
|
+
d[:description] = html_entities.decode(Onebox::Helpers.truncate(d[:description], 250))
|
|
211
211
|
end
|
|
212
212
|
|
|
213
213
|
if !Onebox::Helpers.blank?(d[:site_name])
|
|
214
|
-
d[:domain] = html_entities.decode(Onebox::Helpers.truncate(d[:site_name]
|
|
214
|
+
d[:domain] = html_entities.decode(Onebox::Helpers.truncate(d[:site_name], 80))
|
|
215
215
|
elsif !Onebox::Helpers.blank?(d[:domain])
|
|
216
216
|
d[:domain] = "http://#{d[:domain]}" unless d[:domain] =~ /^https?:\/\//
|
|
217
217
|
d[:domain] = URI(d[:domain]).host.to_s.sub(/^www\./, '') rescue nil
|
|
@@ -231,22 +231,22 @@ module Onebox
|
|
|
231
231
|
|
|
232
232
|
# Twitter labels
|
|
233
233
|
if !Onebox::Helpers.blank?(d[:label1]) && !Onebox::Helpers.blank?(d[:data1]) && !!WhitelistedGenericOnebox.twitter_label_whitelist.find { |l| d[:label1] =~ /#{l}/i }
|
|
234
|
-
d[:label_1] =
|
|
235
|
-
d[:data_1] =
|
|
234
|
+
d[:label_1] = Onebox::Helpers.truncate(d[:label1])
|
|
235
|
+
d[:data_1] = Onebox::Helpers.truncate(d[:data1])
|
|
236
236
|
end
|
|
237
237
|
if !Onebox::Helpers.blank?(d[:label2]) && !Onebox::Helpers.blank?(d[:data2]) && !!WhitelistedGenericOnebox.twitter_label_whitelist.find { |l| d[:label2] =~ /#{l}/i }
|
|
238
238
|
unless Onebox::Helpers.blank?(d[:label_1])
|
|
239
|
-
d[:label_2] =
|
|
240
|
-
d[:data_2] =
|
|
239
|
+
d[:label_2] = Onebox::Helpers.truncate(d[:label2])
|
|
240
|
+
d[:data_2] = Onebox::Helpers.truncate(d[:data2])
|
|
241
241
|
else
|
|
242
|
-
d[:label_1] =
|
|
243
|
-
d[:data_1] =
|
|
242
|
+
d[:label_1] = Onebox::Helpers.truncate(d[:label2])
|
|
243
|
+
d[:data_1] = Onebox::Helpers.truncate(d[:data2])
|
|
244
244
|
end
|
|
245
245
|
end
|
|
246
246
|
|
|
247
247
|
if Onebox::Helpers.blank?(d[:label_1]) && !Onebox::Helpers.blank?(d[:price_amount]) && !Onebox::Helpers.blank?(d[:price_currency])
|
|
248
248
|
d[:label_1] = "Price"
|
|
249
|
-
d[:data_1] =
|
|
249
|
+
d[:data_1] = Onebox::Helpers.truncate("#{d[:price_currency].strip} #{d[:price_amount].strip}")
|
|
250
250
|
end
|
|
251
251
|
|
|
252
252
|
d
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/onebox/helpers.rb
CHANGED
|
@@ -169,12 +169,22 @@ module Onebox
|
|
|
169
169
|
end
|
|
170
170
|
|
|
171
171
|
def self.truncate(string, length = 50)
|
|
172
|
+
string = sanitize(string)
|
|
172
173
|
string.size > length ? string[0...(string.rindex(" ", length) || length)] + "..." : string
|
|
173
174
|
end
|
|
174
175
|
|
|
175
176
|
def self.title_attr(meta)
|
|
176
|
-
title = meta
|
|
177
|
-
|
|
177
|
+
title = get(meta, :title)
|
|
178
|
+
!title.nil? ? "title='#{title}'" : ""
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
def self.get(meta, attr)
|
|
182
|
+
(meta && !blank?(meta[attr])) ? sanitize(meta[attr]) : nil
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
def self.sanitize(value, length = 50)
|
|
186
|
+
return nil if blank?(value)
|
|
187
|
+
Sanitize.fragment(value).strip
|
|
178
188
|
end
|
|
179
189
|
|
|
180
190
|
def self.normalize_url_for_output(url)
|
data/lib/onebox/layout.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/onebox/matcher.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/onebox/preview.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/onebox/status_check.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/onebox/version.rb
CHANGED
data/lib/onebox/view.rb
CHANGED
|
File without changes
|
data/lib/onebox/web.rb
CHANGED
|
File without changes
|
data/lib/onebox/web_helpers.rb
CHANGED
|
File without changes
|
data/onebox.gemspec
CHANGED
|
File without changes
|
data/templates/_layout.mustache
CHANGED
|
File without changes
|
data/templates/amazon.mustache
CHANGED
|
File without changes
|
data/templates/douban.mustache
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/templates/pastebin.mustache
CHANGED
|
File without changes
|
data/templates/pdf.mustache
CHANGED
|
File without changes
|
data/templates/pubmed.mustache
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/templates/wechatmp.mustache
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/templates/xkcd.mustache
CHANGED
|
File without changes
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onebox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.8.
|
|
4
|
+
version: 1.8.77
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joanna Zeta
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2019-
|
|
13
|
+
date: 2019-02-12 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: multi_json
|
|
@@ -294,6 +294,7 @@ files:
|
|
|
294
294
|
- ".travis.yml"
|
|
295
295
|
- CHANGELOG.md
|
|
296
296
|
- Gemfile
|
|
297
|
+
- Gemfile.lock
|
|
297
298
|
- Guardfile
|
|
298
299
|
- LICENSE.txt
|
|
299
300
|
- README.md
|