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
- SHA256:
3
- metadata.gz: a1421df4f78041aebbbaf255a6e676f8303b1c5844e96da104f3308893d3eb8a
4
- data.tar.gz: d189b196f9f75dd554d6ee87418af780b1471486da956271c9c5de3a236cd07b
2
+ SHA1:
3
+ metadata.gz: 952588ec658831e6f80ec3416acf9ac03a68654d
4
+ data.tar.gz: e7ef7fc53e131c962e7caaddc5da8e4bbad85fb2
5
5
  SHA512:
6
- metadata.gz: 2270b0180add1ef0781ccce7b6f37e9ff9e7c34673b8744c5592522d78b472e92d5796e4ca85c0412b34b5fa604e30fe151b40c521f96166295abf38f04a75c8
7
- data.tar.gz: 72cc132a02f851a6f9840b91063e73aa1343df4463b49eac969022abf541c4005dc410e100e3868622f09d46df8d87c954d4d3b7926e1c059cab9fe329bd8be1
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
- "#{domain_name} www.#{domain_name}"
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(domain_name)
22
- @domain_name = domain_name
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 :domain_name
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) unless ARGV.size == 1
32
- { domain_name: ARGV[0] }
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")) &&
@@ -11,7 +11,7 @@ module Runner
11
11
  def process_args(opts = nil)
12
12
  raise MissingArgument.new("domain and target url required", opts) unless ARGV.size == 2
13
13
  {
14
- domain_name: ARGV[0],
14
+ domain_name: [ARGV.first],
15
15
  proxy_url: ARGV[1]
16
16
  }
17
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SharedInfrastructure
4
- VERSION = "2.0.0"
4
+ VERSION = "2.1.0"
5
5
  end
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.0.0
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: 2018-12-23 00:00:00.000000000 Z
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.7.6
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