pinch 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pinch.rb +1 -8
  3. data/spec/pinch_spec.rb +0 -11
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 030d2274d6753a92063e30f52381861e0ac69668
4
- data.tar.gz: 3f3dcec53eae2f7aa575848f0d69ea2ff1059ec4
3
+ metadata.gz: 453f4b28e5090149f8b945f3f0580ec7c86bb03d
4
+ data.tar.gz: 6fc91dd51d7da613238e8d666df447675b0c8a04
5
5
  SHA512:
6
- metadata.gz: c5c1921fde2cb1f4531664a7bfa11b6fb4dadd3f35511bf3e7efa91efdcceb3c3f33b9ce6292dffa98c5fdad361f5cc3bf3192415d1690edd7c1e687adf8316e
7
- data.tar.gz: 18f2ed70982f7e3f85c4b4157310229bd2bda5798e2abec73eb73c43ba33a113c72e788a0d6817516908e8f17e81029f856621765e54148c1d571414b1f8e8e1
6
+ metadata.gz: d870cd1eacf3eb19338758332abbf746610cf09a930f72708bc0914650d3fde4dff1eaa065deb5d821aa02a16ec24495a980210191bb196d36ba22cb93af1044
7
+ data.tar.gz: 0199690caf877f1d152b7422034da937c4809fadfc49035da30193b7d9f0bb6625535f2419bcc863bd8d1136fc3af6550d88a93a0ae17ec62f64516c09b54353
@@ -6,7 +6,7 @@ require 'pinch_response'
6
6
  # @author Peter Hellberg
7
7
  # @author Edward Patel
8
8
  class Pinch
9
- VERSION = "0.3.2"
9
+ VERSION = "0.3.3"
10
10
 
11
11
  attr_reader :get_uri, :user, :pass
12
12
 
@@ -130,12 +130,6 @@ class Pinch
130
130
  # Raise exception if the response code isn’t in the 2xx range
131
131
  response.error! unless response.kind_of?(Net::HTTPSuccess)
132
132
 
133
- # Raise exception if the server doesn’t support the Range header
134
- unless (response['Accept-Ranges'] or "").include?('bytes')
135
- raise RangeHeaderException,
136
- "Range HTTP header not supported on #{@head_uri.host}"
137
- end
138
-
139
133
  response['Content-Length'].to_i
140
134
  rescue Net::HTTPRetriableError => e
141
135
  @head_uri = URI.parse(e.response['Location'])
@@ -302,6 +296,5 @@ private
302
296
  http
303
297
  end
304
298
 
305
- class RangeHeaderException < StandardError; end
306
299
  class TooManyRedirects < StandardError; end
307
300
  end
@@ -30,17 +30,6 @@ end
30
30
  require File.dirname(__FILE__) + '/../lib/pinch'
31
31
 
32
32
  describe Pinch do
33
- describe "url that redirects to the pinch zipball" do
34
- it "should throw an exception about missing Range header support on GitHub" do
35
- VCR.use_cassette('pinch_zipball') do
36
- @url = 'https://github.com/peterhellberg/pinch/zipball/master'
37
- lambda {
38
- Pinch.file_list(@url)
39
- }.must_raise Pinch::RangeHeaderException
40
- end
41
- end
42
- end
43
-
44
33
  describe "when calling get on a compressed ZIP file" do
45
34
  it "should return the contents of the file" do
46
35
  VCR.use_cassette('squeak') do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Hellberg
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-04 00:00:00.000000000 Z
12
+ date: 2015-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  requirements: []
95
95
  rubyforge_project:
96
- rubygems_version: 2.2.0.rc.1
96
+ rubygems_version: 2.4.6
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Retrieve a file from inside a zip file, over the network!