pulse-downloader 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pulse/downloader/client.rb +14 -1
- data/lib/pulse/downloader/version.rb +1 -1
- data/lib/pulse/downloader/web_page_parser.rb +1 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b50ec4293c1d064d672f7b9c8271837420deb866826a85d8c3016ca348bfd39
|
4
|
+
data.tar.gz: d4b35e8706bece03ba778320bb524fd8164f3b7e1933a3f79939b38abe5f9d20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8626f65c533de9ca6422d6a1ea18c018e2ca23316ecd2678a5c9a733fe65d72eb1fd921e9a1215839e8501849cc36cb3c96d4e9cfa39e107fbc5422bc2d7be7
|
7
|
+
data.tar.gz: 70cc3bb87274c39ee93060292ee343144157806dd8900f78a564363bfad2a997182b2ae104ec0941603256fc8d38583d041f01e541d520ed169dc51989fb1f1b
|
@@ -18,7 +18,8 @@ module Pulse
|
|
18
18
|
:report_time,
|
19
19
|
:start_time,
|
20
20
|
:end_time,
|
21
|
-
:progress_bar
|
21
|
+
:progress_bar,
|
22
|
+
:base_url
|
22
23
|
|
23
24
|
# Does not continue downloads-
|
24
25
|
# Will only save once the file has been downloaded in memory
|
@@ -51,6 +52,8 @@ module Pulse
|
|
51
52
|
@save_and_dont_return = save_and_dont_return
|
52
53
|
@report_time = report_time
|
53
54
|
@progress_bar = progress_bar
|
55
|
+
|
56
|
+
@base_url = get_base_url
|
54
57
|
end
|
55
58
|
|
56
59
|
def call!
|
@@ -76,6 +79,16 @@ module Pulse
|
|
76
79
|
|
77
80
|
private
|
78
81
|
|
82
|
+
def get_base_url
|
83
|
+
url_breakdown = url.split('/')
|
84
|
+
|
85
|
+
if url_breakdown.first.include?('https')
|
86
|
+
url_breakdown[2]
|
87
|
+
else
|
88
|
+
url_breakdown.first
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
79
92
|
def get_micro_second_time
|
80
93
|
(Time.now.to_f * 1000).to_i
|
81
94
|
end
|