onebox 1.8.39 → 1.8.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/.travis.yml +0 -1
  4. data/README.md +1 -1
  5. data/lib/onebox/engine/amazon_onebox.rb +98 -17
  6. data/lib/onebox/version.rb +3 -1
  7. data/onebox.gemspec +5 -5
  8. data/templates/amazon.mustache +7 -1
  9. metadata +7 -177
  10. data/spec/fixtures/amazon-og.response +0 -3675
  11. data/spec/fixtures/amazon.response +0 -3040
  12. data/spec/fixtures/cloudapp-gif.response +0 -66
  13. data/spec/fixtures/cloudapp-jpg.response +0 -66
  14. data/spec/fixtures/cloudapp-mp4.response +0 -65
  15. data/spec/fixtures/cloudapp-others.response +0 -66
  16. data/spec/fixtures/dailymail.response +0 -5914
  17. data/spec/fixtures/discourse_topic.response +0 -344
  18. data/spec/fixtures/discourse_topic_reply.response +0 -345
  19. data/spec/fixtures/douban.response +0 -4399
  20. data/spec/fixtures/etsy.response +0 -5827
  21. data/spec/fixtures/etsy_mobile.response +0 -4230
  22. data/spec/fixtures/gfycat.response +0 -1
  23. data/spec/fixtures/githubblob.response +0 -46
  24. data/spec/fixtures/githubcommit.response +0 -87
  25. data/spec/fixtures/githubgist.response +0 -310
  26. data/spec/fixtures/githubpullrequest.response +0 -216
  27. data/spec/fixtures/googleplayapp.response +0 -138
  28. data/spec/fixtures/image.response +0 -0
  29. data/spec/fixtures/meetup.response.html +0 -4419
  30. data/spec/fixtures/meetup_oembed.response +0 -1
  31. data/spec/fixtures/pubmed-electronic-xml.response +0 -175
  32. data/spec/fixtures/pubmed-electronic.response +0 -307
  33. data/spec/fixtures/pubmed-xml.response +0 -122
  34. data/spec/fixtures/pubmed.response +0 -300
  35. data/spec/fixtures/slides.response +0 -2852
  36. data/spec/fixtures/stackexchange-answer.response +0 -1
  37. data/spec/fixtures/stackexchange-question.response +0 -1
  38. data/spec/fixtures/twitterstatus.response +0 -2814
  39. data/spec/fixtures/video.response +0 -0
  40. data/spec/fixtures/wechat-mp.response +0 -631
  41. data/spec/fixtures/wikimedia.response +0 -1
  42. data/spec/fixtures/wikipedia.response +0 -566
  43. data/spec/fixtures/wikipediaredirected.response +0 -899
  44. data/spec/fixtures/xkcd.response +0 -1
  45. data/spec/fixtures/youku-meta.response +0 -1
  46. data/spec/fixtures/youku.response +0 -1443
  47. data/spec/fixtures/youtube-channel.response +0 -5446
  48. data/spec/fixtures/youtube-json.response +0 -1
  49. data/spec/fixtures/youtube-list-json.response +0 -1
  50. data/spec/fixtures/youtube.response +0 -1625
  51. data/spec/lib/onebox/engine/amazon_onebox_spec.rb +0 -116
  52. data/spec/lib/onebox/engine/audio_onebox_spec.rb +0 -31
  53. data/spec/lib/onebox/engine/cloudapp_onebox_spec.rb +0 -26
  54. data/spec/lib/onebox/engine/douban_onebox_spec.rb +0 -29
  55. data/spec/lib/onebox/engine/gfycat_onebox_spec.rb +0 -34
  56. data/spec/lib/onebox/engine/github_blob_onebox_spec.rb +0 -21
  57. data/spec/lib/onebox/engine/github_commit_onebox_spec.rb +0 -108
  58. data/spec/lib/onebox/engine/github_gist_onebox_spec.rb +0 -67
  59. data/spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb +0 -46
  60. data/spec/lib/onebox/engine/google_docs_onebox_spec.rb +0 -35
  61. data/spec/lib/onebox/engine/google_maps_onebox_spec.rb +0 -72
  62. data/spec/lib/onebox/engine/google_play_app_onebox_spec.rb +0 -28
  63. data/spec/lib/onebox/engine/html_spec.rb +0 -25
  64. data/spec/lib/onebox/engine/image_onebox_spec.rb +0 -39
  65. data/spec/lib/onebox/engine/json_spec.rb +0 -25
  66. data/spec/lib/onebox/engine/pdf_onebox_spec.rb +0 -28
  67. data/spec/lib/onebox/engine/pubmed_onebox_spec.rb +0 -78
  68. data/spec/lib/onebox/engine/slides_onebox_spec.rb +0 -24
  69. data/spec/lib/onebox/engine/stack_exchange_onebox_spec.rb +0 -97
  70. data/spec/lib/onebox/engine/trello_onebox_spec.rb +0 -30
  71. data/spec/lib/onebox/engine/twitch_clips_onebox_spec.rb +0 -10
  72. data/spec/lib/onebox/engine/twitch_stream_onebox_spec.rb +0 -15
  73. data/spec/lib/onebox/engine/twitch_video_onebox_spec.rb +0 -10
  74. data/spec/lib/onebox/engine/twitter_status_onebox_spec.rb +0 -187
  75. data/spec/lib/onebox/engine/video_onebox_spec.rb +0 -31
  76. data/spec/lib/onebox/engine/wechat_mp_onebox_spec.rb +0 -26
  77. data/spec/lib/onebox/engine/whitelisted_generic_onebox_spec.rb +0 -179
  78. data/spec/lib/onebox/engine/wikimedia_onebox_spec.rb +0 -23
  79. data/spec/lib/onebox/engine/wikipedia_onebox_spec.rb +0 -21
  80. data/spec/lib/onebox/engine/xkcd_spec.rb +0 -27
  81. data/spec/lib/onebox/engine/youku_onebox_spec.rb +0 -13
  82. data/spec/lib/onebox/engine/youtube_onebox_spec.rb +0 -84
  83. data/spec/lib/onebox/engine_spec.rb +0 -101
  84. data/spec/lib/onebox/helpers_spec.rb +0 -73
  85. data/spec/lib/onebox/layout_spec.rb +0 -79
  86. data/spec/lib/onebox/matcher_spec.rb +0 -74
  87. data/spec/lib/onebox/preview_spec.rb +0 -74
  88. data/spec/lib/onebox/status_check_spec.rb +0 -68
  89. data/spec/lib/onebox_spec.rb +0 -65
  90. data/spec/spec_helper.rb +0 -90
  91. data/spec/support/html_spec_helper.rb +0 -18
  92. data/web/assets/javascripts/jquery.js +0 -4
  93. data/web/assets/javascripts/main.js +0 -23
  94. data/web/assets/stylesheets/normalize.css +0 -427
  95. data/web/assets/stylesheets/style.css +0 -25
  96. data/web/views/index.haml +0 -29
  97. data/web/views/layout.haml +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6e4e0c8a8a62c9b418ddbf15ec75621fc48243a18cb105e50f0dd6d9847f1e7
