directlink 0.0.4.7 → 0.0.4.8

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: 3d38a321383a964dd0c6fcbf4fdf2671dffa0209
4
- data.tar.gz: e97f410e07324784063d3799e3396f1c263832de
3
+ metadata.gz: b436120b4acd62ba55de62824aff4c9e04490104
4
+ data.tar.gz: 6db0db31513073100210447ba2f9cef30db54d96
5
5
  SHA512:
6
- metadata.gz: 53353764e4a5f7443069890a38cc0dfad7453e3d05a96ffc49cebe39328090b04920e54a95446a954370a6e11ef1df9d8373b41dce52ff5ab1d9a8f7f949c5c6
7
- data.tar.gz: 663560a5baec205f4c4d199c187b67d4caf213c75413049bed834783f25507fd96bbff0a775cde3b2365b2bd2361ba1f70334ebed8e3f7c6bc820e59dd822585
6
+ metadata.gz: 7f20abac6d10467eca10023a2e43df7d421e1c9ebd5666fac0d42413737817858cc5a3fca70ae1833bdf64a6266c225d36bddc3a09c97c00a551dfc49a2d98d1
7
+ data.tar.gz: b1f9d918c60bd79e16cb944cd55b6196eac4ab1bd0ef9faab3905ce781ebd93870e743fe9fd88abcba96b2b562a29006d3f8522f8def6d5f70bde9fa3edc6ead
data/.bashrc CHANGED
@@ -1,3 +1,4 @@
1
1
  source api_tokens_for_travis.sh
2
- echo 'to test: ruby test.rb'
3
- echo 'to test: bundle exec ./bin/directlink --debug ...'
2
+ echo 'to test: ruby -I../nethttputils/lib -I./lib test.rb'
3
+ echo 'to test: ruby -I../nethttputils/lib -I./lib ./bin/directlink --debug ...'
4
+ echo 'or: bundle exec ./bin/directlink --debug ...'
data/bin/directlink CHANGED
@@ -43,7 +43,7 @@ if github
43
43
  else
44
44
  require "directlink"
45
45
  end
46
- NetHTTPUtils.logger.level = debug ? Logger::INFO : Logger::FATAL
46
+ NetHTTPUtils.logger.level = debug ? Logger::INFO : Logger::FATAL unless ENV.include? "LOGLEVEL_NetHTTPUtils"
47
47
  # TODO --timeout=
48
48
  DirectLink.silent = !debug
49
49
  abort "usage: directlink [--debug] [--json] [--github] <link1> <link2> <link3> ...\n#{
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.7"
3
+ spec.version = "0.0.4.8"
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"
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.add_dependency "fastimage", "~>2.1.3"
13
13
  spec.add_dependency "nokogiri"
14
- spec.add_dependency "reddit_bot", "~>1.6.13"
14
+ spec.add_dependency "reddit_bot", "~>1.7.0"
15
15
  spec.add_dependency "kramdown"
16
16
  spec.add_dependency "addressable"
17
17
  spec.add_development_dependency "minitest"
data/lib/directlink.rb CHANGED
@@ -69,7 +69,8 @@ module DirectLink
69
69
  /\Ahttps:\/\/lh3\.googleusercontent\.com\/-[a-zA-Z0-9]{11}\/W[a-zA-Z0-9]{9}I\/AAAAAAAA[a-zA-Z_]{3}\/[a-zA-Z0-9]{32}gCJoC\/s0\/[^\/]+\z/,
70
70
  /\Ahttps:\/\/lh3\.googleusercontent\.com\/-[a-zA-Z0-9]{11}\/[a-zA-Z0-9]{10}I\/AAAAAAA[a-zA-Z0-9]{4}\/[a-zA-Z0-9_-]{32}wCJoC\/s0\/[^\/]+\z/,
