simple_deploy 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/simple_deploy/config.rb +10 -10
- data/lib/simple_deploy/deployment.rb +11 -7
- data/lib/simple_deploy/version.rb +1 -1
- metadata +11 -11
data/lib/simple_deploy/config.rb
CHANGED
@@ -16,24 +16,24 @@ module SimpleDeploy
|
|
16
16
|
config['deploy']['artifacts']
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
config['deploy']['
|
19
|
+
def deploy_script
|
20
|
+
config['deploy']['script']
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
24
|
-
config['
|
23
|
+
def environments
|
24
|
+
config['environments']
|
25
25
|
end
|
26
26
|
|
27
|
-
def
|
28
|
-
|
27
|
+
def gateway(name)
|
28
|
+
environments[name]['gateway']
|
29
29
|
end
|
30
30
|
|
31
|
-
def
|
32
|
-
|
31
|
+
def key(name)
|
32
|
+
environments[name]['key'] ||= "#{env_home}/.ssh/id_rsa"
|
33
33
|
end
|
34
34
|
|
35
|
-
def
|
36
|
-
|
35
|
+
def user(name)
|
36
|
+
environments[name]['user'] ||= "#{env_user}"
|
37
37
|
end
|
38
38
|
|
39
39
|
def environment(name)
|
@@ -56,22 +56,26 @@ module SimpleDeploy
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def ssh_options
|
59
|
-
@logger.info "Setting key to #{@config.key}."
|
59
|
+
@logger.info "Setting key to #{@config.key(@environment)}."
|
60
60
|
{
|
61
|
-
:keys => @config.key,
|
61
|
+
:keys => @config.key(@environment),
|
62
62
|
:paranoid => false
|
63
63
|
}
|
64
64
|
end
|
65
65
|
|
66
66
|
def create_deployment
|
67
67
|
@deployment = Capistrano::Configuration.new
|
68
|
-
if @config.user
|
69
|
-
@logger.info "Setting user to #{@config.user}."
|
70
|
-
@deployment.set :user, @config.user
|
68
|
+
if @config.user(@environment)
|
69
|
+
@logger.info "Setting user to #{@config.user(@environment)}."
|
70
|
+
@deployment.set :user, @config.user(@environment)
|
71
71
|
end
|
72
|
-
|
72
|
+
|
73
|
+
if @config.gateway(@environment)
|
74
|
+
@deployment.set :gateway, @config.gateway(@environment)
|
75
|
+
end
|
76
|
+
|
73
77
|
@deployment.variables[:ssh_options] = ssh_options
|
74
|
-
@logger.info "Proxying via gateway #{@config.gateway}."
|
78
|
+
@logger.info "Proxying via gateway #{@config.gateway(@environment)}."
|
75
79
|
|
76
80
|
@instances.each do |i|
|
77
81
|
@logger.info "Adding instance #{i}."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-06-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70297023524640 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70297023524640
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: capistrano
|
27
|
-
requirement: &
|
27
|
+
requirement: &70297023523820 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70297023523820
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: stackster
|
38
|
-
requirement: &
|
38
|
+
requirement: &70297023523260 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - =
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.2.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70297023523260
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: trollop
|
49
|
-
requirement: &
|
49
|
+
requirement: &70297023522820 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70297023522820
|
58
58
|
description: I am designed to deploy artifacts uploaded by Heirloom
|
59
59
|
email:
|
60
60
|
- brett@weav.net
|
@@ -100,7 +100,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
segments:
|
102
102
|
- 0
|
103
|
-
hash:
|
103
|
+
hash: -4243280396597296498
|
104
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
segments:
|
111
111
|
- 0
|
112
|
-
hash:
|
112
|
+
hash: -4243280396597296498
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project: simple_deploy
|
115
115
|
rubygems_version: 1.8.16
|