bosh_cli 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -273,7 +273,7 @@ module Bosh::Cli
273
273
 
274
274
  blob = @index[path]
275
275
  size = blob["size"].to_i
276
- tmp_file = Tempfile.new("bosh-blob")
276
+ tmp_file = File.open(File.join(Dir.mktmpdir, "bosh-blob"), "w")
277
277
 
278
278
  download_label = "downloading"
279
279
  if size > 0
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bosh
4
4
  module Cli
5
- VERSION = "1.0.2"
5
+ VERSION = "1.0.3"
6
6
  end
7
7
  end
@@ -162,17 +162,14 @@ describe Bosh::Cli::BlobManager do
162
162
  }
163
163
  }
164
164
 
165
- tmp_file = Tempfile.new("mock-blob")
166
- Tempfile.stub!(:new).with("bosh-blob").and_return(tmp_file)
167
-
168
165
  File.open(File.join(@config_dir, "blobs.yml"), "w") do |f|
169
166
  YAML.dump(index, f)
170
167
  end
171
168
 
172
169
  @manager = make_manager(@release)
173
170
  @blobstore.should_receive(:get).with("deadbeef",
174
- an_instance_of(Tempfile)).
175
- and_return { tmp_file.write("blob contents"); tmp_file.close }
171
+ an_instance_of(File)).
172
+ and_return { |_, f | f.write("blob contents") }
176
173
 
177
174
  path = @manager.download_blob("foo")
178
175
  File.read(path).should == "blob contents"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-19 00:00:00.000000000 Z
12
+ date: 2012-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bosh_common
@@ -355,7 +355,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
355
355
  version: '0'
356
356
  segments:
357
357
  - 0
358
- hash: 1768623608399422134
358
+ hash: 3581265501078885115
359
359
  required_rubygems_version: !ruby/object:Gem::Requirement
360
360
  none: false
361
361
  requirements:
@@ -364,7 +364,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
364
364
  version: '0'
365
365
  segments:
366
366
  - 0
367
- hash: 1768623608399422134
367
+ hash: 3581265501078885115
368
368
  requirements: []
369
369
  rubyforge_project:
370
370
  rubygems_version: 1.8.24