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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 898829d177296f18bf160341541aa0be1725e08b
4
- data.tar.gz: dca72e48e4374d128a4acbfeb62bdb6a5429f452
3
+ metadata.gz: c74666291128597abbb2c751ed8c125b791ea699
4
+ data.tar.gz: a0b0984000ee60daa64e6e1958cb97d10921f725
5
5
  SHA512:
6
- metadata.gz: 986cb2ac1e0670d468a7d45198300584d62696f8eff4ce2c613fc939619e531a165e764345478156653cc00b839b8def8b5d9b05680dfa9ee95be2fdb165ac1a
7
- data.tar.gz: 353d9a3a1078f6c9b1d7eb542abbc06e7cd7a4698f8798834c40ddff7b9fbcb95748c837581d34beb171906cb2ecb3021597fdb1561c348bd92bbfb73590162f
6
+ metadata.gz: a201cc1dccdb342f0acd44bd3194662c36dbdd21f99a48f619ea70b296bb382fcc8b9276e03273c1ac691458c4b3c2e0f40260ab09bede2db7b571f09a43ea99
7
+ data.tar.gz: 3f53e586c85b49163cecf83da3a097568fc77d6897578d6c9c6eebd56829dd41d281eef14ef44dc734d8e163e80e63a27f4f65134f1d0516b2b4b8b23891572d
@@ -23,7 +23,7 @@ module Desi
23
23
 
24
24
  puts " * fetching release #{version} from #{@host + path}" if @verbose
25
25
 
26
- File.open(destination_name, 'w') {|f| f << @client.get(path).body }
26
+ @client.get_file(path, destination_name)
27
27
 
28
28
  destination_name
29
29
  end
@@ -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)
@@ -60,7 +60,7 @@ module Desi
60
60
  private
61
61
 
62
62
  def fetch_tags
63
- JSON.parse @client.get('/repos/elasticsearch/elasticsearch/tags').body
63
+ JSON.parse @client.get('/repos/elastic/elasticsearch/tags').body
64
64
  end
65
65
 
66
66
  end
@@ -1,3 +1,3 @@
1
1
  module Desi
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
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.1
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-02-27 00:00:00.000000000 Z
11
+ date: 2015-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: boson