cloudfiles_cli 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
data/lib/cloudfiles_cli/cli.rb
CHANGED
@@ -23,5 +23,13 @@ module CloudfilesCli
|
|
23
23
|
def exists(container, remote_filename)
|
24
24
|
Transactions.new(Config.new(options)).exists(container, remote_filename)
|
25
25
|
end
|
26
|
+
|
27
|
+
desc "list CONTAINER", "List container contents"
|
28
|
+
option :username
|
29
|
+
option :api_key
|
30
|
+
option :auth_url
|
31
|
+
def list(container)
|
32
|
+
Transactions.new(Config.new(options)).list(container)
|
33
|
+
end
|
26
34
|
end
|
27
35
|
end
|
@@ -31,6 +31,10 @@ module CloudfilesCli
|
|
31
31
|
puts("#{remotefile} found in #{container_name}")
|
32
32
|
end
|
33
33
|
|
34
|
+
def list(container_name)
|
35
|
+
puts container(container_name).files.map(&:key)
|
36
|
+
end
|
37
|
+
|
34
38
|
def container(container_name)
|
35
39
|
connection.directories.get(container_name) ||
|
36
40
|
abort("Container #{container_name} not found on cloudfiles")
|
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.
|
4
|
+
version: 0.0.5
|
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-
|
12
|
+
date: 2013-09-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|