onebox 2.2.8 → 2.2.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +0 -4
  3. data/lib/onebox/engine.rb +1 -1
  4. data/lib/onebox/engine/allowlisted_generic_onebox.rb +11 -9
  5. data/lib/onebox/engine/amazon_onebox.rb +34 -12
  6. data/lib/onebox/engine/asciinema_onebox.rb +0 -1
  7. data/lib/onebox/engine/audioboom_onebox.rb +5 -2
  8. data/lib/onebox/engine/bandcamp_onebox.rb +8 -8
  9. data/lib/onebox/engine/cloudapp_onebox.rb +12 -12
  10. data/lib/onebox/engine/coub_onebox.rb +0 -1
  11. data/lib/onebox/engine/facebook_media_onebox.rb +8 -7
  12. data/lib/onebox/engine/five_hundred_px_onebox.rb +0 -1
  13. data/lib/onebox/engine/flickr_onebox.rb +14 -15
  14. data/lib/onebox/engine/gfycat_onebox.rb +1 -1
  15. data/lib/onebox/engine/giphy_onebox.rb +0 -1
  16. data/lib/onebox/engine/github_blob_onebox.rb +4 -0
  17. data/lib/onebox/engine/github_commit_onebox.rb +2 -3
  18. data/lib/onebox/engine/github_gist_onebox.rb +1 -2
  19. data/lib/onebox/engine/github_issue_onebox.rb +16 -18
  20. data/lib/onebox/engine/github_pullrequest_onebox.rb +9 -1
  21. data/lib/onebox/engine/gitlab_blob_onebox.rb +4 -0
  22. data/lib/onebox/engine/google_calendar_onebox.rb +1 -1
  23. data/lib/onebox/engine/google_docs_onebox.rb +8 -8
  24. data/lib/onebox/engine/google_drive_onebox.rb +7 -7
  25. data/lib/onebox/engine/google_maps_onebox.rb +0 -2
  26. data/lib/onebox/engine/google_photos_onebox.rb +14 -14
  27. data/lib/onebox/engine/google_play_app_onebox.rb +3 -7
  28. data/lib/onebox/engine/html.rb +5 -1
  29. data/lib/onebox/engine/instagram_onebox.rb +2 -2
  30. data/lib/onebox/engine/kaltura_onebox.rb +8 -6
  31. data/lib/onebox/engine/opengraph_image.rb +0 -1
  32. data/lib/onebox/engine/pastebin_onebox.rb +1 -1
  33. data/lib/onebox/engine/pubmed_onebox.rb +3 -2
  34. data/lib/onebox/engine/replit_onebox.rb +0 -1
  35. data/lib/onebox/engine/sketchfab_onebox.rb +8 -8
  36. data/lib/onebox/engine/slides_onebox.rb +10 -10
  37. data/lib/onebox/engine/soundcloud_onebox.rb +0 -1
  38. data/lib/onebox/engine/stack_exchange_onebox.rb +2 -1
  39. data/lib/onebox/engine/standard_embed.rb +2 -2
  40. data/lib/onebox/engine/steam_store_onebox.rb +6 -5
  41. data/lib/onebox/engine/trello_onebox.rb +2 -2
  42. data/lib/onebox/engine/twitch_clips_onebox.rb +1 -3
  43. data/lib/onebox/engine/twitch_stream_onebox.rb +1 -2
  44. data/lib/onebox/engine/twitch_video_onebox.rb +0 -2
  45. data/lib/onebox/engine/twitter_status_onebox.rb +1 -1
  46. data/lib/onebox/engine/typeform_onebox.rb +7 -6
  47. data/lib/onebox/engine/vimeo_onebox.rb +9 -7
  48. data/lib/onebox/engine/wikimedia_onebox.rb +1 -2
  49. data/lib/onebox/engine/wikipedia_onebox.rb +12 -8
  50. data/lib/onebox/engine/youku_onebox.rb +7 -7
  51. data/lib/onebox/engine/youtube_onebox.rb +46 -17
  52. data/lib/onebox/file_type_finder.rb +0 -1
  53. data/lib/onebox/helpers.rb +25 -14
  54. data/lib/onebox/mixins/git_blob_onebox.rb +5 -3
  55. data/lib/onebox/mixins/github_body.rb +30 -0
  56. data/lib/onebox/mixins/twitch_onebox.rb +0 -1
  57. data/lib/onebox/preview.rb +1 -2
  58. data/lib/onebox/sanitize_config.rb +1 -1
  59. data/lib/onebox/version.rb +1 -1
  60. data/templates/github/github_body.mustache +3 -0
  61. data/templates/githubissue.mustache +7 -9
  62. data/templates/githubpullrequest.mustache +1 -0
  63. metadata +7 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5899faff4b0c2e96d766892a810e866e28a188dbd7b9e8b2c7bdd6bc5a7d7490
