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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 642717e715c2f33794d3647e8756af86226bf90a9ee40c28496109288fa63201
4
- data.tar.gz: a2144dc99b735c2e0cd27b86e5f5b95f60031facc7b47af0e35f3ab0ff2562ba
3
+ metadata.gz: 57dd1d0375f05f3a5849670716be000a0c8074f4ae63b1d422278006b07e5b32
4
+ data.tar.gz: 42309cc4774f3405e338cd48a84bc6ee6619ffa3306d98ab8432e8a196d6cb5f
5
5
  SHA512:
6
- metadata.gz: 34973a14a10b96e2905b2fadfa93828de4014c12f97239a367527aabea8218d13281cdc8dbad7808f9575afafb66172202612a65e51506db4f2e8be4a6055354
7
- data.tar.gz: 893531f33aaf0982973df46acc708e42de316464a3860bda12a693e810283d12d7d5a3a5a743149fa406645ff7242f9ef04509f18a0c855379b867f6ef4f9117
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
@@ -10,6 +10,7 @@
10
10
  /test/version_tmp/
11
11
  /tmp/
12
12
  /test/log/*
13
+ /test/app/tmp/*
13
14
 
14
15
  # Used by dotenv library to load environment variables.
15
16
  # .env
@@ -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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- actionview-component (1.6.1)
4
+ actionview-component (1.6.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -234,7 +234,7 @@ end
234
234
  ```
235
235
 
236
236
  ### Previewing Components
237
- `ActionView::Component::Preview`s provide a way to see how components look by visiting a special URL that renders them.
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!)
@@ -5,7 +5,7 @@ module ActionView
5
5
  module VERSION
6
6
  MAJOR = 1
7
7
  MINOR = 6
8
- PATCH = 1
8
+ PATCH = 2
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH].join(".")
11
11
  end
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.1
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: 2019-12-25 00:00:00.000000000 Z
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"