rack-cloudflare_middleware 1.2.0 → 1.2.2

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: 1806fad87fa57e8317ff1937cd2cd45db0bcef1b89aabb7ba1c3d4aa71434d22
4
- data.tar.gz: 47811778ab426303239fa18e3e29310e5f212cd54740efc71674061e30787c85
3
+ metadata.gz: 8d81d3ecb48c6e3fceaaad766016e093caf5caba2b0176aa7613fe480b1e865a
4
+ data.tar.gz: 911cdb9c16f3dd50bbbd5c9c4a0f6039db5ebbdeaf4c85294687fdbced2e6e87
5
5
  SHA512:
6
- metadata.gz: '084ac8b92afac4bd6aff7435c56a546c3f4faafaf4124d19a3f542fcef07b43b31ffa1222bccc49d46693deb97db5aad3dfd31f1800cc4dcdd1c7475afe0f806'
7
- data.tar.gz: a10319a8ec1dabed6022d7efe051b8af63752f134fbafa4c9fc35d3e563780ec3e3d6fb3de26b81ffc637f1ac0c37ae87a6dabae78cbbeadc2a8b0cbb4d37715
6
+ metadata.gz: 3af4c44a7ff108468ad09081d44bf28626004070ffea1603a4e9de19c6b21917f780abd5e6f07a7ac09ab7ad85f15f5dd23eb4c18b77c180ebc21c5e5cfef752
7
+ data.tar.gz: 42a7a38e2c70f3722e3addb0037fd365d03a2c46f830d84e94832fec3f770bb655b0820c171cf6bd9d55c6c8fb09021082b1aedcde0a485ab31dc41eb1dcca68
@@ -2,11 +2,11 @@ name: "CI"
2
2
  on:
3
3
  pull_request:
4
4
  push:
5
- branches: [ main ]
5
+ branches: [main]
6
6
 
7
7
  jobs:
8
8
  test:
9
- runs-on: ubuntu-latest
9
+ runs-on: ubuntu-24.04
10
10
  timeout-minutes: 30
11
11
  permissions:
12
12
  contents: read
@@ -16,12 +16,12 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: true
18
18
  matrix:
19
- ruby: ["2.7", "3.0", "3.1", "3.2"]
19
+ ruby: ["3.1", "3.2", "3.3", "3.4"]
20
20
  steps:
21
21
  - name: Checkout code
22
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
22
+ uses: actions/checkout@v4
23
23
  - name: Install Ruby and gems
24
- uses: ruby/setup-ruby@8a45918450651f5e4784b6031db26f4b9f76b251
24
+ uses: ruby/setup-ruby@v1
25
25
  with:
26
26
  bundler-cache: true
27
27
  ruby-version: ${{ matrix.ruby }}
@@ -29,23 +29,23 @@ jobs:
29
29
  timeout-minutes: 20
30
30
  run: bundle exec rspec -f doc
31
31
  lint:
32
- runs-on: ubuntu-latest
32
+ runs-on: ubuntu-24.04
33
33
  timeout-minutes: 20
34
34
  permissions:
35
35
  contents: read
36
36
  steps:
37
37
  - name: Checkout code
38
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
38
+ uses: actions/checkout@v4
39
39
  - name: Install Ruby and gems
40
- uses: ruby/setup-ruby@8a45918450651f5e4784b6031db26f4b9f76b251
40
+ uses: ruby/setup-ruby@v1
41
41
  with:
42
42
  bundler-cache: true
43
- ruby-version: "3.1"
43
+ ruby-version: "3.4"
44
44
  - name: Bundle Audit Check
45
45
  run: bundle exec bundle-audit update && bundle exec bundle-audit check
46
46
  - name: Setup Python
47
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0
47
+ uses: actions/setup-python@v5
48
48
  with:
49
- python-version: "3.10"
49
+ python-version: "3.12"
50
50
  - name: Run pre-commit
