magicmonkey 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -168,10 +168,14 @@ module MagicMonkey
|
|
168
168
|
end
|
169
169
|
|
170
170
|
def self.remove(args)
|
171
|
+
o = {:remove_vhost => false}
|
171
172
|
parser = OptionParser.new do |opts|
|
172
173
|
opts.banner = 'Usage: magicmonkey remove APP_NAME'
|
173
174
|
opts.separator ''
|
174
175
|
opts.separator 'Options:'
|
176
|
+
opts.on('--[no-]remove-vhost', "Remove the virtual host file if exist (default: #{o[:remove_vhost]}).") do |r|
|
177
|
+
o[:remove_vhost] = r
|
178
|
+
end
|
175
179
|
opts.on_tail('-v', '--version', 'Print version') { puts Magicmonkey::VERSION; exit }
|
176
180
|
opts.on_tail('-h', '--help', 'Show this help message') { puts opts; exit }
|
177
181
|
end
|
@@ -185,7 +189,7 @@ module MagicMonkey
|
|
185
189
|
app_name = args.first
|
186
190
|
if Conf[app_name]
|
187
191
|
vh_file = "#{Conf[app_name][:vhost_path]}/#{app_name}"
|
188
|
-
if File.exist?(vh_file)
|
192
|
+
if o[:remove_vhost] && File.exist?(vh_file)
|
189
193
|
begin
|
190
194
|
Cocaine::CommandLine.new("sudo a2dissite '#{app_name}' && sudo rm -f '#{vh_file}'").run
|
191
195
|
rescue Cocaine::ExitStatusError => e
|
data/lib/magicmonkey/version.rb
CHANGED
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
|
+
version: 1.0.3
|
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: &
|
16
|
+
requirement: &70316082426460 !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: *
|
24
|
+
version_requirements: *70316082426460
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: term-ansicolor
|
27
|
-
requirement: &
|
27
|
+
requirement: &70316082426040 !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: *
|
35
|
+
version_requirements: *70316082426040
|
36
36
|
description: ! 'Manage your Rails applications: different Ruby versions and different
|
37
37
|
application servers.'
|
38
38
|
email:
|