71
71
  /\Ahttps:\/\/lh3\.googleusercontent\.com\/-[a-zA-Z0-9]{11}\/[a-zA-Z0-9]{10}I\/AAAAAAA[A-Z]{4}\/[a-zA-Z0-9-]{32}gCJoC\/s0\/[^\/]+\z/,
72
- /\Ahttps:\/\/lh3\.googleusercontent\.com\/-[a-zA-Z0-9-]{11}\/[a-zA-Z0-9-]{10}I\/AAAAAAA[a-zA-Z]{4}\/[a-zA-Z0-9_-]{32}ACJoC\/s0\/[^\/]+\z/
72
+ /\Ahttps:\/\/lh3\.googleusercontent\.com\/-[a-zA-Z0-9-]{11}\/[a-zA-Z0-9-]{10}I\/AAAAAAA[a-zA-Z]{4}\/[a-zA-Z0-9_-]{32}ACJoC\/s0\/[^\/]+\z/,
73
+ /\Ahttps:\/\/lh3\.googleusercontent\.com\/-[a-zA-Z0-9]{11}\/[a-zA-Z0-9-]{10}I\/AAAAAAA[a-zA-Z-]{4}\/[a-zA-Z0-9_]{32}gCJoC\/s0\/[^\/]+\z/
73
74
  src
74
75
  # Google Plus userpic
75
76
  when /\A(https:\/\/lh3\.googleusercontent\.com\/-[a-zA-Z0-9-]{11}\/AAAAAAAAAAI\/AAAAAAAA[a-zA-Z0-9]{3}\/[a-zA-Z0-9_-]{11}\/)s\d\d-p(?:-k)?-rw-no(\/photo\.jpg)\z/
@@ -107,7 +108,7 @@ module DirectLink
107
108
  t *= 2
108
109
  retry
109
110
  end
110
- raise ErrorAssert.new "unexpected http error for #{url}"
111
+ raise ErrorAssert.new "unexpected http error #{e.code} for #{url}"
111
112
  end
112
113
  end
113
114
  case link
@@ -129,11 +130,12 @@ module DirectLink
129
130
  # one day single-video item should hit this but somehow it didn't yet
130
131
  raise ErrorAssert.new "unknown data format #{data.inspect} for #{link}"
131
132
  end
132
- when /\Ahttps?:\/\/(?:(?:i|m|www)\.)?imgur\.com\/([a-zA-Z0-9]{7})(?:\.(?:gifv|jpg|png))?\z/,
133
+ when /\Ahttps?:\/\/(?:(?:i|m|www)\.)?imgur\.com\/([a-zA-Z0-9]{7,8})(?:\.(?:gifv|jpg|png))?\z/,
133
134
  /\Ahttps?:\/\/(?:(?:i|m|www)\.)?imgur\.com\/([a-zA-Z0-9]{5})\.mp4\z/,
134
135
  /\Ahttps?:\/\/imgur\.com\/([a-zA-Z0-9]{5}(?:[a-zA-Z0-9]{2})?)\z/,
135
136
  /\Ahttps?:\/\/imgur\.com\/([a-zA-Z0-9]{7})(?:\?\S+)?\z/,
136
- /\Ahttps?:\/\/imgur\.com\/r\/[0-9_a-z]+\/([a-zA-Z0-9]{7})\z/
137
+ /\Ahttps?:\/\/imgur\.com\/r\/[0-9_a-z]+\/([a-zA-Z0-9]{7})\z/,
138
+ /\Ahttps?:\/\/api\.imgur\.com\/3\/image\/([a-zA-Z0-9]{7})\/0\.json\z/
137
139
  json = request_data["https://api.imgur.com/3/image/#{$1}/0.json"]
138
140
  [ JSON.load(json)["data"] ]
139
141
  else
@@ -150,8 +152,21 @@ module DirectLink
150
152
 
151
153
  def self._500px link
