Rename Faker::Show to Faker::Theater#2857
Closed
jdcalvin wants to merge 4 commits intofaker-ruby:mainfrom
Closed
Conversation
The Faker::Show class was namespaced under faker/music/show.rb, and conventionally should be subclassed to Faker::Music::Show. However, the intent of the faker is to provide names for musicals and plays, so opted to call the class `Theater` instead.
Contributor
stefannibrasil
left a comment
There was a problem hiding this comment.
Looking good! Left some comments ⭐
| @@ -0,0 +1,7 @@ | |||
| # Faker::Theater | |||
Contributor
There was a problem hiding this comment.
I don't really know what's the reason behind this unreleased folder but we can skip that and place it in the default folder with the others 👍
| # frozen_string_literal: true | ||
|
|
||
| module Faker | ||
| class Theater < Base |
Contributor
There was a problem hiding this comment.
Have you tried naming this file to lib/faker/theater.rb? No need to be nested, unless that's necessary.
Contributor
7 tasks
Contributor
|
This one hasn't been updated in a while. It's currently being fixed here #2921 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation / Background
This Pull Request has been created because of naming issues identified here: #2787
This PR replaces the usage of
Faker::Showto beFaker::Theaterfor the following reasons:The file was created under
faker/music/show.rbbut the class definition isFaker::ShowAt the very least the class should be name-spaced correctly asFaker::Music::ShowFaker::Showis ambiguous for its current usage.Faker::Music::Showwould also be ambiguous. The class supports three methods:adult_musicalkids_musicalplaythat generate names for musicals and plays which all can be categorized underTheater.Additional information
Related: #2787
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]If you're proposing a new generator: