Skip to content

Commit 10a93e9

Browse files
authored
do not ship DocsBuilderComponent or YARD::MattrAccessorHandler (#2274)
* do not ship DocsBuilderComponent or YARD::MattrAccessorHandler I noticed that we were including these two objects in our published gems, despite them only being used for building docs. * add changelog * use more explicit files glob
1 parent 9d90359 commit 10a93e9

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ namespace :docs do
101101
require "rails"
102102
require "action_controller"
103103
require "view_component"
104-
ViewComponent::Base.config.view_component_path = "view_component"
105-
require "view_component/docs_builder_component"
104+
ViewComponent::Base.config.view_component_path = "docs"
105+
require "docs/docs_builder_component"
106106

107107
error_keys = registry.keys.select { |key| key.to_s.include?("Error::MESSAGE") }.map(&:to_s)
108108

docs/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ nav_order: 6
1010

1111
## main
1212

13+
* Do not include internal `DocsBuilderComponent` or `YARD::MattrAccessorHandler` in published gem.
14+
15+
*Joel Hawksley*
16+
1317
* Only lock to `concurrent-ruby` `1.3.4` for Rails 6.1.
1418

1519
*Joel Hawksley*
1620

1721
* Fix generation of ViewComponent documentation that was broken due to HTML safety issues.
1822

19-
*Simon Fish*
23+
*Simon Fish*
2024

2125
* Add documentation on how ViewComponent works.
2226

view_component.gemspec

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ Gem::Specification.new do |spec|
2424
"public gem pushes."
2525
end
2626

27-
spec.files = Dir["LICENSE.txt", "README.md", "app/**/*", "docs/CHANGELOG.md", "lib/**/*"]
27+
spec.files = Dir[
28+
"LICENSE.txt",
29+
"README.md",
30+
"app/**/*",
31+
"docs/CHANGELOG.md",
32+
"lib/rails/**/*.rb",
33+
"lib/view_component.rb",
34+
"lib/view_component/**/*.rb",
35+
]
2836
spec.require_paths = ["lib"]
2937

3038
spec.required_ruby_version = ">= 2.7.0"

0 commit comments

Comments
 (0)