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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 819e2fcc432b7272d23885e2ea361725b7eae87f4aeb216b2100500cadfd1ffc
4
- data.tar.gz: 3958ff12852ee60b017ddeea924073bf7a787efe70d47929e692726fcd791adb
3
+ metadata.gz: 7468565c85b97035ae072333ef8c3851467920aa5ddda57078929106ca32c6ae
4
+ data.tar.gz: d9cb57ffb7b7de0236774e0836853ca6c33b717ffce1cc1dd20264784829dc2b
5
5
  SHA512:
6
- metadata.gz: ef854e693634333b5843a3cfb13f02271775c05856af79e439335f6154b2be9b4781fd4fa0a931eaad7f928048e9232cbd764dffc87fd64ee1730ec3c3af169c
7
- data.tar.gz: 15300b4f6d30eaa481210993b6ff17cdfb5647498af89a25d951a961bbc6fe48c400dff287574ccf51f0c742d8dc753fd7ae6b753fe278af67b29bb95e0c315d
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`.
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "action_view"
4
- require "active_support/configurable"
5
4
  require "view_component/collection"
6
5
  require "view_component/compile_cache"
7
6
  require "view_component/compiler"
@@ -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
@@ -4,7 +4,7 @@ module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 4
6
6
  MINOR = 1
7
- PATCH = 0
7
+ PATCH = 1
8
8
  PRE = nil
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "action_view"
4
4
  require "active_support/dependencies/autoload"
5
+ require "view_component/version"
5
6
 
6
7
  module ViewComponent
7
8
  extend ActiveSupport::Autoload
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.0
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