rconf 0.9.19 → 0.9.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -106,7 +106,7 @@ module RightConf
|
|
106
106
|
def default_install_path
|
107
107
|
path = if File.exist?('/opt')
|
108
108
|
if File.exist?('/opt/nginx')
|
109
|
-
pick_default_path(File.writable?('/opt/nginx'))
|
109
|
+
pick_default_path(File.writable?('/opt/nginx') && File.executable?('/opt/nginx/sbin/nginx'))
|
110
110
|
else
|
111
111
|
res = Command.execute('mkdir', '/opt/nginx')
|
112
112
|
pick_default_path(res.success?)
|
@@ -152,9 +152,12 @@ module RightConf
|
|
152
152
|
report_failure
|
153
153
|
else
|
154
154
|
FileUtils.cp(`which rake`.chomp, ruby_dir) unless rake_exist = File.exist?(File.join(ruby_dir, 'rake'))
|
155
|
-
|
155
|
+
FileUtils.mkdir_p(install_path)
|
156
|
+
Dir.chdir(install_path) do
|
157
|
+
Command.execute_in_ruby('passenger-install-nginx-module', '--auto',
|
156
158
|
'--auto-download', '--prefix', install_path,
|
157
159
|
:abort_on_failure => "Failed to install nginx into #{install_path}")
|
160
|
+
end
|
158
161
|
FileUtils.mkdir_p(File.join(install_path, 'logs'))
|
159
162
|
File.open(File.join(install_path, 'conf', 'nginx.conf'), 'w') { |f| f.puts(nginx_config) }
|
160
163
|
if File.writable?('/etc/hosts') && IO.read('/etc/hosts') !~ /hosts_entry/
|
data/lib/rconf/version.rb
CHANGED
@@ -21,6 +21,7 @@ describe RightConf::PassengerConfigurator do
|
|
21
21
|
flexmock(File).should_receive(:exist?).with('/opt/nginx').once.and_return(true)
|
22
22
|
flexmock(File).should_receive(:exist?).with('/opt').once.and_return(true)
|
23
23
|
flexmock(File).should_receive(:writable?).with('/opt/nginx').once.and_return(true)
|
24
|
+
flexmock(File).should_receive(:executable?).with('/opt/nginx/sbin/nginx').once.and_return(true)
|
24
25
|
@configurator.__send__(:default_install_path).should == '/opt/nginx'
|
25
26
|
end
|
26
27
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rconf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.20
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06
|
12
|
+
date: 2012-07-06 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70209399567560 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '2.5'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70209399567560
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: flexmock
|
27
|
-
requirement: &
|
27
|
+
requirement: &70209399566940 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0.9'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70209399566940
|
36
36
|
description: ! 'rconf configures the environment for a given application. rconf reads
|
37
37
|
|
38
38
|
the content of an application configuration file and installs and/or
|