directlink 0.0.4.13 → 0.0.5.0

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: 14f2adc0cf8da9dfce19145a8f06ed28c8393555
4
- data.tar.gz: c952263512c3d1c467c287fa7e30245b9a88e844
3
+ metadata.gz: e712b540373ddcb6f3c581a5bf050b97e3cd6df4
4
+ data.tar.gz: b41a9f3507c1349cb65da813b9b066765a4fcc49
5
5
  SHA512:
6
- metadata.gz: 1e1ebcd757a4baed3ce59de52ba1c23a9c8546f849991e75b513971546b4a41ec08869e95907aaece5dc98f8308c2ed8b2941d71e778257e21d590cdecd83a62
7
- data.tar.gz: bdff382c7ea916ec43b3f7d8a03804b11d33d43963a218c706de43011e2e1f5923aa2a88bb2d0f7f919c1945518564d5e6d87a7840468a78604e991813d59164
6
+ metadata.gz: e03fbb4b2763fb132d712f65f442e92c78c41b5626b37e76cf3dfc17713a220764cdbda65dbac13fa92095171c8149d603863654aa1e29831ea56417b9728a3f
7
+ data.tar.gz: 0af11c87c73bf0edd5ec0b56daff76a10f8446586ccb923fdf18e970b1ea153438868a1a070f5a25e203a441a24a5641e91cd4c52c50247662eb469764cd01ce
data/.travis.yml CHANGED
@@ -30,8 +30,8 @@ matrix:
30
30
  # the 'The command "bundle install --jobs=3 --retry=3" failed and exited with 1 during .'
31
31
  # I guess Travis is deprecating old Rubies and so will I
32
32
  - rvm: 2.0
33
- os: linux
33
+ os: osx
34
34
  - rvm: 2.1
35
- os: linux
35
+ os: osx
36
36
  - rvm: 2.2
37
- os: linux
37
+ os: osx
data/directlink.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "directlink"
3
- spec.version = "0.0.4.13"
3
+ spec.version = "0.0.5.0"
4
4
  spec.summary = "converts any kind of image hyperlink to direct link, type of image and its resolution"
5
5
 
6
6
  spec.author = "Victor Maslov aka Nakilon"
data/lib/directlink.rb CHANGED
@@ -40,7 +40,7 @@ module DirectLink
40
40
  # this can handle links without schema because it's used for parsing community HTML pages
41
41
  case src
42
42
  # Google Plus post image
43
- when /\A(https:\/\/lh3\.googleusercontent\.com\/-[a-zA-Z0-9_-]{11}\/[WX][a-zA-Z0-9_-]{9}I\/AAAAAAA[a-zA-Z0-9_-]{4}\/[a-zA-Z0-9_-]{33}(?:[gwAQ]?CJoC|CL0B(?:GAs)?)\/)w[1-5]\d\d(?:-d)?-h[1-9]\d\d-n(?:-k-no)?\/[^\/]+\z/
43
+ when /\A(https:\/\/lh3\.googleusercontent\.com\/-[a-zA-Z0-9_-]{11}\/[WX][a-zA-Z0-9_-]{9}I\/AAAAAAA[a-zA-Z0-9_-]{4}\/[a-zA-Z0-9_-]{33}(?:[gwAQ]?CJoC|CL0B(?:GAs)?)\/)w[1-7]\d\d(?:-d)?-h[1-9]\d\d\d?-n(?:-k-no|-rw|)\/[^\/]+\z/
44
44
  "#{$1}s#{width}/"
45
45
  when /\A(\/\/lh3\.googleusercontent\.com\/proxy\/[a-zA-Z0-9_-]{66,523}=)(?:w(?:[45]\d\d)-h\d\d\d-[np]|s530-p|s110-p-k)\z/
46
46
  "https:#{$1}s#{width}/"
@@ -64,6 +64,9 @@ module DirectLink
64
64
  /\A(https:\/\/lh[356]\.googleusercontent\.com\/-[a-zA-Z0-9]{11}\/AAAAAAAAAAI\/AAAAAAAAAAA\/[a-zA-Z0-9]{11}\/)s64-c-k\/photo\.jpg\z/,
