potluck-nginx 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -0
- data/lib/potluck/nginx/ssl.rb +4 -4
- data/lib/potluck/nginx/version.rb +7 -0
- data/lib/potluck/nginx.rb +6 -7
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fc8a1ec53a80c8a2914316ea35e955a79851fde0c32b59c2d26b22c573e4d3f
|
4
|
+
data.tar.gz: 1f5beb340d4e719f11f98806a7d96844e9c71b11aef0de8441de516d170c0a24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2852025b7fa30b945c8450b23d9efbd725b5abf3dcc41875dff7a860e85a182074c7e47ea3bf8cf7442e7ebab0a715d56296cea541b5a1c9ad9906369aeaa3fc
|
7
|
+
data.tar.gz: 99cef178c6195136c566f55948b5b64068a56ffaa918f4bdea05c7f193d9161ad05796a7a33a3c4dfc0637d1ecb491a818dac35c36516c6a241b581a119f999e
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.7
|
data/lib/potluck/nginx/ssl.rb
CHANGED
@@ -73,10 +73,10 @@ module Potluck
|
|
73
73
|
#
|
74
74
|
def ensure_files
|
75
75
|
return if !@auto_generated || (
|
76
|
-
File.
|
77
|
-
File.
|
78
|
-
File.
|
79
|
-
File.
|
76
|
+
File.exist?(@csr_file) &&
|
77
|
+
File.exist?(@key_file) &&
|
78
|
+
File.exist?(@crt_file) &&
|
79
|
+
File.exist?(@dhparam_file) &&
|
80
80
|
(Time.parse(
|
81
81
|
@nginx.run("openssl x509 -enddate -noout -in #{@crt_file}").sub('notAfter=', '')
|
82
82
|
) - Time.now) >= CERT_RENEW_DAYS * 24 * 60 * 60
|
data/lib/potluck/nginx.rb
CHANGED
@@ -4,6 +4,7 @@ require('fileutils')
|
|
4
4
|
require('potluck')
|
5
5
|
require_relative('nginx/ssl')
|
6
6
|
require_relative('nginx/util')
|
7
|
+
require_relative('nginx/version')
|
7
8
|
|
8
9
|
module Potluck
|
9
10
|
##
|
@@ -146,14 +147,14 @@ module Potluck
|
|
146
147
|
<<~EOS
|
147
148
|
<key>ProgramArguments</key>
|
148
149
|
<array>
|
149
|
-
<string
|
150
|
+
<string>#{HOMEBREW_PREFIX}/opt/nginx/bin/nginx</string>
|
150
151
|
<string>-g</string>
|
151
152
|
<string>daemon off;</string>
|
152
153
|
</array>
|
153
154
|
<key>StandardOutPath</key>
|
154
|
-
<string
|
155
|
+
<string>#{HOMEBREW_PREFIX}/var/log/nginx/access.log</string>
|
155
156
|
<key>StandardErrorPath</key>
|
156
|
-
<string
|
157
|
+
<string>#{HOMEBREW_PREFIX}/var/log/nginx/error.log</string>
|
157
158
|
EOS
|
158
159
|
)
|
159
160
|
end
|
@@ -351,9 +352,7 @@ module Potluck
|
|
351
352
|
# Writes the Nginx configuration to the (inactive) configuration file.
|
352
353
|
#
|
353
354
|
def write_config
|
354
|
-
File.
|
355
|
-
file.write(config_file_content)
|
356
|
-
end
|
355
|
+
File.write(@config_file_inactive, config_file_content)
|
357
356
|
end
|
358
357
|
|
359
358
|
##
|
@@ -367,7 +366,7 @@ module Potluck
|
|
367
366
|
# Renames the active Nginx configuration file to its inactive name.
|
368
367
|
#
|
369
368
|
def deactivate_config
|
370
|
-
FileUtils.mv(@config_file_active, @config_file_inactive) if File.
|
369
|
+
FileUtils.mv(@config_file_active, @config_file_inactive) if File.exist?(@config_file_active)
|
371
370
|
end
|
372
371
|
|
373
372
|
##
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: potluck-nginx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Pickens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: potluck
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.0.
|
19
|
+
version: 0.0.7
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.0.
|
26
|
+
version: 0.0.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,9 +67,11 @@ extra_rdoc_files: []
|
|
67
67
|
files:
|
68
68
|
- LICENSE
|
69
69
|
- README.md
|
70
|
+
- VERSION
|
70
71
|
- lib/potluck/nginx.rb
|
71
72
|
- lib/potluck/nginx/ssl.rb
|
72
73
|
- lib/potluck/nginx/util.rb
|
74
|
+
- lib/potluck/nginx/version.rb
|
73
75
|
homepage: https://github.com/npickens/potluck/tree/master/potluck-nginx
|
74
76
|
licenses:
|
75
77
|
- MIT
|
@@ -92,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
94
|
- !ruby/object:Gem::Version
|
93
95
|
version: '0'
|
94
96
|
requirements: []
|
95
|
-
rubygems_version: 3.
|
97
|
+
rubygems_version: 3.3.7
|
96
98
|
signing_key:
|
97
99
|
specification_version: 4
|
98
100
|
summary: A Ruby manager for Nginx.
|