capistrano-scale 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -21,14 +21,22 @@ module CapistranoScale
|
|
21
21
|
:key => capistrano_config[:aws_releases_bucket],
|
22
22
|
:public => false
|
23
23
|
)
|
24
|
-
logger.debug "Uploading initialization script to S3"
|
25
|
-
|
26
|
-
|
24
|
+
logger.debug "Uploading #{install_cmd_path} initialization script to S3"
|
25
|
+
key = "#{rails_env}/#{application}/aws_install.sh"
|
26
|
+
existing = aws_directory.files.get(key)
|
27
|
+
existing.destroy if existing
|
28
|
+
file = aws_directory.files.new(
|
29
|
+
:key => key,
|
27
30
|
:body => File.open(install_cmd_path),
|
28
31
|
:acl => 'public-read',
|
29
32
|
:encryption => 'AES256'
|
30
33
|
)
|
31
|
-
|
34
|
+
begin
|
35
|
+
file.save
|
36
|
+
logger.debug "AWS Install script uploaded in #{key}"
|
37
|
+
rescue => e
|
38
|
+
raise(Capistrano::Error, "S3 File upload failed: #{e.class.to_s}:#{e.message}")
|
39
|
+
end
|
32
40
|
end
|
33
41
|
end
|
34
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-scale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.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-
|
12
|
+
date: 2012-11-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|