65
65
  /\A(https:\/\/lh[356]\.googleusercontent\.com\/-[a-zA-Z0-9]{11}\/AAAAAAAAAAI\/AAAAAAAAAAA\/[a-zA-Z0-9_]{34}\/)s(?:46|64)-c(?:-k(?:-no)?)?-mo\/photo\.jpg\z/
66
66
  "#{$1}s#{width}/"
67
+ # Google Keep
68
+ when /\A(https:\/\/lh\d\.googleusercontent\.com\/[a-zA-Z0-9_-]{104,106}=s)\d\d\d\d?\Z/
69
+ "#{$1}#{width}"
67
70
  # mp4
68
71
  when /\A(https:\/\/lh3\.googleusercontent\.com\/-[a-zA-Z]{11}\/W[a-zA-Z0-9]{9}I\/AAAAAAAAODw\/[a-zA-Z0-9]{32}QCJoC\/)w530-h883-n-k-no\/[^\/]+\.mp4\z/
69
72
  "#{$1}s#{width}/"
@@ -113,7 +116,7 @@ module DirectLink
113
116
  # one day single-video item should hit this but somehow it didn't yet
114
117
  raise ErrorAssert.new "unknown data format #{data.inspect} for #{link}"
115
118
  end
116
- when /\Ahttps?:\/\/(?:(?:i|m|www)\.)?imgur\.com\/([a-zA-Z0-9]{7,8})(?:\.(?:gifv|jpg|png))?\z/,
119
+ when /\Ahttps?:\/\/(?:(?:i|m|www)\.)?imgur\.com\/([a-zA-Z0-9]{7,8})(?:\.(?:gifv|jpg(?:\?fb)?|png))?\z/,
117
120
  /\Ahttps?:\/\/(?:(?:i|m|www)\.)?imgur\.com\/([a-zA-Z0-9]{5})\.mp4\z/,
118
121
  /\Ahttps?:\/\/imgur\.com\/([a-zA-Z0-9]{5}(?:[a-zA-Z0-9]{2})?)\z/,
119
122
  /\Ahttps?:\/\/imgur\.com\/([a-zA-Z0-9]{7})(?:\?\S+)?\z/,
@@ -229,10 +232,10 @@ module DirectLink
229
232
  if data["media"]["reddit_video"]
230
233
  return [true, data["media"]["reddit_video"]["fallback_url"]]
231
234
  else
232
- raise ErrorAssert.new "our knowledge about Reddit API seems to be outdated" unless data["media"].keys.sort == %w{ oembed type } && %w{ youtube.com gfycat.com }.include?(data["media"]["type"])
235
+ raise ErrorAssert.new "our knowledge about Reddit API seems to be outdated" unless data["media"].keys.sort == %w{ oembed type } && %w{ youtube.com gfycat.com imgur.com }.include?(data["media"]["type"])
233
236
  return [true, data["media"]["oembed"]["thumbnail_url"]]
234
237
  end if data["media"]
235
- return reddit data["url"] if data["crosspost_parent"] # TODO: test that it does it
238
+ return [true, data["url"]] if data["crosspost_parent"]
236
239
  return [true, data["url"]] unless data["is_self"]
237
240
  raise ErrorAssert.new "our knowledge about Reddit API seems to be outdated" if data["url"] != "https://www.reddit.com" + data["permalink"]
238
241
  return [false, data["selftext"]]
@@ -258,6 +261,9 @@ def DirectLink link, max_redirect_resolving_retry_delay = nil, giveup = false
258
261
 
259
262
  google_without_schema_crutch = lambda do
260
263
  if %w{ lh3 googleusercontent com } == URI(link).host.split(?.).last(3) ||
264
+ %w{ lh4 googleusercontent com } == URI(link).host.split(?.).last(3) ||
265
+ %w{ lh5 googleusercontent com } == URI(link).host.split(?.).last(3) ||
266
+ %w{ lh6 googleusercontent com } == URI(link).host.split(?.).last(3) ||
261
267
  %w{ bp blogspot com } == URI(link).host.split(?.).last(3)
262
268
  u = DirectLink.google link
263
269
  f = FastImage.new(u, raise_on_failure: true, http_header: {"User-Agent" => "Mozilla"})
@@ -279,14 +285,7 @@ def DirectLink link, max_redirect_resolving_retry_delay = nil, giveup = false
279
285
  }, **(max_redirect_resolving_retry_delay ? {timeout: max_redirect_resolving_retry_delay, max_start_http_retry_delay: max_redirect_resolving_retry_delay, max_read_retry_delay: max_redirect_resolving_retry_delay} : {})
