vps 0.1.2 → 0.2.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
2
  SHA1:
3
- metadata.gz: 591e2f6174b369e271f23bc60b9d9492045259f3
4
- data.tar.gz: 5b325e542fbacd8a0cf33df939c58db68c17995b
3
+ metadata.gz: 19a1e8448e7c6d7549da881d3c4410dffd9eee99
4
+ data.tar.gz: 8ed547a6a851bfc83a7be9df20d8781d8bf39d6b
5
5
  SHA512:
6
- metadata.gz: 07edf2782cd06c64ad79478dfc51c168552822530083f3170dd702fc46aec3f61600390abb8846cfe1ce7de021f48e5f27a39f1530cfd2cca75ef859c42ce67e
7
- data.tar.gz: 7b59c311ae6fda27227c2128c4dbf26338b6a2e8f4740e49b05cb321b24eb28f2d78d45eaf53e58c28b8d3360abeaf02a5d3cfc2c64572af81ed8bb3cd136f0d
6
+ metadata.gz: 589a2204c45d5eb76a578258d6ac56b053f7efd99fec980ed81b8b9f58e2d86d25918ddd0eff90cb91be63ba1d5f0bae4b26e9bedb7636d264a1e6c377693391
7
+ data.tar.gz: 477b312e229c9cef09c4f75a9e7e8f0aff05be8d9882940b9c03721049563addc569ace2c57739cb73c4a32390c8fdd78f8743af161037183be871745652d791
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## VPS CHANGELOG
2
2
 
3
+ ### Version 0.2.0 (December 31, 2019)
4
+
5
+ * Provide ability to add both custom HTTP and HTTPS Nginx configs
6
+
3
7
  ### Version 0.1.2 (September 29, 2019)
4
8
 
5
9
  * Run postload tasks at the end of deployment
@@ -10,7 +10,10 @@ module VPS
10
10
 
11
11
  unless config[:upstreams].any?{|upstream| upstream[:name] == name}
12
12
  spec = derive_upstream(path)
13
- spec[:nginx] ||= nil
13
+ spec[:nginx] ||= {
14
+ :http => nil,
15
+ :https => nil
16
+ }
14
17
  config[:upstreams].push(spec.merge({
15
18
  :name => name || File.basename(path),
16
19
  :path => path,
data/lib/vps/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module VPS
2
2
  MAJOR = 0
3
- MINOR = 1
4
- TINY = 2
3
+ MINOR = 2
4
+ TINY = 0
5
5
 
6
6
  VERSION = [MAJOR, MINOR, TINY].join(".")
7
7
  end
@@ -18,6 +18,10 @@ server {
18
18
  server_name <%= domains %>;
19
19
  server_tokens off;
20
20
 
21
+ <%- end %>
22
+ <%- if nginx[:http] %>
23
+ <%= nginx[:http].gsub("PROXY_PASS", proxy_pass).indent(2) %>
24
+
21
25
  <%- end %>
22
26
  <%- if https %>
23
27
  location /.well-known/acme-challenge/ {
@@ -47,8 +51,8 @@ server {
47
51
  try_files $uri @app;
48
52
 
49
53
  <%- end %>
50
- <%- if nginx[:config] %>
51
- <%= nginx[:config].gsub("PROXY_PASS", proxy_pass).indent(2) %>
54
+ <%- if nginx[:https] %>
55
+ <%= nginx[:https].gsub("PROXY_PASS", proxy_pass).indent(2) %>
52
56
 
53
57
  <%- end %>
54
58
  location <%= nginx[:try_files] ? "@app" : "/" %> {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Engel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-29 00:00:00.000000000 Z
11
+ date: 2019-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor