view_component 2.19.0 → 2.19.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/CHANGELOG.md +10 -0
- data/README.md +10 -4
- data/lib/view_component/base.rb +3 -2
- data/lib/view_component/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea6f3a009f297903de456f49af5f615c61c5624fb1deadcb6faa159372d4327d
|
|
4
|
+
data.tar.gz: dc5bb14f5e95e34e34aa82c1d004e93891947c1d98f0e70424ab61c2f99c401d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 30afb969cf609a88bacbc8f3eda28bb62c29a3391e6c0b2779de4d5de5a801a28a9289e83d08bae213389949b0c445138d385dbe5df1123f594aca9e60a0ec13
|
|
7
|
+
data.tar.gz: be5e974f0efc4c41f60ec092ae14649cfec174f94e79270789610a14081d0ddc3866ab5f7deadf485596a4f44db6e402316d0f9ddffd3b31bd5f9284b9aab810
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## master
|
|
4
4
|
|
|
5
|
+
## 2.19.1
|
|
6
|
+
|
|
7
|
+
* Check if `Rails.application` is loaded.
|
|
8
|
+
|
|
9
|
+
*Gleydson Tavares*
|
|
10
|
+
|
|
11
|
+
* Add documentation for webpack configuration when using Stimulus controllers.
|
|
12
|
+
|
|
13
|
+
*Ciprian Redinciuc*
|
|
14
|
+
|
|
5
15
|
## 2.19.0
|
|
6
16
|
|
|
7
17
|
* Extend documentation for using Stimulus within sidecar directories.
|
data/README.md
CHANGED
|
@@ -1004,6 +1004,12 @@ application.load(
|
|
|
1004
1004
|
|
|
1005
1005
|
This enables the creation of files such as `app/components/widget_controller.js`, where the controller identifier matches the `data-controller` attribute in the component's HTML template.
|
|
1006
1006
|
|
|
1007
|
+
After configuring Webpack to load Stimulus controller files from the `components` directory, add the path to `resolved_paths` in `config/webpacker.yml`:
|
|
1008
|
+
|
|
1009
|
+
```yml
|
|
1010
|
+
resolved_paths: ["app/components"]
|
|
1011
|
+
```
|
|
1012
|
+
|
|
1007
1013
|
When placing a Stimulus controller inside a sidecar directory, be aware that when referencing the controller [each forward slash in a namespaced controller file’s path becomes two dashes in its identifier](
|
|
1008
1014
|
https://stimulusjs.org/handbook/installing#controller-filenames-map-to-identifiers):
|
|
1009
1015
|
|
|
@@ -1109,10 +1115,10 @@ ViewComponent is built by:
|
|
|
1109
1115
|
|@johannesengl|@czj|@mrrooijen|@bradparker|@mattbrictson|
|
|
1110
1116
|
|Berlin, Germany|Paris, France|The Netherlands|Brisbane, Australia|San Francisco|
|
|
1111
1117
|
|
|
1112
|
-
|<img src="https://avatars.githubusercontent.com/mixergtz?s=256" alt="mixergtz" width="128" />|<img src="https://avatars.githubusercontent.com/jules2689?s=256" alt="jules2689" width="128" />|
|
|
1113
|
-
|
|
1114
|
-
|@mixergtz|@jules2689|
|
|
1115
|
-
|Medellin, Colombia|Toronto, Canada|
|
|
1118
|
+
|<img src="https://avatars.githubusercontent.com/mixergtz?s=256" alt="mixergtz" width="128" />|<img src="https://avatars.githubusercontent.com/jules2689?s=256" alt="jules2689" width="128" />|<img src="https://avatars.githubusercontent.com/g13ydson?s=256" alt="g13ydson" width="128" />|
|
|
1119
|
+
|:---:|:---:|:---:|
|
|
1120
|
+
|@mixergtz|@jules2689|@g13ydson|
|
|
1121
|
+
|Medellin, Colombia|Toronto, Canada|João Pessoa, Brazil|
|
|
1116
1122
|
|
|
1117
1123
|
## License
|
|
1118
1124
|
|
data/lib/view_component/base.rb
CHANGED
|
@@ -187,8 +187,9 @@ module ViewComponent
|
|
|
187
187
|
# `compile` defines
|
|
188
188
|
compile
|
|
189
189
|
|
|
190
|
-
# If
|
|
191
|
-
|
|
190
|
+
# If Rails application is loaded, add application url_helpers to the component context
|
|
191
|
+
# we need to check this to use this gem as a dependency
|
|
192
|
+
if defined?(Rails) && Rails.application
|
|
192
193
|
child.include Rails.application.routes.url_helpers unless child < Rails.application.routes.url_helpers
|
|
193
194
|
end
|
|
194
195
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: view_component
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.19.
|
|
4
|
+
version: 2.19.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitHub Open Source
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-09-
|
|
11
|
+
date: 2020-09-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|