view_component-fragment_caching 0.6.0 → 0.7.0

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: 6dc865b2aec77314368000c920c4879097ca79fd858195c712e0e5938d80b085
4
- data.tar.gz: 89387f7ad9fce99ce3eb58ce7803340cfc389d8d860372690f6a021e278f0c5e
3
+ metadata.gz: 027dc136e49a6c38fd654656d52d99822c05b95b6367ab87c920375338259fd9
4
+ data.tar.gz: 26aa304d74ead2142e5e16d59a02e130ace68c6a43fd92fe8c5a9bd277d51044
5
5
  SHA512:
6
- metadata.gz: a321f276741901f94cbd0f1fbb56753b0fa9f7a597fb1a7f3ab84ab269a18a02c3bfd4b5727268b9603a0465c962876391b31d7f89c261f57e9fa7581dac02aa
7
- data.tar.gz: 39e5eaecb3864c20e536710775e38e4466ca3456823923d9623da69e8710d123ffa6542544746bb97b3cc6525e5a0448b2666089c8b70a3c26a48348f132a2be
6
+ metadata.gz: 7f94f423859bcf472e3d2cc608ae41d7bd3d65c43017012d7d34a10a013cc443db6e7c4c0e3cc2684cdc95ec735fb6fc471b6b452b0dcb63a90c9d9e59e72539
7
+ data.tar.gz: d27dfe00e71fd1fccd790558fac11b49d3c21dffa35ef043844aeeb438c1ca75b789415f1eac3cae7fd6854a8902dae47f25cc676b0381acd001ee9125eb5fee
@@ -6,7 +6,12 @@ module ViewComponent
6
6
  attr_reader :view_component_paths
7
7
 
8
8
  def initialize
9
- self.view_component_path = ::ViewComponent::Base.view_component_path
9
+ self.view_component_path =
10
+ if ViewComponent::Base.respond_to? :view_component_path
11
+ ::ViewComponent::Base.view_component_path
12
+ else
13
+ ViewComponent::FragmentCaching::Engine.config.view_component.generate.path
14
+ end
10
15
  end
11
16
 
12
17
  def view_component_paths=(path_or_paths)
@@ -55,13 +55,12 @@ module ViewComponent
55
55
  end
56
56
 
57
57
  def view_component_ruby_node(identifier, logical_name, template, klass)
58
- "#{identifier.split('.').first}.rb".then do |rb_identifier|
59
- next unless File.exist? rb_identifier
58
+ rb_identifier = "#{File.dirname(identifier)}/#{File.basename(identifier).split('.').first}.rb"
59
+ return unless File.exist? rb_identifier
60
60
 
61
- rb_source = File.read rb_identifier
62
- rb_template = new_ruby_template rb_source, rb_identifier, template, logical_name
63
- klass.new logical_name, logical_name, rb_template, []
64
- end
61
+ rb_source = File.read rb_identifier
62
+ rb_template = new_ruby_template rb_source, rb_identifier, template, logical_name
63
+ klass.new logical_name, logical_name, rb_template, []
65
64
  end
66
65
 
67
66
  def new_ruby_template(rb_source, rb_identifier, template, virtual_path)
@@ -1,6 +1,6 @@
1
1
  module ViewComponent
2
2
  module FragmentCaching
3
- VERSION = '0.6.0'.freeze
3
+ VERSION = '0.7.0'.freeze
4
4
  public_constant :VERSION
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component-fragment_caching
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Arnett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-09 00:00:00.000000000 Z
11
+ date: 2025-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "<"
38
38
  - !ruby/object:Gem::Version
39
- version: '4.0'
39
+ version: '5.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '4.0'
46
+ version: '5.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: appraisal
49
49
  requirement: !ruby/object:Gem::Requirement