280
286
  rescue Net::ReadTimeout
281
287
  else
282
- link = case head.instance_variable_get(:@last_response).code
283
- when "200" ; link
284
- when "302"
285
- URI( head.instance_variable_get(:@last_response).to_hash.fetch("location").tap do |a|
286
- raise DirectLink::ErrorAssert.new "unexpected size of locations after redirect" unless a.size == 1
287
- end.first )
288
- else ; raise NetHTTPUtils::Error.new "", (head.instance_variable_get(:@last_response).code || fail).to_i
289
- end
288
+ link = head.instance_variable_get(:@last_response).uri.to_s
290
289
  end
291
290
 
292
291
  # why do we resolve redirects before trying the known adapters?
@@ -314,10 +313,11 @@ def DirectLink link, max_redirect_resolving_retry_delay = nil, giveup = false
314
313
  f = FastImage.new(u, raise_on_failure: true) # , http_header: {"User-Agent" => "Mozilla"}
315
314
  return struct.new u, w, h, f.type
316
315
  rescue DirectLink::ErrorMissingEnvVar
317
- end if %w{ www flickr com } == URI(link).host.split(?.).last(3)
316
+ end if %w{ www flickr com } == URI(link).host.split(?.) ||
317
+ %w{ flic kr } == URI(link).host.split(?.)
318
318
 
319
319
  if %w{ wikipedia org } == URI(link).host.split(?.).last(2) ||
320
- %w{ commons wikimedia org } == URI(link).host.split(?.).last(3)
320
+ %w{ commons wikimedia org } == URI(link).host.split(?.)
321
321
  u = DirectLink.wiki link
322
322
  f = FastImage.new(u, raise_on_failure: true) # , http_header: {"User-Agent" => "Mozilla"}
323
323
  w, h = f.size
@@ -338,6 +338,7 @@ def DirectLink link, max_redirect_resolving_retry_delay = nil, giveup = false
338
338
  end
339
339
  return struct.new *u.values_at(*%w{ fallback_url width height }), "video" if u.is_a? Hash
340
340
  return DirectLink u
341
+ fail if link == u
341
342
  rescue DirectLink::ErrorMissingEnvVar
342
343
  end if %w{ reddit com } == URI(link).host.split(?.).last(2) ||
343
344
  %w{ redd it } == URI(link).host.split(?.)
data/test.rb CHANGED
@@ -20,6 +20,7 @@ describe DirectLink do
20
20
  describe "google" do
21
21
 
22
22
  describe "does not fail" do
23
+ # TODO: also check the #google is being called
23
24
 
24
25
  "
25
26
  1 //1.bp.blogspot.com/-rYk_u-qROQc/WngolJ8M0LI/AAAAAAAAD-w/woivnaIVzasBPG5C2T1t-VrWKRd_U6lMgCLcBGAs/w530-h278-p/i-469.jpg
@@ -152,6 +153,7 @@ describe DirectLink do
152
153
  https://lh3.googleusercontent.com/-rm-m1meCOMY/W92GhExMG-I/AAAAAAADsTw/bIAm5-1CIOYEpyPJLnxT8VmI_YNW2W5dACJoC/s0/2659806_800n.jpg
153
154
  https://lh3.googleusercontent.com/-z1nwsq4NOT4/XETT5qhXP-I/AAAAAAAAC0s/03kJ22drB1EdqZ97gUXCPHkLZbbqrDbOACJoC/w530-h942-n/gplus1629127930.jpg
154
155
  https://lh3.googleusercontent.com/-NiGph3ObOPg/XE3DgnavXlI/AAAAAAABvgE/pcPPCe88rsU1r941wwP76TVf_o89i74kwCJoC/w530-h353-n/DSCF0753.JPG
156
+ https://lh3.googleusercontent.com/-QfChCi9Lj6A/XEciVlXmDhI/AAAAAAACuZw/iYzoMIxr7SsGzEFbk1LrqIdCdWVu8zCHACJoC/w795-h1193-n-rw/z7765765765757575.jpg
155
157
  }.each_with_index do |link, i|
156
158
  it "gpluscomm_105636351696833883213_86400 ##{i + 1}" do