4
- data.tar.gz: 2e5b72ec7e9c108727a2dbeedca54a54e7b4a455ff768ea84d45b8452b4f867b
3
+ metadata.gz: 90d13b7abf1d64e58716b0468c0241ba8dc7e17dca617a4bc42f2de9fb4418d9
4
+ data.tar.gz: 8ffa07d4b9c4808a5b1d319de5e8167164966544a98eab71e329323fc0cdfd73
5
5
  SHA512:
6
- metadata.gz: 152595e5f532e5ddf676d7ab67e6521de6dce24c5baf78be1f20e6322cbf364b73bcb8cac34c7fc191548f6fdbd24e2e94faeb38612bf4826ef01d4655b47c86
7
- data.tar.gz: 1df2097ce7f36b7d5a59b1337a638e1e2d5fe4c6671fe86c51130fa6756bd9e00bdff0435d8ff273af57bd206c42ed31961518e6c7d43443496b9d78dfcd0ac4
6
+ metadata.gz: ff64a9341af4b04893fbcc87fae1b429e9202cc873cf4eb4d90d484c188bc0eb57bff809c633bfd57a4ba8304cfeae788f1d803a0114a9c79440372bd78e631a
7
+ data.tar.gz: 39e2c32467f56af30aa31819d208791c2353df5e9d63d3d6212f032d5333b485692a44f4cc70b6daae7a6779bc8faf1a2cf535b5ee9ac7cf87b31a13075c87f7
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.2
2
+ TargetRubyVersion: 2.3
3
3
  DisabledByDefault: true
4
4
  Include:
5
5
  - '**/*.gemspec'
data/.travis.yml CHANGED
@@ -1,7 +1,6 @@
1
1
  language: ruby
2
2
  sudo: false
3
3
  rvm:
4
- - 2.2
5
4
  - 2.3
6
5
  - 2.4
7
6
  notifications:
data/README.md CHANGED
@@ -76,7 +76,7 @@ Ruby Support
76
76
 
77
77
  The onebox library is supported on all "officially" supported versions of Ruby.
78
78
 
79
- This means you must be on Ruby 2.2 or above for it to work.
79
+ This means you must be on Ruby 2.3 or above for it to work.
80
80
 
81
81
  Development Preview Interface
82
82
  -----------------------------
@@ -49,33 +49,114 @@ module Onebox
49
49
  if (landing_image = raw.css("#landingImage")) && landing_image.any?
50
50
  landing_image.first["src"].to_s
51
51
  end
52
+
53
+ if (ebook_image = raw.css("#ebooksImgBlkFront")) && ebook_image.any?
54
+ ::JSON.parse(ebook_image.first.attributes["data-a-dynamic-image"].value).keys.first
55
+ end
56
+ end
57
+
58
+ def price
59
+ # get item price (Amazon markup is inconsistent, deal with it)
60
+ if raw.css("#priceblock_ourprice .restOfPrice")[0] && raw.css("#priceblock_ourprice .restOfPrice")[0].inner_text
61
+ "#{raw.css("#priceblock_ourprice .restOfPrice")[0].inner_text}#{raw.css("#priceblock_ourprice .buyingPrice")[0].inner_text}.#{raw.css("#priceblock_ourprice .restOfPrice")[1].inner_text}"
62
+ elsif raw.css("#priceblock_dealprice") && (dealprice = raw.css("#priceblock_dealprice span")[0])
63
+ dealprice.inner_text
64
+ elsif !raw.css("#priceblock_ourprice").inner_text.empty?
65
+ raw.css("#priceblock_ourprice").inner_text
66
+ else
67
+ raw.css(".mediaMatrixListItem.a-active .a-color-price").inner_text
68
+ end
69
+ end
70
+
71
+ def multiple_authors(authors_xpath)
72
+ author_list = raw.xpath(authors_xpath)
73
+ authors = []
74
+ author_list.each { |a| authors << a.inner_text.strip }
75
+ authors.join(", ")
52
76
  end
53
77
 
54
78
  def data
55
79
  og = ::Onebox::Helpers.extract_opengraph(raw)
56
- title = og[:title] || CGI.unescapeHTML(raw.css("title").inner_text)
57
80
 
58
- result = {
59
- link: link,
60
- title: title,
61
- image: og[:image] || image
62
- }
81
+ if raw.at_css('#dp.book_mobile') #printed books
82
+ title = raw.at("h1#title")&.inner_text
83
+ authors = raw.at_css('#byline_secondary_view_div') ? multiple_authors("//div[@id='byline_secondary_view_div']//span[@class='a-text-bold']") : raw.at("#byline")&.inner_text
84
+ rating = raw.at("#averageCustomerReviews_feature_div .a-icon")&.inner_text || raw.at("#cmrsArcLink .a-icon")&.inner_text
63
85
 
64
- result[:by_info] = raw.at("#by-line")
65
- result[:by_info] = Onebox::Helpers.clean(result[:by_info].inner_html) if result[:by_info]
86
+ table_xpath = "//div[@id='productDetails_secondary_view_div']//table[@id='productDetails_techSpec_section_1']"
87
+ isbn = raw.xpath("#{table_xpath}//tr[8]//td").inner_text.strip
66
88
 
67
- # get item price (Amazon markup is inconsistent, deal with it)
68
- result[:price] =
69
- if raw.css("#priceblock_ourprice .restOfPrice")[0] && raw.css("#priceblock_ourprice .restOfPrice")[0].inner_text
70
- "#{raw.css("#priceblock_ourprice .restOfPrice")[0].inner_text}#{raw.css("#priceblock_ourprice .buyingPrice")[0].inner_text}.#{raw.css("#priceblock_ourprice .restOfPrice")[1].inner_text}"
71
- elsif raw.css("#priceblock_dealprice") && (dealprice = raw.css("#priceblock_dealprice span")[0])
72
- dealprice.inner_text
89
+ # if ISBN is misplaced or absent it's hard to find out which data is
90
+ # available and where to find it so just set it all to nil
91
+ if /^\d(\-?\d){12}$/.match(isbn)
92
+ publisher = raw.xpath("#{table_xpath}//tr[1]//td").inner_text.strip
93
+ published = raw.xpath("#{table_xpath}//tr[2]//td").inner_text.strip
94
+ book_length = raw.xpath("#{table_xpath}//tr[6]//td").inner_text.strip
73
95
  else
74
- raw.css("#priceblock_ourprice").inner_text
96
+ isbn = publisher = published = book_length = nil
75
97
  end
76
98
 
77
- summary = raw.at("#productDescription")
78
- result[:description] = og[:description] || (summary && summary.inner_text)
99
+ result = {
100
+ link: link,
101
+ title: title,
102
+ by_info: authors,
103
+ image: og[:image] || image,
104
+ description: raw.at("#productDescription")&.inner_text,
105
+ rating: "#{rating}#{', ' if rating && (!isbn&.empty? || !price&.empty?)}",
106
+ price: price,
107
+ isbn_asin_text: "ISBN",
108
+ isbn_asin: isbn,
109
+ publisher: publisher,
110
+ published: "#{published}#{', ' if published && !price&.empty?}"
111
+ }
112
+
113
+ elsif raw.at_css('#dp.ebooks_mobile') # ebooks
114
+ title = raw.at("#ebooksTitle")&.inner_text
115
+ authors = raw.at_css('#a-popover-mobile-udp-contributor-popover-id') ? multiple_authors("//div[@id='a-popover-mobile-udp-contributor-popover-id']//span[contains(@class,'a-text-bold')]") : (raw.at("#byline")&.inner_text&.strip || raw.at("#bylineInfo")&.inner_text&.strip)
116
+ rating = raw.at("#averageCustomerReviews_feature_div .a-icon")&.inner_text || raw.at("#cmrsArcLink .a-icon")&.inner_text || raw.at("#acrCustomerReviewLink .a-icon")&.inner_text
117
+
118
+ table_xpath = "//div[@id='detailBullets_secondary_view_div']//ul"
119
+ asin = raw.xpath("#{table_xpath}//li[4]/span/span[2]").inner_text
120
+
121
+ # if ASIN is misplaced or absent it's hard to find out which data is
122
+ # available and where to find it so just set it all to nil
123
+ if /^[0-9A-Z]{10}$/.match(asin)
124
+ publisher = raw.xpath("#{table_xpath}//li[2]/span/span[2]").inner_text
125
+ published = raw.xpath("#{table_xpath}//li[1]/span/span[2]").inner_text
126
+ else
127
+ asin = publisher = published = nil
128
+ end
129
+
130
+ result = {
131
+ link: link,
132
+ title: title,
133
+ by_info: authors,
134
+ image: og[:image] || image,
135
+ description: raw.at("#productDescription")&.inner_text,
136
+ rating: "#{rating}#{', ' if rating && (!asin&.empty? || !price&.empty?)}",
137
+ price: price,
138
+ isbn_asin_text: "ASIN",
139
+ isbn_asin: asin,
140
+ publisher: publisher,
141
+ published: "#{published}#{', ' if published && !price&.empty?}"
142
+ }
143
+
144
+ else
145
+ title = og[:title] || CGI.unescapeHTML(raw.css("title").inner_text)
146
+ result = {
147
+ link: link,
148
+ title: title,
149
+ image: og[:image] || image,
150
+ price: price
151
+ }
152
+
153
+ result[:by_info] = raw.at("#by-line")
154
+ result[:by_info] = Onebox::Helpers.clean(result[:by_info].inner_html) if result[:by_info]
155
+
156
+ summary = raw.at("#productDescription")
157
+ result[:description] = og[:description] || (summary && summary.inner_text)
158
+ end
159
+
79
160
  result
80
161
  end
81
162
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Onebox
2
- VERSION = "1.8.39"
4
+ VERSION = "1.8.40"
3
5
  end
data/onebox.gemspec CHANGED
@@ -10,14 +10,14 @@ Gem::Specification.new do |spec|
10
10
  spec.version = Onebox::VERSION
11
11
  spec.authors = ['Joanna Zeta', 'Vyki Englert', 'Robin Ward']
12
12
  spec.email = ['holla@jzeta.com', 'vyki.englert@gmail.com', 'robin.ward@gmail.com']
13
- spec.description = %q{A gem for turning URLs into previews.}
13
+ spec.description = %q{A gem for generating embeddable HTML previews from URLs.}
14
14
  spec.summary = spec.description
15
15
  spec.homepage = 'https://github.com/discourse/onebox'
16
16
  spec.license = 'MIT'
17
17
 
18
- spec.files = `git ls-files`.split($/)
19
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ # specs are too heavy to include they have tons of big fixtures
19
+ # Git repo link exists so you can download from there
20
+ spec.files = `git ls-files`.split($/).reject { |s| s =~ /^(spec|web)/ }
21
21
  spec.require_paths = ['lib']
22
22
 
23
23
  spec.add_runtime_dependency 'multi_json', '~> 1.11'
@@ -42,5 +42,5 @@ Gem::Specification.new do |spec|
42
42
  spec.add_development_dependency 'haml', '~> 4.0'
43
43
  spec.add_development_dependency 'listen', '~> 2.10.0'
44
44
 
45
- spec.required_ruby_version = '>=2.2.0'
45
+ spec.required_ruby_version = '>=2.3.0'
46
46
  end
@@ -3,4 +3,10 @@
3
3
  <h3><a href='{{link}}' target='_blank'>{{title}}</a></h3>
4
4
  {{#by_info}}<b>{{by_info}}</b>{{/by_info}}
5
5
  <p>{{description}}</p>
6
- <p><strong>{{price}}</strong></p>
6
+ <p>
7
+ {{#rating}}{{rating}}{{/rating}}
8
+ {{#isbn_asin}}{{isbn_asin_text}}: {{isbn_asin}}, {{/isbn_asin}}
9
+ {{#publisher}}{{publisher}}, {{/publisher}}
10
+ {{#published}}{{published}}{{/published}}
11
+ <strong>{{price}}</strong>
12
+ </p>
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.39
4
+ version: 1.8.40
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-16 00:00:00.000000000 Z
13
+ date: 2018-02-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json
@@ -292,7 +292,7 @@ dependencies:
292
292
  - - "~>"
293
293
  - !ruby/object:Gem::Version
294
294
  version: 2.10.0
295
- description: A gem for turning URLs into previews.
295
+ description: A gem for generating embeddable HTML previews from URLs.
296
296
  email:
297
297
  - holla@jzeta.com
298
298
  - vyki.englert@gmail.com
@@ -383,88 +383,6 @@ files:
383
383
  - lib/onebox/web.rb
384
384
  - lib/onebox/web_helpers.rb
385
385
  - onebox.gemspec
386
- - spec/fixtures/amazon-og.response
387
- - spec/fixtures/amazon.response
388
- - spec/fixtures/cloudapp-gif.response
389
- - spec/fixtures/cloudapp-jpg.response
390
- - spec/fixtures/cloudapp-mp4.response
391
- - spec/fixtures/cloudapp-others.response
392
- - spec/fixtures/dailymail.response
393
- - spec/fixtures/discourse_topic.response
394
- - spec/fixtures/discourse_topic_reply.response
395
- - spec/fixtures/douban.response
396
- - spec/fixtures/etsy.response
397
- - spec/fixtures/etsy_mobile.response
398
- - spec/fixtures/gfycat.response
399
- - spec/fixtures/githubblob.response
400
- - spec/fixtures/githubcommit.response
401
- - spec/fixtures/githubgist.response
402
- - spec/fixtures/githubpullrequest.response
403
- - spec/fixtures/googleplayapp.response
404
- - spec/fixtures/image.response
405
- - spec/fixtures/meetup.response.html
406
- - spec/fixtures/meetup_oembed.response
407
- - spec/fixtures/pubmed-electronic-xml.response
408
- - spec/fixtures/pubmed-electronic.response
409
- - spec/fixtures/pubmed-xml.response
410
- - spec/fixtures/pubmed.response
411
- - spec/fixtures/slides.response
412
- - spec/fixtures/stackexchange-answer.response
413
- - spec/fixtures/stackexchange-question.response
414
- - spec/fixtures/twitterstatus.response
415
- - spec/fixtures/video.response
416
- - spec/fixtures/wechat-mp.response
417
- - spec/fixtures/wikimedia.response
418
- - spec/fixtures/wikipedia.response
419
- - spec/fixtures/wikipediaredirected.response
420
- - spec/fixtures/xkcd.response
421
- - spec/fixtures/youku-meta.response
422
- - spec/fixtures/youku.response
423
- - spec/fixtures/youtube-channel.response
424
- - spec/fixtures/youtube-json.response
425
- - spec/fixtures/youtube-list-json.response
426
- - spec/fixtures/youtube.response
427
- - spec/lib/onebox/engine/amazon_onebox_spec.rb
428
- - spec/lib/onebox/engine/audio_onebox_spec.rb
429
- - spec/lib/onebox/engine/cloudapp_onebox_spec.rb
430
- - spec/lib/onebox/engine/douban_onebox_spec.rb
431
- - spec/lib/onebox/engine/gfycat_onebox_spec.rb
432
- - spec/lib/onebox/engine/github_blob_onebox_spec.rb
433
- - spec/lib/onebox/engine/github_commit_onebox_spec.rb
434
- - spec/lib/onebox/engine/github_gist_onebox_spec.rb
435
- - spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
436
- - spec/lib/onebox/engine/google_docs_onebox_spec.rb
437
- - spec/lib/onebox/engine/google_maps_onebox_spec.rb
438
- - spec/lib/onebox/engine/google_play_app_onebox_spec.rb
439
- - spec/lib/onebox/engine/html_spec.rb
440
- - spec/lib/onebox/engine/image_onebox_spec.rb
441
- - spec/lib/onebox/engine/json_spec.rb
442
- - spec/lib/onebox/engine/pdf_onebox_spec.rb
443
- - spec/lib/onebox/engine/pubmed_onebox_spec.rb
444
- - spec/lib/onebox/engine/slides_onebox_spec.rb
445
- - spec/lib/onebox/engine/stack_exchange_onebox_spec.rb
446
- - spec/lib/onebox/engine/trello_onebox_spec.rb
447
- - spec/lib/onebox/engine/twitch_clips_onebox_spec.rb
448
- - spec/lib/onebox/engine/twitch_stream_onebox_spec.rb
449
- - spec/lib/onebox/engine/twitch_video_onebox_spec.rb
450
- - spec/lib/onebox/engine/twitter_status_onebox_spec.rb
451
- - spec/lib/onebox/engine/video_onebox_spec.rb
452
- - spec/lib/onebox/engine/wechat_mp_onebox_spec.rb
453
- - spec/lib/onebox/engine/whitelisted_generic_onebox_spec.rb
454
- - spec/lib/onebox/engine/wikimedia_onebox_spec.rb
455
- - spec/lib/onebox/engine/wikipedia_onebox_spec.rb
456
- - spec/lib/onebox/engine/xkcd_spec.rb
457
- - spec/lib/onebox/engine/youku_onebox_spec.rb
458
- - spec/lib/onebox/engine/youtube_onebox_spec.rb
459
- - spec/lib/onebox/engine_spec.rb
460
- - spec/lib/onebox/helpers_spec.rb
461
- - spec/lib/onebox/layout_spec.rb
462
- - spec/lib/onebox/matcher_spec.rb
463
- - spec/lib/onebox/preview_spec.rb
464
- - spec/lib/onebox/status_check_spec.rb
465
- - spec/lib/onebox_spec.rb
466
- - spec/spec_helper.rb
467
- - spec/support/html_spec_helper.rb
468
386
  - templates/_layout.mustache
469
387
  - templates/amazon.mustache
470
388
  - templates/douban.mustache
@@ -485,12 +403,6 @@ files:
485
403
  - templates/wikimedia.mustache
486
404
  - templates/wikipedia.mustache
487
405
  - templates/xkcd.mustache
488
- - web/assets/javascripts/jquery.js
489
- - web/assets/javascripts/main.js
490
- - web/assets/stylesheets/normalize.css
491
- - web/assets/stylesheets/style.css
492
- - web/views/index.haml
493
- - web/views/layout.haml
494
406
  homepage: https://github.com/discourse/onebox
495
407
  licenses:
496
408
  - MIT
@@ -503,7 +415,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
503
415
  requirements:
504
416
  - - ">="
505
417
  - !ruby/object:Gem::Version
506
- version: 2.2.0
418
+ version: 2.3.0
507
419
  required_rubygems_version: !ruby/object:Gem::Requirement
508
420
  requirements:
509
421
  - - ">="
@@ -511,90 +423,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
511
423
  version: '0'
512
424
  requirements: []
513
425
  rubyforge_project:
514
- rubygems_version: 2.7.4
426
+ rubygems_version: 2.7.3
515
427
  signing_key:
516
428
  specification_version: 4
517
- summary: A gem for turning URLs into previews.
518
- test_files:
519
- - spec/fixtures/amazon-og.response
520
- - spec/fixtures/amazon.response
521
- - spec/fixtures/cloudapp-gif.response
522
- - spec/fixtures/cloudapp-jpg.response
523
- - spec/fixtures/cloudapp-mp4.response
524
- - spec/fixtures/cloudapp-others.response
525
- - spec/fixtures/dailymail.response
526
- - spec/fixtures/discourse_topic.response
527
- - spec/fixtures/discourse_topic_reply.response
528
- - spec/fixtures/douban.response
529
- - spec/fixtures/etsy.response
530
- - spec/fixtures/etsy_mobile.response
531
- - spec/fixtures/gfycat.response
532
- - spec/fixtures/githubblob.response
533
- - spec/fixtures/githubcommit.response
534
- - spec/fixtures/githubgist.response
535
- - spec/fixtures/githubpullrequest.response
536
- - spec/fixtures/googleplayapp.response
537
- - spec/fixtures/image.response
538
- - spec/fixtures/meetup.response.html
539
- - spec/fixtures/meetup_oembed.response
540
- - spec/fixtures/pubmed-electronic-xml.response
541
- - spec/fixtures/pubmed-electronic.response
542
- - spec/fixtures/pubmed-xml.response
543
- - spec/fixtures/pubmed.response
544
- - spec/fixtures/slides.response
545
- - spec/fixtures/stackexchange-answer.response
546
- - spec/fixtures/stackexchange-question.response
547
- - spec/fixtures/twitterstatus.response
548
- - spec/fixtures/video.response
549
- - spec/fixtures/wechat-mp.response
550
- - spec/fixtures/wikimedia.response
551
- - spec/fixtures/wikipedia.response
552
- - spec/fixtures/wikipediaredirected.response
553
- - spec/fixtures/xkcd.response
554
- - spec/fixtures/youku-meta.response
555
- - spec/fixtures/youku.response
556
- - spec/fixtures/youtube-channel.response
557
- - spec/fixtures/youtube-json.response
558
- - spec/fixtures/youtube-list-json.response
559
- - spec/fixtures/youtube.response
560
- - spec/lib/onebox/engine/amazon_onebox_spec.rb
561
- - spec/lib/onebox/engine/audio_onebox_spec.rb
562
- - spec/lib/onebox/engine/cloudapp_onebox_spec.rb
563
- - spec/lib/onebox/engine/douban_onebox_spec.rb
564
- - spec/lib/onebox/engine/gfycat_onebox_spec.rb
565
- - spec/lib/onebox/engine/github_blob_onebox_spec.rb
566
- - spec/lib/onebox/engine/github_commit_onebox_spec.rb
567
- - spec/lib/onebox/engine/github_gist_onebox_spec.rb
568
- - spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
569
- - spec/lib/onebox/engine/google_docs_onebox_spec.rb
570
- - spec/lib/onebox/engine/google_maps_onebox_spec.rb
571
- - spec/lib/onebox/engine/google_play_app_onebox_spec.rb
572
- - spec/lib/onebox/engine/html_spec.rb
573
- - spec/lib/onebox/engine/image_onebox_spec.rb
574
- - spec/lib/onebox/engine/json_spec.rb
575
- - spec/lib/onebox/engine/pdf_onebox_spec.rb
576
- - spec/lib/onebox/engine/pubmed_onebox_spec.rb
577
- - spec/lib/onebox/engine/slides_onebox_spec.rb
578
- - spec/lib/onebox/engine/stack_exchange_onebox_spec.rb
579
- - spec/lib/onebox/engine/trello_onebox_spec.rb
580
- - spec/lib/onebox/engine/twitch_clips_onebox_spec.rb
581
- - spec/lib/onebox/engine/twitch_stream_onebox_spec.rb
582
- - spec/lib/onebox/engine/twitch_video_onebox_spec.rb
583
- - spec/lib/onebox/engine/twitter_status_onebox_spec.rb
584
- - spec/lib/onebox/engine/video_onebox_spec.rb
585
- - spec/lib/onebox/engine/wechat_mp_onebox_spec.rb
586
- - spec/lib/onebox/engine/whitelisted_generic_onebox_spec.rb
587
- - spec/lib/onebox/engine/wikimedia_onebox_spec.rb
588
- - spec/lib/onebox/engine/wikipedia_onebox_spec.rb
589
- - spec/lib/onebox/engine/xkcd_spec.rb
590
- - spec/lib/onebox/engine/youku_onebox_spec.rb
591
- - spec/lib/onebox/engine/youtube_onebox_spec.rb
592
- - spec/lib/onebox/engine_spec.rb
593
- - spec/lib/onebox/helpers_spec.rb
594
- - spec/lib/onebox/layout_spec.rb
595
- - spec/lib/onebox/matcher_spec.rb
596
- - spec/lib/onebox/preview_spec.rb
597
- - spec/lib/onebox/status_check_spec.rb
598
- - spec/lib/onebox_spec.rb
599
- - spec/spec_helper.rb
600
- - spec/support/html_spec_helper.rb
429
+ summary: A gem for generating embeddable HTML previews from URLs.
430
+ test_files: []