Skip to content

Commit 2c8c722

Browse files
authored
Merge pull request #4 from proxymesh/ci/rubygems-trusted-publishing-release
RubyGems trusted publishing, YARD/rubydoc, release workflow
2 parents 3eb5570 + 80c2e82 commit 2c8c722

6 files changed

Lines changed: 160 additions & 26 deletions

File tree

.github/workflows/push_gem.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Trusted publishing to RubyGems.org (OIDC). Configure a pending publisher at:
2+
# https://rubygems.org/profile/oidc/pending_trusted_publishers
3+
# Workflow file name and repository must match RubyGems trusted publisher settings.
4+
# See https://guides.rubygems.org/trusted-publishing/pushing-a-new-gem/
5+
# and https://guides.rubygems.org/trusted-publishing/releasing-gems/
6+
7+
name: Push Gem
8+
9+
on:
10+
release:
11+
types: [published]
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
push:
18+
if: github.repository == 'proxymesh/ruby-proxy-headers'
19+
runs-on: ubuntu-latest
20+
21+
permissions:
22+
contents: write
23+
id-token: write
24+
25+
steps:
26+
- name: Harden Runner
27+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
28+
with:
29+
egress-policy: audit
30+
31+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+
with:
33+
persist-credentials: false
34+
35+
- name: Verify release tag matches gem version
36+
env:
37+
REF_NAME: ${{ github.ref_name }}
38+
run: |
39+
VERSION=$(ruby -r ./lib/ruby_proxy_headers/version.rb -e 'puts RubyProxyHeaders::VERSION')
40+
if [ "v${VERSION}" != "${REF_NAME}" ]; then
41+
echo "Release tag must be v${VERSION} (RubyProxyHeaders::VERSION); got ${REF_NAME}" >&2
42+
exit 1
43+
fi
44+
45+
- name: Set up Ruby
46+
uses: ruby/setup-ruby@2e007403fc1ec238429ecaa57af6f22f019cc135 # v1.234.0
47+
with:
48+
bundler-cache: true
49+
ruby-version: ruby
50+
51+
- uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.yardoc/
12
/.bundle/
23
/vendor/bundle/
34
*.gem

.yardopts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
--readme README.md
2+
--title ruby-proxy-headers
3+
--charset utf-8
4+
--markup markdown
5+
--no-private
6+
lib/**/*.rb
7+
-
8+
LICENSE

Gemfile.lock

Lines changed: 93 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
PATH
22
remote: .
33
specs:
4-
ruby-proxy-headers (0.2.0)
4+
ruby-proxy-headers (0.2.1)
55

