pulse-downloader 0.1.17 → 0.1.22

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
  SHA256:
3
- metadata.gz: 0b50ec4293c1d064d672f7b9c8271837420deb866826a85d8c3016ca348bfd39
4
- data.tar.gz: d4b35e8706bece03ba778320bb524fd8164f3b7e1933a3f79939b38abe5f9d20
3
+ metadata.gz: 00f53bf497e8c65d6211956814fa94613857b23bc0b1e3f35c24d69998645941
4
+ data.tar.gz: 77447e1a3b1df593d5c836074c41e6caa57fef28f8926a5f7e1859fb1b58b39d
5
5
  SHA512:
6
- metadata.gz: e8626f65c533de9ca6422d6a1ea18c018e2ca23316ecd2678a5c9a733fe65d72eb1fd921e9a1215839e8501849cc36cb3c96d4e9cfa39e107fbc5422bc2d7be7
7
- data.tar.gz: 70cc3bb87274c39ee93060292ee343144157806dd8900f78a564363bfad2a997182b2ae104ec0941603256fc8d38583d041f01e541d520ed169dc51989fb1f1b
6
+ metadata.gz: 627db0d3d117a199943ba7ade0c27af871f4934e6879bb788fcade5946b95bfa0378d237fb5eee0f68685cf211b042a3b35986441466b0d6811875fe7103304f
7
+ data.tar.gz: 1f7c99a75487b6c615cb94bd8def2ed1f5316036339318244329648be8800dc5ab867a8022e956e1a46ac0e0cb58f4502030453c7efadd7131d7edbb69a5a538
@@ -1,5 +1,5 @@
1
1
  module Pulse
2
2
  module Downloader
3
- VERSION = "0.1.17"
3
+ VERSION = "0.1.22"
4
4
  end
5
5
  end
@@ -19,7 +19,9 @@ module Pulse
19
19
 
20
20
  def extract_file_urls(response)
21
21
  return [] if response.body.nil? || response.body.empty?
22
- extract_download_links(response) + extract_embedded_images(response)
22
+ (
23
+ extract_download_links(response) + extract_embedded_images(response)
24
+ ).uniq
23
25
  end
24
26
 
25
27
  def extract_download_links(response)
@@ -49,7 +51,11 @@ module Pulse
49
51
  end
50
52
 
51
53
  def add_base_url(str)
52
- "#{base_url}#{str}"
54
+ if !str.include?('https://') && !str.include?(base_url)
55
+ "https://#{base_url}#{str}"
56
+ else
57
+ str
58
+ end
53
59
  end
54
60
  end
55
61
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pulse-downloader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - trex22