4
- data.tar.gz: 7d739d48349f32dc3f0675d85b29446d6f758f276b845543cc9f9d359c9eb664
3
+ metadata.gz: ee0229502d76efea853fff81a0e756e33867b7034219bb56805dcf891ab42207
4
+ data.tar.gz: 9e6f581f0dd784f0edb841c05f4faa785bae4cfaf4ac2c482050034ead36b912
5
5
  SHA512:
6
- metadata.gz: 790964df42c83ea05ff052727a7ad4b567f6064be1a25bf974eeac661a6f7daa3696c64686f21bb83df30ad280caffc36b2039e3c0b799a3171713d61c88eff2
7
- data.tar.gz: de30b5e5e6110fd72c0aa792aebffa7571c50f04604efedac648e754a527f4945a784328eb43ce0352e9b06eeac908ea23ff0dcdf3ce4d84ecb5e8c3dd64dfd6
6
+ metadata.gz: 7139dd42d40ebf30b4228c41018db4408fd53c196838c0b8d94afae27ba30d1ba258fc57fbea7ff432619f473a2e22c86b62251c094591f9a9ec90693b768655
7
+ data.tar.gz: 69d506c95f5fbf5526967195ce5f9c1224c1af71f72f0477063e4a8a0e59b8ab4300270cc28aae2cfc74f5e41187b3e3aed11b1656e83c0e766293eb932ca84a
data/.rspec CHANGED
@@ -1,5 +1 @@
1
1
  --color
2
- --format documentation
3
- --fail-fast
4
- --backtrace
5
-
data/lib/onebox/engine.rb CHANGED
@@ -136,7 +136,7 @@ module Onebox
136
136
  end
137
137
 
138
138
  def always_https?
139
- @https
139
+ defined?(@https) ? @https : false
140
140
  end
141
141
  end
142
142
  end
@@ -374,15 +374,17 @@ module Onebox
374
374
  escaped_image_src = ::Onebox::Helpers.normalize_url_for_output(data[:image])
375
375
 
376
376
  <<-HTML
377
- <video title='#{data[:title]}'
378
- width='#{data[:video_width]}'
379
- height='#{data[:video_height]}'
380
- style='max-width:100%'
381
- poster='#{escaped_image_src}'
382
- controls=''>
383
- <source src='#{escaped_video_src}'>
384
- </video>
385
- HTML
377
+ <video
378
+ title='#{data[:title]}'
379
+ width='#{data[:video_width]}'
380
+ height='#{data[:video_height]}'
381
+ style='max-width:100%'
382
+ poster='#{escaped_image_src}'
383
+ controls=''
384
+ >
385
+ <source src='#{escaped_video_src}'>
386
+ </video>
387
+ HTML
386
388
  end
387
389
 
388
390
  def embedded_html
@@ -11,31 +11,46 @@ module Onebox
11
11
  include HTML
12
12
 
13
13
  always_https
