shared-infrastructure 0.0.18 → 1.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
- SHA1:
3
- metadata.gz: 2388baa93ddfa0373ade38fdd49511f4ab4b48f3
4
- data.tar.gz: 34351a7ee79549d6c740c3920c11809c4fe628a2
2
+ SHA256:
3
+ metadata.gz: 82e8d76a3714e8539ce3d2e43caea865a2082452bec9eee7cb20f7e0b4d35cf6
4
+ data.tar.gz: d8a5b7c95fa2ae8c5f0e1ac1eeb1559ccc543c42162eec477707a0d49bd281a7
5
5
  SHA512:
6
- metadata.gz: 569dd911a7ce4aa8f1eb4619172c7674f9d5b862823ad7325845f37d06cd279ee53e93f324ab374ac977ad65fb7ed647142f4ac450a4c83aa5f1b2a4271843b8
7
- data.tar.gz: 8e15c2b82da4e28f1557ae0dd614b4dc5db568b727fb33977c892880090e35ffa45244dc259c8157a1ea13ef1e0aa40d5eea3ab49f86ea09f4b6ddff24034491
6
+ metadata.gz: 4fc3e46e838667666757a585c977376668d92e9afc666b899bc5b78c5f824fffe17094606839195592663a8acf9da27dd92ecbe1e51726520be9bde76b39c479
7
+ data.tar.gz: ba97fe89af05eaaa4e4216f8c00f66b16c2a583e3410493661d6ec947efda294feb3e0991f9607c4106818b9b165427f9da8dc47499acaf5bf688bf8aa9b5301
@@ -17,3 +17,4 @@ require "shared_infrastructure/runner/static_site.rb"
17
17
  require "shared_infrastructure/runner/rails.rb"
18
18
  require "shared_infrastructure/systemd/systemd.rb"
19
19
  require "shared_infrastructure/systemd/rails.rb"
20
+ require "shared_infrastructure/version.rb"
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Matt's post was very helpful: https://mattbrictson.com/accelerated-rails-downloads
4
+
3
5
  module Nginx
4
6
  class Accel
5
7
  def initialize(location_directory, domain: nil)
@@ -117,7 +117,9 @@ Finally, re-run this script to configure nginx for TLS.
117
117
  super
118
118
  end
119
119
 
120
- attr_reader :user
120
+ def user
121
+ @user ||= Etc.getlogin
122
+ end
121
123
  end
122
124
 
123
125
  class SiteHttp < Site
@@ -190,7 +192,7 @@ Finally, re-run this script to configure nginx for TLS.
190
192
  }
191
193
  LOGROTATE
192
194
  end &&
193
- Systemd::Rails.write_unit_file(domain.domain_name, domain, rails_env) &&
195
+ Systemd::Rails.write_unit_file(domain.domain_name, domain, rails_env, user) &&
194
196
  super
195
197
  end
196
198
  end
@@ -11,7 +11,7 @@ module Systemd
11
11
  "redis." + domain_name
12
12
  end
13
13
 
14
- def write_unit_file(domain_name, domain, rails_env = "production")
14
+ def write_unit_file(domain_name, domain, rails_env = "production", user)
15
15
  # if ENV["SECRET_KEY_BASE"].nil? ||
16
16
  # ENV["DATABASE_USERNAME"].nil? ||
17
17
  # ENV["DATABASE_PASSWORD"].nil? ||
@@ -34,7 +34,7 @@ module Systemd
34
34
  # Foreground process (do not use --daemon in ExecStart or config.rb)
35
35
  Type=simple
36
36
 
37
- User=nobody
37
+ User=#{user}
38
38
  Group=www-data
39
39
 
40
40
  # Specify the path to the Rails application root
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SharedInfrastructure
4
+ VERSION = "1.2.0"
5
+ end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shared-infrastructure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 1.2.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-05-01 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2018-10-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: chandler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  description: 'For static sites, Rails apps, and reverse proxies.
14
28
 
15
29
  '
@@ -42,6 +56,7 @@ files:
42
56
  - lib/shared_infrastructure/runner/static_site.rb
43
57
  - lib/shared_infrastructure/systemd/rails.rb
44
58
  - lib/shared_infrastructure/systemd/systemd.rb
59
+ - lib/shared_infrastructure/version.rb
45
60
  homepage: https://github.com/weenhanceit/infrastructure
46
61
  licenses:
47
62
  - MIT
@@ -62,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
77
  version: '0'
63
78
  requirements: []
64
79
  rubyforge_project:
65
- rubygems_version: 2.5.2.1
80
+ rubygems_version: 2.7.6
66
81
  signing_key:
67
82
  specification_version: 4
68
83
  summary: Configure nginx, systemd, and/or Puma