shared-infrastructure 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shared_infrastructure/nginx/upstream.rb +19 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ab310c1021610fd228d494c52b067320a0a0503
|
4
|
+
data.tar.gz: db99f26ed6843d4d2bf49fe52c14c1e79ee07ff1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b75bcf5f739670e7b6db6ec484266ea65d9f796c9fdc46ae99fe7d5c01d53da04961b4aa448d6422d897d977e1494196140c452dfdb7eeb0206fcb2250bac4e
|
7
|
+
data.tar.gz: 47348811cd3a760a4de943072f950c79e13f3a2c6ea7f73902aa726307801bb4744cbbedcdc2d5e3740772f5d41f4b3fbc3413533e0321c791dbbaaf4cb83878
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Nginx
|
4
|
+
class Upstream
|
5
|
+
def initialize(domain_name)
|
6
|
+
@domain_name = domain_name
|
7
|
+
end
|
8
|
+
|
9
|
+
def to_s(level = 0)
|
10
|
+
Lines.new(
|
11
|
+
"upstream #{domain_name} {",
|
12
|
+
Lines.indent("server unix:///tmp/#{domain_name}.sock fail_timeout=0;", 1),
|
13
|
+
"}"
|
14
|
+
).format(level)
|
15
|
+
end
|
16
|
+
|
17
|
+
attr_reader :domain_name
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shared-infrastructure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Larry Reid
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- lib/shared_infrastructure/nginx/server.rb
|
34
34
|
- lib/shared_infrastructure/nginx/server_block.rb
|
35
35
|
- lib/shared_infrastructure/nginx/site.rb
|
36
|
+
- lib/shared_infrastructure/nginx/upstream.rb
|
36
37
|
- lib/shared_infrastructure/runner/base.rb
|
37
38
|
- lib/shared_infrastructure/runner/reverse_proxy.rb
|
38
39
|
- lib/shared_infrastructure/runner/static_site.rb
|