ez-nginx-proxy 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -38,7 +38,7 @@ Now install ez-nginx-proxy
38
38
 
39
39
  $ gem install ez-nginx-proxy
40
40
 
41
- ## NOTE:
41
+ ## Note
42
42
 
43
43
  You will probably see this error when ez-nginx-proxy starts:
44
44
 
@@ -67,14 +67,14 @@ unless nginx
67
67
  EOS
68
68
  end
69
69
 
70
- # Locate the nginx configuration root
70
+ # Locate the nginx configuration root. Since nginx v. 0.6.7, this is defined to be the directory that
71
+ # nginx.conf lives in.
71
72
  config_output = `#{nginx} -V 2>&1`
72
- puts "\033[01;34m>>>> config_output: #{config_output.inspect}\e[m"
73
- match = config_output.match(/--prefix=([\S]+)/)
73
+ match = config_output.match(/--conf-path=([\S]+)/)
74
74
  unless match && match.size == 2
75
75
  abort "Unable to determine the nginx prefix root from the output of `#{nginx} -V`."
76
76
  end
77
- prefix = match[1]
77
+ config_dir = File.dirname(match[1])
78
78
 
79
79
  routes.each do |pattern, target|
80
80
  puts "Proxying `#{pattern}` to #{target}".green
@@ -88,8 +88,7 @@ template = ERB.new <<-EOS.dedent
88
88
  master_process off;
89
89
  worker_processes 1;
90
90
  error_log stderr warn;
91
- pid <%= pid_file %>
92
- ;
91
+ pid <%= pid_file %>;
93
92
 
94
93
  events {
95
94
  worker_connections 768;
@@ -103,7 +102,7 @@ template = ERB.new <<-EOS.dedent
103
102
  keepalive_timeout 65;
104
103
  types_hash_max_size 2048;
105
104
 
106
- include <%= prefix %>/mime.types;
105
+ include <%= File.join(config_dir, "mime.types") %>;
107
106
 
108
107
  default_type application/octet-stream;
109
108
 
@@ -1,3 +1,3 @@
1
1
  module EzNginxProxy
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ez-nginx-proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-07-25 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: trollop
16
- requirement: &24225920 !ruby/object:Gem::Requirement
16
+ requirement: &23235300 !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: *24225920
24
+ version_requirements: *23235300
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: colorize
27
- requirement: &24273800 !ruby/object:Gem::Requirement
27
+ requirement: &23234880 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *24273800
35
+ version_requirements: *23234880
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dedent
38
- requirement: &24273380 !ruby/object:Gem::Requirement
38
+ requirement: &23234460 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *24273380
46
+ version_requirements: *23234460
47
47
  description: A very simple-to-use nginx wrapper for reverse proxying
48
48
  email:
49
49
  - cespare@gmail.com