66
GEM
77
remote: https://rubygems.org/
88
specs:
99
addressable (2.8.9)
1010
public_suffix (>= 2.0.2, < 8.0)
11+
ast (2.4.3)
1112
base64 (0.3.0)
12-
bigdecimal (4.0.1)
13+
bigdecimal (4.1.1)
1314
connection_pool (3.0.2)
1415
csv (3.3.5)
16+
diff-lcs (1.6.2)
1517
domain_name (0.6.20240107)
1618
ethon (0.18.0)
1719
ffi (>= 1.15.0)
@@ -24,21 +26,23 @@ GEM
2426
logger
2527
faraday-net_http (3.4.2)
2628
net-http (~> 0.5)
27-
ffi (1.17.3-aarch64-linux-gnu)
28-
ffi (1.17.3-aarch64-linux-musl)
29-
ffi (1.17.3-arm-linux-gnu)
30-
ffi (1.17.3-arm-linux-musl)
31-
ffi (1.17.3-arm64-darwin)
32-
ffi (1.17.3-x86_64-darwin)
33-
ffi (1.17.3-x86_64-linux-gnu)
34-
ffi (1.17.3-x86_64-linux-musl)
29+
ffi (1.17.4-aarch64-linux-gnu)
30+
ffi (1.17.4-aarch64-linux-musl)
31+
ffi (1.17.4-arm-linux-gnu)
32+
ffi (1.17.4-arm-linux-musl)
33+
ffi (1.17.4-arm64-darwin)
34+
ffi (1.17.4-x86_64-darwin)
35+
ffi (1.17.4-x86_64-linux-gnu)
36+
ffi (1.17.4-x86_64-linux-musl)
3537
http-cookie (1.1.0)
3638
domain_name (~> 0.5)
3739
httparty (0.24.2)
3840
csv
3941
mini_mime (>= 1.0.0)
4042
multi_xml (>= 0.5.2)
41-
json (2.19.2)
43+
json (2.19.3)
44+
language_server-protocol (3.17.0.5)
45+
lint_roller (1.1.0)
4246
logger (1.7.0)
4347
mechanize (2.14.0)
4448
addressable (~> 2.8)
@@ -56,7 +60,7 @@ GEM
5660
mime-types (3.7.0)
5761
logger
5862
mime-types-data (~> 3.2025, >= 3.2025.0507)
59-
mime-types-data (3.2026.0317)
63+
mime-types-data (3.2026.0331)
6064
mini_mime (1.1.5)
6165
multi_xml (0.8.1)
6266
bigdecimal (>= 3.1, < 5)
@@ -82,15 +86,55 @@ GEM
8286
racc (~> 1.4)
8387
nokogiri (1.19.2-x86_64-linux-musl)
8488
racc (~> 1.4)
89+
parallel (1.28.0)
90+
parser (3.3.11.1)
91+
ast (~> 2.4.1)
92+
racc
93+
prism (1.9.0)
8594
public_suffix (7.0.5)
8695
racc (1.8.1)
96+
rainbow (3.1.1)
97+
rake (13.3.1)
98+
regexp_parser (2.12.0)
99+
rspec (3.13.2)
100+
rspec-core (~> 3.13.0)
101+
rspec-expectations (~> 3.13.0)
102+
rspec-mocks (~> 3.13.0)
103+
rspec-core (3.13.6)
104+
rspec-support (~> 3.13.0)
105+
rspec-expectations (3.13.5)
106+
diff-lcs (>= 1.2.0, < 2.0)
107+
rspec-support (~> 3.13.0)
108+
rspec-mocks (3.13.8)
109+
diff-lcs (>= 1.2.0, < 2.0)
110+
rspec-support (~> 3.13.0)
111+
rspec-support (3.13.7)
112+
rubocop (1.86.0)
113+
json (~> 2.3)
114+
language_server-protocol (~> 3.17.0.2)
115+
lint_roller (~> 1.1.0)
116+
parallel (~> 1.10)
117+
parser (>= 3.3.0.2)
118+
rainbow (>= 2.2.2, < 4.0)
119+
regexp_parser (>= 2.9.3, < 3.0)
120+
rubocop-ast (>= 1.49.0, < 2.0)
121+
ruby-progressbar (~> 1.7)
122+
unicode-display_width (>= 2.4.0, < 4.0)
123+
rubocop-ast (1.49.1)
124+
parser (>= 3.3.7.2)
125+
prism (~> 1.7)
126+
ruby-progressbar (1.13.0)
87127
rubyntlm (0.6.5)
88128
base64
89129
typhoeus (1.6.0)
90130
ethon (>= 0.18.0)
131+
unicode-display_width (3.2.0)
132+
unicode-emoji (~> 4.1)
133+
unicode-emoji (4.2.0)
91134
uri (1.1.1)
92135
webrick (1.9.2)
93136
webrobots (0.1.2)
137+
yard (0.9.38)
94138

95139
PLATFORMS
96140
aarch64-linux-gnu
@@ -109,35 +153,43 @@ DEPENDENCIES
109153
faraday-net_http (~> 3.4)
110154
httparty (~> 0.24)
111155
mechanize (~> 2.14)
156+
rake (~> 13.0)
157+
rspec (~> 3.12)
158+
rubocop (~> 1.50)
112159
ruby-proxy-headers!
113160
typhoeus (~> 1.6)
161+
yard (~> 0.9)
114162

