onebox 1.8.38 → 1.8.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/onebox/engine/github_commit_onebox.rb +7 -1
- data/lib/onebox/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d6e4e0c8a8a62c9b418ddbf15ec75621fc48243a18cb105e50f0dd6d9847f1e7
|
4
|
+
data.tar.gz: 2e5b72ec7e9c108727a2dbeedca54a54e7b4a455ff768ea84d45b8452b4f867b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 152595e5f532e5ddf676d7ab67e6521de6dce24c5baf78be1f20e6322cbf364b73bcb8cac34c7fc191548f6fdbd24e2e94faeb38612bf4826ef01d4655b47c86
|
7
|
+
data.tar.gz: 1df2097ce7f36b7d5a59b1337a638e1e2d5fe4c6671fe86c51130fa6756bd9e00bdff0435d8ff273af57bd206c42ed31961518e6c7d43443496b9d78dfcd0ac4
|
@@ -30,7 +30,13 @@ module Onebox
|
|
30
30
|
result['title'] = result['commit']['message'].split("\n").first
|
31
31
|
|
32
32
|
if result['commit']['message'].lines.count > 1
|
33
|
-
|
33
|
+
message = result['commit']['message'].split("\n", 2).last.strip
|
34
|
+
|
35
|
+
message_words = message.gsub("\n\n", "\n").gsub("\n", "<br>").split(" ")
|
36
|
+
max_words = 20
|
37
|
+
result['message'] = message_words[0..max_words].join(" ")
|
38
|
+
result['message'] << "..." if message_words.length > max_words
|
39
|
+
result['message'] = result['message'].gsub("<br>", "\n")
|
34
40
|
end
|
35
41
|
|
36
42
|
ulink = URI(link)
|
data/lib/onebox/version.rb
CHANGED
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.39
|
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: 2018-02-
|
13
|
+
date: 2018-02-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|
@@ -511,7 +511,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
511
511
|
version: '0'
|
512
512
|
requirements: []
|
513
513
|
rubyforge_project:
|
514
|
-
rubygems_version: 2.
|
514
|
+
rubygems_version: 2.7.4
|
515
515
|
signing_key:
|
516
516
|
specification_version: 4
|
517
517
|
summary: A gem for turning URLs into previews.
|