51
- uses: pre-commit/action@5f528da5c95691c4cf42ff76a4d10854b62cbb82
51
+ uses: instrumentl/pre-commit-action@v4
@@ -0,0 +1,36 @@
1
+ name: Pull Request Updated
2
+
3
+ on:
4
+ pull_request:
5
+ types:
6
+ - opened
7
+ - reopened
8
+ - edited
9
+ - synchronize
10
+ - ready_for_review
11
+ - converted_to_draft
12
+
13
+ jobs:
14
+ tag-for-dependabot:
15
+ name: Tag libero For Dependabot
16
+ if: ${{ github.actor == 'dependabot[bot]' }}
17
+ runs-on: ubuntu-24.04
18
+ timeout-minutes: 2
19
+ permissions:
20
+ contents: read
21
+ pull-requests: write
22
+ steps:
23
+ - name: Generate a token
24
+ id: generate_token
25
+ uses: actions/create-github-app-token@v2
26
+ with:
27
+ app-id: ${{ secrets.DEPENDABOT_AUTO_MERGER_APP_ID }}
28
+ private-key: ${{ secrets.DEPENDABOT_AUTO_MERGER_PRIVATE_KEY }}
29
+ owner: ${{ github.repository_owner }}
30
+ repositories: ${{ github.event.repository.name }}
31
+ - name: Auto Assign
32
+ run: gh pr edit "$PR_URL" --add-reviewer "$REVIEWER"
33
+ env:
34
+ PR_URL: ${{ github.event.pull_request.html_url }}
35
+ REVIEWER: instrumentl/libero
36
+ GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
@@ -4,15 +4,15 @@ on:
4
4
  types: [published]
5
5
  jobs:
6
6
  release:
7
- runs-on: ubuntu-latest
7
+ runs-on: ubuntu-24.04
8
8
  steps:
9
9
  - name: Checkout code
10
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
10
+ uses: actions/checkout@v4
11
11
  - name: Install Ruby and gems
12
- uses: ruby/setup-ruby@8a45918450651f5e4784b6031db26f4b9f76b251
12
+ uses: ruby/setup-ruby@v1
13
13
  with:
14
14
  bundler-cache: true
15
- ruby-version: "3.2"
15
+ ruby-version: "3.3"
16
16
  - name: Publish gem
17
17
  run: |
18
18
  umask 077
@@ -12,6 +12,6 @@ repos:
12
12
  exclude: '^spec/data/'
13
13
  - id: check-merge-conflict
14
14
  - repo: https://github.com/instrumentl/pre-commit-standardrb.git
15
- rev: 'b9c5657a92bcc2ebfa9ec295754b0c56877fbed8'
15
+ rev: 'v1.44.0'
16
16
  hooks:
17
17
  - id: standardrb
data/.rubocop.yml CHANGED
@@ -2,9 +2,9 @@ require: standard
2
2
  inherit_gem:
3
3
  standard: config/base.yml
4
4
  AllCops:
5
- TargetRubyVersion: 2.7
5
+ TargetRubyVersion: 3.4
6
6
  Exclude:
7
- - 'vendor/bundle/**/*'
8
- - 'tmp/**/*'
9
- - 'public/**/*'
10
- - 'bin/{bundle,rails,rake,spring}'
7
+ - "vendor/bundle/**/*"
8
+ - "tmp/**/*"
9
+ - "public/**/*"
10
+ - "bin/{bundle,rails,rake,spring}"
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ NEXT
2
+ ----
3
+ - Drop support for Ruby <3.1
4
+
5
+ v1.2.2 - 2024-05-22
6
+ -------------------
7
+ - Added support for ruby 3.4
8
+
9
+ v1.2.1 - 2024-02-23
10
+ -------------------
11
+ - Update cloudflare trusted IP URL to include new required trailing slash
12
+ - Many dependabot bumps
13
+
1
14
  v1.2.0 - 2023-06-05
2
15
  -------------------
3
16
  - Set `required_ruby_version` in the gemspec
data/Gemfile CHANGED
@@ -4,15 +4,15 @@ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- gem "faraday", "~> 2.7"
8
- gem "rake", "~> 13.0"
7
+ gem "faraday", "~> 2.13"
8
+ gem "rake", "~> 13.2"
9
9
 
