cloudfiles_cli 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,12 @@ module CloudfilesCli
20
20
  def download(container_name, remotefile, localfile)
21
21
  container = connection.directories.get(container_name)
22
22
  object = container.files.get(remotefile)
23
- IO.binwrite(localfile, object.body)
23
+ if object.nil?
24
+ STDERR.puts "File #{remotefile} not found on cloudfiles"
25
+ exit 1
26
+ else
27
+ IO.binwrite(localfile, object.body)
28
+ end
24
29
  end
25
30
  end
26
31
  end
@@ -1,3 +1,3 @@
1
1
  module CloudfilesCli
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudfiles_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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: 2013-07-25 00:00:00.000000000 Z
12
+ date: 2013-07-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor