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 +4 -4
- data/Gemfile.lock +4 -4
- data/lib/dronejob/version.rb +1 -1
- data/lib/dronejob/workspace_file/media.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95bbf56fbf52ab7285d8d711b3f5ae81005d326c
|
4
|
+
data.tar.gz: aed5ee7e7432283ac7ede34439bf18e1cb56043f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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)
|
data/lib/dronejob/version.rb
CHANGED
@@ -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!(
|
38
|
+
html.gsub!(original_url, cache_file.relative_path)
|
38
39
|
end
|
39
40
|
hydra.queue(request)
|
40
41
|
end
|