115163
CHECKSUMS
116164
addressable (2.8.9) sha256=cc154fcbe689711808a43601dee7b980238ce54368d23e127421753e46895485
165+
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
117166
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
118-
bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7
167+
bigdecimal (4.1.1) sha256=1c09efab961da45203c8316b0cdaec0ff391dfadb952dd459584b63ebf8054ca
119168
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
120169
csv (3.3.5) sha256=6e5134ac3383ef728b7f02725d9872934f523cb40b961479f69cf3afa6c8e73f
170+
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
121171
domain_name (0.6.20240107) sha256=5f693b2215708476517479bf2b3802e49068ad82167bcd2286f899536a17d933
122172
ethon (0.18.0) sha256=b598afc9f30448cb068b850714b7d6948e941476095d04f90a4ac65b8d6efcb2
123173
excon (1.4.2) sha256=32d8d8eda619717d9b8043b4675e096fb5c2139b080e2ad3b267f88c545aaa35
124174
faraday (2.14.1) sha256=a43cceedc1e39d188f4d2cdd360a8aaa6a11da0c407052e426ba8d3fb42ef61c
125175
faraday-net_http (3.4.2) sha256=f147758260d3526939bf57ecf911682f94926a3666502e24c69992765875906c
126-
ffi (1.17.3-aarch64-linux-gnu) sha256=28ad573df26560f0aedd8a90c3371279a0b2bd0b4e834b16a2baa10bd7a97068
127-
ffi (1.17.3-aarch64-linux-musl) sha256=020b33b76775b1abacc3b7d86b287cef3251f66d747092deec592c7f5df764b2
128-
ffi (1.17.3-arm-linux-gnu) sha256=5bd4cea83b68b5ec0037f99c57d5ce2dd5aa438f35decc5ef68a7d085c785668
129-
ffi (1.17.3-arm-linux-musl) sha256=0d7626bb96265f9af78afa33e267d71cfef9d9a8eb8f5525344f8da6c7d76053
130-
ffi (1.17.3-arm64-darwin) sha256=0c690555d4cee17a7f07c04d59df39b2fba74ec440b19da1f685c6579bb0717f
131-
ffi (1.17.3-x86_64-darwin) sha256=1f211811eb5cfaa25998322cdd92ab104bfbd26d1c4c08471599c511f2c00bb5
132-
ffi (1.17.3-x86_64-linux-gnu) sha256=3746b01f677aae7b16dc1acb7cb3cc17b3e35bdae7676a3f568153fb0e2c887f
133-
ffi (1.17.3-x86_64-linux-musl) sha256=086b221c3a68320b7564066f46fed23449a44f7a1935f1fe5a245bd89d9aea56
176+
ffi (1.17.4-aarch64-linux-gnu) sha256=b208f06f91ffd8f5e1193da3cae3d2ccfc27fc36fba577baf698d26d91c080df
177+
ffi (1.17.4-aarch64-linux-musl) sha256=9286b7a615f2676245283aef0a0a3b475ae3aae2bb5448baace630bb77b91f39
178+
ffi (1.17.4-arm-linux-gnu) sha256=d6dbddf7cb77bf955411af5f187a65b8cd378cb003c15c05697f5feee1cb1564
179+
ffi (1.17.4-arm-linux-musl) sha256=9d4838ded0465bef6e2426935f6bcc93134b6616785a84ffd2a3d82bc3cf6f95
180+
ffi (1.17.4-arm64-darwin) sha256=19071aaf1419251b0a46852abf960e77330a3b334d13a4ab51d58b31a937001b
181+
ffi (1.17.4-x86_64-darwin) sha256=aa70390523cf3235096cf64962b709b4cfbd5c082a2cb2ae714eb0fe2ccda496
182+
ffi (1.17.4-x86_64-linux-gnu) sha256=9d3db14c2eae074b382fa9c083fe95aec6e0a1451da249eab096c34002bc752d
183+
ffi (1.17.4-x86_64-linux-musl) sha256=3fdf9888483de005f8ef8d1cf2d3b20d86626af206cbf780f6a6a12439a9c49e
134184
http-cookie (1.1.0) sha256=38a5e60d1527eebc396831b8c4b9455440509881219273a6c99943d29eadbb19
135185
httparty (0.24.2) sha256=8fca6a54aa0c4aa4303a0fd33e5e2156175d6a5334f714263b458abd7fda9c38
136-
json (2.19.2) sha256=e7e1bd318b2c37c4ceee2444841c86539bc462e81f40d134cf97826cb14e83cf
186+
json (2.19.3) sha256=289b0bb53052a1fa8c34ab33cc750b659ba14a5c45f3fcf4b18762dc67c78646
187+
language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
188+
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
137189
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
138190
mechanize (2.14.0) sha256=33e76b7639d0181a46eaf1136b05f0e9043dfc5fc4b1a7b9fd8ae8bd437dd5e4
139191
mime-types (3.7.0) sha256=dcebf61c246f08e15a4de34e386ebe8233791e868564a470c3fe77c00eed5e56
140-
mime-types-data (3.2026.0317) sha256=77f078a4d8631d52b842ba77099734b06eddb7ad339d792e746d2272b67e511b
192+
mime-types-data (3.2026.0331) sha256=e9942b1fac72532e2b201b0c32c52e7650ef5ef8ca043a5054674597795c97a5
141193
mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef
142194
multi_xml (0.8.1) sha256=addba0290bac34e9088bfe73dc4878530297a82a7bbd66cb44dcd0a4b86edf5a
143195
net-http (0.9.1) sha256=25ba0b67c63e89df626ed8fac771d0ad24ad151a858af2cc8e6a716ca4336996
@@ -152,14 +204,31 @@ CHECKSUMS
152204
nokogiri (1.19.2-x86_64-darwin) sha256=7d9af11fda72dfaa2961d8c4d5380ca0b51bc389dc5f8d4b859b9644f195e7a4
153205
nokogiri (1.19.2-x86_64-linux-gnu) sha256=fa8feca882b73e871a9845f3817a72e9734c8e974bdc4fbad6e4bc6e8076b94f
154206
nokogiri (1.19.2-x86_64-linux-musl) sha256=93128448e61a9383a30baef041bf1f5817e22f297a1d400521e90294445069a8
207+
parallel (1.28.0) sha256=33e6de1484baf2524792d178b0913fc8eb94c628d6cfe45599ad4458c638c970
208+
parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54
209+
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
155210
public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
156211
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
157-
ruby-proxy-headers (0.2.0)
212+
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
213+
rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
214+
regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb
215+
rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
216+
rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
217+
rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
218+
rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
219+
rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
220+
rubocop (1.86.0) sha256=4ff1186fe16ebe9baff5e7aad66bb0ad4cabf5cdcd419f773146dbba2565d186
221+
rubocop-ast (1.49.1) sha256=4412f3ee70f6fe4546cc489548e0f6fcf76cafcfa80fa03af67098ffed755035
222+
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
223+
ruby-proxy-headers (0.2.1)
158224
rubyntlm (0.6.5) sha256=47013402b99ae29ee93f930af51edaec8c6008556f4be25705a422b4430314f5
159225
typhoeus (1.6.0) sha256=bacc41c23e379547e29801dc235cd1699b70b955a1ba3d32b2b877aa844c331d
226+
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
227+
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
160228
uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
161229
webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
162230
webrobots (0.1.2) sha256=ebbcaa2cb4930fa1b83206f432c5cb64746507b2dcf50ea1301569a4d662cda6
231+
yard (0.9.38) sha256=721fb82afb10532aa49860655f6cc2eaa7130889df291b052e1e6b268283010f
163232