10
10
  group :development, :test do
11
- gem "rspec", "~> 3.0"
12
- gem "rspec-its", "~> 1.3"
11
+ gem "rspec", "~> 3.13"
12
+ gem "rspec-its", "~> 2.0"
13
13
  gem "rack-test", "~> 2"
14
14
  gem "standard", "~> 1"
15
15
  gem "pry"
16
- gem "webmock", "~> 3.18"
17
- gem "bundle-audit", "~> 0.1.0"
16
+ gem "webmock", "~> 3.25"
17
+ gem "bundler-audit", "~> 0.9.2"
18
18
  end
data/Gemfile.lock CHANGED
@@ -1,115 +1,131 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-cloudflare_middleware (1.2.0)
4
+ rack-cloudflare_middleware (1.2.2)
5
5
  faraday (>= 1.0, < 3)
6
6
  rack (>= 2, < 4)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.8.1)
12
- public_suffix (>= 2.0.2, < 6.0)
13
- ast (2.4.2)
14
- bundle-audit (0.1.0)
15
- bundler-audit
16
- bundler-audit (0.9.1)
11
+ addressable (2.8.7)
12
+ public_suffix (>= 2.0.2, < 7.0)
13
+ ast (2.4.3)
14
+ bigdecimal (3.1.9)
15
+ bundler-audit (0.9.2)
17
16
  bundler (>= 1.2.0, < 3)
18
17
  thor (~> 1.0)
19
18
  coderay (1.1.3)
20
- crack (0.4.5)
19
+ crack (1.0.0)
20
+ bigdecimal
21
21
  rexml
22
- diff-lcs (1.5.0)
23
- faraday (2.7.5)
24
- faraday-net_http (>= 2.0, < 3.1)
25
- ruby2_keywords (>= 0.0.4)
26
- faraday-net_http (3.0.2)
27
- hashdiff (1.0.1)
28
- json (2.6.3)
29
- language_server-protocol (3.17.0.3)
30
- lint_roller (1.0.0)
31
- method_source (1.0.0)
32
- parallel (1.23.0)
33
- parser (3.2.2.1)
22
+ diff-lcs (1.5.1)
23
+ faraday (2.13.1)
24
+ faraday-net_http (>= 2.0, < 3.5)
25
+ json
26
+ logger
27
+ faraday-net_http (3.4.0)
28
+ net-http (>= 0.5.0)
29
+ hashdiff (1.1.2)
30
+ json (2.12.0)
31
+ language_server-protocol (3.17.0.5)
32
+ lint_roller (1.1.0)
33
+ logger (1.7.0)
34
+ method_source (1.1.0)
35
+ net-http (0.6.0)
36
+ uri
37
+ parallel (1.27.0)
38
+ parser (3.3.8.0)
34
39
  ast (~> 2.4.1)
35
- pry (0.14.2)
40
+ racc
41
+ prism (1.4.0)
42
+ pry (0.15.2)
36
43
  coderay (~> 1.1)
37
44
  method_source (~> 1.0)
38
- public_suffix (5.0.1)
39
- rack (3.0.7)
40
- rack-test (2.1.0)
45
+ public_suffix (6.0.1)
46
+ racc (1.8.1)
47
+ rack (3.1.15)
48
+ rack-test (2.2.0)
41
49
  rack (>= 1.3)
42
50
  rainbow (3.1.1)
43
- rake (13.0.6)
44
- regexp_parser (2.8.0)
45
- rexml (3.2.5)
46
- rspec (3.12.0)
47
- rspec-core (~> 3.12.0)
48
- rspec-expectations (~> 3.12.0)
49
- rspec-mocks (~> 3.12.0)
50
- rspec-core (3.12.1)
51
- rspec-support (~> 3.12.0)
52
- rspec-expectations (3.12.2)
51
+ rake (13.2.1)
52
+ regexp_parser (2.10.0)
53
+ rexml (3.4.1)
54
+ rspec (3.13.0)
55
+ rspec-core (~> 3.13.0)
56
+ rspec-expectations (~> 3.13.0)
57
+ rspec-mocks (~> 3.13.0)
58
+ rspec-core (3.13.2)
59
+ rspec-support (~> 3.13.0)
60
+ rspec-expectations (3.13.3)
53
61
  diff-lcs (>= 1.2.0, < 2.0)
54
- rspec-support (~> 3.12.0)
55
- rspec-its (1.3.0)
56
- rspec-core (>= 3.0.0)
57
- rspec-expectations (>= 3.0.0)
58
- rspec-mocks (3.12.4)
62
+ rspec-support (~> 3.13.0)
63
+ rspec-its (2.0.0)
64
+ rspec-core (>= 3.13.0)
65
+ rspec-expectations (>= 3.13.0)
66
+ rspec-mocks (3.13.2)
59
67
  diff-lcs (>= 1.2.0, < 2.0)
60
- rspec-support (~> 3.12.0)
61
- rspec-support (3.12.0)
62
- rubocop (1.50.2)
68
+ rspec-support (~> 3.13.0)
69
+ rspec-support (3.13.1)
70
+ rubocop (1.75.5)
63
71
  json (~> 2.3)
72
+ language_server-protocol (~> 3.17.0.2)
73
+ lint_roller (~> 1.1.0)
64
74
  parallel (~> 1.10)
65
- parser (>= 3.2.0.0)
75
+ parser (>= 3.3.0.2)
66
76
  rainbow (>= 2.2.2, < 4.0)
67
- regexp_parser (>= 1.8, < 3.0)
68
- rexml (>= 3.2.5, < 4.0)
69
- rubocop-ast (>= 1.28.0, < 2.0)
77
+ regexp_parser (>= 2.9.3, < 3.0)
78
+ rubocop-ast (>= 1.44.0, < 2.0)
70
79
  ruby-progressbar (~> 1.7)
71
- unicode-display_width (>= 2.4.0, < 3.0)
72
- rubocop-ast (1.28.1)
73
- parser (>= 3.2.1.0)
74
- rubocop-performance (1.16.0)
75
- rubocop (>= 1.7.0, < 2.0)
76
- rubocop-ast (>= 0.4.0)
80
+ unicode-display_width (>= 2.4.0, < 4.0)
81
+ rubocop-ast (1.44.1)
82
+ parser (>= 3.3.7.2)
83
+ prism (~> 1.4)
84
+ rubocop-performance (1.25.0)
85
+ lint_roller (~> 1.1)
86
+ rubocop (>= 1.75.0, < 2.0)
87
+ rubocop-ast (>= 1.38.0, < 2.0)
77
88
  ruby-progressbar (1.13.0)
78
- ruby2_keywords (0.0.5)
79
- standard (1.28.4)
89
+ standard (1.50.0)
80
90
  language_server-protocol (~> 3.17.0.2)
81
91
  lint_roller (~> 1.0)
82
- rubocop (~> 1.50.2)
92
+ rubocop (~> 1.75.5)
83
93
  standard-custom (~> 1.0.0)
84
- standard-performance (~> 1.0.1)
85
- standard-custom (1.0.0)
86
- lint_roller (~> 1.0)
87
- standard-performance (1.0.1)
94
+ standard-performance (~> 1.8)
95
+ standard-custom (1.0.2)
88
96
  lint_roller (~> 1.0)
89
- rubocop-performance (~> 1.16.0)
90
- thor (1.2.1)
91
- unicode-display_width (2.4.2)
92
- webmock (3.18.1)
97
+ rubocop (~> 1.50)
98
+ standard-performance (1.8.0)
99
+ lint_roller (~> 1.1)
100
+ rubocop-performance (~> 1.25.0)
101
+ thor (1.3.2)
102
+ unicode-display_width (3.1.4)
103
+ unicode-emoji (~> 4.0, >= 4.0.4)
104
+ unicode-emoji (4.0.4)
105
+ uri (1.0.3)
106
+ webmock (3.25.1)
93
107
  addressable (>= 2.8.0)
