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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54a7741f3afa9a30ed79a1b175e2b311ac336094
4
- data.tar.gz: fe517bf7ea380c63501d80e2c600eda30a225561
3
+ metadata.gz: 0ab310c1021610fd228d494c52b067320a0a0503
4
+ data.tar.gz: db99f26ed6843d4d2bf49fe52c14c1e79ee07ff1
5
5
  SHA512:
6
- metadata.gz: 24eb0cb374861a315bfe55d73aed35d2bbf9780208eb0a917ad6ca41531804884434ea909280b676f2cac8fdb832293603a2f3331f88b2b5f5d48a3b3c06ff95
7
- data.tar.gz: a22e5af7d7dd39576f97e80d458d299d8c61a1cb7429d0b974514bf1b5cdbd26d328834a3be155a67afe2613d4450a34ee67094a05348353899ebc7143c4c75d
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.2
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