Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 22 lines (18 sloc) 0.636 kB
e90332d @alloy If the user wants it, we'll add the configuration needed by passenger…
alloy authored
1 module SharedPassengerBehaviour
79c4629 @alloy Make sure that hitting OK in the alert will run the passenger_config_…
alloy authored
2 include OSX
3
88f61cb @alloy Write out the config before starting an application.
alloy authored
4 USERS_APACHE_PASSENGER_APPS_DIR = "/etc/apache2/users/#{OSX.NSUserName}-passenger-apps"
5 USERS_APACHE_CONFIG = "/etc/apache2/users/#{OSX.NSUserName}.conf"
6
e90332d @alloy If the user wants it, we'll add the configuration needed by passenger…
alloy authored
7 def execute(command)
1679fa3 @alloy Check if Passenger is installed, if not tell the user to do so.
alloy authored
8 apple_script "do shell script \"#{command}\" with administrator privileges"
9 end
b52f45e @alloy Started the work to create configs for multiple apps at once. WIP.
alloy authored
10 module_function :execute
1679fa3 @alloy Check if Passenger is installed, if not tell the user to do so.
alloy authored
11
12 def apple_script(command)
13 script = NSAppleScript.alloc.initWithSource(command)
e90332d @alloy If the user wants it, we'll add the configuration needed by passenger…
alloy authored
14 script.performSelector_withObject("executeAndReturnError:", nil)
15 end
94cd90a @alloy Write configs for multiple applications and reload the apache configs.
alloy authored
16 module_function :apple_script
e90332d @alloy If the user wants it, we'll add the configuration needed by passenger…
alloy authored
17
18 def p(obj)
76c1df7 @alloy Verified that restarting the application works. Cleaned UI and code.
alloy authored
19 NSLog(obj.is_a?(String) ? obj : obj.inspect)
e90332d @alloy If the user wants it, we'll add the configuration needed by passenger…
alloy authored
20 end
94cd90a @alloy Write configs for multiple applications and reload the apache configs.
alloy authored
21 module_function :p
e90332d @alloy If the user wants it, we'll add the configuration needed by passenger…
alloy authored
22 end
Something went wrong with that request. Please try again.