Skip to content

Commit 0bac1e3

Browse files
authored
Merge pull request #2412 from ViewComponent/re_add_format
Re-introduce Base#format and Collection#format to fix Rails 7.1 tests
2 parents 496acb7 + d96dc6b commit 0bac1e3

16 files changed

+1420
-30
lines changed

.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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ nav_order: 6
1414

1515
*Hans Lemuet*
1616

17+
* Conditionally add the `ViewComponent::Base#format` method back for Rails 7.1 only.
18+
* Compute and check lockfiles into source control.
19+
* Constrain Rails versions in gemfiles to only allow the patch version to vary, eg. `~> 7.1.0` instead of `~> 7.1`.
20+
21+
*Cameron Dutro*
22+
1723
## 4.0.0
1824

1925
Two years after releasing [3.0.0](https://github.com/ViewComponent/view_component/releases/tag/v3.0.0) and almost six years since [1.0.0](https://github.com/ViewComponent/view_component/releases/tag/v1.0.0), we're proud to ship ViewComponent 4. This release marks a shift towards a Long Term Support model for the project, having reached significant feature maturity. While contributions are always welcome, we're unlikely to accept further breaking changes or major feature additions.

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)