Skip to content

Commit d8a28f7

Browse files
authored
Merge branch 'main' into drop-eol-rails-7.1
2 parents 683da38 + 839fd5c commit d8a28f7

File tree

6 files changed

+31
-11
lines changed

6 files changed

+31
-11
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ group :development, :test do
2727
gem "method_source", "~> 1"
2828
gem "minitest", "~> 5"
2929
gem "propshaft", "~> 1"
30-
gem "puma", "~> 6"
30+
gem "puma", ">= 6"
3131
gem "rake", "~> 13"
3232
gem "rails-dom-testing", "~> 2.3.0"
3333
gem "redis"

Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ GEM
9595
ast (2.4.3)
9696
base64 (0.3.0)
9797
benchmark-ips (2.14.0)
98-
better_html (2.1.1)
99-
actionview (>= 6.0)
100-
activesupport (>= 6.0)
98+
better_html (2.2.0)
99+
actionview (>= 7.0)
100+
activesupport (>= 7.0)
101101
ast (~> 2.0)
102102
erubi (~> 1.4)
103103
parser (>= 2.4)
@@ -155,7 +155,7 @@ GEM
155155
jbuilder (2.14.1)
156156
actionview (>= 7.0.0)
157157
activesupport (>= 7.0.0)
158-
json (2.15.1)
158+
json (2.15.2)
159159
language_server-protocol (3.17.0.5)
160160
lint_roller (1.1.0)
161161
logger (1.7.0)
@@ -203,7 +203,7 @@ GEM
203203
nokogiri (1.18.10-x86_64-linux-musl)
204204
racc (~> 1.4)
205205
parallel (1.27.0)
206-
parser (3.3.9.0)
206+
parser (3.3.10.0)
207207
ast (~> 2.4.1)
208208
racc
209209
pp (0.6.3)
@@ -218,7 +218,7 @@ GEM
218218
date
219219
stringio
220220
public_suffix (6.0.2)
221-
puma (6.6.1)
221+
puma (7.1.0)
222222
nio4r (~> 2.0)
223223
racc (1.8.1)
224224
rack (3.2.3)
@@ -423,7 +423,7 @@ DEPENDENCIES
423423
method_source (~> 1)
424424
minitest (~> 5)
425425
propshaft (~> 1)
426-
puma (~> 6)
426+
puma (>= 6)
427427
rails (~> 8)
428428
rails-dom-testing (~> 2.3.0)
429429
rake (~> 13)

docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ nav_order: 6
1414

1515
*Hans Lemuet*
1616

17+
* Resolve deprecation warning for `ActiveSupport::Configurable`.
18+
19+
*Simon Fish*
20+
1721
* Make `ViewComponent::VERSION` accessible to other gems by default.
1822

1923
*Hans Lemuet*

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ Hundreds of people have [contributed](https://github.com/ViewComponent/view_comp
164164
* [PrintReleaf](https://www.printreleaf.com/)
165165
* [Project Blacklight](http://projectblacklight.org/)
166166
* [QuickNode](https://www.quicknode.com/)
167+
* [RailsCarma](https://www.railscarma.com)
167168
* [Reinvented Hospitality](https://reinvented-hospitality.com/)
168169
* [Room AI](https://roomai.com/)
169170
* [SerpApi](https://www.serpapi.com/)

lib/view_component/base.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
22

33
require "action_view"
4-
require "active_support/configurable"
54
require "view_component/collection"
65
require "view_component/compile_cache"
76
require "view_component/compiler"

lib/view_component/configurable.rb

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,30 @@ module ViewComponent
44
module Configurable
55
extend ActiveSupport::Concern
66

7+
class_methods do
8+
def config
9+
@_config ||= if respond_to?(:superclass) && superclass.respond_to?(:config)
10+
superclass.config.inheritable_copy
11+
else
12+
ActiveSupport::OrderedOptions.new
13+
end
14+
end
15+
16+
def configure
17+
yield config
18+
end
19+
end
20+
721
included do
822
next if respond_to?(:config) && config.respond_to?(:view_component) && config.respond_to_missing?(:instrumentation_enabled)
923

10-
include ActiveSupport::Configurable
11-
1224
configure do |config|
1325
config.view_component ||= ActiveSupport::InheritableOptions.new
1426
end
27+
28+
def config
29+
self.class.config
30+
end
1531
end
1632
end
1733
end

0 commit comments

Comments
 (0)