view_component_helper 0.2.0 → 0.4.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: aa08be2ddaa37bc9b165d29928df25c35f083b6478709940c4fbdf183e01f360
4
- data.tar.gz: 4d0b7273f388875d641440f9c95558d5cb45afcd1d00fe6ad3ee560264f6e422
3
+ metadata.gz: 93b7eca6167373623132673b6b72b8fd68ba3510af7c149c811426f25915728d
4
+ data.tar.gz: c74a84b1de7204dc509f8339d7729f68bec535098f90f600965f690aac30d58f
5
5
  SHA512:
6
- metadata.gz: 07c7235bb00024e54dd445dc3212c1382ce341c2ba17c5e9a6c7b58099262a2883134dfdf7d2642be1d7a72e8b86f33392f08f4283f75f9778d43865d1f9ed9c
7
- data.tar.gz: af8928f87af5ee8e28c385c5c289fe6996fedb83661a87ee71fa729ce1eaf41b28792c59e5f41eb98db0744d0706fd9e5ca1e52ba863e5d23b315407df09310f
6
+ metadata.gz: 111b28a83aecfa3bb8c195b3e5acb11ff35c80912f6f7078fd8e60201ebeba227e537c57a251990ca4a0336716a619842be966e3f0b74089fb159d7b83ffc6d6
7
+ data.tar.gz: 8223bac8064f546818512930f855672f8f1f3cf8249720a1aafb5fd0bec85c0711451ae13179c5910067569a122f0c591413a44b3d1558397b345b286c7c6c89
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- view_component_helper (0.2.0)
4
+ view_component_helper (0.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -187,6 +187,9 @@ GEM
187
187
  websocket-extensions (0.1.5)
188
188
  zeitwerk (2.6.8)
189
189
 
190
+ PLATFORMS
191
+ x86_64-darwin-21
192
+
190
193
  DEPENDENCIES
191
194
  rails
192
195
  rake (~> 13.0)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ViewComponentHelper
4
- VERSION = "0.2.0"
4
+ VERSION = "0.4.0"
5
5
  end
@@ -1,18 +1,20 @@
1
1
  module ViewComponentHelper
2
- module ViewHelper
3
- def render_view_component(path, *args, **kwargs, &)
4
- render component_class_for(path).new(*args, **kwargs, &)
5
- end
2
+ def render_view_component(path, *args, **kwargs, &)
3
+ render component_class_for(path).new(*args, **kwargs, &)
4
+ end
6
5
 
7
- alias render_vc render_view_component
6
+ alias render_vc render_view_component
8
7
 
9
- private
8
+ private
10
9
 
11
- def component_class_for(path)
12
- class_names = path.to_s.split("/")
13
- component_name = class_names.map(&:capitalize).join("::")
10
+ def component_class_for(path)
11
+ class_names = path.to_s.split("/")
12
+ component_name = class_names.map(&:capitalize).join("::")
14
13
 
15
- component_name.constantize
16
- end
14
+ component_name.constantize
17
15
  end
16
+ end
17
+
18
+ ActiveSupport.on_load :action_view do
19
+ include ViewComponentHelper
18
20
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "view_component_helper/version"
4
-
5
- module ViewComponentHelper
6
- class Error < StandardError; end
7
- end
3
+ require "addressable/uri"
4
+ require "view_component_helper/view_helper"
5
+ require "view_component_helper/version"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yamitake
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-02 00:00:00.000000000 Z
11
+ date: 2023-08-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'The ''view_component_helper'' gem streamlines View helper method invocation
14
14
  for view_component. Simplify integration and boost productivity. '
@@ -27,7 +27,6 @@ files:
27
27
  - README.md
28
28
  - Rakefile
29
29
  - lib/view_component_helper.rb
30
- - lib/view_component_helper/engine.rb
31
30
  - lib/view_component_helper/version.rb
32
31
  - lib/view_component_helper/view_helper.rb
33
32
  - sig/view_component_helper.rbs
@@ -1,9 +0,0 @@
1
- require 'view_component_helper/view_helper'
2
- module ViewComponentHelper
3
- class Engine < ::Rails::Engine
4
- isolate_namespace ViewComponentHelper
5
- initializer 'view_component_helper.action_view_helpers' do
6
- ActiveSupport.on_load(:action_view) { include ViewComponentHelper::ViewHelper }
7
- end
8
- end
9
- end