resync-client 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +16 -12
- data/lib/resync/client/version.rb +1 -1
- data/resync-client.gemspec +1 -1
- data/spec/unit/resync/client/bitstream_spec.rb +2 -2
- data/spec/unit/resync/client/http_helper_spec.rb +18 -6
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa4c934bab5f910e12150c2cafd5c6ce45e74e52
|
4
|
+
data.tar.gz: 1506085c4edec3af5e91d880c092ae4c3462d7d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1164e90bd20134fb7abfa42363586636b0ea43bdb8afcbc76af6b2a12987381c449c5151b5b07e571ab7485f02fc401b9147ef40d3be0dfb9603e7ec43561d2e
|
7
|
+
data.tar.gz: f6e9891cecb8ee287265391c41e27d34badbc15e612656a36b9ce8226fc5e4d625b9a436757a57111022e3eabb935554cbfe26dd9019d136cd3dfd7a99ac56ff
|
data/CHANGES.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
+
## 0.4.5
|
2
|
+
|
3
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.4.4
|
4
|
+
|
1
5
|
## 0.4.4
|
2
6
|
|
3
7
|
- Replace all `require_relative` with absolute `require` to avoid symlink issues
|
4
|
-
- Update [resync](https://github.com/CDLUC3/resync) 0.4.3 (which does the same thing)
|
8
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.4.3 (which does the same thing)
|
5
9
|
|
6
10
|
## 0.4.3
|
7
11
|
|
@@ -11,25 +15,25 @@
|
|
11
15
|
## 0.4.2
|
12
16
|
|
13
17
|
- Make gemspec smart enough to handle SSH checkouts
|
14
|
-
- Update to
|
18
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.4.2
|
15
19
|
|
16
20
|
## 0.4.1
|
17
21
|
|
18
|
-
- Update to
|
22
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.4.1
|
19
23
|
|
20
24
|
## 0.4.0
|
21
25
|
|
22
|
-
- Update to
|
26
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.4.0
|
23
27
|
|
24
28
|
## 0.3.5
|
25
29
|
|
26
30
|
- Fix issue where `Dir.glob` could cause files to be required in an unpredictable order (h/t [nabeta](https://github.com/CDLUC3/resync/pull/1))
|
27
|
-
- Update to
|
31
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.3.4
|
28
32
|
|
29
33
|
## 0.3.4
|
30
34
|
|
31
35
|
- Move GitHub project to [CDLUC3](https://github.com/CDLUC3/)
|
32
|
-
- Update to
|
36
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.3.2
|
33
37
|
|
34
38
|
## 0.3.3
|
35
39
|
|
@@ -46,7 +50,7 @@
|
|
46
50
|
|
47
51
|
## 0.3.0
|
48
52
|
|
49
|
-
- Update to
|
53
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.3.0
|
50
54
|
- Replace `ZipPackages` class with simple enumerable
|
51
55
|
|
52
56
|
## 0.2.6
|
@@ -68,22 +72,22 @@
|
|
68
72
|
|
69
73
|
## 0.2.3
|
70
74
|
|
71
|
-
- Update to
|
75
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.2.2
|
72
76
|
|
73
77
|
## 0.2.2
|
74
78
|
|
75
79
|
- Replaced `Bistream#stream` with `Bitstream#get_input_stream`, which (unlike the former) returns a new stream with each invocation.
|
76
|
-
- Update to
|
80
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.2.1
|
77
81
|
|
78
82
|
## 0.2.1
|
79
83
|
|
80
|
-
- Update to
|
84
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.1.3
|
81
85
|
- Add more tests for client delegation
|
82
86
|
|
83
87
|
## 0.2.0
|
84
88
|
|
85
89
|
- Use named mixins instead of instance monkey-patching for easier documentation and navigation.
|
86
|
-
- Update to
|
90
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.1.2
|
87
91
|
|
88
92
|
## 0.1.2
|
89
93
|
|
@@ -91,7 +95,7 @@
|
|
91
95
|
|
92
96
|
## 0.1.1
|
93
97
|
|
94
|
-
- Update to
|
98
|
+
- Update to [resync](https://github.com/CDLUC3/resync) 0.1.1
|
95
99
|
|
96
100
|
## 0.1.0
|
97
101
|
|
data/resync-client.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
26
|
spec.add_dependency 'promise', '~> 0.3', '>= 0.3.1'
|
27
|
-
spec.add_dependency 'resync', '~> 0.4', '>= 0.4.
|
27
|
+
spec.add_dependency 'resync', '~> 0.4', '>= 0.4.4'
|
28
28
|
spec.add_dependency 'rubyzip', '~> 1.1'
|
29
29
|
|
30
30
|
spec.add_development_dependency 'equivalent-xml', '~> 0.6.0'
|
@@ -31,11 +31,11 @@ module Resync
|
|
31
31
|
|
32
32
|
describe '#new' do
|
33
33
|
it 'requires a zipfile' do
|
34
|
-
expect { Bitstream.new(resource: @resource) }.to raise_error
|
34
|
+
expect { Bitstream.new(resource: @resource) }.to raise_error(ArgumentError)
|
35
35
|
end
|
36
36
|
|
37
37
|
it 'requires a resource' do
|
38
|
-
expect { Bitstream.new(zipfile: @zipfile) }.to raise_error
|
38
|
+
expect { Bitstream.new(zipfile: @zipfile) }.to raise_error(ArgumentError)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
@@ -91,7 +91,9 @@ module Resync
|
|
91
91
|
@redirect = Net::HTTPMovedPermanently.allocate
|
92
92
|
allow(@redirect).to receive(:[]).with('location').and_return(uri.to_s)
|
93
93
|
expect(@http).to receive(:request).with(request_for(uri: uri, headers: { 'User-Agent' => user_agent })).exactly(HTTPHelper::DEFAULT_MAX_REDIRECTS).times.and_yield(@redirect)
|
94
|
-
expect { helper.fetch(uri: uri) }.to raise_error
|
94
|
+
expect { helper.fetch(uri: uri) }.to raise_error do |e|
|
95
|
+
expect(e.message).to match(/Redirect limit.*exceeded.*#{uri.to_s}/)
|
96
|
+
end
|
95
97
|
end
|
96
98
|
|
97
99
|
it 'fails on a 4xx' do
|
@@ -100,7 +102,9 @@ module Resync
|
|
100
102
|
allow(@error).to receive(:message).and_return('Forbidden')
|
101
103
|
expect(@http).to receive(:request).and_yield(@error)
|
102
104
|
uri = URI('http://example.org/')
|
103
|
-
expect { helper.fetch(uri: uri) }.to raise_error
|
105
|
+
expect { helper.fetch(uri: uri) }.to raise_error do |e|
|
106
|
+
expect(e.message).to match(/403.*Forbidden.*#{uri.to_s}/)
|
107
|
+
end
|
104
108
|
end
|
105
109
|
|
106
110
|
it 'fails on a 5xx' do
|
@@ -109,7 +113,9 @@ module Resync
|
|
109
113
|
allow(@error).to receive(:message).and_return('Internal Server Error')
|
110
114
|
expect(@http).to receive(:request).and_yield(@error)
|
111
115
|
uri = URI('http://example.org/')
|
112
|
-
expect { helper.fetch(uri: uri) }.to raise_error
|
116
|
+
expect { helper.fetch(uri: uri) }.to raise_error do |e|
|
117
|
+
expect(e.message).to match(/500.*Internal Server Error.*#{uri.to_s}/)
|
118
|
+
end
|
113
119
|
end
|
114
120
|
end
|
115
121
|
|
@@ -197,7 +203,9 @@ module Resync
|
|
197
203
|
@redirect = Net::HTTPMovedPermanently.allocate
|
198
204
|
allow(@redirect).to receive(:[]).with('location').and_return(uri.to_s)
|
199
205
|
expect(@http).to receive(:request).with(request_for(uri: uri, headers: { 'User-Agent' => user_agent })).exactly(HTTPHelper::DEFAULT_MAX_REDIRECTS).times.and_yield(@redirect)
|
200
|
-
expect { @path = helper.fetch_to_file(uri: uri) }.to raise_error
|
206
|
+
expect { @path = helper.fetch_to_file(uri: uri) }.to raise_error do |e|
|
207
|
+
expect(e.message).to match(/Redirect limit.*exceeded.*#{uri.to_s}/)
|
208
|
+
end
|
201
209
|
expect(@path).to be_nil
|
202
210
|
end
|
203
211
|
|
@@ -207,7 +215,9 @@ module Resync
|
|
207
215
|
allow(@error).to receive(:message).and_return('Forbidden')
|
208
216
|
expect(@http).to receive(:request).and_yield(@error)
|
209
217
|
uri = URI('http://example.org/')
|
210
|
-
expect { @path = helper.fetch_to_file(uri: uri) }.to raise_error
|
218
|
+
expect { @path = helper.fetch_to_file(uri: uri) }.to raise_error do |e|
|
219
|
+
expect(e.message).to match(/403.*Forbidden.*#{uri.to_s}/)
|
220
|
+
end
|
211
221
|
expect(@path).to be_nil
|
212
222
|
end
|
213
223
|
|
@@ -217,7 +227,9 @@ module Resync
|
|
217
227
|
allow(@error).to receive(:message).and_return('Internal Server Error')
|
218
228
|
expect(@http).to receive(:request).and_yield(@error)
|
219
229
|
uri = URI('http://example.org/')
|
220
|
-
expect { helper.fetch_to_file(uri: uri) }.to raise_error
|
230
|
+
expect { helper.fetch_to_file(uri: uri) }.to raise_error do |e|
|
231
|
+
expect(e.message).to match(/500.*Internal Server Error.*#{uri.to_s}/)
|
232
|
+
end
|
221
233
|
end
|
222
234
|
|
223
235
|
it 'accepts a file path argument' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resync-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Moles
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: promise
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '0.4'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.4.
|
42
|
+
version: 0.4.4
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '0.4'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 0.4.
|
52
|
+
version: 0.4.4
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rubyzip
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|