Skip to content

Commit

Permalink
Add Final Space to TvShows category (faker-ruby#2147)
Browse files Browse the repository at this point in the history
  • Loading branch information
fralps authored and droznyk committed Oct 23, 2020
1 parent 20947a3 commit 1d289b4
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
- [Faker::TvShows::DrWho](doc/tv_shows/dr_who.md)
- [Faker::TvShows::DumbAndDumber](doc/tv_shows/dumb_and_dumber.md)
- [Faker::TvShows::FamilyGuy](doc/tv_shows/family_guy.md)
- [Faker::TvShows::FinalSpace](doc/tv_shows/final_space.md)
- [Faker::TvShows::Friends](doc/tv_shows/friends.md)
- [Faker::TvShows::GameOfThrones](doc/tv_shows/game_of_thrones.md)
- [Faker::TvShows::HeyArnold](doc/tv_shows/hey_arnold.md)
Expand Down
9 changes: 9 additions & 0 deletions doc/tv_shows/final_space.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Faker::TvShows::FinalSpace

```ruby
Faker::TvShows::FinalSpace.character #=> "Gary Goodspeed"

Faker::TvShows::FinalSpace.vehicle #=> "Imperium Cruiser"

Faker::TvShows::FinalSpace.quote #=> "It's an alien on my face! It's an alien on my...It's a space alien!"
```
51 changes: 51 additions & 0 deletions lib/faker/tv_shows/final_space.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# frozen_string_literal: true

module Faker
class TvShows
class FinalSpace < Base
flexible :final_space

class << self
##
# Produces a character from Final Space.
#
# @return [String]
#
# @example
# Faker::TvShows::FinalSpace.character #=> "Gary Goodspeed"
#
# @faker.version next
def character
fetch('final_space.characters')
end

##
# Produces a vehicle from Final Space.
#
# @return [String]
#
# @example
# Faker::TvShows::FinalSpace.vehicle #=> "Imperium Cruiser"
#
# @faker.version next
def vehicle
fetch('final_space.vehicles')
end

##
# Produces a quote from Final Space.
#
# @return [String]
#
# @example
# Faker::TvShows::FinalSpace.quote
# #=> "It's an alien on my face! It's an alien on my...It's a space alien!"
#
# @faker.version next
def quote
fetch('final_space.quotes')
end
end
end
end
end
37 changes: 37 additions & 0 deletions lib/locales/en/final_space.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
en:
faker:
final_space:
characters:
- A.V.A
- Ash Graven
- Avocato
- Bolo
- Clarence
- Gary Goodspeed
- H.U.E
- John Goodspeed
- KVN
- Little Cato
- Lord Commander
- Mooncake
- Nighfall
- Quinn Ergon
- Sheryl Goodspeed

vehicles:
- Crimson Light
- Galaxy One
- Imperium Cruiser
- F71 Hawk
- Heavy Incinerator
- Star Chaser

quotes:
- It's an alien on my face! It's an alien on my...It's a space alien!
- Get. Your. Finger. Out. Of. My. TUMMY!
- Chookity
- Twist my nipples rough
- Let's get wild, how about you buy me a drink
- Hey kids, it's me, your mother
- That's not a cookie. And you know that HUE, you know that!
- Get off my cheeks HUE!
21 changes: 21 additions & 0 deletions test/faker/tv_shows/test_final_space.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

require_relative '../../test_helper'

class TestFakerTvShowsFinalSpace < Test::Unit::TestCase
def setup
@tester = Faker::TvShows::FinalSpace
end

def test_character
assert @tester.character.match(/\w+/)
end

def test_vehicle
assert @tester.vehicle.match(/\w+/)
end

def test_quote
assert @tester.quote.match(/\w+/)
end
end

0 comments on commit 1d289b4

Please sign in to comment.