Skip to content

Commit

Permalink
Generated README: Titleize app name (#1195)
Browse files Browse the repository at this point in the history
Follow-up to #1187

Since we derive the app name from a module name, we need to [titleize][]
it so it reads better in the `README`.

Now `ExpectedAppName` will be rendered as `Expected App Name`.

[titleize]: https://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-titleize
  • Loading branch information
stevepolitodesign committed May 10, 2024
1 parent 96b5f03 commit e3b00f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/suspenders/cleanup/generate_readme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def perform
File.open(readme, "w+") do |file|
@file = file

heading app_name, level: 1
heading app_name.titleize, level: 1

prerequisites

Expand Down
2 changes: 1 addition & 1 deletion test/suspenders/cleanup/generate_readme_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class GenerateReadmeTest < ActiveSupport::TestCase
Tempfile.create "README.md" do |readme|
path = readme.path

Suspenders::Cleanup::GenerateReadme.perform(path, "Expected App Name")
Suspenders::Cleanup::GenerateReadme.perform(path, "ExpectedAppName")

readme.rewind
readme = readme.read
Expand Down

0 comments on commit e3b00f9

Please sign in to comment.