157
159
  assert DirectLink.google link
@@ -205,13 +207,25 @@ describe DirectLink do
205
207
  assert DirectLink.google link
206
208
  end
207
209
  end
210
+ %w{
211
+ https://lh4.googleusercontent.com/KwxMEMlyjNKXqSqszuiCgPMi7_oE5fVv1Sw373HXBYlguP8AnIPAqefTS6DbBuurVGYRSxGrtDyKei1hae9Djf6rjiwjJd0aauA5Bg-z=s615
212
+ https://lh5.googleusercontent.com/fRmAL_04p7oomNHCiV4tH4-agHSDBtLaWi_Tb6bgE5ZSHVu5OjQF3iRn06nNwP3ywZwdFP92zWM-o8yw0cn6m0tDTBARuO6F9e0wYu_1=s685
213
+ https://lh5.googleusercontent.com/FcYUQBKLXWtFLEvbQduvu7FHUm2f7U_MVdMBVnNbpwfzKHIU-xABkudxw-m21SlM0jFYRHedh7Is5Dg6qlgIQF1iSndlWjiKCTTsUo1w=s1080
214
+ https://lh5.googleusercontent.com/gcDb3dxbch9jUKPzKGawJiwtHcNS9wp6o2sc0aJj9wOWQA-u8kXmKIrZ-TkLxajee6qLaT2p6OK2N7klTJ9CxU66OnpBhYJMg0q9QEdq5Q=s2160
215
+ }.each_with_index do |link, i|
216
+ it "google keep ##{i + 1}" do
217
+ assert DirectLink.google link
218
+ end
219
+ end
208
220
 
209
221
  end
222
+
210
223
  # TODO: expand this for every branch in lib
211
224
  %w{
212
225
  https_long_blogspot https://2.bp.blogspot.com/-rb2PXLGZy0s/W2nQe3mXOSI/AAAAAAAARhQ/P8gV-bMtYbY2xxpTJNcYVxu3XDTUaugxQCLcBGAs/s640/beach-bora-bora-clouds-753626.jpg https://2.bp.blogspot.com/-rb2PXLGZy0s/W2nQe3mXOSI/AAAAAAAARhQ/P8gV-bMtYbY2xxpTJNcYVxu3XDTUaugxQCLcBGAs/s0/
213
226
  http_short_blogspot http://4.bp.blogspot.com/-poH-QXn7YGg/U-3ZTDkeF_I/AAAAAAAAISE/ms2gNIb-v-g/w72-h72-p-k-no-nu/Top-24-Inspired-181.jpg https://4.bp.blogspot.com/-poH-QXn7YGg/U-3ZTDkeF_I/AAAAAAAAISE/ms2gNIb-v-g/s0/
214
227
  just_gplus https://lh3.googleusercontent.com/-NiGph3ObOPg/XE3DgnavXlI/AAAAAAABvgE/pcPPCe88rsU1r941wwP76TVf_o89i74kwCJoC/w530-h353-n/DSCF0753.JPG https://lh3.googleusercontent.com/-NiGph3ObOPg/XE3DgnavXlI/AAAAAAABvgE/pcPPCe88rsU1r941wwP76TVf_o89i74kwCJoC/s0/
228
+ google_keep https://lh5.googleusercontent.com/fRmAL_04p7oomNHCiV4tH4-agHSDBtLaWi_Tb6bgE5ZSHVu5OjQF3iRn06nNwP3ywZwdFP92zWM-o8yw0cn6m0tDTBARuO6F9e0wYu_1=s685 https://lh5.googleusercontent.com/fRmAL_04p7oomNHCiV4tH4-agHSDBtLaWi_Tb6bgE5ZSHVu5OjQF3iRn06nNwP3ywZwdFP92zWM-o8yw0cn6m0tDTBARuO6F9e0wYu_1=s0
215
229
  }.each_slice 3 do |name, link, o|
216
230
  it "replaces s0 and schema correctly #{name}" do
217
231
  assert_equal o, DirectLink.google(link)
@@ -298,7 +312,7 @@ describe DirectLink do
298
312
  ["http://imgur.com/gallery/qP2RQtL", "https://i.imgur.com/qP2RQtL.png"], # single image gallery?
