-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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::Movies::Departed Class #1931
Merged
Zeragamba
merged 2 commits into
faker-ruby:master
from
jaebradley:add-actors-characters-and-quotes-for-the-departed
May 23, 2020
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Faker::Movies::Departed | ||
|
||
Available since version next. | ||
|
||
```ruby | ||
Faker::Movies::Departed.actor #=> "Matt Damon" | ||
|
||
Faker::Movies::Departed.character #=> "Frank Costello" | ||
|
||
Faker::Movies::Departed.quote #=> "I'm the guy who does his job. You must be the other guy" | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
class Movies | ||
class Departed < Base | ||
class << self | ||
## | ||
# Produces an actor from The Departed. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Movies::Departed.actor #=> "Matt Damon" | ||
# | ||
# @faker.version next | ||
def actor | ||
fetch('departed.actors') | ||
end | ||
|
||
## | ||
# Produces a character from The Departed. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Movies::Departed.character #=> "Frank Costello" | ||
# | ||
# @faker.version next | ||
def character | ||
fetch('departed.characters') | ||
end | ||
|
||
## | ||
# Produces a quote from The Departed. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Movies::Departed.quote | ||
# #=> "I'm the guy who does his job. You must be the other guy" | ||
# | ||
# @faker.version next | ||
def quote | ||
fetch('departed.quotes') | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
en: | ||
faker: | ||
departed: | ||
actors: | ||
- Leonardo DiCaprio | ||
- Matt Damon | ||
- Jack Nicholson | ||
- Mark Wahlberg | ||
- Martin Sheen | ||
- Ray Winstone | ||
- Vera Farmiga | ||
- Anthony Anderson | ||
- Alec Baldwin | ||
- Kevin Corrigan | ||
- James Badge Dale | ||
- David O'Hara | ||
- Mark Rolston | ||
characters: | ||
- Billy Costigan | ||
- Colin Sullivan | ||
- Frank Costello | ||
- Sean Dignam | ||
- Oliver Queenan | ||
- Arnold French | ||
- Madolyn Madden | ||
- Tony Brown | ||
- George Ellerby | ||
- Sean Costigan | ||
- James Barrigan | ||
- Patrick Fitzgibbons | ||
- Timothy Delahunt | ||
quotes: | ||
- I'm the guy who does his job. You must be the other guy. | ||
- You have an immaculate record. Some guys don't trust an immaculate record. | ||
I do. I have an immaculate record. | ||
- You got a nice suit at home or do you like coming to work everyday dressed | ||
like you're going to invade Poland? | ||
- All due respect Mr. Costello school is out. | ||
- Normally he's a very uh nice guy. Don't judge him from this meeting alone. | ||
- Maybe. Maybe not. Maybe fuck yourself. | ||
- My theory on Feds is that they're like mushrooms feed 'em shit and keep 'em | ||
in the dark | ||
- Don't laugh! This ain't reality TV! | ||
- Let's say you have no idea and leave it at that okay? No idea. Zip. None. | ||
- Families are always rising or falling in America am I right? | ||
- What Freud said about the Irish is we're the only people who are impervious | ||
to psychoanalysis. | ||
- One of you mugs got a light? | ||
- Do you want to be a cop or do you want to appear to be a cop? | ||
- Yeah, it's working... Overtime! |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../../test_helper' | ||
|
||
class TestFakerDeparted < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Movies::Departed | ||
end | ||
|
||
def test_actor | ||
assert @tester.actor.match(/\w+/) | ||
end | ||
|
||
def test_character | ||
assert @tester.character.match(/\w+/) | ||
end | ||
|
||
def test_quote | ||
assert @tester.quote.match(/\w+/) | ||
end | ||
end |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to adjust this version value - I might have missed how to generate the next version (I did peek at the contribution guide, but could have misread the section on document generation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For these docs, I don't think we keep track of when a set of generators were added.