shared-infrastructure 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 952588ec658831e6f80ec3416acf9ac03a68654d
|
4
|
+
data.tar.gz: e7ef7fc53e131c962e7caaddc5da8e4bbad85fb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec0dcf44cccc795ab31da3f2b1cd2096db384b8f39cbf5c3ac3b5b6747453f8e6de7d8b93a89e3af35dda800c385ed713ae8d504eecb040f3522d472d20d10c8
|
7
|
+
data.tar.gz: 2bfcbe876bcc438b16ff77eb2e54d061370d385380fedac45c599277b22bc39b251c194ec662685733627b1e57be79f7063edf2ea53f24c6d234f955717d9d9d
|
@@ -7,19 +7,24 @@ module SharedInfrastructure
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def certbot_domain_names
|
10
|
-
"#{
|
10
|
+
domain_names.map { |domain| "#{domain} www.#{domain}" }.join(" ")
|
11
11
|
end
|
12
12
|
|
13
13
|
def certificate_directory
|
14
14
|
"/etc/letsencrypt/live/#{domain_name}"
|
15
15
|
end
|
16
16
|
|
17
|
+
def domain_name
|
18
|
+
domain_names.first
|
19
|
+
end
|
20
|
+
|
17
21
|
def enabled_site
|
18
22
|
"/etc/nginx/sites-enabled/#{domain_name}"
|
19
23
|
end
|
20
24
|
|
21
|
-
def initialize(
|
22
|
-
|
25
|
+
def initialize(domain_names)
|
26
|
+
domain_names = [domain_names] unless domain_names.respond_to?(:map)
|
27
|
+
@domain_names = domain_names
|
23
28
|
end
|
24
29
|
|
25
30
|
def rails_env_log(rails_env = "production")
|
@@ -39,6 +44,6 @@ module SharedInfrastructure
|
|
39
44
|
File.join(root, "html")
|
40
45
|
end
|
41
46
|
|
42
|
-
attr_reader :
|
47
|
+
attr_reader :domain_names
|
43
48
|
end
|
44
49
|
end
|
@@ -28,8 +28,8 @@ module Runner
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def process_args(opts = nil)
|
31
|
-
raise MissingArgument.new("domain required", opts)
|
32
|
-
{ domain_name: ARGV
|
31
|
+
raise MissingArgument.new("domain required", opts) if ARGV.size == 0
|
32
|
+
{ domain_name: ARGV }
|
33
33
|
end
|
34
34
|
|
35
35
|
def process_options(http_builder_class = Nginx::Builder::SiteHttp,
|
@@ -106,7 +106,7 @@ module Runner
|
|
106
106
|
options[:protocol]
|
107
107
|
else
|
108
108
|
certificate_directory = Nginx.certificate_directory(
|
109
|
-
options[:certificate_domain] || options[:domain_name]
|
109
|
+
options[:certificate_domain] || options[:domain_name].first # FIXME:
|
110
110
|
)
|
111
111
|
if File.exist?(File.join(certificate_directory, "privkey.pem")) &&
|
112
112
|
File.exist?(File.join(certificate_directory, "fullchain.pem")) &&
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shared-infrastructure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Larry Reid
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chandler
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.
|
80
|
+
rubygems_version: 2.5.2.1
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: Configure nginx, systemd, and/or Puma
|