152
154
  raise ErrorBadLink.new link unless %r{\Ahttps://500px\.com/photo/(?<id>[^/]+)/[^/]+\z} =~ link
153
- w, h = JSON.load(NetHTTPUtils.request_data "https://api.500px.com/v1/photos", form: {ids: id})["photos"].values.first.values_at("width", "height")
154
- u, f = JSON.load(NetHTTPUtils.request_data "https://api.500px.com/v1/photos", form: {"image_size[]" => w, "ids" => id})["photos"].values.first["images"].first.values_at("url", "format")
155
+ require "nokogiri"
156
+ resp = NetHTTPUtils.request_data link
157
+ f = lambda do |form|
158
+ JSON.load(
159
+ NetHTTPUtils.request_data "https://api.500px.com/v1/photos",
160
+ form: form,
161
+ header: {
162
+ "Cookie" => resp.instance_variable_get(:@last_response).to_hash.fetch("set-cookie").join(?\s),
163
+ "X-CSRF-Token" => Nokogiri::HTML(resp).at_css("[name=csrf-token]")[:content]
164
+ }
165
+ ).fetch("photos").values.first
166
+ end
167
+ w, h = f[{"ids" => id }].values_at("width", "height")
168
+ # we need the above request to find the real resolution otherwise the "url" in the next request will be wrong
169
+ u, f = f[{"ids" => id, "image_size[]" => w}].fetch("images").first.values_at("url", "format")
155
170
  [w, h, u, f]
156
171
  end
157
172
 
@@ -247,6 +262,7 @@ end
247
262
  require "fastimage"
248
263
 
249
264
  def DirectLink link, max_redirect_resolving_retry_delay = nil, giveup = false
265
+ ArgumentError.new("link should be a <String>, not <#{link.class}>") unless link.is_a? String
250
266
  begin
251
267
  URI link
252
268
  rescue URI::InvalidURIError
@@ -273,17 +289,25 @@ def DirectLink link, max_redirect_resolving_retry_delay = nil, giveup = false
273
289
  # > NetHTTPUtils.logger.level = Logger::DEBUG
274
290
  # > NetHTTPUtils.request_data "http://www.aeronautica.difesa.it/organizzazione/REPARTI/divolo/PublishingImages/6%C2%B0%20Stormo/2013-decollo%20al%20tramonto%20REX%201280.jpg",
275
291
  # max_read_retry_delay: 5, timeout: 5
276
- r = NetHTTPUtils.get_response link, header: {
277
- "User-Agent" => "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
278
- }, **(max_redirect_resolving_retry_delay ? {
279
- max_timeout_retry_delay: max_redirect_resolving_retry_delay,
280
- max_sslerror_retry_delay: max_redirect_resolving_retry_delay,
281
- max_read_retry_delay: max_redirect_resolving_retry_delay,
282
- max_econnrefused_retry_delay: max_redirect_resolving_retry_delay,
283
- max_socketerror_retry_delay: max_redirect_resolving_retry_delay,
284
- } : {})
285
- raise NetHTTPUtils::Error.new "", r.code.to_i unless "200" == r.code
286
- link = r.uri.to_s
292
+
293
+ begin
294
+ head = NetHTTPUtils.request_data link, :head, header: {
295
+ "User-Agent" => "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
296
+ }, **(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} : {})
297
+ rescue Net::ReadTimeout
298
+ rescue NetHTTPUtils::Error => e
299
+ raise unless e.code == 401
300
+ else
301
+ link = case head.instance_variable_get(:@last_response).code
302
+ when "200" ; link
303
+ when "302"
304
+ URI( head.instance_variable_get(:@last_response).to_hash.fetch("location").tap do |a|
305
+ raise DirectLink::ErrorAssert.new "unexpected size of locations after redirect" unless a.size == 1
306
+ end.first )
307
+ else ; raise NetHTTPUtils::Error.new "", (head.instance_variable_get(:@last_response).code || fail).to_i
308
+ end
309
+ end
310
+
287
311
  # why do we resolve redirects before trying the known adapters?
288
312
  # because they can be hidden behind URL shorteners
