omg-actionpack 8.0.0.alpha8 → 8.0.0.alpha9

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: 25af50ef776cddbe4644faf9005396c435dc06ab1a96f9d36804d3e403d81551
4
- data.tar.gz: 22e5847f38d2bc79e75ac4a8c9f974a11aae7124843ec3a0c9f54760d0f3ff14
3
+ metadata.gz: 641622fc7e5ee6fc52a44fd241aaef220c19edf1750c5481b8dff0225cc86a30
4
+ data.tar.gz: e35f78cb7a1e637259c6dc2ccf2709d04cdbbe507a664d4de906039a02870a4c
5
5
  SHA512:
6
- metadata.gz: 19a2eab60987fc7ac73e9016a597f6ad455c5ad8c6263467170a599cef43c4e190f3bcb2fecb29b68c316042c551549d5cd243130e262a26c6668747ecc12851
7
- data.tar.gz: 78c5eefefc12807643fe1d0ba218b3311666fb3761e9131c8b6d282783655c790203f003fa71a019f7c7183d8550e95d778ba2c2bc82383c58d9bb7d917d2417
6
+ metadata.gz: ded415b6f7b40c38e1da7e5b969644d72a71b723f3f835012ac021973ad15c117ae7492aa2b69499d1c0b021e3f56ab36907552cfe81c65f2380745bcd33cb4d
7
+ data.tar.gz: 32f017addf1ee8b4bbaf54bf05989545ce83bb388fd005c9f4b2c111212dda7367ca383e710bbabcc120e06cb94994ed2b6550d418f978f1c2a2d1dbcb6e7a48
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## Rails 8.0.0.alpha9 (September 25, 2024) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 8.0.0.alpha8 (September 18, 2024) ##
2
7
 
3
8
  * No changes.
@@ -52,14 +52,15 @@ module ActionController # :nodoc:
52
52
  # rate_limit to: 3, within: 2.seconds, name: "short-term"
53
53
  # rate_limit to: 10, within: 5.minutes, name: "long-term"
54
54
  # end
55
- def rate_limit(to:, within:, by: -> { request.remote_ip }, with: -> { head :too_many_requests }, store: cache_store, name: controller_path, **options)
55
+ def rate_limit(to:, within:, by: -> { request.remote_ip }, with: -> { head :too_many_requests }, store: cache_store, name: nil, **options)
56
56
  before_action -> { rate_limiting(to: to, within: within, by: by, with: with, store: store, name: name) }, **options
57
57
  end
58
58
  end
59
59
 
60
60
  private
61
61
  def rate_limiting(to:, within:, by:, with:, store:, name:)
62
- count = store.increment("rate-limit:#{name}:#{instance_exec(&by)}", 1, expires_in: within)
62
+ cache_key = ["rate-limit", controller_path, name, instance_exec(&by)].compact.join(":")
63
+ count = store.increment(cache_key, 1, expires_in: within)
63
64
  if count && count > to
64
65
  ActiveSupport::Notifications.instrument("rate_limit.action_controller", request: request) do
65
66
  instance_exec(&with)
@@ -19,7 +19,7 @@ module ActionDispatch
19
19
  #
20
20
  # Requests can opt-out of redirection with `exclude`:
21
21
  #
22
- # config.ssl_options = { redirect: { exclude: -> request { /healthcheck/.match?(request.path) } } }
22
+ # config.ssl_options = { redirect: { exclude: -> request { request.path == "/up" } } }
23
23
  #
24
24
  # Cookies will not be flagged as secure for excluded requests.
25
25
  #
@@ -1053,6 +1053,7 @@ module ActionDispatch
1053
1053
  end
1054
1054
 
1055
1055
  # Allows you to set default parameters for a route, such as this:
1056
+ #
1056
1057
  # defaults id: 'home' do
1057
1058
  # match 'scoped_pages/(:id)', to: 'pages#show'
1058
1059
  # end
@@ -12,7 +12,7 @@ module ActionPack
12
12
  MAJOR = 8
13
13
  MINOR = 0
14
14
  TINY = 0
15
- PRE = "alpha8"
15
+ PRE = "alpha9"
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omg-actionpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0.alpha8
4
+ version: 8.0.0.alpha9
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-18 00:00:00.000000000 Z
11
+ date: 2024-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omg-activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 8.0.0.alpha8
19
+ version: 8.0.0.alpha9
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 8.0.0.alpha8
26
+ version: 8.0.0.alpha9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -128,28 +128,28 @@ dependencies:
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 8.0.0.alpha8
131
+ version: 8.0.0.alpha9
132
132
  type: :runtime
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: 8.0.0.alpha8
138
+ version: 8.0.0.alpha9
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: omg-activemodel
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: 8.0.0.alpha8
145
+ version: 8.0.0.alpha9
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: 8.0.0.alpha8
152
+ version: 8.0.0.alpha9
153
153
  description: Web apps on Rails. Simple, battle-tested conventions for building and
154
154
  testing MVC web applications. Works with any Rack-compatible server.
155
155
  email: david@loudthinking.com
@@ -347,10 +347,10 @@ licenses:
347
347
  - MIT
348
348
  metadata:
349
349
  bug_tracker_uri: https://github.com/rails/rails/issues
350
- changelog_uri: https://github.com/rails/rails/blob/v8.0.0.alpha8/actionpack/CHANGELOG.md
351
- documentation_uri: https://api.rubyonrails.org/v8.0.0.alpha8/
350
+ changelog_uri: https://github.com/rails/rails/blob/v8.0.0.alpha9/actionpack/CHANGELOG.md
351
+ documentation_uri: https://api.rubyonrails.org/v8.0.0.alpha9/
352
352
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
353
- source_code_uri: https://github.com/rails/rails/tree/v8.0.0.alpha8/actionpack
353
+ source_code_uri: https://github.com/rails/rails/tree/v8.0.0.alpha9/actionpack
354
354
  rubygems_mfa_required: 'true'
355
355
  post_install_message:
356
356
  rdoc_options: []