magicmonkey 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -134,10 +134,9 @@ module MagicMonkey
134
134
  vh_file = "#{o[:vhost_path]}/#{app_name}"
135
135
  if (!File.exist?(vh_file) || o[:overwrite_files])
136
136
  begin
137
- Cocaine::CommandLine.new('sudo echo', "'#{o[:vhost_template]}' > #{vh_file}").run
137
+ Cocaine::CommandLine.new("sudo bash -c \"echo '#{o[:vhost_template]}' > #{vh_file}\"").run
138
138
  rescue Cocaine::ExitStatusError => e
139
139
  rputs 'Failed to write virtual host file.'
140
- exit
141
140
  end
142
141
  else
143
142
  puts "Virtual host file '#{vh_file}' already exist. Use option '-f' to replace it. Skip creation."
@@ -148,7 +147,6 @@ module MagicMonkey
148
147
  Cocaine::CommandLine.new("sudo a2ensite '#{app_name}'").run
149
148
  rescue Cocaine::ExitStatusError => e
150
149
  rputs 'Failed to enable the site.'
151
- exit
152
150
  end
153
151
  end
154
152
  if o[:enable_site] && o[:reload_apache]
@@ -156,7 +154,6 @@ module MagicMonkey
156
154
  Cocaine::CommandLine.new('sudo /etc/init.d/apache2 reload').run
157
155
  rescue Cocaine::ExitStatusError => e
158
156
  rputs 'Failed to reload Apache.'
159
- exit
160
157
  end
161
158
  end
162
159
  Conf[app_name] = o.select{|k,v| [:ruby, :port, :app_server, :app_server_options, :app_path, :vhost_path].include?(k)}
@@ -266,6 +263,7 @@ module MagicMonkey
266
263
  applications = args
267
264
  applications = Conf.applications if applications.empty?
268
265
  applications.each do |app_name|
266
+ puts app_name.upcase
269
267
  pp Conf[app_name]
270
268
  puts '-'*80
271
269
  end
@@ -1,3 +1,3 @@
1
1
  module Magicmonkey
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magicmonkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-25 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cocaine
16
- requirement: &70166973463740 !ruby/object:Gem::Requirement
16
+ requirement: &70114353832880 !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: :runtime
23
23
  prerelease: false
24
- version_requirements: *70166973463740
24
+ version_requirements: *70114353832880
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: term-ansicolor
27
- requirement: &70166973463280 !ruby/object:Gem::Requirement
27
+ requirement: &70114353832400 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70166973463280
35
+ version_requirements: *70114353832400
36
36
  description: ! 'Manage your Rails applications: different Ruby versions and different
37
37
  application servers.'
38
38
  email: