onebox 1.5.13 → 1.5.14

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
2
  SHA1:
3
- metadata.gz: 0f8031763d3695cefd269de23ffe5622d00223f1
4
- data.tar.gz: 338f8b07c36852db96639a76a0a59d2cbbb1b1cf
3
+ metadata.gz: 66774548728354077668c4930c8c3ac05cb0706a
4
+ data.tar.gz: 4eb912093e93670dc737418582a1c2bf3d4ec41f
5
5
  SHA512:
6
- metadata.gz: c3d05b05258d6f3c828a5bd5b5993ead4034a4985b0df80150366d46b0e598dc2f6204d153e0538226e1e07a4fc619552e757de3273d1d8c6dfa56bc38a09766
7
- data.tar.gz: d27d79ab2efe1ad279c61341d09e675b228dcc7e98ec6c1fce5dae4aec014858a1f0883c229758c40c1d9a2c69a376ac632bc9806c4783ca18532b5f2033217b
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
- # avatar: "https://www.gravatar.com/avatar/#{@raw['user']['gravatar_id']}?s=128",
42
- avatar:"https://avatars1.githubusercontent.com/u/#{@raw['user']['id']}?v=2&s=96"
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
@@ -1,3 +1,3 @@
1
1
  module Onebox
2
- VERSION = "1.5.13"
2
+ VERSION = "1.5.14"
3
3
  end
@@ -22,3 +22,7 @@
22
22
  with <strong>{{stats.additions}} additions</strong>
23
23
  and <strong>{{stats.deletions}} deletions</strong>.
24
24
  </div>
25
+
26
+ <div class="github-repository-path">
27
+ <a href="{{repository_url}}" target="_blank">{{repository_path}}</a>
28
+ </div>
@@ -17,6 +17,10 @@
17
17
  </div>
18
18
  </div>
19
19
 
20
+ <div class="github-repository-path">
21
+ <a href="{{repository_url}}" target="_blank">{{repository_path}}</a>
22
+ </div>
23
+
20
24
  <pre class='content' style="white-space: pre-wrap;">{{content}}</pre>
21
25
 
22
26
  <div class='lables'>
@@ -19,3 +19,7 @@
19
19
  with <strong>{{additions}} additions</strong>
20
20
  and <strong>{{deletions}} deletions</strong>.
21
21
  </div>
22
+
23
+ <div class="github-repository-path">
24
+ <a href="{{repository_url}}" target="_blank">{{repository_path}}</a>
25
+ </div>
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.13
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-02-24 00:00:00.000000000 Z
13
+ date: 2015-03-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json