vps 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: 495b59ec7e4efd137d87d03d2d5592512849879f
4
- data.tar.gz: d9bf0c254e4e532e051a892096ba8cbdfbedda3b
3
+ metadata.gz: 0715c15db0c61c43f427cde770c38cde3f65e677
4
+ data.tar.gz: 62fbbc6d56af47c025031dd5125ab7a4072d546d
5
5
  SHA512:
6
- metadata.gz: bbc9e798ff049bcef6ca15750ca26a9fb6d015706068628118381d2a8702f1a041f7a6d55d0d2145a1e8de52c640e19f8d48e9eaf522a62d8714e22a518e1ad7
7
- data.tar.gz: b52f3f9474ef1cc806bcf2fd14be10951641347a439016be2386e5d39c2c18c4575feabea7f4f4ab2042c87cebcf894a77f716daece7ed25fa77093d4edf46d5
6
+ metadata.gz: 0850d9d9a5888d1162e7cb491906f0afea445f82535a68ae03014b6304cb594c7c81f765f14325bf0b1d295a1a88a7e07ac009859f6d5c0ba727d3fee34988a8
7
+ data.tar.gz: 7c6dfffa4ce37dc82012bf13865cc03f9feb6367c1565305f5a7461f88fe73d951fccd502fbfc6544df7505f50fb1de15feabdef5ec29bffd682cfc0a768f1be
@@ -1,5 +1,9 @@
1
1
  ## VPS CHANGELOG
2
2
 
3
+ ### Version 0.2.3 (January 2, 2020)
4
+
5
+ * Support upstreams without domains
6
+
3
7
  ### Version 0.2.2 (January 2, 2020)
4
8
 
5
9
  * Automatically add container names for upstreams and services
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -57,7 +57,7 @@ module VPS
57
57
  (hash || {}).fetch(key)
58
58
  end.tap do |value|
59
59
  if to_domain && value
60
- if (domain = value[:domains].first)
60
+ if (domain = (value[:domains] || ["-"]).first)
61
61
  return domain.gsub(/https?:\/\//, "")
62
62
  end
63
63
  end
@@ -1,7 +1,7 @@
1
1
  module VPS
2
2
  MAJOR = 0
3
3
  MINOR = 2
4
- TINY = 2
4
+ TINY = 3
5
5
 
6
6
  VERSION = [MAJOR, MINOR, TINY].join(".")
7
7
  end
@@ -3,7 +3,7 @@
3
3
  upstream <%= upstream[:name] %> {
4
4
  server <%= upstream[:name] %>:<%= upstream[:port] %>;
5
5
  }
6
- <%- upstream[:domains].partition{|domain| domain.include?("http://")}.reject(&:empty?).each do |domains| %>
6
+ <%- (upstream[:domains] || []).partition{|domain| domain.include?("http://")}.reject(&:empty?).each do |domains| %>
7
7
  <%-
8
8
  https = domains.first.include?("https://")
9
9
  domains = domains.collect{|domain| domain.gsub(/https?:\/\//, "")}.join(" ")
@@ -1,6 +1,6 @@
1
1
  #!/bin/bash
2
2
 
3
- <%- if (domains = upstream[:domains].collect{|domain| domain.dup.gsub!("https://", "")}.compact).any? %>
3
+ <%- if (domains = (upstream[:domains] || []).collect{|domain| domain.dup.gsub!("https://", "")}.compact).any? %>
4
4
  domains=(<%= domains.join(" ") %>)
5
5
  email="<%= upstream[:email] || "noreply@#{domains.first}" %>" # Adding a valid address is strongly recommended
6
6
  data_path="./data/certbot"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Engel