289
313
  # also it can resolve NetHTTPUtils::Error(404) before trying the adapter
@@ -297,10 +321,7 @@ def DirectLink link, max_redirect_resolving_retry_delay = nil, giveup = false
297
321
  # `DirectLink.imgur` return value is always an Array
298
322
  return imgur.size == 1 ? imgur.first : imgur
299
323
  rescue DirectLink::ErrorMissingEnvVar
300
- end if %w{ imgur com } == URI(link).host.split(?.).last(2) ||
301
- %w{ i imgur com } == URI(link).host.split(?.).last(3) ||
302
- %w{ m imgur com } == URI(link).host.split(?.).last(3) ||
303
- %w{ www imgur com } == URI(link).host.split(?.).last(3)
324
+ end if %w{ imgur com } == URI(link).host.split(?.).last(2)
304
325
 
305
326
  if %w{ 500px com } == URI(link).host.split(?.).last(2)
306
327
  w, h, u, t = DirectLink._500px(link)
@@ -331,7 +352,7 @@ def DirectLink link, max_redirect_resolving_retry_delay = nil, giveup = false
331
352
  f = ->_{ _.type == :a ? _.attr["href"] : _.children.flat_map(&f) }
332
353
  require "kramdown"
333
354
  return f[Kramdown::Document.new(u).root].map do |sublink|
334
- DirectLink URI.join(link, sublink), max_redirect_resolving_retry_delay, giveup
355
+ DirectLink URI.join(link, sublink).to_s, max_redirect_resolving_retry_delay, giveup
335
356
  end
336
357
  end
337
358
  return struct.new *u.values_at(*%w{ fallback_url width height }), "video" if u.is_a? Hash
@@ -340,21 +361,25 @@ def DirectLink link, max_redirect_resolving_retry_delay = nil, giveup = false
340
361
  end if %w{ reddit com } == URI(link).host.split(?.).last(2) ||
341
362
  %w{ redd it } == URI(link).host.split(?.)
342
363
 
343
-
344
364
  begin
345
- f = FastImage.new(link, raise_on_failure: true, http_header: {"User-Agent" => "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"})
365
+ f = FastImage.new(link, raise_on_failure: true, timeout: 5, http_header: {"User-Agent" => "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"})
346
366
  rescue FastImage::UnknownImageType
347
367
  raise if giveup
348
368
  require "nokogiri"
349
- html = Nokogiri::HTML NetHTTPUtils::request_data link, header: {"User-Agent" => "Mozilla"}
369
+ head = NetHTTPUtils.request_data link, :head, header: {"User-Agent" => "Mozilla"}
370
+ case head.instance_variable_get(:@last_response).content_type
371
+ when "text/html" ; nil
372
+ else ; raise
373
+ end
374
+ html = Nokogiri::HTML NetHTTPUtils.request_data link, header: {"User-Agent" => "Mozilla"}
350
375
  h = {} # TODO: maybe move it outside because of possible img[:src] recursion?...
351
376
  l = lambda do |node, s = []|
352
377
  node.element_children.flat_map do |child|
353
378
  next l[child, s + [child.node_name]] unless "img" == child.node_name
354
379
  begin
355
- [[s, (h[child[:src]] = h[child[:src]] || DirectLink(URI.join(link, child[:src]), nil, true))]] # ... or wait, do we giveup?
380
+ [[s, (h[child[:src]] = h[child[:src]] || DirectLink(URI.join(link, child[:src]).to_s, nil, true))]] # ... or wait, do we giveup?
356
381
  rescue => e
357
- DirectLink.logger.error e
382
+ DirectLink.logger.error "#{e} (from no giveup)"
358
383
  []
359
384
  end
360
385
  end
@@ -367,6 +392,6 @@ def DirectLink link, max_redirect_resolving_retry_delay = nil, giveup = false
367
392
  else
368
393
  # TODO: maybe move this to right before `rescue` line
369
394
  w, h = f.size
