passify 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.md +3 -0
- data/lib/passify/cli.rb +17 -1
- data/lib/passify/version.rb +1 -1
- metadata +8 -8
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -43,6 +43,9 @@ It makes sense to create a wrapper for `passify` if you are using multiple versi
|
|
43
43
|
rvm wrapper 1.8.7 --no-prefix passify
|
44
44
|
|
45
45
|
## Changelog
|
46
|
+
### 0.1.2
|
47
|
+
* added env-command to change rack environment
|
48
|
+
|
46
49
|
### 0.1.1
|
47
50
|
* added support for legacy application
|
48
51
|
|
data/lib/passify/cli.rb
CHANGED
@@ -44,6 +44,22 @@ module Passify
|
|
44
44
|
unregister_host(host)
|
45
45
|
end
|
46
46
|
|
47
|
+
desc "env", "Change the environment of the current app"
|
48
|
+
def env(name = nil, env = 'production')
|
49
|
+
error("Passify is currently not installed. Please run `passify install` first.") unless passify_installed?
|
50
|
+
name = File.basename(pwd) if name.nil? || name.empty?
|
51
|
+
name = urlify(name)
|
52
|
+
host = "#{name}.local"
|
53
|
+
notice("No application exists under http://#{host} .") unless app_exists?(host)
|
54
|
+
line_no, rack_env = `grep -n 'RackEnv' #{vhost_file(host)}`.split(":")
|
55
|
+
current_env = rack_env.strip.split(" ")[1]
|
56
|
+
notice("The application is already in '#{env}' environment.") if current_env == env
|
57
|
+
sudome
|
58
|
+
`sed -i '' '#{line_no}s!#{current_env}!#{env}!' #{vhost_file(host)}`
|
59
|
+
restart_apache
|
60
|
+
say "The application now runs in '#{env}' environment."
|
61
|
+
end
|
62
|
+
|
47
63
|
desc "install", "Installs passify into the local Apache installation."
|
48
64
|
def install
|
49
65
|
error("Passenger seems not to be installed. Refer to http://www.modrails.com/ for installation instructions.") unless passenger_installed?
|
@@ -220,7 +236,7 @@ module Passify
|
|
220
236
|
DirectoryIndex index.html index.php
|
221
237
|
<Directory "#{path}">
|
222
238
|
Allow from all
|
223
|
-
|
239
|
+
AllowOverride All
|
224
240
|
</Directory>
|
225
241
|
PassengerEnabled off
|
226
242
|
</VirtualHost>
|
data/lib/passify/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: passify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Fabian Schwahn
|
@@ -15,13 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-11-18 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: thor
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
23
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
24
|
none: false
|
27
25
|
requirements:
|
@@ -31,11 +29,11 @@ dependencies:
|
|
31
29
|
segments:
|
32
30
|
- 0
|
33
31
|
version: "0"
|
32
|
+
prerelease: false
|
33
|
+
type: :runtime
|
34
34
|
requirement: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rake
|
37
|
-
type: :development
|
38
|
-
prerelease: false
|
39
37
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
38
|
none: false
|
41
39
|
requirements:
|
@@ -45,6 +43,8 @@ dependencies:
|
|
45
43
|
segments:
|
46
44
|
- 0
|
47
45
|
version: "0"
|
46
|
+
prerelease: false
|
47
|
+
type: :development
|
48
48
|
requirement: *id002
|
49
49
|
description: passify is a command line interface (CLI) for Phusion Passenger, equivalent to what powder and powify are for pow. passify is compatible with PassengerPane.
|
50
50
|
email:
|