actionview-component 1.6.1 → 1.6.2
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/.github/ISSUE_TEMPLATE +30 -0
- data/.github/PULL_REQUEST_TEMPLATE +19 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/action_view/component/base.rb +0 -6
- data/lib/action_view/component/railtie.rb +9 -1
- data/lib/action_view/component/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57dd1d0375f05f3a5849670716be000a0c8074f4ae63b1d422278006b07e5b32
|
4
|
+
data.tar.gz: 42309cc4774f3405e338cd48a84bc6ee6619ffa3306d98ab8432e8a196d6cb5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdaad351b7db8bb6aab8e94294c221c50993cdd851fac8d43f64c3628627b5652be8fd3bb93f450467f74401433d4d3fffea560ca9ddc8c78fe645fbe0596056
|
7
|
+
data.tar.gz: f75561cba609fd4eecf3ac958a0cf9ef9ee9300772c3016749cf3ab5bea5e5ac5f4c2005f47623587e5a80fb9c9d71a18aeaad33fc9d89ba8c1123191dc0345b
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<!-- **** Filing a Feature Request? Include these sections. **** -->
|
2
|
+
|
3
|
+
### Feature request
|
4
|
+
<!-- Provide a summary of the behavior. -->
|
5
|
+
|
6
|
+
### Motivation
|
7
|
+
|
8
|
+
<!-- What would you like to do with this feature? Can you provide
|
9
|
+
context or references to similar behavior in other libraries. -->
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
<!-- **** Filing a Bug Report? Include these sections. **** -->
|
16
|
+
|
17
|
+
### Steps to reproduce
|
18
|
+
<!-- Provide an series of steps or, better yet, a link to a repo to
|
19
|
+
demonstrate the bug you've identified. -->
|
20
|
+
|
21
|
+
### Expected behavior
|
22
|
+
<!-- Tell us what should happen -->
|
23
|
+
|
24
|
+
### Actual behavior
|
25
|
+
<!-- Tell us what happens instead -->
|
26
|
+
|
27
|
+
### System configuration
|
28
|
+
**Rails version**:
|
29
|
+
|
30
|
+
**Ruby version**:
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!-- https://github.com/github/actionview-component/blob/master/CONTRIBUTING.md#submitting-a-pull-request -->
|
2
|
+
|
3
|
+
### Summary
|
4
|
+
|
5
|
+
<!-- Provide a general description of the code changes in your pull
|
6
|
+
request... were there any bugs you had fixed? If so, mention them. If
|
7
|
+
these bugs have open GitHub issues, be sure to tag them here as well,
|
8
|
+
to keep the conversation linked together. -->
|
9
|
+
|
10
|
+
### Other Information
|
11
|
+
|
12
|
+
<!-- If there's anything else that's important and relevant to your pull
|
13
|
+
request, mention that information here. This could include
|
14
|
+
benchmarks, or other information.
|
15
|
+
|
16
|
+
If you are updating any of the CHANGELOG files or are asked to update the
|
17
|
+
CHANGELOG files by reviewers, please add the CHANGELOG entry at the top of the file.
|
18
|
+
|
19
|
+
Thanks for contributing to actionview-component! -->
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# v1.6.2
|
2
|
+
|
3
|
+
* Fix Uninitialized Constant error.
|
4
|
+
|
5
|
+
*Jon Palmer*
|
6
|
+
|
7
|
+
* Add basic github issue and PR templates.
|
8
|
+
|
9
|
+
*Dylan Clark*
|
10
|
+
|
11
|
+
* Update readme phrasing around previews.
|
12
|
+
|
13
|
+
*Justin Coyne*
|
14
|
+
|
1
15
|
# v1.6.1
|
2
16
|
|
3
17
|
* Allow Previews to have no layout.
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -234,7 +234,7 @@ end
|
|
234
234
|
```
|
235
235
|
|
236
236
|
### Previewing Components
|
237
|
-
`ActionView::Component::Preview`
|
237
|
+
`ActionView::Component::Preview` provides a way to see how components look by visiting a special URL that renders them.
|
238
238
|
In the previous example, the preview class for `TestComponent` would be called `TestComponentPreview` and located in `test/components/previews/test_component_preview.rb`.
|
239
239
|
To see the preview of the component with a given title, implement a method that renders the component.
|
240
240
|
You can define as many examples as you want:
|
@@ -127,12 +127,6 @@ module ActionView
|
|
127
127
|
instance_method(:initialize).source_location[0]
|
128
128
|
end
|
129
129
|
|
130
|
-
def eager_load!
|
131
|
-
self.descendants.each do |descendant|
|
132
|
-
descendant.compile if descendant.has_initializer?
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
130
|
def compiled?
|
137
131
|
@compiled && ActionView::Base.cache_template_loading
|
138
132
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "rails"
|
4
|
+
require "action_view/component"
|
4
5
|
|
5
6
|
module ActionView
|
6
7
|
module Component
|
@@ -25,7 +26,6 @@ module ActionView
|
|
25
26
|
require "railties/lib/rails/components_controller"
|
26
27
|
require "railties/lib/rails/component_examples_controller"
|
27
28
|
|
28
|
-
app.config.eager_load_namespaces << ActionView::Component::Base
|
29
29
|
options = app.config.action_view_component
|
30
30
|
|
31
31
|
if options.show_previews && options.preview_path
|
@@ -33,6 +33,14 @@ module ActionView
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
+
initializer "action_view_component.eager_load_actions" do
|
37
|
+
ActiveSupport.on_load(:after_initialize) do
|
38
|
+
ActionView::Component::Base.descendants.each do |descendant|
|
39
|
+
descendant.compile if descendant.has_initializer? && config.eager_load
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
36
44
|
initializer "action_view_component.compile_config_methods" do
|
37
45
|
ActiveSupport.on_load(:action_view_component) do
|
38
46
|
config.compile_methods! if config.respond_to?(:compile_methods!)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionview-component
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Open Source
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -129,6 +129,8 @@ executables: []
|
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
|
+
- ".github/ISSUE_TEMPLATE"
|
133
|
+
- ".github/PULL_REQUEST_TEMPLATE"
|
132
134
|
- ".github/workflows/ruby_on_rails.yml"
|
133
135
|
- ".gitignore"
|
134
136
|
- ".rubocop.yml"
|