onebox 1.5.13 → 1.5.14
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/lib/onebox/engine/github_commit_onebox.rb +2 -0
- data/lib/onebox/engine/github_issue_onebox.rb +5 -4
- data/lib/onebox/engine/github_pullrequest_onebox.rb +2 -2
- data/lib/onebox/engine/whitelisted_generic_onebox.rb +3 -1
- data/lib/onebox/version.rb +1 -1
- data/templates/githubcommit.mustache +4 -0
- data/templates/githubissue.mustache +4 -0
- data/templates/githubpullrequest.mustache +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66774548728354077668c4930c8c3ac05cb0706a
|
|
4
|
+
data.tar.gz: 4eb912093e93670dc737418582a1c2bf3d4ec41f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8a70602d6840531198d155606f1a6bfb1b3bcf83f9d45d81917592136d6dfa3df8b6c55ab7a9a028f1feda98046ee460d576c1272214bd947109a26464e3a15a
|
|
7
|
+
data.tar.gz: 008d182e8c048a752ea581db973279a514e41a82b37f825652a2a617970141de570a30ff86ae61ecb10a16d62a43e37647087013a42cab5d9c67850f20bd46f3
|
|
@@ -27,6 +27,8 @@ module Onebox
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
result['commit_date'] = Time.parse(result['commit']['author']['date']).strftime("%I:%M%p - %d %b %y")
|
|
30
|
+
result['repository_path'] = "#{URI(link).host}/#{URI(link).path.split('/')[1]}/#{URI(link).path.split('/')[2]}"
|
|
31
|
+
result['repository_url'] = "https://#{result['repository_path']}"
|
|
30
32
|
result
|
|
31
33
|
end
|
|
32
34
|
end
|
|
@@ -32,14 +32,15 @@ module Onebox
|
|
|
32
32
|
status_color = {"open"=>"#6cc644","closed"=>"#bd2c00","merged"=>"#6e5494"}
|
|
33
33
|
result = { link: @url,
|
|
34
34
|
title: "Issue: " + @raw["title"],
|
|
35
|
-
content:short_content.gsub("<br>","\n"),
|
|
35
|
+
content: short_content.gsub("<br>","\n"),
|
|
36
36
|
labels: @raw["labels"],
|
|
37
37
|
user: @raw['user'],
|
|
38
38
|
created_at: @raw['created_at'].split("T")[0], #get only date for now
|
|
39
|
-
closed_at: (@raw['closed_at'].nil? ? "" : @raw['closed_at'].split("T")[0]
|
|
39
|
+
closed_at: (@raw['closed_at'].nil? ? "" : @raw['closed_at'].split("T")[0]),
|
|
40
40
|
closed_by: @raw['closed_by'],
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
avatar: "https://avatars1.githubusercontent.com/u/#{@raw['user']['id']}?v=2&s=96",
|
|
42
|
+
repository_path: "#{URI(link).host}/#{URI(link).path.split('/')[1]}/#{URI(link).path.split('/')[2]}",
|
|
43
|
+
repository_url: "https://#{URI(link).host}/#{URI(link).path.split('/')[1]}/#{URI(link).path.split('/')[2]}",
|
|
43
44
|
}
|
|
44
45
|
end
|
|
45
46
|
end
|
|
@@ -21,10 +21,10 @@ module Onebox
|
|
|
21
21
|
result = raw.clone
|
|
22
22
|
result['link'] = link
|
|
23
23
|
result['created_at'] = Time.parse(result['created_at']).strftime("%I:%M%p - %d %b %y")
|
|
24
|
+
result['repository_path'] = "#{URI(link).host}/#{URI(link).path.split('/')[1]}/#{URI(link).path.split('/')[2]}"
|
|
25
|
+
result['repository_url'] = "https://#{result['repository_path']}"
|
|
24
26
|
result
|
|
25
27
|
end
|
|
26
28
|
end
|
|
27
29
|
end
|
|
28
30
|
end
|
|
29
|
-
|
|
30
|
-
|
|
@@ -19,6 +19,7 @@ module Onebox
|
|
|
19
19
|
8tracks.com
|
|
20
20
|
about.com
|
|
21
21
|
answers.com
|
|
22
|
+
arstechnica.com
|
|
22
23
|
ask.com
|
|
23
24
|
battle.net
|
|
24
25
|
bbc.co.uk
|
|
@@ -53,6 +54,7 @@ module Onebox
|
|
|
53
54
|
forbes.com
|
|
54
55
|
foxnews.com
|
|
55
56
|
funnyordie.com
|
|
57
|
+
gfycat.com
|
|
56
58
|
groupon.com
|
|
57
59
|
howtogeek.com
|
|
58
60
|
huffingtonpost.com
|
|
@@ -129,7 +131,7 @@ module Onebox
|
|
|
129
131
|
# include the entire page HTML. However for some providers like Imgur it allows us
|
|
130
132
|
# to return gifv and galleries.
|
|
131
133
|
def self.default_html_providers
|
|
132
|
-
['Imgur', 'Meetup']
|
|
134
|
+
['Imgur', 'Meetup', 'Gfycat']
|
|
133
135
|
end
|
|
134
136
|
|
|
135
137
|
def self.html_providers
|
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.5.
|
|
4
|
+
version: 1.5.14
|
|
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: 2015-
|
|
13
|
+
date: 2015-03-12 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: multi_json
|