Skip to content

Commit c190d34

Browse files
authored
Add Final Space to TvShows category (faker-ruby#2147)
1 parent 74a94c1 commit c190d34

File tree

5 files changed

+119
-0
lines changed

5 files changed

+119
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
309309
- [Faker::TvShows::DrWho](doc/tv_shows/dr_who.md)
310310
- [Faker::TvShows::DumbAndDumber](doc/tv_shows/dumb_and_dumber.md)
311311
- [Faker::TvShows::FamilyGuy](doc/tv_shows/family_guy.md)
312+
- [Faker::TvShows::FinalSpace](doc/tv_shows/final_space.md)
312313
- [Faker::TvShows::Friends](doc/tv_shows/friends.md)
313314
- [Faker::TvShows::GameOfThrones](doc/tv_shows/game_of_thrones.md)
314315
- [Faker::TvShows::HeyArnold](doc/tv_shows/hey_arnold.md)

doc/tv_shows/final_space.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Faker::TvShows::FinalSpace
2+
3+
```ruby
4+
Faker::TvShows::FinalSpace.character #=> "Gary Goodspeed"
5+
6+
Faker::TvShows::FinalSpace.vehicle #=> "Imperium Cruiser"
7+
8+
Faker::TvShows::FinalSpace.quote #=> "It's an alien on my face! It's an alien on my...It's a space alien!"
9+
```

lib/faker/tv_shows/final_space.rb

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# frozen_string_literal: true
2+
3+
module Faker
4+
class TvShows
5+
class FinalSpace < Base
6+
flexible :final_space
7+
8+
class << self
9+
##
10+
# Produces a character from Final Space.
11+
#
12+
# @return [String]
13+
#
14+
# @example
15+
# Faker::TvShows::FinalSpace.character #=> "Gary Goodspeed"
16+
#
17+
# @faker.version next
18+
def character
19+
fetch('final_space.characters')
20+
end
21+
22+
##
23+
# Produces a vehicle from Final Space.
24+
#
25+
# @return [String]
26+
#
27+
# @example
28+
# Faker::TvShows::FinalSpace.vehicle #=> "Imperium Cruiser"
29+
#
30+
# @faker.version next
31+
def vehicle
32+
fetch('final_space.vehicles')
33+
end
34+
35+
##
36+
# Produces a quote from Final Space.
37+
#
38+
# @return [String]
39+
#
40+
# @example
41+
# Faker::TvShows::FinalSpace.quote
42+
# #=> "It's an alien on my face! It's an alien on my...It's a space alien!"
43+
#
44+
# @faker.version next
45+
def quote
46+
fetch('final_space.quotes')
47+
end
48+
end
49+
end
50+
end
51+
end

lib/locales/en/final_space.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
en:
2+
faker:
3+
final_space:
4+
characters:
5+
- A.V.A
6+
- Ash Graven
7+
- Avocato
8+
- Bolo
9+
- Clarence
10+
- Gary Goodspeed
11+
- H.U.E
12+
- John Goodspeed
13+
- KVN
14+
- Little Cato
15+
- Lord Commander
16+
- Mooncake
17+
- Nighfall
18+
- Quinn Ergon
19+
- Sheryl Goodspeed
20+
21+
vehicles:
22+
- Crimson Light
23+
- Galaxy One
24+
- Imperium Cruiser
25+
- F71 Hawk
26+
- Heavy Incinerator
27+
- Star Chaser
28+
29+
quotes:
30+
- It's an alien on my face! It's an alien on my...It's a space alien!
31+
- Get. Your. Finger. Out. Of. My. TUMMY!
32+
- Chookity
33+
- Twist my nipples rough
34+
- Let's get wild, how about you buy me a drink
35+
- Hey kids, it's me, your mother
36+
- That's not a cookie. And you know that HUE, you know that!
37+
- Get off my cheeks HUE!
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# frozen_string_literal: true
2+
3+
require_relative '../../test_helper'
4+
5+
class TestFakerTvShowsFinalSpace < Test::Unit::TestCase
6+
def setup
7+
@tester = Faker::TvShows::FinalSpace
8+
end
9+
10+
def test_character
11+
assert @tester.character.match(/\w+/)
12+
end
13+
14+
def test_vehicle
15+
assert @tester.vehicle.match(/\w+/)
16+
end
17+
18+
def test_quote
19+
assert @tester.quote.match(/\w+/)
20+
end
21+
end

0 commit comments

Comments
 (0)