Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Faker::TvShows::TheOfficeOriginal #2342

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -343,6 +343,8 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
- [Faker::TvShows::TheExpanse](doc/tv_shows/the_expanse.md)
- [Faker::TvShows::TheFreshPrinceOfBelAir](doc/tv_shows/the_fresh_prince_of_bel_air.md)
- [Faker::TvShows::TheITCrowd](doc/tv_shows/the_it_crowd.md)
- [Faker::TvShows::TheOffice](doc/tv_shows/the_office.md)
- [Faker::TvShows::TheOfficeOriginal](doc/tv_shows/the_office_original.md)
- [Faker::TvShows::TheThickOfIt](doc/tv_shows/the_thick_of_it.md)
- [Faker::TvShows::TwinPeaks](doc/tv_shows/twin_peaks.md)
- [Faker::TvShows::VentureBros](doc/tv_shows/venture_bros.md)
Expand Down
7 changes: 7 additions & 0 deletions doc/tv_shows/the_office_original.md
@@ -0,0 +1,7 @@
# Faker::TvShows::TheOfficeOriginal

```ruby
Faker::TvShows::TheOfficeOriginal.character #=> "David Brent"

Faker::TvShows::TheOfficeOriginal.quote #=> "Unconditional trust. Mutual, likewise, reciprocated."
```
37 changes: 37 additions & 0 deletions lib/faker/tv_shows/the_office_original.rb
@@ -0,0 +1,37 @@
# frozen_string_literal: true

module Faker
class TvShows
class TheOfficeOriginal < Base
flexible :the_office_original

class << self
##
# Produces a character from The Office (original UK version).
#
# @return [String]
#
# @example
# Faker::TvShows::TheOfficeOriginal.character #=> "David Brent"
#
# @faker.version next
def character
fetch('the_office_original.characters')
end

##
# Produces a quote from The Office (original UK version).
#
# @return [String]
#
# @example
# Faker::TvShows::TheOfficeOriginal.quote #=> "Unconditional trust. Mutual, likewise, reciprocated."
#
# @faker.version next
def quote
fetch('the_office_original.quotes')
end
end
end
end
end
46 changes: 46 additions & 0 deletions lib/locales/en/the_office_original.yml
@@ -0,0 +1,46 @@
en:
faker:
the_office_original:
characters:
[
"David Brent",
"Tim Canterbury",
"Gareth Keenan",
"Dawn Tinsley",
"Jennifer Taylor-Clarke",
"Ricky Howard",
"Chris Finch",
"Neil Godwin",
"Rachel",
"Anne",
"Keith Bishop",
"Lee",
"Glynn aka Taffy",
"Malcolm",
"Donna",
"Karen Roper",
"Trudy",
"Oliver",
"Brenda",
"Rowan",
"Simon",
"Ray",
"Helena",
"Carol",
"Oggy",
]
quotes:
[
"Unconditional trust. Mutual, likewise, reciprocated.",
"I’m taking them into battle, and I’m doing my own stapling.",
"Ipso facto. Trust received, responsibility given and taken.",
"Were we successful? I’ll let you judge that when I tell you that we were once supported by a little-known Scottish outfit called Texas.",
"Yeah? If you were to ask me to name three geniuses, I probably wouldn’t say Einstein, Newton You know. I’d go Milligan, Cleese, Everett. Sessions.",
"Whilst getting the job done, they’re having a laugh at work with the Sword of Damocles hanging over them.",
"We are the most efficient branch – cogito ergo sum – we’ll be fine.",
"But, er I suppose I’ve created an atmosphere where I’m a friend first and a boss second. Probably an entertainer third.",
"What upsets me about the job? Um Wasted talent, yeah? People could come to me and they could go, David, you’ve been in the business twelve years. Can you spare us a moment to tell us how to run a team? How to keep them task-orientated as well as happy. But they don’t. That’s the tragedy.",
"You just have to accept that some days you are the pigeon, and some days you are the statue.",
"A sergeant major spends his time training his men to be killers. He doesn’t polish his own boots. He probably does polish his own boots, but, you know, that doesn’t mean I have to do my own filing.",
"You will never work in a place like this again. It’s brilliant. Fact. And you’ll never have another boss like me, someone who’s basically a chilled-out entertainer.",
]
17 changes: 17 additions & 0 deletions test/faker/tv_shows/test_the_office_original.rb
@@ -0,0 +1,17 @@
# frozen_string_literal: true

require_relative '../../test_helper'

class TestFakerTvShowsTheOfficeOriginal < Test::Unit::TestCase
def setup
@tester = Faker::TvShows::TheOfficeOriginal
end

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

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