ridley 1.7.0 → 1.7.1

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: 216f146a9f80f6c69560dd58c6c8f79a0ccc3a8b
4
- data.tar.gz: 66c4fed1770ed8d1c2f7493c01280cc01e2f15fe
3
+ metadata.gz: b2a78cdade0a4199cf9793a2f4eca28e61baf9e7
4
+ data.tar.gz: 9dd018fd3730ce690dad3be7eabb725621bb5ca3
5
5
  SHA512:
6
- metadata.gz: 9ec951c99b32ff1588fdc1609f2a1e0bb594f091b0b3bd90757c728ded0a35e154860e66f29ed57c683426c3d188cda1efb963f2e3ab6a31f97ad206382c6b4e
7
- data.tar.gz: 18d53a050989ae16eae0b8aa6d99c3bc4740b01bffd082bb46cecea04eea05e9e70955c6ee7c34c2d54b8a170ac0c1711f485667cfa294db91ddd3d5f68654a0
6
+ metadata.gz: a23d46b865752707d88c46f48fcde018fe0f3643251d07b414f9029ba6c536d4c46e64ddd7a193b53058a034669ef2515cf67e4a27cd7bdbccbce8f7e3476e2a
7
+ data.tar.gz: 1c54de6e0a88d546024e42de38b0cfb0a633de0b1e03f3515fc75f8dd357c6cc40c451b105da999c01323561072f296dd04ad3f1a63cdb70d635ac3b28d5fb6e
data/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ # 1.7.1
2
+
3
+ * [#224](https://github.com/RiotGames/ridley/pull/224) Connection#stream will now return true/false on whether it copied the file that was streamed.
@@ -122,6 +122,8 @@ module Ridley
122
122
  # a URL to stream the response body from
123
123
  # @param [String] destination
124
124
  # a location on disk to stream the content of the response body to
125
+ #
126
+ # @return [Boolean] true when the destination file exists
125
127
  def stream(target, destination)
126
128
  FileUtils.mkdir_p(File.dirname(destination))
127
129
 
@@ -157,6 +159,7 @@ module Ridley
157
159
  local.flush
158
160
 
159
161
  FileUtils.cp(local.path, destination)
162
+ File.exists?(destination)
160
163
  rescue OpenURI::HTTPError => ex
161
164
  abort(ex)
162
165
  ensure
@@ -1,3 +1,3 @@
1
1
  module Ridley
2
- VERSION = "1.7.0"
2
+ VERSION = "1.7.1"
3
3
  end
@@ -65,6 +65,10 @@ describe Ridley::Connection do
65
65
  File.exist?(destination).should be_true
66
66
  end
67
67
 
68
+ it "returns true when the file was copied" do
69
+ expect(subject.stream(target, destination)).to be_true
70
+ end
71
+
68
72
  it "contains the contents of the response body" do
69
73
  subject.stream(target, destination)
70
74
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridley
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-17 00:00:00.000000000 Z
12
+ date: 2013-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
@@ -288,6 +288,7 @@ files:
288
288
  - .gitignore
289
289
  - .ruby-version
290
290
  - .travis.yml
291
+ - CHANGELOG.md
291
292
  - Gemfile
292
293
  - Guardfile
293
294
  - LICENSE