From 7fdb92e58d5bafcbdddf46f07c15a61154ebc919 Mon Sep 17 00:00:00 2001 From: Mayank Date: Thu, 12 Mar 2020 18:55:58 +0530 Subject: [PATCH 1/2] Add Faker::Rajnikanth --- README.md | 1 + doc/default/rajnikanth.md | 5 ++ lib/faker/default/rajnikanth.rb | 24 ++++++++ lib/locales/en/rajnikanth.yml | 77 ++++++++++++++++++++++++++ test/faker/default/test_faker_jokes.rb | 13 +++++ 5 files changed, 120 insertions(+) create mode 100644 doc/default/rajnikanth.md create mode 100644 lib/faker/default/rajnikanth.rb create mode 100644 lib/locales/en/rajnikanth.yml create mode 100644 test/faker/default/test_faker_jokes.rb diff --git a/README.md b/README.md index ebbe7f3e05..974ba8fee1 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast - [Faker::PhoneNumber](doc/default/phone_number.md) - [Faker::Placeholdit](doc/default/placeholdit.md) - [Faker::ProgrammingLanguage](doc/default/programming_language.md) + - [Faker::Rajnikanth](doc/default/rajnikanth.md) - [Faker::Relationship](doc/default/relationship.md) - [Faker::Restaurant](doc/default/restaurant.md) - [Faker::Science](doc/default/science.md) diff --git a/doc/default/rajnikanth.md b/doc/default/rajnikanth.md new file mode 100644 index 0000000000..bafdfc1730 --- /dev/null +++ b/doc/default/rajnikanth.md @@ -0,0 +1,5 @@ +# Faker::Rajnikanth + +```ruby +Faker::Rajnikanth.joke #=> "Rajinikanth can get rid of his shadow" +``` \ No newline at end of file diff --git a/lib/faker/default/rajnikanth.rb b/lib/faker/default/rajnikanth.rb new file mode 100644 index 0000000000..d4657b7132 --- /dev/null +++ b/lib/faker/default/rajnikanth.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +module Faker + class Rajnikanth < Base + flexible :rajnikanth + + class << self + # Produces a Rajnikanth. + # Original list of facts: + # http://www.rajinikanthjokes.com/ + # + # @return [String] + # + # @example + # Faker::Rajnikanth.fact + # #=> "Rajinikanth is so fast that he always comes yesterday." + # + # @faker.version 2.10.3 + def joke + fetch('rajnikanth.joke') + end + end + end +end diff --git a/lib/locales/en/rajnikanth.yml b/lib/locales/en/rajnikanth.yml new file mode 100644 index 0000000000..5ca4be37f2 --- /dev/null +++ b/lib/locales/en/rajnikanth.yml @@ -0,0 +1,77 @@ +en: + faker: + rajnikanth: + joke: [ + "The only time Rajini needed a body double was crying scene !", + "Rajinikanth knows why this kolaveri kolaveri Di", + "Rajinikanth threw a grenade and killed 50 people, then grenade exploded", + "Some people get lucky and kill two birds with one stone. Rajnikanth once killed four birds with half a stone.", + "Rajinikanth can give missed call to his own number..", + "God created Earth and Heaven in 6 days , on 7th day he rested then he created Rajinikanth !", + "Rajinikanth doesn't answer nature's call. Nature answers Rajinikanth's call", + "Govt of India pays tax to Rajinikanth for living here", + "When Rajinikanth goes to a gym to workout, no one can workout since Rajini uses all the weights available.", + "Einstein said you can't move at the speed of light, obviously he was never kicked by Rajinikanth", + "Why Himalayas are rising? It's simple. Rajinikanth lives in Chennai. Lever effect.", + "Adam and Eve are children of Rajinikanth", + "Rajinikanth is so fast that he always comes yesterday", + "Rajinikanth can get rid of his shadow", + "Rajini can eat dosa with chop sticks", + "Tornado changes course when it sees Rajini standing in it's way", + "Police dept is bored because of 0 crime in the city where rajini lives", + "Gabbar singh forgets his dialogues when he sees Rajinikanth", + "Rajini won the best actor oscar for his acting in a game of dumb charades", + "The box office collection of the movie RA-One Was less than parking collection of ROBOT.......!", + "Once Rajnikanth became the coach of Indian cricket team and guess wha India won the Fifa world cup !", + "People update status from BlackBerry, iPhone, iPad, etc. Rajinikant updates his facebook status with a calculator !!", + "Rajinikant got 150 questions in exam paper asking - 'Solve any 100 questions' He solved all 150 and wrote, 'Rascalla!, CHECK ANY 100!'", + "Rajini participates in long jump once every four year.... And those years are called LEAP year", + "Once Rajnikanth entered bigg boss...The next day announcement was made... Rajnikanth chahte hai ki bigg boss confession room me aaye", + "Once Rajni was the guest contestant in KBC. Amitabh says 'Computerji, Rajnikantji to phela sawaal poochiye'. Computer 'main lifeline use karna chahta hu.'", + "Ek bar Rajinikanth ne ek aadmi ko 'Go to Hell' kaha... That person is now known as Yamraj !!", + "Rajinikanth knows Ek chutki sindur ke kimat ... Rs 0.0234355884", + "Once Rajinikanth told joke to a little kid... Now he is known as laughing buddha", + "Rajinikanth can cure cancer with his first aid box", + "Once Rajinikanth used the support of a building to tie his shoe lace, the building is known as Leaning tower of Pisa.", + "Rajinikanth knows those two persons.. who shake hands in NOKIA cell phones...!!", + "Rajinikanth's dog can bend a pipe with it's tail.", + "Michael Jackson's moon walk is no match for Rajinikanth's Sun Walk...", + "Rajinikanth can make his wife admit her mistakes", + "Rajinikanth doesn't enjoy animation movies because he can see the gaps between the 24 frames every second", + "The reason why Rajinikanth stuttered in the movie Darr, because he saw Rajinikanth behind Juhi", + "When Rajinikanth gets depressed, the world faces great depression", + "Rajinikanth is a vegetarian… He doesn't eat animals until he first puts them into vegetative state with his blow", + "If Rajinikanth's PC hangs… its time for next windows release…", + "Rajinikanth can sneeze with open eyes.", + "Rajini is the reason why we don't have any other superheros in India", + "Rajinikanth can make 2 parallel lines intersect just by staring at them.", + "Santa Claus waits for a gift from Rajinikanth every Christmas.", + "Rajinikanth taught yoga to Baba Ramdev", + "Rajinikanth taught us all... Impossible is nothing...", + "One of Rajinikanth's hobby - Swimming on Tsunami.", + "Sh!t happens to everyone.. Even to Rajini... One time he coudn't kill 100 bears with a single punch but only 99 died.", + "Rajinikanth uses Ambuja cement as tooth powder", + "Once Rajinikanth dropped a coin while he was standing in the belcony... He went down to pick it up, but it was not there.... hmmmm... He reached there before the coin...", + "Rajinikanth was not amused by Gandhi’s non violence movement.", + "Lifetime Warranty does not exist only because of Rajnikanth.", + "If you want a list of Rajinikanth's enemies, just check the extinct species list.", + "When RAJNI had surgery, the anesthesia was applied to the doctors.", + "The apple which fell on newton was actually thrown by Rajinikanth.", + "Only Rajinijanth has 32 wisdom teeth.", + "When Rajinikanth goes thru immigration.. the officers show him thier passports.", + "Sun doesn't rise until Rajinikanth says 'Good Morning'", + "Once Rajnikant, after chewing the 'PAAN', spit on the wall of a building.", + "Today that building is popularly known as THE RED FORT..", + "Once Rajinikath shouted at a boy for not wearing cap in the hot sun. Today that boy is known as Himesh Reshammiya.", + "Rajnikanth Saw The Movie Break k Baad before the Break !!!", + "Rajnikanth's pulse is measured in richter scale.", + "Rajnikanth was practicing for a spelling test..the rough sheet he used is known as oxford dictionary..", + "Rajnikanth has seen the face of the fat lady who owns the house in tom n jerry..", + "Rajnikanth ploughs the field using nothing but his toes.", + "Once spiderman,superman and batman visited rajnikant's house together.. it was teachers day!", + "Rajinikanth can whistle and smile at the same time...", + "Computer doesn't give warning message to Rajini… Rajini warns computer", + "When Rajnikant get angry at the Sun, it hides behind the moon… that phenomenon is called Solar eclipse.", + "Rajini was born on 30th Feb, since then that date was removed from calendar so that noone else gets the same birthday.", + "Rajnikanth can run Windows 7 on 64KB memory.", + "Rajni never tweets, he only roars."] diff --git a/test/faker/default/test_faker_jokes.rb b/test/faker/default/test_faker_jokes.rb new file mode 100644 index 0000000000..3f37c320a6 --- /dev/null +++ b/test/faker/default/test_faker_jokes.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require_relative '../../test_helper' + +class TestFakerRajnikanth < Test::Unit::TestCase + def setup + @tester = Faker::Rajnikanth + end + + def test_jokes + assert @tester.joke.match(/\w+/) + end +end From 132d4b1d7311699ad1dfb083bda6d8a76498d8e4 Mon Sep 17 00:00:00 2001 From: Mayank Date: Thu, 12 Mar 2020 19:10:26 +0530 Subject: [PATCH 2/2] Change jokes in the documentation of the Rajnikanth class from facts to jokes --- lib/faker/default/rajnikanth.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/faker/default/rajnikanth.rb b/lib/faker/default/rajnikanth.rb index d4657b7132..6fb4323c21 100644 --- a/lib/faker/default/rajnikanth.rb +++ b/lib/faker/default/rajnikanth.rb @@ -6,13 +6,13 @@ class Rajnikanth < Base class << self # Produces a Rajnikanth. - # Original list of facts: + # Original list of jokes: # http://www.rajinikanthjokes.com/ # # @return [String] # # @example - # Faker::Rajnikanth.fact + # Faker::Rajnikanth.joke # #=> "Rajinikanth is so fast that he always comes yesterday." # # @faker.version 2.10.3