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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 93d84795208b6845f986569134baa989a7b0413f
4
- data.tar.gz: 065ab0d91d48f0f70accf25491945a0e42f6484d
2
+ SHA256:
3
+ metadata.gz: d6e4e0c8a8a62c9b418ddbf15ec75621fc48243a18cb105e50f0dd6d9847f1e7
4
+ data.tar.gz: 2e5b72ec7e9c108727a2dbeedca54a54e7b4a455ff768ea84d45b8452b4f867b
5
5
  SHA512:
6
- metadata.gz: 6a3ba89b23f5930a2aff0eef44644d69927b4a816220b68c0f8cc953961b226d611564863a491f492c97e9f01674bd872ff19200eac74283043bd18e1a318e7a
7
- data.tar.gz: b27d5b3b1f4f898ef4540899858db5420762df9aa855fef9ea11c651caf681fe081891ace02cb5502908d9b019dc0a8021a9928066c3902887624156ef88867f
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
- result['message'] = result['commit']['message'].split("\n", 2).last.strip
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)
@@ -1,3 +1,3 @@
1
1
  module Onebox
2
- VERSION = "1.8.38"
2
+ VERSION = "1.8.39"
3
3
  end
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.38
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-14 00:00:00.000000000 Z
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.5.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.