dronejob 1.1.6 → 1.1.7

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: 133722f1098d1e4aa29d16ec5b71ed117cef0078
4
- data.tar.gz: 567c9672e9390da26e265add6233d769ca4d04f8
3
+ metadata.gz: 95bbf56fbf52ab7285d8d711b3f5ae81005d326c
4
+ data.tar.gz: aed5ee7e7432283ac7ede34439bf18e1cb56043f
5
5
  SHA512:
6
- metadata.gz: 5753b22a4c6997f63151063bbd2251b7b38f126f2f3aeb48b1bbf399110a2b1984a7696236846544b91a956103fc3052bf10ce1c9a8f197440783732b11c47ba
7
- data.tar.gz: 4b4d05c428e4a8130de93eba65977261a97990854c5c22015cedb33cf293da9392c6856cb24b2e7910e53e47220180d464fffaa4b6b61a3a3d09c50ee8e1cdde
6
+ metadata.gz: e9ec063fb39aeb8c445f8571f8dabea965264c88c97998c08d02bdbbc62aada3f23a89911c237953503754a36b899da7a11c2b8e747d7f9a384c876d3b30e049
7
+ data.tar.gz: fd9b800728cb93d5e8f3467f75bd679de7deebdeea7923cdce64675569ac3fef3d8165dc68474c33a142a944a7cb25abb6be6008eb7f3f09cdd6d2aae1499edf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dronejob (1.1.6)
4
+ dronejob (1.1.7)
5
5
  activejob (~> 4.2)
6
6
  bundler (>= 1.3.0, < 2.0)
7
7
  git (~> 1.2)
@@ -16,10 +16,10 @@ PATH
16
16
  GEM
17
17
  remote: http://rubygems.org/
18
18
  specs:
19
- activejob (4.2.7)
20
- activesupport (= 4.2.7)
19
+ activejob (4.2.7.1)
20
+ activesupport (= 4.2.7.1)
21
21
  globalid (>= 0.3.0)
22
- activesupport (4.2.7)
22
+ activesupport (4.2.7.1)
23
23
  i18n (~> 0.7)
24
24
  json (~> 1.7, >= 1.7.7)
25
25
  minitest (~> 5.1)
@@ -1,3 +1,3 @@
1
1
  module Dronejob
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
@@ -29,12 +29,13 @@ module Dronejob
29
29
  hydra = Typhoeus::Hydra.new(max_concurrency: 10)
30
30
  html = contents
31
31
  html.scan(/["'(]{1}((https:|http:)?\/\/[^"')]+\.(jpg|jpeg|png|gif|mp3|mp4))["')?#]{1}/).map{|match| match[0]}.uniq.each do |url|
32
+ original_url = url
32
33
  url = "http:#{url}" if url[0..1] == "//"
33
34
  ext = File.extname(url).gsub(/^\./, "")
34
35
  cache_file = cache_dir.file("#{Digest::MD5.hexdigest(url)}.#{ext}")
35
36
  request = cache_file.queue_download(url) do
36
37
  cache_file.optimize!
37
- html.gsub!(url, cache_file.relative_path)
38
+ html.gsub!(original_url, cache_file.relative_path)
38
39
  end
39
40
  hydra.queue(request)
40
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dronejob
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Strebitzer