pulse-downloader 0.1.6 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +15 -9
- data/lib/pulse/downloader/client.rb +2 -0
- data/lib/pulse/downloader/file_checker.rb +2 -2
- data/lib/pulse/downloader/file_downloader.rb +3 -1
- data/lib/pulse/downloader/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 608d5fcfe9c84a1c201f54a4a74b64dbe285580e733a77fe89f42c8645b6c2e4
|
4
|
+
data.tar.gz: 3252a32fa9955d1d81b158c3cff4c483329dd1d610a663cd48382a0fe40c1ddc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f10828967940a47f023dc610e3121f00eebe8962fea1830ccb25c9d84fc8b244749d094cfbfbc8c9ce0495cd572823058fc9557dc665e318a680c6e000703fa7
|
7
|
+
data.tar.gz: 07becda8b5b3c47908c96c6ee5016980ac053c3555b4acac47f1da7d73cf42bcac692351f877cf2ffd2a33d74107a2687614d25a3a8613593d0181bd6159428b
|
data/Gemfile.lock
CHANGED
@@ -1,23 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pulse-downloader (0.1.
|
4
|
+
pulse-downloader (0.1.11)
|
5
5
|
active_attr (~> 0.15)
|
6
6
|
httparty (~> 0.18)
|
7
7
|
nokogiri (~> 1.11)
|
8
|
+
progress_bar (~> 1.3.3)
|
8
9
|
|
9
10
|
GEM
|
10
11
|
remote: https://rubygems.org/
|
11
12
|
specs:
|
12
|
-
actionpack (6.1.3.
|
13
|
-
actionview (= 6.1.3.
|
14
|
-
activesupport (= 6.1.3.
|
13
|
+
actionpack (6.1.3.2)
|
14
|
+
actionview (= 6.1.3.2)
|
15
|
+
activesupport (= 6.1.3.2)
|
15
16
|
rack (~> 2.0, >= 2.0.9)
|
16
17
|
rack-test (>= 0.6.3)
|
17
18
|
rails-dom-testing (~> 2.0)
|
18
19
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
19
|
-
actionview (6.1.3.
|
20
|
-
activesupport (= 6.1.3.
|
20
|
+
actionview (6.1.3.2)
|
21
|
+
activesupport (= 6.1.3.2)
|
21
22
|
builder (~> 3.1)
|
22
23
|
erubi (~> 1.4)
|
23
24
|
rails-dom-testing (~> 2.0)
|
@@ -26,9 +27,9 @@ GEM
|
|
26
27
|
actionpack (>= 3.0.2, < 7.0)
|
27
28
|
activemodel (>= 3.0.2, < 7.0)
|
28
29
|
activesupport (>= 3.0.2, < 7.0)
|
29
|
-
activemodel (6.1.3.
|
30
|
-
activesupport (= 6.1.3.
|
31
|
-
activesupport (6.1.3.
|
30
|
+
activemodel (6.1.3.2)
|
31
|
+
activesupport (= 6.1.3.2)
|
32
|
+
activesupport (6.1.3.2)
|
32
33
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
33
34
|
i18n (>= 1.6, < 2)
|
34
35
|
minitest (>= 5.1)
|
@@ -45,6 +46,7 @@ GEM
|
|
45
46
|
crass (1.0.6)
|
46
47
|
erubi (1.10.0)
|
47
48
|
hashdiff (1.0.1)
|
49
|
+
highline (2.0.3)
|
48
50
|
httparty (0.18.1)
|
49
51
|
mime-types (~> 3.0)
|
50
52
|
multi_xml (>= 0.5.2)
|
@@ -69,6 +71,10 @@ GEM
|
|
69
71
|
multi_xml (0.6.0)
|
70
72
|
nokogiri (1.11.3-x86_64-linux)
|
71
73
|
racc (~> 1.4)
|
74
|
+
options (2.3.2)
|
75
|
+
progress_bar (1.3.3)
|
76
|
+
highline (>= 1.6, < 3)
|
77
|
+
options (~> 2.3.0)
|
72
78
|
pry (0.14.1)
|
73
79
|
coderay (~> 1.1)
|
74
80
|
method_source (~> 1.0)
|
@@ -10,11 +10,11 @@ module Pulse
|
|
10
10
|
private
|
11
11
|
|
12
12
|
def compute_save_path(url)
|
13
|
-
"#{save_path}/#{compute_filename(url)}".gsub('//', '/')
|
13
|
+
"#{save_path}/#{compute_filename(url)}".gsub('//', '/').gsub(' ', '')
|
14
14
|
end
|
15
15
|
|
16
16
|
def compute_filename(file_path)
|
17
|
-
file_path.scan(/[\/]\S+/).last
|
17
|
+
file_path.scan(/[\/]\S+/).last.split('/').last
|
18
18
|
end
|
19
19
|
|
20
20
|
def list_files_in(path)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Pulse
|
2
2
|
module Downloader
|
3
3
|
module FileDownloader
|
4
|
+
require 'uri'
|
5
|
+
|
4
6
|
# save_path and verify_ssl are defined in client.rb
|
5
7
|
def download(file_path, progress_bar=nil)
|
6
8
|
raise "save_path is undefined" if save_data && save_path == ''
|
@@ -8,7 +10,7 @@ module Pulse
|
|
8
10
|
|
9
11
|
@start_time = get_micro_second_time
|
10
12
|
|
11
|
-
file_data = HTTParty.get(compute_file_link(file_path), verify: verify_ssl)
|
13
|
+
file_data = HTTParty.get(URI.escape(compute_file_link(file_path)), verify: verify_ssl)
|
12
14
|
|
13
15
|
@end_time = get_micro_second_time
|
14
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pulse-downloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- trex22
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|