14
- matches_regexp(/^https?:\/\/(?:www\.)?(?:smile\.)?(amazon|amzn)\.(?<tld>com|ca|de|it|es|fr|co\.jp|co\.uk|cn|in|com\.br|com\.mx)\//)
14
+ matches_regexp(/^https?:\/\/(?:www\.)?(?:smile\.)?(amazon|amzn)\.(?<tld>com|ca|de|it|es|fr|co\.jp|co\.uk|cn|in|com\.br|com\.mx|nl|pl|sa|sg|se|com\.tr|ae)\//)
15
15
 
16
16
  def url
17
+ @raw ||= nil
18
+
19
+ # If possible, fetch the cached HTML body immediately so we can
20
+ # try to grab the canonical URL from that document,
21
+ # rather than guess at the best URL structure to use
22
+ if body_cacher&.respond_to?('cache_response_body?')
23
+ if body_cacher.cache_response_body?(uri.to_s) && body_cacher.cached_response_body_exists?(uri.to_s)
24
+ @raw ||= Onebox::Helpers.fetch_html_doc(@url, http_params, body_cacher)
25
+ end
26
+ end
27
+
28
+ if @raw
29
+ canonical_link = @raw.at('//link[@rel="canonical"]/@href')
30
+ return canonical_link.to_s if canonical_link
31
+ end
32
+
17
33
  if match && match[:id]
18
- return "https://www.amazon.#{tld}/gp/aw/d/#{Onebox::Helpers.uri_encode(match[:id])}"
34
+ return "https://www.amazon.#{tld}/dp/#{Onebox::Helpers.uri_encode(match[:id])}"
19
35
  end
20
36
 
21
37
  @url
22
38
  end
23
39
 
24
40
  def tld
25
- @tld || @@matcher.match(@url)["tld"]
41
+ @tld ||= @@matcher.match(@url)["tld"]
26
42
  end
27
43
 
28
44
  def http_params
29
- {
30
- 'User-Agent' =>
31
- 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'
32
- }
45
+ if @options && @options[:user_agent]
46
+ { 'User-Agent' => @options[:user_agent] }
47
+ end
33
48
  end
34
49
 
35
50
  private
36
51
 
37
52
  def match
38
- @match ||= @url.match(/(?:d|g)p\/(?:product\/|video\/detail\/)?(?<id>[^\/]+)(?:\/|$)/mi)
53
+ @match ||= @url.match(/(?:d|g)p\/(?:product\/|video\/detail\/)?(?<id>[A-Z0-9]+)(?:\/|\?|$)/mi)
39
54
  end
40
55
 
41
56
  def image
@@ -50,6 +65,10 @@ module Onebox
50
65
  end
51
66
 
52
67
  if (landing_image = raw.css("#landingImage")) && landing_image.any?
68
+ attributes = landing_image.first.attributes
69
+
70
+ return attributes["data-old-hires"].to_s if attributes["data-old-hires"]
71
+
53
72
  landing_image.first["src"].to_s
54
73
  end
55
74
 
@@ -100,7 +119,7 @@ module Onebox
100
119
  end
101
120
 
102
121
  result = {
103
- link: link,
122
+ link: url,
104
123
  title: title,
105
124
  by_info: authors,
106
125
  image: og.image || image,
@@ -131,7 +150,7 @@ module Onebox
131
150
  end
132
151
 
133
152
  result = {
134
- link: link,
153
+ link: url,
135
154
  title: title,
136
155
  by_info: authors,
137
156
  image: og.image || image,
@@ -147,7 +166,7 @@ module Onebox
147
166
  else
148
167
  title = og.title || CGI.unescapeHTML(raw.css("title").inner_text)
149
168
  result = {
150
- link: link,
169
+ link: url,
151
170
  title: title,
152
171
  image: og.image || image,
153
172
  price: price
@@ -157,7 +176,10 @@ module Onebox
157
176
  result[:by_info] = Onebox::Helpers.clean(result[:by_info].inner_html) if result[:by_info]
158
177
 
159
178
  summary = raw.at("#productDescription")
160
- result[:description] = og.description || (summary && summary.inner_text) || CGI.unescapeHTML(Onebox::Helpers.truncate(raw.css("meta[name=description]").first["content"], 250))
179
+
180
+ description = og.description || summary&.inner_text
181
+ description ||= raw.css("meta[name=description]").first&.[]("content")
182
+ result[:description] = CGI.unescapeHTML(Onebox::Helpers.truncate(description, 250)) if description
161
183
  end
162
184
 
163
185
  result[:price] = nil if result[:price].start_with?("$0") || result[:price] == 0
@@ -7,7 +7,6 @@ module Onebox
7
7
  include StandardEmbed
8
8
 
9
9
  always_https
10
-
11
10
  matches_regexp(/^https?:\/\/asciinema\.org\/a\/[\p{Alnum}_\-]+$/)
12
11
 
13
12
  def to_html
@@ -13,14 +13,17 @@ module Onebox
13
13
  oembed = get_oembed
14
14
 
15
15
  <<-HTML
16
- <img src="#{oembed.thumbnail_url}" style="max-width: #{oembed.width}px; max-height: #{oembed.height}px;" #{oembed.title_attr}>
16
+ <img
17
+ src="#{oembed.thumbnail_url}"
18
+ style="max-width: #{oembed.width}px; max-height: #{oembed.height}px;"
19
+ #{oembed.title_attr}
20
+ >
17
21
  HTML
18
22
  end
19
23
 
20
24
  def to_html
21
25
  get_oembed.html
22
26
  end
23
-
24
27
  end
25
28
  end
26
29
  end
@@ -20,16 +20,16 @@ module Onebox
20
20
  escaped_src = og.video_secure_url || og.video
21
21
 
22
22
  <<-HTML
23
- <iframe src="#{escaped_src}"
24
- width="#{og.video_width}"
25
- height="#{og.video_height}"
26
- scrolling="no"
27
- frameborder="0"
28
- allowfullscreen>
29
- </iframe>
23
+ <iframe
24
+ src="#{escaped_src}"
25
+ width="#{og.video_width}"
26
+ height="#{og.video_height}"
27
+ scrolling="no"
28
+ frameborder="0"
29
+ allowfullscreen
30
+ ></iframe>
30
31
  HTML
31
32
  end
32
-
33
33
  end
34
34
  end
35
35
  end
@@ -25,28 +25,28 @@ module Onebox
25
25
 
26
26
  def link_html(og)
27
27
  <<-HTML
28
- <a href='#{og.url}' target='_blank' rel='noopener'>
29
- #{og.title}
30
- </a>
31
- HTML
28
+ <a href='#{og.url}' target='_blank' rel='noopener'>
29
+ #{og.title}
30
+ </a>
31
+ HTML
32
32
  end
33
33
 
34
34
  def video_html(og)
35
35
  direct_src = ::Onebox::Helpers.normalize_url_for_output("#{og.get(:url)}/#{og.title}")
36
36
 
37
37
  <<-HTML
38
- <video width='480' height='360' #{og.title_attr} controls loop>
39
- <source src='#{direct_src}' type='video/mp4'>
40
- </video>
41
- HTML
38
+ <video width='480' height='360' #{og.title_attr} controls loop>
39
+ <source src='#{direct_src}' type='video/mp4'>
40
+ </video>
41
+ HTML
42
42
  end
43
43
 
44
44
  def image_html(og)
45
45
  <<-HTML
46
- <a href='#{og.url}' target='_blank' class='onebox' rel='noopener'>
47
- <img src='#{og.image}' #{og.title_attr} alt='CloudApp' width='480'>
48
- </a>
49
- HTML
46
+ <a href='#{og.url}' target='_blank' class='onebox' rel='noopener'>
47
+ <img src='#{og.image}' #{og.title_attr} alt='CloudApp' width='480'>
48
+ </a>
49
+ HTML
50
50
  end
51
51
  end
52
52
  end
@@ -17,7 +17,6 @@ module Onebox
17
17
  def to_html
18
18
  get_oembed.html
19
19
  end
20
-
21
20
  end
22
21
  end
23
22
  end
@@ -14,13 +14,14 @@ module Onebox
14
14
  metadata = get_twitter
15
15
  if metadata.present? && metadata[:card] == "player" && metadata[:player].present?
16
16
  <<-HTML
17
- <iframe src="#{metadata[:player]}"
18
- width="#{metadata[:player_width]}"
19
- height="#{metadata[:player_height]}"
20
- scrolling="no"
21
- frameborder="0"
22
- allowfullscreen>
23
- </iframe>
17
+ <iframe
18
+ src="#{metadata[:player]}"
19
+ width="#{metadata[:player_width]}"
20
+ height="#{metadata[:player_height]}"
21
+ scrolling="no"
22
+ frameborder="0"
23
+ allowfullscreen
24
+ ></iframe>
24
25
  HTML
25
26
  else
26
27
  html = Onebox::Engine::AllowlistedGenericOnebox.new(@url, @timeout).to_html
@@ -13,7 +13,6 @@ module Onebox
13
13
  og = get_opengraph
14
14
  "<img src='#{og.image}' width='#{og.image_width}' height='#{og.image_height}' class='onebox' #{og.title_attr}>"
15
15
  end
16
-
17
16
  end
18
17
  end
19
18
  end
@@ -25,29 +25,28 @@ module Onebox
25
25
  album_title = "[Album] #{og.title}"
26
26
 
27
27
  <<-HTML
28
- <div class='onebox flickr-album'>
29
- <a href='#{escaped_url}' target='_blank' rel='noopener'>
30
- <span class='outer-box' style='max-width:#{og.image_width}px'>
31
- <span class='inner-box'>
32
- <span class='album-title'>#{album_title}</span>
33
- </span>
28
+ <div class='onebox flickr-album'>
29
+ <a href='#{escaped_url}' target='_blank' rel='noopener'>
30
+ <span class='outer-box' style='max-width:#{og.image_width}px'>
31
+ <span class='inner-box'>
32
+ <span class='album-title'>#{album_title}</span>
34
33
  </span>
35
- <img src='#{og.get_secure_image}' #{og.title_attr} height='#{og.image_height}' width='#{og.image_width}'>
36
- </a>
37
- </div>
38
- HTML
34
+ </span>
35
+ <img src='#{og.get_secure_image}' #{og.title_attr} height='#{og.image_height}' width='#{og.image_width}'>
36
+ </a>
37
+ </div>
38
+ HTML
39
39
  end
40
40
 
41
41
  def image_html(og)
42
42
  escaped_url = ::Onebox::Helpers.normalize_url_for_output(url)
43
43
 
44
44
  <<-HTML
45
- <a href='#{escaped_url}' target='_blank' rel='noopener' class="onebox">
46
- <img src='#{og.get_secure_image}' #{og.title_attr} alt='Imgur' height='#{og.image_height}' width='#{og.image_width}'>
47
- </a>
48
- HTML
45
+ <a href='#{escaped_url}' target='_blank' rel='noopener' class="onebox">
46
+ <img src='#{og.get_secure_image}' #{og.title_attr} alt='Imgur' height='#{og.image_height}' width='#{og.image_width}'>
47
+ </a>
48
+ HTML
49
49
  end
50
-
51
50
  end
52
51
  end
53
52
  end
@@ -63,7 +63,7 @@ module Onebox
63
63
 
64
64
  def nokogiri_page
65
65
  @nokogiri_page ||= begin
66
- response = Onebox::Helpers.fetch_response(url, 10) rescue nil
66
+ response = Onebox::Helpers.fetch_response(url, redirect_limit: 10) rescue nil
67
67
  Nokogiri::HTML(response)
68
68
  end
69
69
  end
@@ -18,7 +18,6 @@ module Onebox
18
18
  </a>
19
19
  HTML
20
20
  end
21
-
22
21
  end
23
22
  end
24
23
  end
@@ -8,17 +8,21 @@ module Onebox
8
8
  def self.git_regexp
9
9
  /^https?:\/\/(www\.)?github\.com.*\/blob\//
10
10
  end
11
+
11
12
  def self.onebox_name
12
13
  "githubblob"
13
14
  end
14
15
 
15
16
  include Onebox::Mixins::GitBlobOnebox
17
+
16
18
  def raw_regexp
17
19
  /github\.com\/(?<user>[^\/]+)\/(?<repo>[^\/]+)\/blob\/(?<sha1>[^\/]+)\/(?<file>[^#]+)(#(L(?<from>[^-]*)(-L(?<to>.*))?))?/mi
18
20
  end
21
+
19
22
  def raw_template(m)
20
23
  "https://raw.githubusercontent.com/#{m[:user]}/#{m[:repo]}/#{m[:sha1]}/#{m[:file]}"
21
24
  end
25
+
22
26
  def title
23
27
  Sanitize.fragment(Onebox::Helpers.uri_unencode(link).sub(/^https?\:\/\/github\.com\//, ''))
24
28
  end
@@ -17,11 +17,10 @@ module Onebox
17
17
  private
18
18
 
19
19
  def match
20
- return @match if @match
20
+ return @match if defined?(@match)
21
21
 
22
22
  @match = @url.match(%{github\.com/(?<owner>[^/]+)/(?<repository>[^/]+)/commit/(?<sha>[^/]+)})
23
-
24
- @match = @url.match(%{github\.com/(?<owner>[^/]+)/(?<repository>[^/]+)/pull/(?<pr>[^/]+)/commit/(?<sha>[^/]+)}) if @match.nil?
23
+ @match ||= @url.match(%{github\.com/(?<owner>[^/]+)/(?<repository>[^/]+)/pull/(?<pr>[^/]+)/commit/(?<sha>[^/]+)})
25
24
 
26
25
  @match
27
26
  end
@@ -9,7 +9,7 @@ module Onebox
9
9
 
10
10
  MAX_FILES = 3
11
11
 
12
- matches_regexp Regexp.new("^http(?:s)?://gist\\.(?:(?:\\w)+\\.)?(github)\\.com(?:/)?")
12
+ matches_regexp(/^http(?:s)?:\/\/gist\.(?:(?:\w)+\.)?(github)\.com(?:\/)?/)
13
13
  always_https
14
14
 
15
15
  def url
@@ -76,7 +76,6 @@ module Onebox
76
76
  @lines ||= @json["content"].split("\n")
77
77
  end
78
78
  end
79
-
80
79
  end
81
80
  end
82
81
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative '../mixins/github_body'
4
+
3
5
  module Onebox
4
6
  module Engine
5
7
  class GithubIssueOnebox
@@ -7,7 +9,9 @@ module Onebox
7
9
  include Engine
8
10
  include LayoutSupport
9
11
  include JSON
10
- matches_regexp Regexp.new("^https?:\/\/(?:www\.)?(?:(?:\w)+\.)?github\.com\/(?<org>.+)\/(?<repo>.+)\/issues\/([[:digit:]]+)")
12
+ include Onebox::Mixins::GithubBody
13
+
14
+ matches_regexp(/^https?:\/\/(?:www\.)?(?:(?:\w)+\.)?github\.com\/(?<org>.+)\/(?<repo>.+)\/issues\/([[:digit:]]+)/)
11
15
  always_https
12
16
 
13
17
  def url
@@ -22,32 +26,26 @@ module Onebox
22
26
  end
23
27
 
24
28
  def data
25
- @raw ||= ::MultiJson.load(URI.open(url, "Accept" => "application/vnd.github.v3.text+json", read_timeout: timeout)) #custom Accept header so we can get body as text.
26
- body_text = @raw["body_text"]
27
-
28
- content_words = body_text.gsub("\n\n", "\n").gsub("\n", "<br>").split(" ") #one pass of removing double newline, then we change \n to <br> and later on we revert it back to \n this is a workaround to avoid losing newlines after we join it back.
29
- max_words = 20
30
- short_content = content_words[0..max_words].join(" ")
31
- short_content += "..." if content_words.length > max_words
32
-
33
- created_at = Time.parse(@raw['created_at'])
34
- closed_at = Time.parse(@raw['closed_at']) if @raw['closed_at']
35
-
29
+ created_at = Time.parse(raw['created_at'])
30
+ closed_at = Time.parse(raw['closed_at']) if raw['closed_at']
31
+ body, excerpt = compute_body(raw['body'])
36
32
  ulink = URI(link)
33
+
37
34
  {
38
35
  link: @url,
39
- title: @raw["title"],
40
- content: short_content.gsub("<br>", "\n"),
41
- labels: @raw["labels"],
42
- user: @raw['user'],
36
+ title: raw["title"],
37
+ body: body,
38
+ excerpt: excerpt,
39
+ labels: raw["labels"],
40
+ user: raw['user'],
43
41
  created_at: created_at.strftime("%I:%M%p - %d %b %y %Z"),
44
42
  created_at_date: created_at.strftime("%F"),
45
43
  created_at_time: created_at.strftime("%T"),
46
44
  closed_at: closed_at&.strftime("%I:%M%p - %d %b %y %Z"),
47
45
  closed_at_date: closed_at&.strftime("%F"),
48
46
  closed_at_time: closed_at&.strftime("%T"),
49
- closed_by: @raw['closed_by'],
50
- avatar: "https://avatars1.githubusercontent.com/u/#{@raw['user']['id']}?v=2&s=96",
47
+ closed_by: raw['closed_by'],
48
+ avatar: "https://avatars1.githubusercontent.com/u/#{raw['user']['id']}?v=2&s=96",
51
49
  domain: "#{ulink.host}/#{ulink.path.split('/')[1]}/#{ulink.path.split('/')[2]}",
52
50
  }
53
51
  end