cloudflare-rails 5.0.0 → 6.0.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
2
  SHA256:
3
- metadata.gz: f4d8ab5a9f56ae053e1647298c77b9a1616834b89d72467d09938f27ea9063d6
4
- data.tar.gz: 123877f4dfc33b4c276cbfa91a718e14e9d92f8244ea618e21c12b57a84b203c
3
+ metadata.gz: f52bcf9825a5051914653aa8b471e173896ca7b0345c88b30512a7f5ca5792ca
4
+ data.tar.gz: ddfe50aa060ef4971b9722658ae75dee9580ce1b2c028973f5caa877e370e7a3
5
5
  SHA512:
6
- metadata.gz: b2814703b862fd8c88e89a40fa4d84dfcf1b71e2b90d823a74d450f54a69edc3ea14e0056f0442dcca837a460d4c253b21fa6e156b21d72148b53d47723b39ab
7
- data.tar.gz: 66a1dbe16f14fce0562e34b4a694fc681299014afcf4d20785ea58467cc932e382c5df57a461e2cfc928c7a7aebe7ff524b29d020d759778ca2680b5ea153655
6
+ metadata.gz: ca4faedbdaf7f45af3212865abf420cdc1077bd9c0339f507425f3ce11a520101dedc9d8023b70bfe15d8c163fd6dd21d74a55f785255b95956bdb5fe6dbcc16
7
+ data.tar.gz: 1f7fe45788911c43bf9897e17b9a410615d8554e75cd0e6971dd81a398c0c1fa420ecb6c1c036a4b37d1604bdfcd5aa6d928c5a2ce07e7761c3628f3263c1360
data/.rubocop.yml CHANGED
@@ -7,7 +7,7 @@ require:
7
7
 
8
8
  AllCops:
9
9
  NewCops: enable
10
- TargetRubyVersion: 2.5
10
+ TargetRubyVersion: 3.1
11
11
  SuggestExtensions: false
12
12
 
13
13
  Style/Documentation:
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2023-12-11 04:03:08 UTC using RuboCop version 1.58.0.
3
+ # on 2023-12-16 21:20:23 UTC using RuboCop version 1.59.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -37,6 +37,14 @@ Metrics/AbcSize:
37
37
  Metrics/MethodLength:
38
38
  Max: 11
39
39
 
40
+ # Offense count: 1
41
+ # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
42
+ # CheckDefinitionPathHierarchyRoots: lib, spec, test, src
43
+ # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
44
+ Naming/FileName:
45
+ Exclude:
46
+ - 'lib/cloudflare-rails.rb'
47
+
40
48
  # Offense count: 2
41
49
  # Configuration parameters: ForbiddenDelimiters.
42
50
  # ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
data/Appraisals CHANGED
@@ -1,11 +1,11 @@
1
- appraise 'rails-6.1' do
2
- gem 'rails', '~> 6.1.0'
1
+ appraise 'rails-7.1' do
2
+ gem 'rails', '~> 7.1.0'
3
3
  end
4
4
 
5
- appraise 'rails-7.0' do
6
- gem 'rails', '~> 7.0.0'
5
+ appraise 'rails-7.2' do
6
+ gem 'rails', github: 'rails/rails', branch: '7-2-stable'
7
7
  end
8
8
 
9
- appraise 'rails-7.1' do
10
- gem 'rails', '~> 7.1.0'
9
+ appraise 'rails-8.0' do
10
+ gem 'rails', github: 'rails/rails'
11
11
  end
