Skip to content

Commit b0694f3

Browse files
committed
Merge main
2 parents 6f85862 + 1ed16e3 commit b0694f3

19 files changed

+1432
-41
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
bundle --quiet && bundle exec rake
9797
env:
9898
VIEW_COMPONENT_PATH: ../view_component
99-
RAILS_VERSION: '7.1.5'
99+
RAILS_VERSION: '8.0.2'
100100
PARALLEL_WORKERS: '1'
101101
coverage:
102102
needs: test

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,4 @@ build-iPhoneSimulator/
4545
/replicate-bug
4646

4747
# Appraisal
48-
/gemfiles/*.gemfile.lock
4948
/gemfiles/.bundle/

Appraisals

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,44 @@
11
# frozen_string_literal: true
22

33
appraise "rails-7.1" do
4-
gem "rails", "~> 7.1"
5-
gem "tailwindcss-rails", "~> 2"
6-
gem "turbo-rails", "~> 1"
4+
ruby "~> 3.2.0"
5+
6+
gem "rails", "~> 7.1.0"
7+
8+
group :development, :test do
9+
gem "turbo-rails", "~> 1"
10+
gem "rspec-rails", "~> 7"
11+
end
712
end
813

914
appraise "rails-7.2" do
10-
gem "rails", "~> 7.2"
11-
gem "tailwindcss-rails", "~> 2"
12-
gem "turbo-rails", "~> 2"
15+
ruby "~> 3.3.0"
16+
17+
gem "rails", "~> 7.2.0"
18+
19+
group :development, :test do
20+
gem "turbo-rails", "~> 2"
21+
gem "rspec-rails", "~> 7"
22+
end
1323
end
1424

1525
appraise "rails-8.0" do
16-
gem "rails", "~> 8.0"
17-
gem "tailwindcss-rails", "~> 2"
18-
gem "turbo-rails", "~> 2"
26+
ruby "~> 3.4.0"
27+
28+
gem "rails", "~> 8.0.0"
29+
30+
group :development, :test do
31+
gem "turbo-rails", "~> 2"
32+
gem "rspec-rails", "~> 8"
33+
end
1934
end
2035

2136
appraise "rails-main" do
2237
gem "rack", git: "https://github.com/rack/rack", ref: "8a4475a9f416a72e5b02bd7817e4a8ed684f29b0"
2338
gem "rails", github: "rails/rails", branch: "main"
24-
gem "tailwindcss-rails", "~> 2"
25-
gem "turbo-rails", "~> 2"
39+
40+
group :development, :test do
41+
gem "turbo-rails", "~> 2"
42+
gem "rspec-rails", "~> 8"
43+
end
2644
end

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ group :development, :test do
3030
gem "rake", "~> 13"
3131
gem "rails-dom-testing", "~> 2.3.0"
3232
gem "redis"
33-
gem "rspec-rails", "~> 8"
33+
gem "rspec-rails"
3434
gem "rubocop-md", "~> 2"
3535
gem "selenium-webdriver", "~> 4"
3636
gem "simplecov-console", "< 1"
3737
gem "simplecov", "< 1"
3838
gem "slim", "~> 5"
3939
gem "sprockets-rails", "~> 3"
4040
gem "standard", "~> 1"
41+
gem "tailwindcss-rails", "~> 2"
4142
gem "turbo-rails"
4243
gem "warning"
4344
gem "yard-activesupport-concern", "< 1"

Gemfile.lock

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
view_component (4.0.0)
4+
view_component (4.0.1)
55
activesupport (>= 7.1.0, < 8.1)
66
concurrent-ruby (~> 1)
77

@@ -213,7 +213,7 @@ GEM
213213
date
214214
stringio
215215
public_suffix (6.0.2)
216-
puma (6.6.0)
216+
puma (6.6.1)
217217
nio4r (~> 2.0)
218218
racc (1.8.1)
219219
rack (3.1.16)
@@ -348,6 +348,10 @@ GEM
348348
lint_roller (~> 1.1)
349349
rubocop-performance (~> 1.25.0)
350350
stringio (3.1.7)
351+
tailwindcss-rails (2.1.0)
352+
railties (>= 6.0.0)
353+
tailwindcss-rails (2.1.0-arm64-darwin)
354+
railties (>= 6.0.0)
351355
temple (0.10.3)
352356
terminal-table (4.0.0)
353357
unicode-display_width (>= 1.1.1, < 4)
@@ -409,14 +413,15 @@ DEPENDENCIES
409413
rails-dom-testing (~> 2.3.0)
410414
rake (~> 13)
411415
redis
412-
rspec-rails (~> 8)
416+
rspec-rails
413417
rubocop-md (~> 2)
414418
selenium-webdriver (~> 4)
415419
simplecov (< 1)
416420
simplecov-console (< 1)
417421
slim (~> 5)
418422
sprockets-rails (~> 3)
419423
standard (~> 1)
424+
tailwindcss-rails (~> 2)
420425
turbo-rails
421426
view_component!
422427
warning

docs/CHANGELOG.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,18 @@ nav_order: 6
1010

1111
## main
1212

13+
## 4.0.1
14+
1315
* Setup Trusted Publishing to RubyGems to improve software supply chain safety.
1416

1517
*Hans Lemuet*
1618

19+
* Conditionally add the `ViewComponent::Base#format` method back for Rails 7.1 only.
20+
* Compute and check lockfiles into source control.
21+
* Constrain Rails versions in gemfiles to only allow the patch version to vary, eg. `~> 7.1.0` instead of `~> 7.1`.
22+
23+
*Cameron Dutro*
24+
1725
* Share the view context in tests to prevent out-of-order rendering issues for certain advanced use-cases, eg. testing instances of Rails' `FormBuilder`.
1826

1927
*Cameron Dutro*
@@ -45,11 +53,10 @@ Please report any issues at [https://github.com/ViewComponent/view_component/iss
4553

4654
### Breaking changes (dev/test)
4755

48-
* Rename `config.generate.component_parent_class` to `config.generate.parent_class`.
49-
* Remove `config.test_controller` in favor of `vc_test_controller_class` test helper method.
50-
* `config.component_parent_class` is now `config.generate.component_parent_class`, moving the generator-specific option to the generator configuration namespace.
56+
* Remove `config.view_component.test_controller` in favor of `vc_test_controller_class` test helper method.
57+
* `config.view_component.component_parent_class` is now `config.view_component.generate.parent_class`, moving the generator-specific option to the generator configuration namespace.
58+
* `config.view_component.view_component_path` is now `config.view_component.generate.path`, as components have long since been able to exist in any directory.
5159
* Move previews-related configuration (`enabled`, `route`, `paths`, `default_layout`, `controller`) to under `previews` namespace.
52-
* `config.view_component_path` is now `config.generate.path`, as components have long since been able to exist in any directory.
5360
* `--inline` generator option now generates inline template. Use `--call` to generate `#call` method.
5461
* Remove broken integration with `rails stats` that ignored components outside of `app/components`.
5562
* Remove `preview_source` functionality. Consider using [Lookbook](https://lookbook.build/) instead.
@@ -74,7 +81,7 @@ Please report any issues at [https://github.com/ViewComponent/view_component/iss
7481
### Bug fixes
7582

7683
* Fix bug where virtual path wasn't reset, breaking translations outside of components.
77-
* Fix bug where `config.previews.enabled` didn't function properly in production environments.
84+
* Fix bug where `config.view_component.previews.enabled` didn't function properly in production environments.
7885
* Fix bug in `SlotableDefault` where default couldn't be overridden when content was passed as a block.
7986
* Fix bug where request-aware helpers didn't work outside of the request context.
8087
* `ViewComponentsSystemTestController` shouldn't be useable outside of test environment
@@ -89,7 +96,7 @@ Please report any issues at [https://github.com/ViewComponent/view_component/iss
8996
* Update documentation on performance to reflect more representative benchmark showing 2-3x speed increase over partials.
9097
* Add documentation note about instrumentation negatively affecting performance.
9198
* Remove unnecessary ENABLE_RELOADING test suite flag.
92-
* `config.previews.default_layout` should default to nil.
99+
* `config.view_component.previews.default_layout` should default to nil.
93100
* Add test coverage for uncovered code.
94101
* Test against `turbo-rails` `v2` and `rspec-rails` `v7`.
95102

docs/_data/library.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 4.0.0
1+
version: 4.0.1

gemfiles/rails_7.1.gemfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
source "https://rubygems.org"
44

5-
gem "rails", "~> 7.1"
6-
gem "tailwindcss-rails", "~> 2"
7-
gem "turbo-rails", "~> 1"
5+
ruby "~> 3.2.0"
6+
7+
gem "rails", "~> 7.1.0"
88

99
group :development, :test do
1010
gem "allocation_stats"
@@ -34,6 +34,8 @@ group :development, :test do
3434
gem "slim", "~> 5"
3535
gem "sprockets-rails", "~> 3"
3636
gem "standard", "~> 1"
37+
gem "tailwindcss-rails", "~> 2"
38+
gem "turbo-rails", "~> 1"
3739
gem "warning"
3840
gem "yard-activesupport-concern", "< 1"
3941
gem "yard", "< 1"

0 commit comments

Comments
 (0)