ruby-nginx 1.0.0.pre.beta.4 → 1.0.0
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e053789e61b0bf22afb92ea549a0ecb68bc4615761ae7342ff246e095100932
|
4
|
+
data.tar.gz: de3c4bd02f4745cca14cbf15f034a5187c10d3cddd083b1948ab63d9d958a6d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 154b601c107623263d962fdcb5832d8143a579e2725dfe8788f7f764aa6fed22d7bf955ed248227385e484e9183008fb5231eae078c39febe7491f4e309a9bfa
|
7
|
+
data.tar.gz: 128c4ff6ae5b29351872953e7597ed900219178855ea4f53f9953ce3b31973b71dfb4e429710fac82339072811d4c8b9286994ae575d67d6eba1d4571865c8a2
|
@@ -33,6 +33,7 @@ module Ruby
|
|
33
33
|
validate!
|
34
34
|
apply_dynamic_defaults!
|
35
35
|
|
36
|
+
create_temp_path!
|
36
37
|
create_ssl_certs! if options[:ssl]
|
37
38
|
create_log_files! if options[:log]
|
38
39
|
|
@@ -51,6 +52,7 @@ module Ruby
|
|
51
52
|
|
52
53
|
def default_paths
|
53
54
|
{
|
55
|
+
temp_path: default_path("tmp"),
|
54
56
|
ssl_certificate_path: default_path("certs/_#{options[:domain]}.pem"),
|
55
57
|
ssl_certificate_key_path: default_path("certs/_#{options[:domain]}-key.pem"),
|
56
58
|
access_log_path: default_path("logs/#{options[:domain]}.access.log"),
|
@@ -92,6 +94,10 @@ module Ruby
|
|
92
94
|
raise Ruby::Nginx::AbortError, "Failed to read template.", cause: e
|
93
95
|
end
|
94
96
|
|
97
|
+
def create_temp_path!
|
98
|
+
options[:temp_path] = System::SafeFile.mkdir(options[:temp_path])
|
99
|
+
end
|
100
|
+
|
95
101
|
def create_ssl_certs!
|
96
102
|
System::Mkcert.create!(
|
97
103
|
options[:domain],
|
@@ -7,6 +7,14 @@ module Ruby
|
|
7
7
|
module System
|
8
8
|
class SafeFile
|
9
9
|
class << self
|
10
|
+
def mkdir(dir_path)
|
11
|
+
safe_path = File.expand_path(dir_path)
|
12
|
+
|
13
|
+
FileUtils.mkdir_p(dir_path)
|
14
|
+
|
15
|
+
safe_path
|
16
|
+
end
|
17
|
+
|
10
18
|
def touch(file_path)
|
11
19
|
safe_path = File.expand_path(file_path)
|
12
20
|
|
@@ -54,6 +54,9 @@ server {
|
|
54
54
|
error_log <%= options[:error_log_path] %> warn;
|
55
55
|
<% end %>
|
56
56
|
|
57
|
+
# Do not use the default proxy_temp_path, this is to avoid directory permissions issues.
|
58
|
+
proxy_temp_path <%= options[:temp_path] %> 1 2;
|
59
|
+
|
57
60
|
# reverse proxy
|
58
61
|
location @<%= name %> {
|
59
62
|
proxy_pass http://<%= name %>;
|
data/lib/ruby/nginx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-nginx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bert McCutchen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erb
|