data/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+ ## [6.0.0] - 2024-06-12
7
+ - Drop support for `rails` version `6.1` and `7.0`, new minimum version is `7.1.0` (https://github.com/modosc/cloudflare-rails/pull/142)
8
+ - Bump minimum ruby version to `3.1.0` in preparation for `rails` version `7.2` (https://github.com/modosc/cloudflare-rails/pull/142)
9
+ - Relax `rails` dependencies to allow for `7.2` and `8.0` (https://github.com/modosc/cloudflare-rails/pull/142)
10
+ - Fix `Appraisals` branch for `rails` version `7.2` (https://github.com/modosc/cloudflare-rails/pull/142)
11
+ - add `rails` version `8.0` to `Appraisals` (https://github.com/modosc/cloudflare-rails/pull/142)
12
+
13
+ ## [5.0.1] - 2023-12-16
14
+ - Fix `zeitwerk` loading issue (https://github.com/modosc/cloudflare-rails/pull/105)
6
15
 
7
16
  ## [5.0.0] - 2023-12-15
8
17
  ### Breaking Changes
data/README.md CHANGED
@@ -3,10 +3,12 @@ This gem correctly configures Rails for [CloudFlare](https://www.cloudflare.com)
3
3
 
4
4
  ## Rails Compatibility
5
5
 
6
- This gem requires `railties`, `activesupport`, and `actionpack` >= `6.1`. For older `rails` versions see the chart below:
6
+ This gem requires `railties`, `activesupport`, and `actionpack` >= `7.1`. For older `rails` versions see the chart below:
7
7
 
8
8
  | `rails` version | `cloudflare-rails` version |
9
9
  | --------------- | -------------------------- |
10
+ | 7.0 | 5.0.1 |
11
+ | 6.1 | 5.0.1 |
10
12
  | 6.0 | 3.0.0 |
11
13
  | 5.2 | 2.4.0 |
12
14
  | 5.1 | 2.0.0 |
@@ -18,25 +18,25 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ['lib']
19
19
 
20
20
  spec.add_development_dependency 'appraisal', '~> 2.5.0'
21
- spec.add_development_dependency 'bundler', '>= 2.1.2'
21
+ spec.add_development_dependency 'bundler', '>= 2.4.18'
22
22
  spec.add_development_dependency 'pry-byebug'
23
23
  spec.add_development_dependency 'rack-attack', '~> 6.7.0'
24
- spec.add_development_dependency 'rake', '~> 13.1.0'
25
- spec.add_development_dependency 'rspec', '~> 3.12.0'
24
+ spec.add_development_dependency 'rake', '~> 13.2.1'
25
+ spec.add_development_dependency 'rspec', '~> 3.13.0'
26
26
  spec.add_development_dependency 'rspec_junit_formatter', '~> 0.6.0'
27
- spec.add_development_dependency 'rspec-rails', '~> 6.1.0'
28
- spec.add_development_dependency 'rubocop', '~> 1.58.0'
29
- spec.add_development_dependency 'rubocop-performance', '~> 1.19.1'
30
- spec.add_development_dependency 'rubocop-rails', '~> 2.22.2'
31
- spec.add_development_dependency 'rubocop-rspec', '~> 2.25.0'
32
- spec.add_development_dependency 'webmock', '~> 3.19.1'
27
+ spec.add_development_dependency 'rspec-rails', '~> 6.1.2'
28
+ spec.add_development_dependency 'rubocop', '~> 1.64.1'
29
+ spec.add_development_dependency 'rubocop-performance', '~> 1.21.0'
30
+ spec.add_development_dependency 'rubocop-rails', '~> 2.25.0'
31
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.26.1'
32
+ spec.add_development_dependency 'webmock', '~> 3.23.1'
33
33
 
34
- spec.add_dependency 'actionpack', '>= 6.1', '< 7.2.0'
35
- spec.add_dependency 'activesupport', '>= 6.1', '< 7.2.0'
36
- spec.add_dependency 'railties', '>= 6.1', '< 7.2.0'
34
+ spec.add_dependency 'actionpack', '>= 7.1.0', '< 8.1.0'
35
+ spec.add_dependency 'activesupport', '>= 7.1.0', '< 8.1.0'
36
+ spec.add_dependency 'railties', '>= 7.1.0', '< 8.1.0'
37
37
  spec.add_dependency 'zeitwerk', '>= 2.5.0'
38
38
 
39
- # rails 6.1 lists this as the minimum
40
- spec.required_ruby_version = '>= 2.5.0'
39
+ # rails 7.2 lists this as the minimum
40
+ spec.required_ruby_version = '>= 3.1.0'
41
41
  spec.metadata['rubygems_mfa_required'] = 'true'
42
42
  end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
5
  source 'https://rubygems.org'
4
6
 
5
- gem 'rails', '~> 7.0.0'
7
+ gem 'rails', github: 'rails/rails', branch: '7-2-stable'
6
8
 
7
9
  gemspec path: '../'
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
5
  source 'https://rubygems.org'
4
6
 
5
- gem 'rails', '~> 6.1.0'
7
+ gem 'rails', github: 'rails/rails'
6
8
 
7
9
  gemspec path: '../'
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'cloudflare_rails'
@@ -15,7 +15,7 @@ module CloudflareRails
15
15
  # @param [Net::HTTPResponse]
16
16
  def initialize(response)
17
17
  @response = response
18
- super(response)
18
+ super
19
19
  end
20
20
  end
21
21
 
@@ -1,3 +1,3 @@
1
1
  module CloudflareRails
2
- VERSION = '5.0.0'.freeze
2
+ VERSION = '6.0.0'.freeze
3
3
  end
@@ -1,7 +1,9 @@
1
1
  require 'zeitwerk'
2
2
  loader = Zeitwerk::Loader.for_gem
3
+ loader.ignore("#{__dir__}/cloudflare-rails.rb")
3
4
  loader.setup
4
- loader.eager_load
5
5
 
6
6
  module CloudflareRails
7
7
  end
8
+
9
+ loader.eager_load
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudflare-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jonathan schatz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-15 00:00:00.000000000 Z
11
+ date: 2024-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.1.2
33
+ version: 2.4.18
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 2.1.2
40
+ version: 2.4.18
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry-byebug
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 13.1.0
75
+ version: 13.2.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 13.1.0
82
+ version: 13.2.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 3.12.0
89
+ version: 3.13.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 3.12.0
96
+ version: 3.13.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec_junit_formatter
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -114,144 +114,144 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 6.1.0
117
+ version: 6.1.2
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 6.1.0
124
+ version: 6.1.2
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rubocop
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.58.0
131
+ version: 1.64.1
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.58.0
138
+ version: 1.64.1
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rubocop-performance
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.19.1
145
+ version: 1.21.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 1.19.1
152
+ version: 1.21.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rubocop-rails
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 2.22.2
159
+ version: 2.25.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 2.22.2
166
+ version: 2.25.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rubocop-rspec
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 2.25.0
173
+ version: 2.26.1
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 2.25.0
180
+ version: 2.26.1
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: webmock
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: 3.19.1
187
+ version: 3.23.1
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: 3.19.1
194
+ version: 3.23.1
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: actionpack
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: '6.1'
201
+ version: 7.1.0
202
202
  - - "<"
203
203
  - !ruby/object:Gem::Version
204
- version: 7.2.0
204
+ version: 8.1.0
205
205
  type: :runtime
206
206
  prerelease: false
207
207
  version_requirements: !ruby/object:Gem::Requirement
208
208
  requirements:
209
209
  - - ">="
210
210
  - !ruby/object:Gem::Version
211
- version: '6.1'
211
+ version: 7.1.0
212
212
  - - "<"
213
213
  - !ruby/object:Gem::Version
214
- version: 7.2.0
214
+ version: 8.1.0
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: activesupport
217
217
  requirement: !ruby/object:Gem::Requirement
218
218
  requirements:
219
219
  - - ">="
220
220
  - !ruby/object:Gem::Version
221
- version: '6.1'
221
+ version: 7.1.0
222
222
  - - "<"
223
223
  - !ruby/object:Gem::Version
224
- version: 7.2.0
224
+ version: 8.1.0
225
225
  type: :runtime
226
226
  prerelease: false
227
227
  version_requirements: !ruby/object:Gem::Requirement
228
228
  requirements:
229
229
  - - ">="
230
230
  - !ruby/object:Gem::Version
231
- version: '6.1'
231
+ version: 7.1.0
232
232
  - - "<"
233
233
  - !ruby/object:Gem::Version
234
- version: 7.2.0
234
+ version: 8.1.0
235
235
  - !ruby/object:Gem::Dependency
236
236
  name: railties
237
237
  requirement: !ruby/object:Gem::Requirement
238
238
  requirements:
239
239
  - - ">="
240
240
  - !ruby/object:Gem::Version
241
- version: '6.1'
241
+ version: 7.1.0
242
242
  - - "<"
243
243
  - !ruby/object:Gem::Version
244
- version: 7.2.0
244
+ version: 8.1.0
245
245
  type: :runtime
246
246
  prerelease: false
247
247
  version_requirements: !ruby/object:Gem::Requirement
248
248
  requirements:
249
249
  - - ">="
250
250
  - !ruby/object:Gem::Version
251
- version: '6.1'
251
+ version: 7.1.0
252
252
  - - "<"
253
253
  - !ruby/object:Gem::Version
254
- version: 7.2.0
254
+ version: 8.1.0
255
255
  - !ruby/object:Gem::Dependency
256
256
  name: zeitwerk
257
257
  requirement: !ruby/object:Gem::Requirement
@@ -290,9 +290,10 @@ files:
290
290
  - bin/setup
291
291
  - cloudflare-rails.gemspec
292
292
  - gemfiles/.bundle/config
293
- - gemfiles/rails_6.1.gemfile
294
- - gemfiles/rails_7.0.gemfile
295
293
  - gemfiles/rails_7.1.gemfile
294
+ - gemfiles/rails_7.2.gemfile
295
+ - gemfiles/rails_8.0.gemfile
296
+ - lib/cloudflare-rails.rb
296
297
  - lib/cloudflare_rails.rb
297
298
  - lib/cloudflare_rails/check_trusted_proxies.rb
298
299
  - lib/cloudflare_rails/fallback_ips.rb
@@ -313,7 +314,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
313
314
  requirements:
314
315
  - - ">="
315
316
  - !ruby/object:Gem::Version
316
- version: 2.5.0
317
+ version: 3.1.0
317
318
  required_rubygems_version: !ruby/object:Gem::Requirement
318
319
  requirements:
319
320
  - - ">="