Skip to content

Commit

Permalink
Add Faker::Movie.title
Browse files Browse the repository at this point in the history
  • Loading branch information
gizipp committed Mar 25, 2020
1 parent 7966190 commit 197c808
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/movies/movie.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Faker::Movie

```ruby
Faker::Movie.title #=> "The Lord of the Rings: The Two Towers"

Faker::Movie.quote #=> "Bumble bee tuna"
```
13 changes: 13 additions & 0 deletions lib/faker/movies/movie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
module Faker
class Movie < Base
class << self
##
# Produces a title from a movie.
#
# @return [String]
#
# @example
# Faker::Movie.title #=> "The Lord of the Rings: The Two Towers"
#
# @faker.version next
def title
fetch('movie.title')
end

##
# Produces a quote from a movie.
#
Expand Down
193 changes: 192 additions & 1 deletion lib/locales/en/movie.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,196 @@
en:
faker:
movie:
title:
- '12 Angry Men'
- '12 Years a Slave'
- '2001: A Space Odyssey'
- '3 Idiots'
- 'A Beautiful Mind'
- 'A Clockwork Orange'
- 'A Wednesday'
- 'Alien'
- 'All About Eve'
- 'Amadeus'
- 'American Beauty'
- 'Apocalypse Now'
- 'Back to the Future'
- 'Batman Begins'
- 'Beauty and the Beast'
- 'Before Sunrise'
- 'Bicycle Thieves'
- 'Blade Runner'
- 'Blade Runner 2049'
- 'Braveheart'
- 'Casablanca'
- 'Casino'
- 'Catch Me If You Can'
- 'Chinatown'
- 'Cidade de Deus'
- 'Cinema Paradiso'
- 'Citizen Kane'
- 'City Lights'
- 'City of God'
- 'Cool Hand Luke'
- 'Dead Poets Society'
- 'Dial M for Murder'
- 'Die Hard'
- 'Django Unchained'
- 'Dog Day Afternoon'
- 'Donnie Darko'
- 'Double Indemnity'
- 'Dunkirk'
- 'Eternal Sunshine of the Spotless Mind'
- 'Fargo'
- 'Fight Club'
- 'Finding Nemo'
- 'Forrest Gump'
- 'Full Metal Jacket'
- 'Gandhi'
- 'Gladiator'
- 'Gone Girl'
- 'Gone with the Wind'
- 'Good Will Hunting'
- 'Goodfellas'
- 'Gran Torino'
- 'Grave of the Fireflies'
- 'Groundhog Day'
- 'Hacksaw Ridge'
- 'Heat'
- 'Hotel Rwanda'
- 'How to Train Your Dragon'
- 'In the Name of the Father'
- 'Inception'
- 'Indiana Jones and the Last Crusade'
- 'Inglourious Basterds'
- 'Inside Out'
- 'Interstellar'
- 'Into the Wild'
- 'Intouchables'
- 'It Happened One Night'
- 'Jaws'
- 'Judgment at Nuremberg'
- 'Jurassic Park'
- 'L.A. Confidential'
- 'La La Land'
- 'Lawrence of Arabia'
- 'Life Is Beautiful'
- 'Life of Brian'
- 'Lock, Stock and Two Smoking Barrels'
- 'Mad Max: Fury Road'
- 'Mary and Max'
- 'Memento'
- 'Metropolis'
- 'Million Dollar Baby'
- 'Modern Times'
- 'Monsters, Inc.'
- 'Monty Python and the Holy Grail'
- 'Mr. Smith Goes to Washington'
- 'Network'
- 'No Country for Old Men'
- 'North by Northwest'
- 'Nuovo Cinema Paradiso'
- 'Oldboy'
- 'Oldeuboi'
- 'Once Upon a Time in America'
- 'Once Upon a Time in the West'
- 'Paper Moon'
- 'Paris, Texas'
- 'Paths of Glory'
- 'Persona'
- 'Platoon'
- 'Princess Mononoke'
- 'Prisoners'
- 'Psycho'
- 'Pulp Fiction'
- 'Raging Bull'
- 'Raiders of the Lost Ark'
- 'Rocky'
- 'Room'
- 'Rush'
- 'Saving Private Ryan'
- 'Scarface'
- 'Se7en'
- 'Seven Samurai'
- 'Sholay'
- 'Shutter Island'
- 'Snatch'
- 'Some Like It Hot'
- 'Spirited Away'
- 'Spotlight'
- 'Stalker'
- 'Stand by Me'
- 'Star Wars'
- 'Star Wars: Episode I – The Phantom Menace'
- 'Star Wars: Episode II – Attack of the Clones'
- 'Star Wars: Episode III – Revenge of the Sith'
- 'Star Wars: Episode IV – A New Hope'
- 'Star Wars: Episode V - The Empire Strikes Back'
- 'Star Wars: Episode VI - Return of the Jedi'
- 'Star Wars: Episode VII - The Force Awakens'
- 'Star Wars: Episode VIII – The Last Jedi'
- 'Star Wars: Episode IX – The Rise of Skywalker'
- 'Sunrise: A Song of Two Humans'
- 'Sunset Blvd.'
- 'Taxi Driver'
- 'Terminator 2: Judgment Day'
- 'The Apartment'
- 'The Best Years of Our Lives'
- 'The Big Lebowski'
- 'The Bourne Ultimatum'
- 'The Bridge on the River Kwai'
- 'The Dark Knight'
- 'The Dark Knight Rises'
- 'The Deer Hunter'
- 'The Departed'
- 'The Elephant Man'
- 'The General'
- 'The Godfather'
- 'The Godfather: Part II'
- 'The Gold Rush'
- 'The Good, the Bad and the Ugly'
- 'The Grand Budapest Hotel'
- 'The Grapes of Wrath'
- 'The Great Dictator'
- 'The Great Escape'
- 'The Green Mile'
- 'The Help'
- 'The Intouchables'
- 'The Kid'
- 'The Lion King'
- 'The Lives of Others'
- 'The Lord of the Rings: The Fellowship of the Ring'
- 'The Lord of the Rings: The Return of the King'
- 'The Lord of the Rings: The Two Towers'
- 'The Maltese Falcon'
- 'The Matrix'
- 'The Pianist'
- 'The Prestige'
- 'The Princess Bride'
- 'The Shawshank Redemption'
- 'The Shining'
- 'The Silence of the Lambs'
- 'The Sixth Sense'
- 'The Sting'
- 'The Terminator'
- 'The Thing'
- 'The Third Man'
- 'The Treasure of the Sierra Madre'
- 'The Truman Show'
- 'The Usual Suspects'
- 'The Wizard of Oz'
- 'The Wolf of Wall Street'
- 'There Will Be Blood'
- 'To Kill a Mockingbird'
- 'Touch of Evil'
- 'Toy Story'
- 'Toy Story 2'
- 'Toy Story 3'
- 'Twelve Monkeys'
- 'Unforgiven'
- 'V for Vendetta'
- 'Vertigo'
- 'WALL·E'
- 'Whiplash'
- 'Witness for the Prosecution'
quote: ["Frankly, my dear, I don’t give a damn.", "I'm going to make him an offer he can't refuse.", "Toto, I've got a feeling we're not in Kansas anymore.", "Here's looking at you, kid.", "Go ahead, make my day.", "All right, Mr. DeMille, I'm ready for my closeup.", "May the Force be with you.", "Fasten your seatbelts. It's going to be a bumpy night.", "You talking to me?", "What we've got here is failure to communicate.", "I love the smell of napalm in the morning."]

13 changes: 13 additions & 0 deletions test/faker/movies/test_faker_movie.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require_relative '../../test_helper'

class TestFakerMovie < Test::Unit::TestCase
def setup
@tester = Faker::Movie
end

def test_title
assert @tester.title.match(/\w+/)
end
end

0 comments on commit 197c808

Please sign in to comment.