94
108
  crack (>= 0.3.2)
95
109
  hashdiff (>= 0.4.0, < 2.0.0)
96
110
 
97
111
  PLATFORMS
98
112
  arm64-darwin-22
113
+ arm64-darwin-23
114
+ arm64-darwin-24
99
115
  x86_64-linux
100
116
 
101
117
  DEPENDENCIES
102
- bundle-audit (~> 0.1.0)
103
118
  bundler (~> 2)
104
- faraday (~> 2.7)
119
+ bundler-audit (~> 0.9.2)
120
+ faraday (~> 2.13)
105
121
  pry
106
122
  rack-cloudflare_middleware!
107
123
  rack-test (~> 2)
108
- rake (~> 13.0)
109
- rspec (~> 3.0)
110
- rspec-its (~> 1.3)
124
+ rake (~> 13.2)
125
+ rspec (~> 3.13)
126
+ rspec-its (~> 2.0)
111
127
  standard (~> 1)
112
- webmock (~> 3.18)
128
+ webmock (~> 3.25)
113
129
 
114
130
  BUNDLED WITH
115
- 2.4.7
131
+ 2.5.23
@@ -40,8 +40,8 @@ module Rack
40
40
  end
41
41
 
42
42
  def update!
43
- read_network "https://www.cloudflare.com/ips-v4", 4
44
- read_network "https://www.cloudflare.com/ips-v6", 6
43
+ read_network "https://www.cloudflare.com/ips-v4/", 4
44
+ read_network "https://www.cloudflare.com/ips-v6/", 6
45
45
  end
46
46
 
47
47
  def check_update
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rack
4
4
  module CloudflareMiddleware
5
- VERSION = "1.2.0"
5
+ VERSION = "1.2.2"
6
6
  end
7
7
  end
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  end
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.required_ruby_version = ">= 2.7"
24
+ spec.required_ruby_version = ">= 3.1"
25
25
 
26
26
  spec.add_dependency "faraday", ">= 1.0", "< 3"
27
27
  spec.add_dependency "rack", ">= 2", "< 4"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-cloudflare_middleware
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Brown
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-06 00:00:00.000000000 Z
11
+ date: 2025-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -106,7 +106,7 @@ dependencies:
106
106
  - - "~>"
107
107
  - !ruby/object:Gem::Version
108
108
  version: '1'
109
- description:
109
+ description:
110
110
  email:
111
111
  - james@instrumentl.com
112
112
  executables: []
@@ -115,6 +115,7 @@ extra_rdoc_files: []
115
115
  files:
116
116
  - ".github/dependabot.yml"
117
117
  - ".github/workflows/ci.yml"
118
+ - ".github/workflows/pull-request-updated.yml"
118
119
  - ".github/workflows/release.yml"
119
120
  - ".gitignore"
120
121
  - ".pre-commit-config.yaml"
@@ -136,7 +137,7 @@ homepage: https://github.com/instrumentl/rack-cloudflare_middleware
136
137
  licenses:
137
138
  - ISC
138
139
  metadata: {}
139
- post_install_message:
140
+ post_install_message:
140
141
  rdoc_options: []
141
142
  require_paths:
142
143
  - lib
@@ -144,15 +145,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
145
  requirements:
145
146
  - - ">="
146
147
  - !ruby/object:Gem::Version
147
- version: '2.7'
148
+ version: '3.1'
148
149
  required_rubygems_version: !ruby/object:Gem::Requirement
149
150
  requirements:
150
151
  - - ">="
151
152
  - !ruby/object:Gem::Version
152
153
  version: '0'
153
154
  requirements: []
154
- rubygems_version: 3.4.10
155
- signing_key:
155
+ rubygems_version: 3.5.22
156
+ signing_key:
156
157
  specification_version: 4
157
158
  summary: Rack middleware for handling Cloudflare remote IP headers
158
159
  test_files: []