164233
BUNDLED WITH
165234
4.0.8

lib/ruby_proxy_headers/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module RubyProxyHeaders
4-
VERSION = '0.2.0'
4+
VERSION = '0.2.1'
55
end

ruby-proxy-headers.gemspec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ Gem::Specification.new do |s|
1717
s.required_ruby_version = '>= 3.1'
1818

1919
s.metadata['source_code_uri'] = 'https://github.com/proxymesh/ruby-proxy-headers'
20+
s.metadata['documentation_uri'] = 'https://rubydoc.info/gems/ruby-proxy-headers'
2021

21-
s.files = Dir['lib/**/*', 'LICENSE', 'README.md', 'IMPLEMENTATION_PRIORITY.md', 'LIBRARY_RESEARCH.md', 'DEFERRED.md']
22+
s.files = Dir['lib/**/*', 'LICENSE', 'README.md', 'IMPLEMENTATION_PRIORITY.md', 'LIBRARY_RESEARCH.md', 'DEFERRED.md', '.yardopts']
2223
s.require_paths = ['lib']
2324

2425
s.add_development_dependency 'bundler', '>= 2.4'
26+
s.add_development_dependency 'rake', '~> 13.0'
27+
s.add_development_dependency 'rspec', '~> 3.12'
28+
s.add_development_dependency 'rubocop', '~> 1.50'
29+
s.add_development_dependency 'yard', '~> 0.9'
2530
s.add_development_dependency 'excon', '~> 1.4'
2631
s.add_development_dependency 'faraday', '~> 2.14'
2732
s.add_development_dependency 'faraday-net_http', '~> 3.4'

0 commit comments

Comments
 (0)