cliaws 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/bin/clis3 +12 -19
- data/config/hoe.rb +3 -3
- data/lib/cliaws/version.rb +1 -1
- metadata +19 -6
data/History.txt
CHANGED
data/bin/clis3
CHANGED
@@ -56,7 +56,7 @@ Main {
|
|
56
56
|
end
|
57
57
|
|
58
58
|
mode("put") do
|
59
|
-
argument("
|
59
|
+
argument("files_or_s3_path") do
|
60
60
|
optional
|
61
61
|
argument_required
|
62
62
|
arity -2
|
@@ -68,17 +68,17 @@ Main {
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def run
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
71
|
+
paths = params["files_or_s3_path"].values
|
72
|
+
s3_object = paths.pop
|
73
|
+
|
74
|
+
if params["data"].given? && !paths.empty? then
|
75
|
+
raise ArgumentError, "Cannot specify both --data and filename(s) to send."
|
76
|
+
elsif params["data"].given? then
|
77
|
+
source = params["data"].value
|
78
|
+
elsif paths == ["-"] then
|
75
79
|
source = STDIN
|
76
|
-
|
77
|
-
|
78
|
-
source = File.open(source_name, "rb")
|
79
|
-
elsif params["local_files"].given? then
|
80
|
-
s3_object = params["local_files"].values.pop
|
81
|
-
targets = params["local_files"].values.map {|filename| filename.to_s}
|
80
|
+
else
|
81
|
+
targets = paths.map {|filename| filename.to_s}
|
82
82
|
targets.each do |local_file|
|
83
83
|
File.open(local_file, "rb") do |source|
|
84
84
|
remote_file = File.join(s3_object, File.basename(local_file))
|
@@ -88,16 +88,9 @@ Main {
|
|
88
88
|
end
|
89
89
|
|
90
90
|
exit 0
|
91
|
-
else
|
92
|
-
source = params["data"].value
|
93
|
-
end
|
94
|
-
|
95
|
-
s3_object = params["local_files"].values.pop
|
96
|
-
if s3_object =~ /\/$/ then
|
97
|
-
raise ArgumentError, "Target is a directory, but input is not a local file -- cannot proceed" if source_name.nil?
|
98
|
-
s3_object = File.join(s3_object, File.basename(source_name))
|
99
91
|
end
|
100
92
|
|
93
|
+
raise ArgumentError, "Target is a directory, but input is not a local file -- cannot proceed" if s3_object =~ /\/$/
|
101
94
|
Cliaws.s3.put(source, s3_object)
|
102
95
|
|
103
96
|
rescue Cliaws::S3::UnknownBucket
|
data/config/hoe.rb
CHANGED
@@ -59,9 +59,9 @@ $hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
|
59
59
|
# == Optional
|
60
60
|
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
61
61
|
p.extra_deps = [
|
62
|
-
["main", "~> 2.8
|
63
|
-
["right_aws", "~> 1.
|
64
|
-
["activesupport", "~> 2.
|
62
|
+
["main", "~> 2.8"],
|
63
|
+
["right_aws", "~> 1.8"],
|
64
|
+
["activesupport", "~> 2.1"]
|
65
65
|
]
|
66
66
|
|
67
67
|
#p.spec_extras = {} # A hash of extra values to set in the gemspec.
|
data/lib/cliaws/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cliaws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Fran\xC3\xA7ois Beausoleil"
|
@@ -9,35 +9,48 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-08-25 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: main
|
17
|
+
type: :runtime
|
17
18
|
version_requirement:
|
18
19
|
version_requirements: !ruby/object:Gem::Requirement
|
19
20
|
requirements:
|
20
21
|
- - ~>
|
21
22
|
- !ruby/object:Gem::Version
|
22
|
-
version: 2.8
|
23
|
+
version: "2.8"
|
23
24
|
version:
|
24
25
|
- !ruby/object:Gem::Dependency
|
25
26
|
name: right_aws
|
27
|
+
type: :runtime
|
26
28
|
version_requirement:
|
27
29
|
version_requirements: !ruby/object:Gem::Requirement
|
28
30
|
requirements:
|
29
31
|
- - ~>
|
30
32
|
- !ruby/object:Gem::Version
|
31
|
-
version: 1.
|
33
|
+
version: "1.8"
|
32
34
|
version:
|
33
35
|
- !ruby/object:Gem::Dependency
|
34
36
|
name: activesupport
|
37
|
+
type: :runtime
|
35
38
|
version_requirement:
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
41
|
- - ~>
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
43
|
+
version: "2.1"
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: hoe
|
47
|
+
type: :development
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.7.0
|
41
54
|
version:
|
42
55
|
description: A command-line suite of tools to access Amazon Web Services, using the RightAws gems.
|
43
56
|
email:
|
@@ -107,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
120
|
requirements: []
|
108
121
|
|
109
122
|
rubyforge_project: cliaws
|
110
|
-
rubygems_version: 1.
|
123
|
+
rubygems_version: 1.2.0
|
111
124
|
signing_key:
|
112
125
|
specification_version: 2
|
113
126
|
summary: A command-line suite of tools to access Amazon Web Services, using the RightAws gems.
|