299
313
  ["http://imgur.com/gallery/nKAwE/new", 28, "https://i.imgur.com/VQhR8hB.jpg", "https://i.imgur.com/axlzNRL.jpg"],
300
314
  ["http://m.imgur.com/rarOohr", "https://i.imgur.com/rarOohr.jpg"],
301
- ["http://imgur.com/r/wallpaper/j39dKMi", "https://i.imgur.com/j39dKMi.jpg"],
315
+ ["http://imgur.com/r/wallpaper/j39dKMi", "https://i.imgur.com/j39dKMi.jpg?1"],
302
316
  ["http://imgur.com/gallery/jm0OKQM", DirectLink::ErrorNotFound], # this id does not belong to gallery but to an image, that is probably irrelevant
303
317
  ["http://imgur.com/gallery/oZXfZ", DirectLink::ErrorNotFound], # this id does not belong to gallery but to an album, that is probably irrelevant
304
318
  ["http://imgur.com/gallery/dCQprEq/new", "https://i.imgur.com/dCQprEq.jpg", 5760, 3840, "image/jpeg"],
@@ -313,6 +327,7 @@ describe DirectLink do
313
327
  ["http://imgur.com/a/AdJUK", 3, "https://i.imgur.com/Yunpxnx.jpg", "https://i.imgur.com/2epn2nT.jpg", "https://i.imgur.com/3afw2aF.jpg"],
314
328
  ["https://imgur.com/9yaMdJq", "https://i.imgur.com/9yaMdJq.mp4", 720, 404, "video/mp4"],
315
329
  ["http://imgur.com/gallery/dCQprEq/new", "https://i.imgur.com/dCQprEq.jpg", 5760, 3840, "image/jpeg"],
330
+ ["https://i.imgur.com/fFUTSJu.jpg?fb", "https://i.imgur.com/fFUTSJu.jpg", 1469, 2200, "image/jpeg"], # from reddit.com/93mtba
316
331
  ].each_with_index do |t, i|
317
332
  url, n, first, last, type = t
318
333
  it "##{i + 1}" do
@@ -377,6 +392,7 @@ describe DirectLink do
377
392
  ["https://www.reddit.com/r/travel/988889", [true, "https://i.redd.it/3h5xls6ehrg11.jpg"]],
378
393
  ["http://redd.it/988889", [true, "https://i.redd.it/3h5xls6ehrg11.jpg"]],
379
394
  ["https://www.reddit.com/r/CatsStandingUp/duplicates/abn0ua/cat/", [true, "https://v.redd.it/s9b86afb6w721/DASH_2_4_M?source=fallback"]],
395
+ ["https://www.reddit.com/r/hangers/comments/97you5/tara_radovic/", [true, "https://i.imgur.com/rbLqgOu.jpg"]], # "crossport" from Imgur
380
396
  ] ],
381
397
  ].each do |method, tests|
382
398
  describe method do
@@ -402,6 +418,7 @@ describe DirectLink do
402
418
  //1.bp.blogspot.com/-rYk_u-qROQc/WngolJ8M0LI/AAAAAAAAD-w/woivnaIVzasBPG5C2T1t-VrWKRd_U6lMgCLcBGAs/w530-h278-p/i-469.jpg
403
419
  https://2.bp.blogspot.com/-rb2PXLGZy0s/W2nQe3mXOSI/AAAAAAAARhQ/P8gV-bMtYbY2xxpTJNcYVxu3XDTUaugxQCLcBGAs/s640/beach-bora-bora-clouds-753626.jpg
404
420
  http://4.bp.blogspot.com/-poH-QXn7YGg/U-3ZTDkeF_I/AAAAAAAAISE/ms2gNIb-v-g/w72-h72-p-k-no-nu/Top-24-Inspired-181.jpg
421
+ https://lh5.googleusercontent.com/FcYUQBKLXWtFLEvbQduvu7FHUm2f7U_MVdMBVnNbpwfzKHIU-xABkudxw-m21SlM0jFYRHedh7Is5Dg6qlgIQF1iSndlWjiKCTTsUo1w=s1080
405
422
  },
406
423
  imgur: %w{
407
424
  https://imgur.com/3eThW
@@ -414,7 +431,7 @@ describe DirectLink do
414
431
  https://500px.com/photo/112134597/milky-way-by-tom-hall
415
432
  },
