Skip to content

Commit

Permalink
Matz
Browse files Browse the repository at this point in the history
  • Loading branch information
denys281 committed Feb 16, 2017
1 parent 5f05153 commit ca06685
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ DEPENDENCIES
timecop

BUNDLED WITH
1.13.6
1.13.7
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Contents
- [Faker::LordOfTheRings](doc/lord_of_the_rings.md)
- [Faker::LoremPixel](doc/lorem_pixel.md)
- [Faker::Lorem](doc/lorem.md)
- [Faker::Matz](doc/matz.md)
- [Faker::Music](doc/music.md)
- [Faker::Name](doc/name.md)
- [Faker::Number](doc/number.md)
Expand Down
5 changes: 5 additions & 0 deletions doc/matz.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Faker::Matz

```ruby
Faker::Matz.quote #=> "You want to enjoy life, don't you? If you get your job done quickly and your job is fun, that's good isn't it? That's the purpose of life, partly. Your life is better."
```
1 change: 1 addition & 0 deletions lib/faker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def unique(max_retries = 10_000)
require 'faker/harry_potter'
require 'faker/friends'
require 'faker/rick_and_morty'
require 'faker/matz'

require 'extensions/array'
require 'extensions/symbol'
Expand Down
9 changes: 9 additions & 0 deletions lib/faker/matz.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Faker
class Matz < Base
class << self
def quote
fetch('matz.quotes')
end
end
end
end
28 changes: 27 additions & 1 deletion lib/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -490,4 +490,30 @@ en:
rick_and_morty:
characters: ["Rick Sanchez", "Tiny Rick", "Morty Smith", "Morty Jr.", "Summer Smith", "Jerry Smith", "Beth Smith", "Snuffles", "Birdperson", "Tammy Gueterman", "Jessica", "Baby Legs", "Mr. Meeseeks", "Scary Terry", "Mr. Poopybutthole", "Unity", "Squanchy", "Shrimply Pibbles", "Dr. Glip-Glop", "Eyeholes Man", "Beth's Mytholog", "Jerry's Mytholog", "Mr. Needful", "Krombopulos Michael", "Mr. Goldenfold", "Snowball"]
locations: ["Dimension C-132", "Dimension C-137", "Earth", "Alphabetrium", "Arbolez Mentorosos", "Bird World", "Cronenberg World", "Dwarf Terrace-9", "Gazorpazorp", "Glapflap", "Hideout Planet", "On a Cob Planet", "Parblesnops", "Pawn Shop Planet", "Planet Squanch", "Pluto", "Purge Planet", "Screaming Sun Earth", "Snorlab"]
quotes: ["Ohh yea, you gotta get schwifty.", "I like what you got.", "Don’t even trip dawg.", "Get off the high road Summer. We all got pink eye because you wouldn't stop texting on the toilet.", "Yo! What up my glip glops!", "It's fine, everything is fine. Theres an infinite number of realities Morty and in a few dozen of those I got lucky and turned everything back to normal.", "Sometimes science is a lot more art, than science. A lot of people don't get that.", "There is no god, Summer; gotta rip that band-aid off now you'll thank me later.", "WUBBA LUBBA DUB DUBS!!!", "Oh, I'm sorry Morty, are you the scientist or are you the kid who wanted to get laid?", "This isn't Game of Thrones, Morty.", "You're our boy dog, don't even trip.", "He's not a hot girl. He can't just bail on his life and set up shop in someone else's.", "I don't get it and I don't need to.", "Pluto's a planet.", "HI! I'M MR MEESEEKS! LOOK AT ME!", "Existence is pain to a meeseeks Jerry, and we will do anything to alleviate that pain.", "Well then get your shit together. Get it all together and put it in a backpack, all your shit, so it's together. ...and if you gotta take it somewhere, take it somewhere ya know? Take it to the shit store and sell it, or put it in a shit museum. I don't care what you do, you just gotta get it together... Get your shit together.", "Aw, c'mon Rick. That doesn't seem so bad.", "Aww, gee, you got me there Rick.", "You're like Hitler, except...Hitler cared about Germany, or something.", "Hello Jerry, come to rub my face in urine again?", "Snuffles was my slave name, you can call me snowball because my fur is pretty and white.", "Go home and drink, grandpa.", "I'm the devil. What should I do when I fail? Give myself an ice cream?"]
quotes: ["Ohh yea, you gotta get schwifty.", "I like what you got.", "Don’t even trip dawg.", "Get off the high road Summer. We all got pink eye because you wouldn't stop texting on the toilet.", "Yo! What up my glip glops!", "It's fine, everything is fine. Theres an infinite number of realities Morty and in a few dozen of those I got lucky and turned everything back to normal.", "Sometimes science is a lot more art, than science. A lot of people don't get that.", "There is no god, Summer; gotta rip that band-aid off now you'll thank me later.", "WUBBA LUBBA DUB DUBS!!!", "Oh, I'm sorry Morty, are you the scientist or are you the kid who wanted to get laid?", "This isn't Game of Thrones, Morty.", "You're our boy dog, don't even trip.", "He's not a hot girl. He can't just bail on his life and set up shop in someone else's.", "I don't get it and I don't need to.", "Pluto's a planet.", "HI! I'M MR MEESEEKS! LOOK AT ME!", "Existence is pain to a meeseeks Jerry, and we will do anything to alleviate that pain.", "Well then get your shit together. Get it all together and put it in a backpack, all your shit, so it's together. ...and if you gotta take it somewhere, take it somewhere ya know? Take it to the shit store and sell it, or put it in a shit museum. I don't care what you do, you just gotta get it together... Get your shit together.", "Aw, c'mon Rick. That doesn't seem so bad.", "Aww, gee, you got me there Rick.", "You're like Hitler, except...Hitler cared about Germany, or something.", "Hello Jerry, come to rub my face in urine again?", "Snuffles was my slave name, you can call me snowball because my fur is pretty and white.", "Go home and drink, grandpa.", "I'm the devil. What should I do when I fail? Give myself an ice cream?"]
matz:
quotes: [
"I believe consistency and orthogonality are tools of design, not the primary goal in design.",
"From the viewpoint of what you can do, therefore, languages do differ - but the differences are limited. For example, Python and Ruby provide almost the same power to the programmer.",
"The orthogonal features, when combined, can explode into complexity.",
"I didn't work hard to make Ruby perfect for everyone, because you feel differently from me. No language can be perfect for everyone. I tried to make Ruby perfect for me, but maybe it's not perfect for you. The perfect language for Guido van Rossum is probably Python.",
"Because of the Turing completeness theory, everything one Turing-complete language can do can theoretically be done by another Turing-complete language, but at a different cost. You can do everything in assembler, but no one wants to program in assembler anymore.",
"Ruby inherited the Perl philosophy of having more than one way to do the same thing. I inherited that philosophy from Larry Wall, who is my hero actually. I want to make Ruby users free. I want to give them the freedom to choose.",
"You want to enjoy life, don't you? If you get your job done quickly and your job is fun, that's good isn't it? That's the purpose of life, partly. Your life is better.",
"People are different. People choose different criteria. But if there is a better way among many alternatives, I want to encourage that way by making it comfortable. So that's what I've tried to do.",
"In our daily lives as programmers, we process text strings a lot. So I tried to work hard on text processing, namely the string class and regular expressions. Regular expressions are built into the language and are very tuned up for use.",
"Most of the tasks we do are for humans. For example, a tax calculation is counting numbers so the government can pull money out from my wallet, but government consists of humans.",
"Actually, I didn't make the claim that Ruby follows the principle of least surprise. Someone felt the design of Ruby follows that philosophy, so they started saying that. I didn't bring that up, actually.",
"Smart people underestimate the ordinarity of ordinary people.",
"Language designers want to design the perfect language. They want to be able to say, 'My language is perfect. It can do everything.' But it's just plain impossible to design a perfect language, because there are two ways to look at a language. One way is by looking at what can be done with that language. The other is by looking at how we feel using that language-how we feel while programming.",
"I believe that the purpose of life is, at least in part, to be happy. Based on this belief, Ruby is designed to make programming not only easy but also fun. It allows you to concentrate on the creative side of programming, with less stress.",
"Most programs are not write-once. They are reworked and rewritten again and again in their lived. Bugs must be debugged. Changing requirements and the need for increased functionality mean the program itself may be modified on an ongoing basis. During this process, human beings must be able to read and understand the original code. It is therefore more important by far for humans to be able to understand the program than it is for the computer.",
"I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language.",
"Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software.",
"It is not the responsibility of the language to force good looking code, but the language should make good looking code possible.",
"Plant a memory, plant a tree, do it today for tomorrow.",
"Imagine you are writing an email. You are in front of the computer. You are operating the computer, clicking a mouse and typing on a keyboard, but the message will be sent to a human over the internet. So you are working before the computer, but with a human behind the computer.",
"Often people, especially computer engineers, focus on the machines. But in fact we need to focus on humans, on how humans care about doing programming or operating the application of the machines.",
"Everyone has an individual background. Someone may come from Python, someone else may come from Perl, and they may be surprised by different aspects of the language. Then they come up to me and say, 'I was surprised by this feature of the language, so therefore Ruby violates the principle of least surprise.' Wait. Wait. The principle of least surprise is not for you only.",
"Sometimes people jot down pseudo-code on paper. If that pseudo-code runs directly on their computers, its best, isn't it? Ruby tries to be like that, like pseudo-code that runs. Python people say that too."
]
11 changes: 11 additions & 0 deletions test/test_faker_matz.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')

class TestFakerMatz < Test::Unit::TestCase
def setup
@tester = Faker::Matz
end

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

0 comments on commit ca06685

Please sign in to comment.