Skip to content

Commit

Permalink
Revert "Deprecate celebrity methods in favor of actor (faker-ruby…
Browse files Browse the repository at this point in the history
…#2133)"

This reverts commit 213408c.
  • Loading branch information
droznyk committed Oct 23, 2020
1 parent c68620c commit c711a1e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 48 deletions.
2 changes: 1 addition & 1 deletion doc/tv_shows/buffy.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Faker::TvShows::Buffy.character #=> "Buffy Summers"

Faker::TvShows::Buffy.quote #=> "If the apocalypse comes, beep me."

Faker::TvShows::Buffy.actor #=> "John Ritter"
Faker::TvShows::Buffy.celebrity #=> "John Ritter"

Faker::TvShows::Buffy.big_bad #=> "Glory"

Expand Down
2 changes: 1 addition & 1 deletion doc/tv_shows/the_fresh_prince_of_bel_air.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```ruby
Faker::TvShows::TheFreshPrinceOfBelAir.character #=> "Will Smith"

Faker::TvShows::TheFreshPrinceOfBelAir.actor #=> "Quincy Jones"
Faker::TvShows::TheFreshPrinceOfBelAir.celebrity #=> "Quincy Jones"

Faker::TvShows::TheFreshPrinceOfBelAir.quote #=> "Girl, you look so good, I would marry your brother just to get in your family."
```
21 changes: 4 additions & 17 deletions lib/faker/tv_shows/buffy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,17 @@ def quote
end

##
# Produces a actor from Buffy the Vampire Slayer.
#
# @return [String]
#
# @example
# Faker::TvShows::Buffy.actor #=> "John Ritter"
#
# @faker.version next
def actor
fetch('buffy.actors')
end

##
# Produces a actor from Buffy the Vampire Slayer.
# Produces a celebrity from Buffy the Vampire Slayer.
#
# @return [String]
#
# @example
# Faker::TvShows::Buffy.celebrity #=> "John Ritter"
#
# @deprecated Use the `actor` method instead.
#
# @faker.version 1.9.2
alias celebrity actor
def celebrity
fetch('buffy.celebrities')
end

##
# Produces a big bad from Buffy the Vampire Slayer.
Expand Down
21 changes: 4 additions & 17 deletions lib/faker/tv_shows/the_fresh_prince_of_bel_air.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,17 @@ def character
end

##
# Produces a actor from The Fresh Prince of Bel-Air.
#
# @return [String]
#
# @example
# Faker::TvShows::TheFreshPrinceOfBelAir.actor #=> "Quincy Jones"
#
# @faker.version next
def actor
fetch('the_fresh_prince_of_bel_air.actors')
end

##
# Produces a actor from The Fresh Prince of Bel-Air.
# Produces a celebrity from The Fresh Prince of Bel-Air.
#
# @return [String]
#
# @example
# Faker::TvShows::TheFreshPrinceOfBelAir.celebrity #=> "Quincy Jones"
#
# @deprecated Use the `actor` method instead.
#
# @faker.version 1.8.3
alias celebrity actor
def celebrity
fetch('the_fresh_prince_of_bel_air.celebrities')
end

##
# Produces a quote from The Fresh Prince of Bel-Air.
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/en/buffy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ en:
"We don't know much about them except for they're very ugly, and they're very mobile for blind people.",
"And I wonder what possible catastrophe came crashing down from heaven and brought this dashing stranger to tears?"
]
actors: [
celebrities: [
'Sarah Michelle Geller',
'Alyson Hannigan',
'David Boreanaz',
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/en/fresh_prince_of_bel_air.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ en:
faker:
the_fresh_prince_of_bel_air:
characters: ['Will Smith', 'Philip Banks', 'Carlton Banks', 'Ashley Banks', 'Hilary Banks', 'Vivian Banks', 'Nicky Banks', 'Geoffrey Butler', 'Jazz', 'Vy Smith', 'Hattie Banks', 'Lisa Wilkes', 'Jackie Ames', 'Henry Furth', 'Trevor', 'Tyriq', 'Ice Tray', 'Dee Dee', 'Kellogg Lieberbaum', 'Coach Smiley', 'Judge Carl Robertson']
actors: ['Quincy Jones', 'Jay Leno', 'Ronald Reagan', 'Dick Clark', 'Evander Holyfield', 'Isaiah Thomas', 'Heavy D', 'Don Cornelius', 'Kadeem Hardison', 'Hugh M. Hefner', 'Kareem Abdul-Jabbar', 'Bo Jackson', 'Ken Griffey Jr.', 'Al B. Sure!', 'John Ridley', 'Doctor Dré', 'Regis Philbin', 'William Shatner', 'B. B. King', 'Kim Fields', 'Arthel Neville', 'Oprah Winfrey', 'Donal J. Trump', 'Leeza Gibbons', 'Susan Powter', 'Tempestt Bledsoe', 'Kathie Lee Gifford', 'Garcelle Beauvais', 'Bree Walker']
celebrities: ['Quincy Jones', 'Jay Leno', 'Ronald Reagan', 'Dick Clark', 'Evander Holyfield', 'Isaiah Thomas', 'Heavy D', 'Don Cornelius', 'Kadeem Hardison', 'Hugh M. Hefner', 'Kareem Abdul-Jabbar', 'Bo Jackson', 'Ken Griffey Jr.', 'Al B. Sure!', 'John Ridley', 'Doctor Dré', 'Regis Philbin', 'William Shatner', 'B. B. King', 'Kim Fields', 'Arthel Neville', 'Oprah Winfrey', 'Donal J. Trump', 'Leeza Gibbons', 'Susan Powter', 'Tempestt Bledsoe', 'Kathie Lee Gifford', 'Garcelle Beauvais', 'Bree Walker']
quotes: [
"Girl, you look so good, I would marry your brother just to get in your family.",
"In west Philadelphia born and raised, on the playground was where I spent most of my days.",
Expand Down
5 changes: 0 additions & 5 deletions test/faker/tv_shows/test_buffy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ def test_quote
assert @tester.quote.match(/\w+/)
end

def test_actor
assert @tester.actor.match(/\w+/)
end

# deprecated
def test_celebrity
assert @tester.celebrity.match(/\w+/)
end
Expand Down
5 changes: 0 additions & 5 deletions test/faker/tv_shows/test_the_fresh_prince_of_bel_air.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ def test_character
assert @tester.character.match(/\w+/)
end

def test_actor
assert @tester.actor.match(/\w+/)
end

# deprecated
def test_celebrity
assert @tester.celebrity.match(/\w+/)
end
Expand Down

0 comments on commit c711a1e

Please sign in to comment.