416
433
  flickr: %w{
417
- https://www.flickr.com/photos/tomas-/17220613278/
434
+ https://www.flickr.com/photos/59880970@N07/15773941043/in/dateposted-public/
418
435
  https://flic.kr/p/vPvCWJ
419
436
  },
420
437
  wiki: %w{
@@ -423,7 +440,6 @@ describe DirectLink do
423
440
  },
424
441
  reddit: %w{
425
442
  https://www.reddit.com/r/cacography/comments/32tq0i/c/
426
- https://i.redd.it/si758zk7r5xz.jpg
427
443
  http://redd.it/32tq0i
428
444
  https://reddit.com/123456
429
445
  https://www.reddit.com/r/travel/988889
@@ -431,12 +447,12 @@ describe DirectLink do
431
447
  }.each do |method, tests|
432
448
  describe "DirectLink() calls #{method}" do
433
449
  tests.each_with_index do |input, i|
434
- it "##{i + 1}" do
435
- called = false
436
- m = DirectLink.method method
437
- DirectLink.stub method, ->link{ called = true } do
438
- DirectLink.method(method).call input
439
- assert called, "DirectLink.#{method} was not called"
450
+ it "##{i + 1} (this may prematurely fail on redirect resolving, so links should be valid)" do
451
+ DirectLink.stub method, ->link{ throw :_ } do
452
+ catch :_ do
453
+ DirectLink input
454
+ fail "DirectLink.#{method} was not called"
455
+ end
440
456
  end
441
457
  end
442
458
  end
@@ -612,7 +628,7 @@ describe DirectLink do
612
628
  describe "other domains tests" do
613
629
  [
614
630
  ["http://www.aeronautica.difesa.it/organizzazione/REPARTI/divolo/PublishingImages/6%C2%B0%20Stormo/2013-decollo%20al%20tramonto%20REX%201280.jpg", ["http://www.aeronautica.difesa.it/organizzazione/REPARTI/divolo/PublishingImages/6%C2%B0%20Stormo/2013-decollo%20al%20tramonto%20REX%201280.jpg", 1280, 853, :jpeg], nil, 1],
615
- ["http://minus.com/lkP3hgRJd9npi", SocketError, /nodename nor servname provided, or not known|No address associated with hostname/, 0],
631
+ # ["http://minus.com/lkP3hgRJd9npi", SocketError, /nodename nor servname provided, or not known|No address associated with hostname/, 0],
616
632
  ["http://www.cutehalloweencostumeideas.org/wp-content/uploads/2017/10/Niagara-Falls_04.jpg", SocketError, /nodename nor servname provided, or not known|Name or service not known/, 0],
617
633
  ].each_with_index do |(input, expectation, message_string_or_regex, max_redirect_resolving_retry_delay), i|
618
634
  it "##{i + 1}" do
@@ -730,7 +746,7 @@ describe DirectLink do
730
746
  [
731
747
  ["<= #{valid_imgur_image_url1}
732
748
  => https://i.imgur.com/QpOBvRY.png
733
- png 460x460
749
+ image/png 460x460
734
750
  <= #{valid_imgur_image_url2}
735
751
  => https://i.imgur.com/QpOBvRY.png
736
752
  image/png 460x460
@@ -742,7 +758,7 @@ describe DirectLink do
742
758
  "url": "https://i.imgur.com/QpOBvRY.png",
743
759
  "width": 460,
744
760
  "height": 460,
745
- "type": "png"
761
+ "type": "image/png"
746
762
  },
747
763
  [
748
764
  {
@@ -769,7 +785,7 @@ describe DirectLink do
769
785
 
770
786
  it "reddit_bot gem logger does not flood STDOUT" do
771
787
  string, status = Open3.capture2e "RUBYOPT='-rbundler/setup' ./bin/directlink http://redd.it/997he7"
772
- assert_equal "<= http://redd.it/997he7\n=> https://i.imgur.com/QpOBvRY.png\n png 460x460\n", string
788
+ assert_equal "<= http://redd.it/997he7\n=> https://i.imgur.com/QpOBvRY.png\n image/png 460x460\n", string
773
789
  end
774
790
 
775
791
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: directlink
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.13
4
+ version: 0.0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Maslov aka Nakilon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-23 00:00:00.000000000 Z
11
+ date: 2019-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastimage