standup 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,6 @@ module Standup
8
8
  @keypair_file = Settings.aws.keypair_file
9
9
  @user = @node.scripts.ec2.params.ssh_user
10
10
  @ssh = nil
11
- @rvm_installed = nil
12
11
  @context = {}
13
12
  end
14
13
 
@@ -140,8 +139,8 @@ module Standup
140
139
  result
141
140
  end
142
141
 
143
- def file_exists? path, raw = false
144
- send(:"#{raw ? 'raw_' : ''}exec", "if [ -e #{path} ]; then echo 'true'; fi") == "true\n"
142
+ def file_exists? path
143
+ exec("if [ -e #{path} ]; then echo 'true'; fi") =~ /true/
145
144
  end
146
145
 
147
146
  def install_packages packages, opts = {}
@@ -186,7 +185,7 @@ module Standup
186
185
 
187
186
  def rvm_installed?
188
187
  unless instance_variable_defined? :@rvm_installed
189
- @rvm_installed = file_exists?('/usr/local/rvm/bin/rvm', true)
188
+ @rvm_installed = !!(raw_exec('which rvm') =~ /rvm/)
190
189
  end
191
190
  @rvm_installed
192
191
  end
@@ -1,5 +1,5 @@
1
1
  module Standup
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
 
4
4
  def self.version
5
5
  VERSION
data/scripts/db_backup.rb CHANGED
@@ -1,4 +1,4 @@
1
- klnblkblkbklblkcdStandup.script :node do
1
+ Standup.script :node do
2
2
  def run
3
3
  exec "s3cmd mb #{bucket}"
4
4
 
data/scripts/passenger.rb CHANGED
@@ -9,10 +9,12 @@ Standup.script :node do
9
9
 
10
10
  sudo 'mkdir -p /opt/nginx/conf/servers'
11
11
 
12
- upload script_file('nginx.conf'),
13
- :to =>'/opt/nginx/conf/nginx.conf',
14
- :sudo => true
15
-
12
+ with_processed_file script_file('nginx.conf') do |file|
13
+ upload file,
14
+ :to =>'/opt/nginx/conf/nginx.conf',
15
+ :sudo => true
16
+ end
17
+
16
18
  upload script_file('nginx'),
17
19
  :to =>'/etc/init.d/nginx',
18
20
  :sudo => true
@@ -8,8 +8,8 @@ events {
8
8
  }
9
9
 
10
10
  http {
11
- passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.4;
12
- passenger_ruby /usr/local/bin/ruby;
11
+ passenger_root <%= scripts.ruby.info[:gem_dir] %>/passenger-3.0.7;
12
+ passenger_ruby <%= scripts.ruby.info[:bin_ruby] %>;
13
13
 
14
14
  include mime.types;
15
15
  default_type application/octet-stream;
data/scripts/ruby.rb CHANGED
@@ -16,6 +16,14 @@ Standup.script :node do
16
16
  end
17
17
  end
18
18
 
19
+ def info
20
+ @rvminfo ||= YAML.load(exec('rvm info')).values.first
21
+ {
22
+ :gem_dir => "#{@rvminfo['homes']['gem']}/gems",
23
+ :bin_ruby => @rvminfo['binaries']['ruby']
24
+ }
25
+ end
26
+
19
27
  def version
20
28
  @version ||= begin
21
29
  files = Dir['**/.rvmrc']
metadata CHANGED
@@ -1,119 +1,116 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: standup
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.4
4
5
  prerelease:
5
- version: 0.5.3
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Ilia Ablamonov
9
9
  - Artem Orlov
10
10
  - Cloud Castle Inc.
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
-
15
- date: 2011-07-06 00:00:00 +04:00
14
+ date: 2011-07-06 00:00:00.000000000 +04:00
16
15
  default_executable:
17
- dependencies:
18
- - !ruby/object:Gem::Dependency
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
19
18
  name: trollop
20
- prerelease: false
21
- requirement: &id001 !ruby/object:Gem::Requirement
19
+ requirement: &2153220240 !ruby/object:Gem::Requirement
22
20
  none: false
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: "1.16"
21
+ requirements:
22
+ - - ! '>='
23
+ - !ruby/object:Gem::Version
24
+ version: '1.16'
27
25
  type: :runtime
28
- version_requirements: *id001
29
- - !ruby/object:Gem::Dependency
30
- name: i18n
31
26
  prerelease: false
32
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ version_requirements: *2153220240
28
+ - !ruby/object:Gem::Dependency
29
+ name: i18n
30
+ requirement: &2153219740 !ruby/object:Gem::Requirement
33
31
  none: false
34
- requirements:
35
- - - ">="
36
- - !ruby/object:Gem::Version
32
+ requirements:
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
37
35
  version: 0.5.0
38
36
  type: :runtime
39
- version_requirements: *id002
40
- - !ruby/object:Gem::Dependency
41
- name: activesupport
42
37
  prerelease: false
43
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ version_requirements: *2153219740
39
+ - !ruby/object:Gem::Dependency
40
+ name: activesupport
41
+ requirement: &2153219220 !ruby/object:Gem::Requirement
44
42
  none: false
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: "3.0"
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '3.0'
49
47
  type: :runtime
50
- version_requirements: *id003
51
- - !ruby/object:Gem::Dependency
52
- name: settingslogic
53
48
  prerelease: false
54
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ version_requirements: *2153219220
50
+ - !ruby/object:Gem::Dependency
51
+ name: settingslogic
52
+ requirement: &2153218740 !ruby/object:Gem::Requirement
55
53
  none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: "2.0"
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '2.0'
60
58
  type: :runtime
61
- version_requirements: *id004
62
- - !ruby/object:Gem::Dependency
63
- name: amazon-ec2
64
59
  prerelease: false
65
- requirement: &id005 !ruby/object:Gem::Requirement
60
+ version_requirements: *2153218740
61
+ - !ruby/object:Gem::Dependency
62
+ name: amazon-ec2
63
+ requirement: &2153218260 !ruby/object:Gem::Requirement
66
64
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- version: "0.9"
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0.9'
71
69
  type: :runtime
72
- version_requirements: *id005
73
- - !ruby/object:Gem::Dependency
74
- name: aws-s3
75
70
  prerelease: false
76
- requirement: &id006 !ruby/object:Gem::Requirement
71
+ version_requirements: *2153218260
72
+ - !ruby/object:Gem::Dependency
73
+ name: aws-s3
74
+ requirement: &2153217800 !ruby/object:Gem::Requirement
77
75
  none: false
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- version: "0.5"
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0.5'
82
80
  type: :runtime
83
- version_requirements: *id006
84
- - !ruby/object:Gem::Dependency
85
- name: net-ssh
86
81
  prerelease: false
87
- requirement: &id007 !ruby/object:Gem::Requirement
82
+ version_requirements: *2153217800
83
+ - !ruby/object:Gem::Dependency
84
+ name: net-ssh
85
+ requirement: &2153217340 !ruby/object:Gem::Requirement
88
86
  none: false
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- version: "2.0"
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '2.0'
93
91
  type: :runtime
94
- version_requirements: *id007
95
- - !ruby/object:Gem::Dependency
96
- name: highline
97
92
  prerelease: false
98
- requirement: &id008 !ruby/object:Gem::Requirement
93
+ version_requirements: *2153217340
94
+ - !ruby/object:Gem::Dependency
95
+ name: highline
96
+ requirement: &2153216880 !ruby/object:Gem::Requirement
99
97
  none: false
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
103
101
  version: 1.5.2
104
102
  type: :runtime
105
- version_requirements: *id008
106
- description: ""
107
- email:
103
+ prerelease: false
104
+ version_requirements: *2153216880
105
+ description: ''
106
+ email:
108
107
  - ilia@flamefork.ru
109
108
  - art.orlov@gmail.com
110
- executables:
109
+ executables:
111
110
  - standup
112
111
  extensions: []
113
-
114
112
  extra_rdoc_files: []
115
-
116
- files:
113
+ files:
117
114
  - .gitignore
118
115
  - .rvmrc
119
116
  - Gemfile
@@ -186,30 +183,27 @@ files:
186
183
  has_rdoc: true
187
184
  homepage: https://github.com/cloudcastle/standup
188
185
  licenses: []
189
-
190
186
  post_install_message:
191
187
  rdoc_options: []
192
-
193
- require_paths:
188
+ require_paths:
194
189
  - lib
195
- required_ruby_version: !ruby/object:Gem::Requirement
190
+ required_ruby_version: !ruby/object:Gem::Requirement
196
191
  none: false
197
- requirements:
198
- - - ">="
199
- - !ruby/object:Gem::Version
200
- version: "0"
201
- required_rubygems_version: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ! '>='
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ required_rubygems_version: !ruby/object:Gem::Requirement
202
197
  none: false
203
- requirements:
204
- - - ">="
205
- - !ruby/object:Gem::Version
206
- version: "0"
198
+ requirements:
199
+ - - ! '>='
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
207
202
  requirements: []
208
-
209
203
  rubyforge_project: standup
210
204
  rubygems_version: 1.6.2
211
205
  signing_key:
212
206
  specification_version: 3
213
- summary: Standup is an application deployment and infrastructure management tool for Rails and Amazon EC2
207
+ summary: Standup is an application deployment and infrastructure management tool for
208
+ Rails and Amazon EC2
214
209
  test_files: []
215
-