view_component 2.42.0 → 2.43.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of view_component might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec259ffe370fa7001ca5669ff70484a339564e113b5adcde81862873375a91f3
4
- data.tar.gz: a1ffead994abcb10cf05a39a5d6cdadbfcc7987c19682858356b16574cda5bc9
3
+ metadata.gz: 3213b43fb64df68370b007c5e90029923c1b35d5893bfb1c57fad904d2df99fc
4
+ data.tar.gz: d13ad45c178645ba3c639cd889ec9f645defe96579f0a94d305b0ce940405bb1
5
5
  SHA512:
6
- metadata.gz: 43b9b1daceb39a542bf2923bf33420c3c3bce34188190393f54982eef65fa3f6bd27315b07ac86fc5fef95847182eeae1994f32e68611b08839287569808e43b
7
- data.tar.gz: 761538016609ef056dd3940bc84e2fa425c42a98bfd860f9123b368a75c2c3a6ece671c3fd8454a5e2e754a34d10b30448e5f41dc4f679ab7e38ef7e9b0277a4
6
+ metadata.gz: 159ff39bb666465d3ae385b9abed08c977c748d4c4c2d2112c1dd87b7c2823a819d253af78a9b14ead1519bbd15c79de4c92518266ebe2fd88fd9de4850bf887
7
+ data.tar.gz: 7a62698b2449485ac139b89706c785f1466b49e98551df4a70897a347f8cc64619a072b860ebdd09869728978699e7926e3a09649abe083b954d4e18c746cc18
data/docs/CHANGELOG.md CHANGED
@@ -5,6 +5,46 @@ title: Changelog
5
5
 
6
6
  # Changelog
7
7
 
8
+ ## main
9
+
10
+ ## 2.43.0
11
+
12
+ * Add note about tests and instance methods.
13
+
14
+ *Joel Hawksley*
15
+
16
+ * Flesh out `ViewComponents in practice`.
17
+
18
+ *Joel Hawksley*
19
+
20
+ * Add CODEOWNERS entries for feature areas owned by community committers.
21
+
22
+ *Joel Hawksley*
23
+
24
+ * Separate lint and CI workflows.
25
+
26
+ *Blake Williams*
27
+
28
+ * Add support for `image_path` helper in previews.
29
+
30
+ *Tobias Ahlin*, *Joel Hawksley*
31
+
32
+ * Add section to docs listing users of ViewComponent. Please submit a PR to add your team to the list!
33
+
34
+ *Joel Hawksley*
35
+
36
+ * Fix loading issue with Stimulus generator and add specs for Stimulus generator.
37
+
38
+ *Peter Sumskas*
39
+
40
+ * Remove dependency on `ActionDispatch::Static` in Rails middleware stack when enabling statics assets for source code preview.
41
+
42
+ *Gregory Igelmund*
43
+
44
+ * Require `view_component/engine` automatically.
45
+
46
+ *Cameron Dutro*
47
+
8
48
  ## 2.42.0
9
49
 
10
50
  * Add logo files and page to docs.
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "rails/generators/abstract_generator"
4
+
3
5
  module Stimulus
4
6
  module Generators
5
7
  class ComponentGenerator < ::Rails::Generators::NamedBase
@@ -103,7 +103,7 @@ module ViewComponent
103
103
 
104
104
  initializer "static assets" do |app|
105
105
  if app.config.view_component.show_previews
106
- app.middleware.insert_before(::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/app/assets/vendor")
106
+ app.middleware.use(::ActionDispatch::Static, "#{root}/app/assets/vendor")
107
107
  end
108
108
  end
109
109
 
@@ -5,6 +5,7 @@ require "active_support/descendants_tracker"
5
5
  module ViewComponent # :nodoc:
6
6
  class Preview
7
7
  include ActionView::Helpers::TagHelper
8
+ include ActionView::Helpers::AssetTagHelper
8
9
  extend ActiveSupport::DescendantsTracker
9
10
 
10
11
  def render(component, **args, &block)
@@ -3,7 +3,7 @@
3
3
  module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 2
6
- MINOR = 42
6
+ MINOR = 43
7
7
  PATCH = 0
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].join(".")
@@ -17,3 +17,5 @@ module ViewComponent
17
17
  autoload :TemplateError
18
18
  autoload :Translatable
19
19
  end
20
+
21
+ require "view_component/engine" if defined?(Rails::Engine)
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.42.0
4
+ version: 2.43.0
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: 2021-10-27 00:00:00.000000000 Z
11
+ date: 2021-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -356,7 +356,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
356
356
  - !ruby/object:Gem::Version
357
357
  version: '0'
358
358
  requirements: []
359
- rubygems_version: 3.1.2
359
+ rubygems_version: 3.1.4
360
360
  signing_key:
361
361
  specification_version: 4
362
362
  summary: View components for Rails