view_component 4.1.0 → 4.1.1
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 +4 -4
- data/docs/CHANGELOG.md +22 -0
- data/lib/view_component/base.rb +0 -1
- data/lib/view_component/configurable.rb +18 -2
- data/lib/view_component/version.rb +1 -1
- data/lib/view_component.rb +1 -0
- metadata +21 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7468565c85b97035ae072333ef8c3851467920aa5ddda57078929106ca32c6ae
|
|
4
|
+
data.tar.gz: d9cb57ffb7b7de0236774e0836853ca6c33b717ffce1cc1dd20264784829dc2b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c714baf334d711d94be596712484baf758fb9e03411c6adb1f9e476230e048a3ebe066ef6eeffd079eabaee1240caf68f133c5fb35f82256cff825999ba3852
|
|
7
|
+
data.tar.gz: cf63306f08750f07b6d966c21cae7b169d995372dbf249312752ea6b699e5b118ce16f699b03e2c231dac10ea740b0cc9f1ca8aa9185a4247741c1558bfe12a2
|
data/docs/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,24 @@ nav_order: 6
|
|
|
10
10
|
|
|
11
11
|
## main
|
|
12
12
|
|
|
13
|
+
## 4.1.1
|
|
14
|
+
|
|
15
|
+
* Add Consultport to list of companies using ViewComponent.
|
|
16
|
+
|
|
17
|
+
*Sebastian Nepote*
|
|
18
|
+
|
|
19
|
+
* Resolve deprecation warning for `ActiveSupport::Configurable`.
|
|
20
|
+
|
|
21
|
+
*Simon Fish*
|
|
22
|
+
|
|
23
|
+
* Make `ViewComponent::VERSION` accessible to other gems by default.
|
|
24
|
+
|
|
25
|
+
*Hans Lemuet*
|
|
26
|
+
|
|
27
|
+
* Added Reinvented Hospitality to the list of companies using ViewComponent.
|
|
28
|
+
|
|
29
|
+
*Torgil Zechel*
|
|
30
|
+
|
|
13
31
|
## 4.1.0
|
|
14
32
|
|
|
15
33
|
* Add Rails 8.1 support.
|
|
@@ -20,6 +38,10 @@ nav_order: 6
|
|
|
20
38
|
|
|
21
39
|
*Tom Lord*
|
|
22
40
|
|
|
41
|
+
* Declare `actionview` as a `view_component` gem dependency.
|
|
42
|
+
|
|
43
|
+
*Michal Cichra*
|
|
44
|
+
|
|
23
45
|
## 4.0.2
|
|
24
46
|
|
|
25
47
|
* Share the view context in tests to prevent out-of-order rendering issues for certain advanced use-cases, eg. testing instances of Rails' `FormBuilder`.
|
data/lib/view_component/base.rb
CHANGED
|
@@ -4,14 +4,30 @@ module ViewComponent
|
|
|
4
4
|
module Configurable
|
|
5
5
|
extend ActiveSupport::Concern
|
|
6
6
|
|
|
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
|
+
|
|
7
21
|
included do
|
|
8
22
|
next if respond_to?(:config) && config.respond_to?(:view_component) && config.respond_to_missing?(:instrumentation_enabled)
|
|
9
23
|
|
|
10
|
-
include ActiveSupport::Configurable
|
|
11
|
-
|
|
12
24
|
configure do |config|
|
|
13
25
|
config.view_component ||= ActiveSupport::InheritableOptions.new
|
|
14
26
|
end
|
|
27
|
+
|
|
28
|
+
def config
|
|
29
|
+
self.class.config
|
|
30
|
+
end
|
|
15
31
|
end
|
|
16
32
|
end
|
|
17
33
|
end
|
data/lib/view_component.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: view_component
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.1.
|
|
4
|
+
version: 4.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ViewComponent Team
|
|
@@ -29,6 +29,26 @@ dependencies:
|
|
|
29
29
|
- - "<"
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
31
|
version: '8.2'
|
|
32
|
+
- !ruby/object:Gem::Dependency
|
|
33
|
+
name: actionview
|
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: 7.1.0
|
|
39
|
+
- - "<"
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '8.2'
|
|
42
|
+
type: :runtime
|
|
43
|
+
prerelease: false
|
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
45
|
+
requirements:
|
|
46
|
+
- - ">="
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: 7.1.0
|
|
49
|
+
- - "<"
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '8.2'
|
|
32
52
|
- !ruby/object:Gem::Dependency
|
|
33
53
|
name: concurrent-ruby
|
|
34
54
|
requirement: !ruby/object:Gem::Requirement
|