publishing_platform_app_config 0.2.1 → 0.3.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b2e3bc5b89e3b4a47cf69d695c6dc61d83b10efa3209be95a7903aa7f9e96e1
|
4
|
+
data.tar.gz: 8a92dff954b7338cb787cec741c1ade155c71b0ebaa65720e59f81865192c3ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49197ae21a0e92c4c1bcdac435890ee3104f952c14819369678427fa65155b3d8add5205a7bad6e1ccd0c5b6c41d75f9eff3e7c9fe78f2ea0b78af0c4d7a0cb0
|
7
|
+
data.tar.gz: 57fb61a4adac41174e0ba782f6e187b4100eba3d4ffee378f4b3551724efd161054e3620065cd9b4b99341060e784b9a36ad51497c45ee06dcc658901d3d43e1
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module PublishingPlatformPuma
|
2
|
+
def self.configure_rails(config)
|
3
|
+
config.port ENV.fetch("PORT", 3000)
|
4
|
+
|
5
|
+
config.environment ENV.fetch("RAILS_ENV", "development")
|
6
|
+
|
7
|
+
# `worker_timeout` specifies how many seconds Puma will wait before terminating a worker.
|
8
|
+
timeout = if ENV.fetch("RAILS_ENV", "development") == "development"
|
9
|
+
3600
|
10
|
+
else
|
11
|
+
Integer(ENV.fetch("PUMA_TIMEOUT", 15))
|
12
|
+
end
|
13
|
+
config.worker_timeout timeout
|
14
|
+
|
15
|
+
# When changing the min/max threads for Puma, also consider changing ActiveRecord to match.
|
16
|
+
max_threads_count = ENV.fetch("RAILS_MAX_THREADS", 5)
|
17
|
+
min_threads_count = ENV.fetch("RAILS_MIN_THREADS", max_threads_count)
|
18
|
+
config.threads min_threads_count, max_threads_count
|
19
|
+
|
20
|
+
# `workers` specifies the number of worker processes that Puma will fork.
|
21
|
+
# The overall concurrency limit is worker count * max threads per worker.
|
22
|
+
config.workers ENV.fetch("WEB_CONCURRENCY", 2)
|
23
|
+
|
24
|
+
# `preload_app!` tells Puma to load application code before forking worker processes.
|
25
|
+
# This reduces RAM wastage by making better use of copy-on-write.
|
26
|
+
config.preload_app!
|
27
|
+
|
28
|
+
# Allow puma to be restarted by `rails restart` command.
|
29
|
+
config.plugin :tmp_restart
|
30
|
+
end
|
31
|
+
end
|
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
18
18
|
spec.require_paths = %w[lib]
|
19
19
|
|
20
|
+
spec.add_dependency "puma", ">= 5.6", "< 7.0"
|
20
21
|
spec.add_dependency "sentry-rails", "~> 5.3"
|
21
22
|
spec.add_dependency "sentry-ruby", "~> 5.3"
|
22
23
|
|
metadata
CHANGED
@@ -1,15 +1,34 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: publishing_platform_app_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Publishing Platform
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-17 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: puma
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '5.6'
|
19
|
+
- - "<"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '7.0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '5.6'
|
29
|
+
- - "<"
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '7.0'
|
13
32
|
- !ruby/object:Gem::Dependency
|
14
33
|
name: sentry-rails
|
15
34
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,7 +114,6 @@ dependencies:
|
|
95
114
|
- !ruby/object:Gem::Version
|
96
115
|
version: '0'
|
97
116
|
description: Base configuration for Publishing Platform applications
|
98
|
-
email:
|
99
117
|
executables: []
|
100
118
|
extensions: []
|
101
119
|
extra_rdoc_files: []
|
@@ -116,14 +134,13 @@ files:
|
|
116
134
|
- lib/publishing_platform_app_config/publishing_platform_content_security_policy.rb
|
117
135
|
- lib/publishing_platform_app_config/publishing_platform_error.rb
|
118
136
|
- lib/publishing_platform_app_config/publishing_platform_error/configuration.rb
|
137
|
+
- lib/publishing_platform_app_config/publishing_platform_puma.rb
|
119
138
|
- lib/publishing_platform_app_config/railtie.rb
|
120
139
|
- lib/publishing_platform_app_config/version.rb
|
121
140
|
- publishing_platform_app_config.gemspec
|
122
|
-
homepage:
|
123
141
|
licenses:
|
124
142
|
- MIT
|
125
143
|
metadata: {}
|
126
|
-
post_install_message:
|
127
144
|
rdoc_options: []
|
128
145
|
require_paths:
|
129
146
|
- lib
|
@@ -138,8 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
155
|
- !ruby/object:Gem::Version
|
139
156
|
version: '0'
|
140
157
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
142
|
-
signing_key:
|
158
|
+
rubygems_version: 3.6.3
|
143
159
|
specification_version: 4
|
144
160
|
summary: Base configuration for Publishing Platform applications
|
145
161
|
test_files: []
|