publishing_platform_app_config 0.2.1 → 0.4.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: 04e10cd7c700f6da63d98e50953dfb6ecf0f415843b71d5e24e3e4fd31da5822
4
- data.tar.gz: 834b44b6fef8bbabb9cd88ad458c18ce16e6754e84142412aec24c29e5a625f7
3
+ metadata.gz: 4ebfd789b9f38076440d56255a14496150382540e1f9351f13cea0334682377f
4
+ data.tar.gz: 6f97fc4b4e92d7dfd3e8130ddc73ad9b5be88d4e73fa2754e6a9e0245a0666cd
5
5
  SHA512:
6
- metadata.gz: 7af5f1a9f1e63f859ecf485f431743a0ace14271aa4228ee293f9dbf2fec15f6a05f6a2f0622085a98165ea11dd032b3602337dbe2d38f10f4f2f8ce9936fbca
7
- data.tar.gz: 905020ad544d85f30faee40522f37bc42bb4ceed5a6efdade3865e585d4da954d50657983712136ee97d2bded93b5a323bd1e08cc519d5eeff3e81fc65105e7e
6
+ metadata.gz: 754889d89c802268d3e2e7db1dda3acb9d3983e208bfe7195099c399309aceae322206a98b0e82dd4dc3b06f63258ff784c6cefa9f9fc3b6641028f374e75dde
7
+ data.tar.gz: '0956d29895a1e3d23df4907cbe476cde96686ca441ab213beaed687fe3a0caf8b293c9145abda7af685a42600120022735e722ab16a5d5651ba423ce8f4c1e2d'
@@ -0,0 +1,12 @@
1
+ name: Lint GitHub Actions
2
+ on:
3
+ push:
4
+ paths: ['.github/**']
5
+ jobs:
6
+ actionlint:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
+ with:
11
+ show-progress: false
12
+ - uses: publishing-platform/publishing-platform-infrastructure/.github/actions/actionlint@main
@@ -8,7 +8,7 @@ jobs:
8
8
  strategy:
9
9
  fail-fast: false
10
10
  matrix:
11
- ruby: [3.2, 3.3]
11
+ ruby: [3.2, 3.3, 3.4]
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
14
  - uses: actions/checkout@v4
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.4
1
+ 3.2.9
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PublishingPlatformAppConfig
4
- VERSION = "0.2.1"
4
+ VERSION = "0.4.0"
5
5
  end
@@ -10,14 +10,15 @@ Gem::Specification.new do |spec|
10
10
  spec.summary = "Base configuration for Publishing Platform applications"
11
11
  spec.description = "Base configuration for Publishing Platform applications"
12
12
  spec.license = "MIT"
13
- spec.required_ruby_version = ">= 3.1"
13
+ spec.required_ruby_version = ">= 3.2"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
16
  spec.bindir = "exe"
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 "sentry-rails", "~> 5.3"
20
+ spec.add_dependency "puma", ">= 5.6", "< 8.0"
21
+ spec.add_dependency "sentry-rails", ">= 5.3", "< 7.0"
21
22
  spec.add_dependency "sentry-ruby", "~> 5.3"
22
23
 
23
24
  spec.add_development_dependency "climate_control"
metadata CHANGED
@@ -1,29 +1,54 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: publishing_platform_app_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Publishing Platform
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-11-29 00:00:00.000000000 Z
10
+ date: 1980-01-02 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: '8.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: '8.0'
13
32
  - !ruby/object:Gem::Dependency
14
33
  name: sentry-rails
15
34
  requirement: !ruby/object:Gem::Requirement
16
35
  requirements:
17
- - - "~>"
36
+ - - ">="
18
37
  - !ruby/object:Gem::Version
19
38
  version: '5.3'
39
+ - - "<"
40
+ - !ruby/object:Gem::Version
41
+ version: '7.0'
20
42
  type: :runtime
21
43
  prerelease: false
22
44
  version_requirements: !ruby/object:Gem::Requirement
23
45
  requirements:
24
- - - "~>"
46
+ - - ">="
25
47
  - !ruby/object:Gem::Version
26
48
  version: '5.3'
49
+ - - "<"
50
+ - !ruby/object:Gem::Version
51
+ version: '7.0'
27
52
  - !ruby/object:Gem::Dependency
28
53
  name: sentry-ruby
29
54
  requirement: !ruby/object:Gem::Requirement
@@ -95,12 +120,12 @@ dependencies:
95
120
  - !ruby/object:Gem::Version
96
121
  version: '0'
97
122
  description: Base configuration for Publishing Platform applications
98
- email:
99
123
  executables: []
100
124
  extensions: []
101
125
  extra_rdoc_files: []
102
126
  files:
103
127
  - ".github/dependabot.yml"
128
+ - ".github/workflows/actionlint.yml"
104
129
  - ".github/workflows/ci.yml"
105
130
  - ".gitignore"
106
131
  - ".rspec"
@@ -116,14 +141,13 @@ files:
116
141
  - lib/publishing_platform_app_config/publishing_platform_content_security_policy.rb
117
142
  - lib/publishing_platform_app_config/publishing_platform_error.rb
118
143
  - lib/publishing_platform_app_config/publishing_platform_error/configuration.rb
144
+ - lib/publishing_platform_app_config/publishing_platform_puma.rb
119
145
  - lib/publishing_platform_app_config/railtie.rb
120
146
  - lib/publishing_platform_app_config/version.rb
121
147
  - publishing_platform_app_config.gemspec
122
- homepage:
123
148
  licenses:
124
149
  - MIT
125
150
  metadata: {}
126
- post_install_message:
127
151
  rdoc_options: []
128
152
  require_paths:
129
153
  - lib
@@ -131,15 +155,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
155
  requirements:
132
156
  - - ">="
133
157
  - !ruby/object:Gem::Version
134
- version: '3.1'
158
+ version: '3.2'
135
159
  required_rubygems_version: !ruby/object:Gem::Requirement
136
160
  requirements:
137
161
  - - ">="
138
162
  - !ruby/object:Gem::Version
139
163
  version: '0'
140
164
  requirements: []
141
- rubygems_version: 3.5.23
142
- signing_key:
165
+ rubygems_version: 4.0.9
143
166
  specification_version: 4
144
167
  summary: Base configuration for Publishing Platform applications
145
168
  test_files: []