370
- struct.new link, w, h, f.type
395
+ struct.new f.instance_variable_get(:@parsed_uri).to_s, w, h, f.type
371
396
  end
372
397
  end
data/test.rb CHANGED
@@ -132,6 +132,7 @@ describe DirectLink do
132
132
  https://lh3.googleusercontent.com/-VXUjuSl-dZY/WvK340_E9uI/AAAAAAAAVlg/HqKf1LgUcPUJNrLxHebCMuHhpDRq36_bQCJoC/s0/gplus248254159.jpg
133
133
  https://lh3.googleusercontent.com/-NlZRwcX_Lj8/WvQTijeAfJI/AAAAAAABNyo/jgoDgbZdTvsnLOGmmYlXMr2jL66ieZV4QCJoC/s0/67u8iii.png
134
134
  https://lh3.googleusercontent.com/-8baBz80pf8Y/Wu8KG5lyGhI/AAAAAAACSyU/s3hasZzObK0VlntA1EBj-WBrTRagzRnLQCJoC/s0/%25D0%2592%25D0%25B5%25D1%2581%25D0%25B5%25D0%25BD%25D0%25BD%25D0%25B8%25D0%25B5%2B%25D0%25BA%25D1%2580%25D0%25B0%25D1%2581%25D0%25B0%25D0%25B2%25D1%2586%25D1%258B.JPG
135
+ https://lh3.googleusercontent.com/-BBjhu17YIgg/W-gnZNaZeMI/AAAAAAABA-k/UMlSbNuE0DsSEPV8u3yf_6i2S5H9vFoBgCJoC/s0/gplus320347186.png
135
136
  }.each_with_index do |link, i|
136
137
  it "already high res image ##{i + 1}" do
137
138
  assert DirectLink.google link
@@ -226,11 +227,10 @@ describe DirectLink do
226
227
  end
227
228
  end
228
229
  it "does not throw 400 after a successfull retry" do
229
- f = false
230
+ f = 0
230
231
  m = NetHTTPUtils.method :request_data
231
232
  NetHTTPUtils.stub :request_data, lambda{ |*args|
232
- f ^= true
233
- raise NetHTTPUtils::Error.new "", 400 if f
233
+ raise NetHTTPUtils::Error.new "", 400 if 1 == f += 1
234
234
  m.call *args
235
235
  } do
236
236
  assert_equal [["https://i.imgur.com/BLCesav.jpg", 1000, 1500, "image/jpeg"]],
@@ -432,7 +432,7 @@ describe DirectLink do
432
432
  it "Reddit correctly parses out id when no token provided" do
433
433
  t = ENV.delete "REDDIT_SECRETS"
434
434
  FastImage.stub :new, lambda{ |link, *|
435
- assert_equal "https://v.redd.it/2tyovczka8m11/DASH_4_8_M", link
435
+ assert_equal "https://v.redd.it/2tyovczka8m11/DASH_4_8_M?source=fallback", link
436
436
  throw :_
437
437
  } do
438
438
  begin
@@ -535,7 +535,7 @@ describe DirectLink do
535
535
  ].each do |exception|
536
536
  it "raises #{exception} from the redirect resolving stage" do
537
537
  assert_raises exception do
538
- NetHTTPUtils.stub :get_response, ->*{ raise exception.new } do
538
+ NetHTTPUtils.stub :request_data, ->*{ raise exception.new } do
539
539
  DirectLink "http://example.com/404"
540
540
  end
541
541
  end
@@ -543,7 +543,7 @@ describe DirectLink do
543
543
  end
544
544
  it "raises Net::OpenTimeout -- server side issues can happen (not related to User Agent)" do
545
545
  assert_raises Net::OpenTimeout do
546
- NetHTTPUtils.stub :get_response, ->*{ raise Net::OpenTimeout.new } do
546
+ NetHTTPUtils.stub :request_data, ->*{ raise Net::OpenTimeout.new } do
547
547
  DirectLink "http://example.com/404"
548
548
  end
549
549
  end
@@ -569,7 +569,7 @@ describe DirectLink do
569
569
 
570
570
  describe "other domains tests" do
571
571
  [
572
- ["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]],
572
+ ["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],
573
573
  ["http://minus.com/lkP3hgRJd9npi", SocketError, /nodename nor servname provided, or not known|No address associated with hostname/, 0],
574
574
  ["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],
575
575
  ].each_with_index do |(input, expectation, message_string_or_regex, max_redirect_resolving_retry_delay), i|
@@ -602,7 +602,7 @@ describe DirectLink do
602
602
  ["http://redd.it/997he7", DirectLink::ErrorBadLink, true],
603
603
  ["http://redd.it/997he7", 1], # currently only links are parsed
604
604
  ].each_with_index do |(input, expectation, giveup), i|
605
- it "##{i + 1} (#{URI(input).host})" do # to match with minitest `-n` run flag
605
+ it "##{i + 1} (#{URI(input).host}) (giveup=#{!!giveup})" do # to match with minitest `-n` run flag
606
606
  ti = ENV.delete "IMGUR_CLIENT_ID"
607
607
  tr = ENV.delete "REDDIT_SECRETS"
608
608
  begin
@@ -677,7 +677,7 @@ describe DirectLink do
677
677
  # TODO: a test that it appends the `exception.cause`
678
678
  ].each_with_index do |(expected_exit_code, link, expected_output, unset), i| # TODO: unset is not used anymore or I have to go sleep?
679
679
  it "##{i + 1}" do
680
- string, status = Open3.capture2e "export #{File.read("api_tokens_for_travis.sh").gsub(/\n?export/, ?\s).strip}#{unset} && RUBYOPT='-rbundler/setup' ./bin/directlink #{link}"
680
+ string, status = Open3.capture2e "export #{File.read("api_tokens_for_travis.sh").gsub(/\n?export/, ?\s).strip}#{unset} && RUBYOPT='-rbundler/setup #{$-I.map{ |i| "-I #{i}" }.join " "}' ./bin/directlink #{link}"
681
681
  assert_equal [expected_exit_code, "#{expected_output}\n"], [status.exitstatus, string], "for #{link}"
682
682
  end
683
683
  end
@@ -688,7 +688,7 @@ describe DirectLink do
688
688
  [
689
689
  ["<= #{valid_imgur_image_url1}
690
690
  => https://i.imgur.com/QpOBvRY.png
691
- image/png 460x460
691
+ png 460x460
692
692
  <= #{valid_imgur_image_url2}
693
693
  => https://i.imgur.com/QpOBvRY.png
694
694
  image/png 460x460
@@ -700,7 +700,7 @@ describe DirectLink do
700
700
  "url": "https://i.imgur.com/QpOBvRY.png",
701
701
  "width": 460,
702
702
  "height": 460,
703
- "type": "image/png"
703
+ "type": "png"
704
704
  },
705
705
  [
706
706
  {
@@ -727,7 +727,7 @@ describe DirectLink do
727
727
 
728
728
  it "reddit_bot gem logger does not flood STDOUT" do
729
729
  string, status = Open3.capture2e "RUBYOPT='-rbundler/setup' ./bin/directlink http://redd.it/997he7"
730
- assert_equal "<= http://redd.it/997he7\n=> https://i.imgur.com/QpOBvRY.png\n image/png 460x460\n", string
730
+ assert_equal "<= http://redd.it/997he7\n=> https://i.imgur.com/QpOBvRY.png\n png 460x460\n", string
731
731
  end
732
732
 
733
733
  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.7
4
+ version: 0.0.4.8
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: 2018-12-04 00:00:00.000000000 Z
11
+ date: 2019-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastimage
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.6.13
47
+ version: 1.7.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.6.13
54
+ version: 1.7.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: kramdown
57
57
  requirement: !ruby/object:Gem::Requirement