desi 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/desi/downloader.rb +1 -1
- data/lib/desi/http_client.rb +14 -0
- data/lib/desi/upstream.rb +1 -1
- data/lib/desi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c74666291128597abbb2c751ed8c125b791ea699
|
4
|
+
data.tar.gz: a0b0984000ee60daa64e6e1958cb97d10921f725
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a201cc1dccdb342f0acd44bd3194662c36dbdd21f99a48f619ea70b296bb382fcc8b9276e03273c1ac691458c4b3c2e0f40260ab09bede2db7b571f09a43ea99
|
7
|
+
data.tar.gz: 3f53e586c85b49163cecf83da3a097568fc77d6897578d6c9c6eebd56829dd41d281eef14ef44dc734d8e163e80e63a27f4f65134f1d0516b2b4b8b23891572d
|
data/lib/desi/downloader.rb
CHANGED
data/lib/desi/http_client.rb
CHANGED
@@ -60,6 +60,20 @@ module Desi
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
+
def get_file(path, destination)
|
64
|
+
Net::HTTP.start(@uri.host, @uri.port, use_ssl: @uri.scheme == 'https') do |http|
|
65
|
+
request = Net::HTTP::Get.new path
|
66
|
+
|
67
|
+
http.request request do |response|
|
68
|
+
open destination, 'w' do |io|
|
69
|
+
response.read_body do |chunk|
|
70
|
+
io.write chunk
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
63
77
|
private
|
64
78
|
|
65
79
|
def to_uri(host_string)
|
data/lib/desi/upstream.rb
CHANGED
data/lib/desi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: desi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominique Rose-Rosette
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: boson
|