quotey 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +16 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +24 -0
- data/LICENSE +22 -0
- data/README.md +44 -0
- data/Rakefile +2 -0
- data/lib/quotey.rb +4 -0
- data/lib/quotey/misc_quotes.txt +320 -0
- data/lib/quotey/quoter.rb +41 -0
- data/lib/quotey/version.rb +3 -0
- data/quotey.gemspec +19 -0
- data/spec/misc_quotes.txt +3 -0
- data/spec/quotey_spec.rb +78 -0
- metadata +77 -0
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color --format nested
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
quotey (0.0.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.1.3)
|
10
|
+
rspec (2.11.0)
|
11
|
+
rspec-core (~> 2.11.0)
|
12
|
+
rspec-expectations (~> 2.11.0)
|
13
|
+
rspec-mocks (~> 2.11.0)
|
14
|
+
rspec-core (2.11.1)
|
15
|
+
rspec-expectations (2.11.3)
|
16
|
+
diff-lcs (~> 1.1.3)
|
17
|
+
rspec-mocks (2.11.3)
|
18
|
+
|
19
|
+
PLATFORMS
|
20
|
+
ruby
|
21
|
+
|
22
|
+
DEPENDENCIES
|
23
|
+
quotey!
|
24
|
+
rspec (~> 2.11)
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Amir Friedman
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# Quotey
|
2
|
+
|
3
|
+
A gem for generating random quotes
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
$ gem install quotey
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
### Basic usage
|
12
|
+
|
13
|
+
my_quote_object = Quotey::Quoter.new
|
14
|
+
my_quote_object.get_quote
|
15
|
+
=> "\"In the depths of winter I finally learned there was in me an invincible summer.\" - Albert Camus"
|
16
|
+
|
17
|
+
### Custom behavior
|
18
|
+
|
19
|
+
Quotey can receive an options hash:
|
20
|
+
|
21
|
+
* :file
|
22
|
+
* :no_repeat
|
23
|
+
|
24
|
+
#### Using Different file
|
25
|
+
|
26
|
+
my_quote_object = Quotey::Quoter.new(file: "/path/to/my/text/file.txt")
|
27
|
+
|
28
|
+
Lines are delimited per \n.
|
29
|
+
|
30
|
+
#### No repeating
|
31
|
+
|
32
|
+
Want to make sure you get a fresh quote everytime? Worry not!
|
33
|
+
|
34
|
+
my_quote_object = Quotey::Quoter.new(no_repeat: true)
|
35
|
+
|
36
|
+
Note that once Quotey finishes the list it re-reads the file that was given during the instantiation.
|
37
|
+
|
38
|
+
## Contributing
|
39
|
+
|
40
|
+
1. Fork it
|
41
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
42
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
43
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
44
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/lib/quotey.rb
ADDED
@@ -0,0 +1,320 @@
|
|
1
|
+
"What a tragic world this is. Those down here are prisoners, and the ultimate tragedy is that they don't know it, they think they are free because they never have been free, and do not understand what it means. This is a prison and few men have guessed. But I know, he said to himself. Because that is why I am here. To burn the walls, to tear down the metal gates, to break each chain." - Philip K. Dick, The Divine Invasion
|
2
|
+
"He was born in the wrong era, on the wrong side of the river, with the ability to do anything and finding nothing he wants to do." - Rumble Fish
|
3
|
+
"Any idiot can face a crisis. It is this day-to-day living that wears you out." -- Anton Chekhov
|
4
|
+
"The basis of optimism is sheer terror." - Oscar Wilde
|
5
|
+
"My dreams were all my own, I accounted for them to nobody. They were my refuge when annoyed, my dearest pleasure when free" - Mary Shelley
|
6
|
+
"Either I've been missing something or nothing has been going on." -- Karen Elizabeth Gordon
|
7
|
+
"I waver, continually fly to the summit of the mountain, but cannot stay up there for more than a moment. Others waver too, but in lower regions, with greater strength; if they are in danger of falling, they are caught up by the kinsman who walks beside them for that purpose. But I waver on the heights; it is not death, alas, but the eternal torments of dying" - Kafka, diaries
|
8
|
+
"I opened myself to you only to be skinned alive. The more vulnerable I became, the faster and more deft your knife. Knowing what was happening, still I stayed and let you carve more. That's how much I loved you. That's how much." - Rabih Alameddine, I, the Divine.
|
9
|
+
"Sometimes people put up walls, not to keep others out, but to see who cares enough to break them down." - Author Unknown
|
10
|
+
"And those who were seen dancing were thought to be insane by those who could not hear the music." - Friedrich Nietzsche
|
11
|
+
"I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me." --Hunter S. Thompson
|
12
|
+
"And while we don't have a Shy Pride Week, we do have many private moments when we keep our thought to ourselves, such as 'Shy is nice,' 'Walk short,' 'Be proud--shut up,' and 'Shy is beautiful, for the most part.' These are some that I thought up myself. Perhaps other persons have some of their own, I don't know." - Garrison Keillor, "Shy Rights, Why Not Pretty Soon?"
|
13
|
+
"And I always thought that the simplest words, must be enough. That when I say how things are everyone's heart must be torn to shreds. That you'll go down if you don't stand up. Surely you see that." - Bertolt Brecht
|
14
|
+
"I am not an Athenian or a Greek, I am a citizen of the world." - Socrates
|
15
|
+
"I want, I think, to be omniscient... I think I would like to call myself: "The girl who wanted to be God." Yet if I were not in this body, where would I be?... But, oh, I cry out against it. I am I - I am powerful, but to what extent? I am I." - Sylvia Plath
|
16
|
+
"The philosophers have only interpreted the world, in various ways. The point, however, is to change it." - Karl Marx.
|
17
|
+
"People everywhere confuse what they read in newspapers with news." - Abbott Joseph Liebling
|
18
|
+
"You're obliged to pretend respect for people and institutions you think absurd. You live attached in a cowardly fashion to moral and social conventions you despise, condemn, and know lack all foundation. It is that permanent contradiction between your ideas and desires and all the dead formalities and vain pretenses of your civilization which makes you sad, troubled and unbalanced. In that intolerable conflict you lose all joy of life and all feeling of personality, because at every moment they suppress and restrain and check the free play of your powers. That's the poisoned and mortal wound of the civilized world." - Octave Mirabeau, The Torture Garden
|
19
|
+
"For several moments both of us were the unconscious and cosmic toys of our own deception." - Octave Mirabeau, The Torture Garden
|
20
|
+
"What a tragic world this is. Those down here are prisoners, and the ultimate tragedy is that they don't know it, they think they are free because they never have been free, and do not understand what it means. This is a prison and few men have guessed. But I know, he said to himself. Because that is why I am here. To burn the walls, to tear down the metal gates, to break each chain." - Philip K. Dick, The Divine Invasion
|
21
|
+
"Propriety forbids us to boast about our good qualities, but it does not forbid us to be aware of them." - Rene Descartes
|
22
|
+
"The rich will do anything for the poor but get off their backs" - Karl Marx
|
23
|
+
"In a society that tries to standardize thinking, individuality is not highly prized" - Alex Grey
|
24
|
+
"The man who does not read good books has no advantage over the man who can't read them." - Mark Twain
|
25
|
+
"God is an illusion created by humanity to comfort them in the face of their helplessness when they outgrow their parents." - Sigmund Freud
|
26
|
+
"If man makes himself a worm he must not complain when he is trodden on." - Immanuel Kant
|
27
|
+
"Be civil to all; sociable to many; familiar with few." - Benjamin Franklin
|
28
|
+
"The less people know about how sausages and laws are made, the better they'll sleep at night." - Otto von Bismarck
|
29
|
+
"Hope is a good breakfast, but it is a bad supper." - Francis Bacon
|
30
|
+
"Whenever you find you are on the side of the majority, it is time to pause and reflect." - Mark Twain
|
31
|
+
"Be like the fountain that overflows, not the cistern that merely contains." - Paulo Coelho
|
32
|
+
"You can hold yourself back from the sufferings of the world, that is something you are free to do and it accords with your nature, but perhaps this very holding back is the one suffering you could avoid." - Franz Kafka
|
33
|
+
"Intellectuals are people who believe that ideas are of more importance than values. That is to say, their own ideas and other people's values." - Gerald Brenan.
|
34
|
+
"That my life has no aim is evident even from the accidental nature of its origin; that I can posit an aim for myself is another matter." - Friedrich Nietzsche.
|
35
|
+
"My peers, lately, have found companionship through means of intoxication; it makes them sociable. I, however, cannot force myself to use drugs to cheat on my loneliness - it is all that I have -- and when the drugs and alcohol dissipate, will be all that my peers have as well." -- Franz Kafka.
|
36
|
+
"They dress the wound of my people as though it were not serious. 'Peace, peace,' they say, when there is no peace.." - Jeremiah 6:14
|
37
|
+
"There is no greater sorrow than to recall in misery the time when you were happy." - Dante
|
38
|
+
"We can forgive the arabs for killing our children. We cannot forgive them for forcing us to kill their children. We will only have peace with the Arabs when they love their children more than they hate us." - Golda Meir
|
39
|
+
"The universe appears to me like an immense, inexorable torture-garden. Passions, greed, hatred, and lies; law, social institutions, justice, love, glory, heroism, and religion: these are its monstrous flowers and its hideous instruments of eternal human suffering." - Octave Mirbeau
|
40
|
+
"Sometimes the insane and the contrarians and the ones who are closest to suicide are the most valuble people society has. They may be precursors of social change. They've taken the burdens of the culture onto themselves, and in their struggle to solve their own problems they're solving problems for the culture as well." - Robert M. Pirsig, Lila
|
41
|
+
"We are all in the gutter, but some of us are looking at the stars." - Oscar Wilde
|
42
|
+
����� ��� ������ ������ ���� ������ �� ����� ������ ���� ����� - �����
|
43
|
+
"All our knowledge � past, present and future � is nothing compared to what we will never know." - Tsiolkovsky
|
44
|
+
"If I have seen further, it is by standing on the shoulders of giants." - Isaac Newton
|
45
|
+
"Morality is the herd-instinct in the individual." - Friedrich Nietzsch
|
46
|
+
"We can forgive a man for making a useful thing as long as he does not admire it. The only excuse for making a useless thing is that one admires it intensly. All art is quite useless." - Oscar Wilde
|
47
|
+
"That's the thing about depression: A human being can survive almost anything, as long as she sees the end in sight. But depression is so insidious, and it compounds daily, that it's impossible to ever see the end. The fog is like a cage without a key." "Prozac Nation", Elizabeth Wurtzel
|
48
|
+
"Sometimes I wish I could walk around with a HANDLE WITH CARE sign stuck to my forehead. Sometimes I wish that there were a way to let people know that just because I live in a world without rules, and in a life that is lawless, doesn't mean that it doesn't hurt so bad the morning after. Sometimes I think that I was forced to withdraw into depression because it was the only rightful protest I could throw in the face of a world that said it was alright for people to come and go as they please, that there were simply no real obligations left." - "Prozac Nation" Elizabeth Wurtzel
|
49
|
+
"Insanity is knowing that what you're doing is completely idiotic, but still, somehow, you just can't stop it." - "Prozac Nation", Elizabeth Wurtzel
|
50
|
+
"Inside here it is sterile, it is drab, the light is artificial and too bright, but at least no one can touch me." - "Prozac Nation", Elizabeth Wurtzel
|
51
|
+
"The only reason why we ask other people how their weekend was is so we can tell them about our own weekend." - "Invisible Monsters" Chuck Palahniuk
|
52
|
+
"What I want is to be needed. What I need is to be indispensable to somebody. Who I need is somebody that will eat up all my free time, my ego, my attention. Somebody addicted to me. A mutual addiction." - "Choke", Chuck Palahniuk
|
53
|
+
"Somebody get me out of here, I'm tearing at myself. Nobody gives a damn about me, or anybody else..." - "Medication", Garbage
|
54
|
+
"Quod me nutrit me destruit" ("What nourishes me also destroys me.")
|
55
|
+
"You're young, you're crazy, you're in bed and you've got knives. So shit happens." - Angelina Jolie
|
56
|
+
"Suicide is the ultimate fuck you." - Ginger Snaps [movie]
|
57
|
+
"When you don't want to feel, death can seem like a dream. But seeing death, really seeing it, makes dreaming about it fucking ridiculous." - -Girl, Interrupted [movie version]
|
58
|
+
"Very early in my life it was much too late." - "The Lover," Marguerite Duras
|
59
|
+
"In the depths of winter I finally learned there was in me an invincible summer." - Albert Camus
|
60
|
+
"Why? You have to ask yourself. I think it's a way of claiming immunity. First-person narrators can't die, so long as we keep telling the story of our own lives we're safe. Ha bloody fucking Ha." - (Billy Prior): The Ghost Road, by Pat Barker.
|
61
|
+
"Stand in the corner. Laugh out loud. Be quiet. Have a beer. Smoke a joint. Give head. Be nihilistic. Play nice. Always smile. Ignore your thoughts. Cut yourself. Wear a mask. Its all a fucking movie."
|
62
|
+
"We would worry less about what others think of us if we realized how seldom they do it." - Ethel Barrett
|
63
|
+
"What we anticipate seldom occurs; what we least expected generally happens." - Benjamin Disraeli
|
64
|
+
"Humans, we used to be exactly like them. Flawed, weak, organic. But we've evolved to include the synthetic." - The Borg Queen, "Start Trek: First Contact"
|
65
|
+
"He who fights with monsters might take care lest he thereby become a monster. And if you gaze for long into an abyss, the abyss gazes also into you." - Friedrich Nietzsche
|
66
|
+
"It was then, staring into the graveyards, that my somber existence was truly born." - Julian Myndfyre
|
67
|
+
"I want to know God's thoughts... all the rest are details." - Albert Einstein
|
68
|
+
"Computers are unreliable, but humans are even more unreliable. Any system which depends on human reliability is unreliable." - Gilb
|
69
|
+
"If you possess virtue you are its victim."
|
70
|
+
"Words are, of course, the most powerful drug used by mankind." - Rudyard Kipling
|
71
|
+
"Until they become conscious they will never rebel, and until after they have rebelled they cannot become conscious." - George Orwell
|
72
|
+
"Always forgive your enemies; nothing annoys them so much." - Oscar Wilde
|
73
|
+
"save the earth, mandate abortions"
|
74
|
+
"In the End, we will remember not the words of our enemies, but the silence of our friends." - Martin Luther King
|
75
|
+
"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - Albert Einstein
|
76
|
+
"It is better to deserve honors and not have them than to have them and not deserve them." - Mark Twain
|
77
|
+
"Great things are not accomplished by those who yield to trends and fads and popular opinion." - Jack Kerouac
|
78
|
+
"True friends stab you in the front." - Oscar Wilde
|
79
|
+
"Computers are useless. They can only give you answers." - Pablo Picasso
|
80
|
+
"Go to Heaven for the climate, Hell for the company." - Mark Twain
|
81
|
+
"An idea is never given to you without you being given the power to make it reality. You must, nevertheless, suffer for it." - Richard Bach
|
82
|
+
"Every positive value has its price in negative terms� the genius of Einstein leads to Hiroshima." - Picasso
|
83
|
+
"Our fathers were our models for God. If they bailed, what does that tell you about God? You have to be prepared for the possibility that God does not like you. In all probability, he hates you."
|
84
|
+
"On the whole human beings want to be good, but not too good and not quite all the time." - George Orwell
|
85
|
+
"Kiss Strangers. Drink more. Do what you want. Have a baby. Believe in Narcissus. Articulate boredom. Drink piss. Get naked. Argue constantly. Masturbate openly. Never hallucinate. Exercise sensitivity. Suck cock, Fuck. It�s all so empty." - Richey Edwards
|
86
|
+
"The darkest places in hell are reserved for those who maintain their neutrality in times of moral crisis." - Dante Alighieri
|
87
|
+
"The great masses of the people� will more easily fall victims to a big lie than to a small one." - Adolf Hitler
|
88
|
+
"Lord, protect me from my friends. I can take care of my enemies." - Voltaire
|
89
|
+
"Alas, the gates of life never swing open except upon death, never open except upon the palaces and gardens of death. And the universe appears to me like an immense, inexorable torture-garden... What I say today, and what I heard, exists and cries and howls beyond this garden, which is no more than a symbol to me of the entire earth."
|
90
|
+
"We were raised on television to believe that we'd all be millionares, movie gods, rock stars, but we won't. And we're starting to figure that out."
|
91
|
+
"Every intellectual effort is bent toward committing the most diversified violations upon human beings"
|
92
|
+
"The male chromosome is an incomplete female chromosome. in other words the male is a walking abortion ; aborted at the gene stage. to be male is to be deficient, emotionally limited; maleness is a deficiency disease and males are emotional cripples" - Valerie Solanos
|
93
|
+
"Noone can ever love me the way i wanna be loved noone can ever touch me the way i wanna be touched noone can hold me the way i wanna be held and i will never tell anyone so i will always be alone" - scott wylie
|
94
|
+
"We don't have a great war in our generation, or a great depression, but we do, we have a great war of the spirit. We have a great revolution against the culture. The great depression is our lives. We have a spiritual depression."
|
95
|
+
"many youngsters are fixated to think there is a way of life that will make them happy - for some it is easter mysticism, for some commercial new agism, for some it's lover+job+friends+car+cat. but there is no way to happiness. live never becomes worth of living"
|
96
|
+
"silently i stood in front of the mirror and all i saw was silence." - scott wylie
|
97
|
+
"if life is a celebration i must have missed my party" - scott wylie
|
98
|
+
"Life is a burden to me. Nothing gives me pleasure. I find only sadness in everything around me. It is very difficult because the ways of those with whom I live, and probably always shall live, are as different from mine as moonlight is from sunshine." - Napoleon
|
99
|
+
"Most people are other people. Their thoughts are someone else's opinions, their lives a mimicry, their passions a quotation." - Oscar Wilde
|
100
|
+
"A fanatic is one who can't change his mind and won't change the subject." - Winston Churchill
|
101
|
+
"Forgive your enemies, but never forget their names" - John F. Kennedy
|
102
|
+
The object of war is not to die for your country but to make the other bastard die for his. - Gen. George S. Patton
|
103
|
+
If everyone is thinking alike then somebody isn't thinking. � George S. Patton, Jr.
|
104
|
+
Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" BSD: "Are you guys coming or what?"
|
105
|
+
Let us therefore brace ourselves to our duty, and so bear ourselves that, if the British Commonwealth and the Empire last for a thousand years, men will still say: 'This was their finest hour' - Winston Churchill
|
106
|
+
Follow me if i advance. Kill me if i retreat. Avenge me if i die.
|
107
|
+
From Stettin in the Baltic to Trieste in the Adriatic, an iron curtain has descended across the Continent. - Winston Churchill
|
108
|
+
Love seems the swiftest, but it is the slowest of growths. � Mark Twain
|
109
|
+
The problems of the world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities. � John Keats
|
110
|
+
The earth was made round so we would not see too far down the road. � Karen Blixen
|
111
|
+
You may be disappointed if you fail, but you are doomed if you don't try. � Beverly Sills
|
112
|
+
One does not love a place the less for having suffered in it unless it has all been suffering, nothing but suffering. � Jane Austen
|
113
|
+
Great souls have wills; feeble ones have only wishes. � Chinese proverb
|
114
|
+
Absence of evidence is not evidence of absence. � Carl Sagan
|
115
|
+
Even though you have ten thousand fields, you can eat but one measure of rice a day. � Chinese proverb
|
116
|
+
Don't be afraid to fail. Don't waste energy trying to cover up failure. Learn from your failures and go on to the next challenge. � H. Stanley Judd
|
117
|
+
Real generosity toward the future consists in giving all to what is present. � Albert Camus
|
118
|
+
The only bad thing about burning your bridges behind you is that the world is round. � Author unknown
|
119
|
+
Success � it's what you do with what you've got. � Woody Hayes
|
120
|
+
Determination. The will to endure to the end, to get knocked down seventy times and get up off the floor saying, "Here comes number seventy-one!" � Richard M. Devos
|
121
|
+
The end of science is not to prove a theory, but to improve mankind. � Manly Hall
|
122
|
+
The greater the difficulty the greater the glory. � Cicero
|
123
|
+
The two elements the traveler first captures in the big city are extrahuman architecture and furious rhythm. � Federico Garcia Lorca
|
124
|
+
Don't become a mere recorder of the facts, but try to penetrate the mystery of their origin. � Ivan Pavlov
|
125
|
+
Don't allow the grass to grow on the path of friendship. � Native American proverb
|
126
|
+
Delicious autumn! My very soul is wedded to it, and if I were a bird I would fly about the earth seeking the successive autumns. � George Eliot
|
127
|
+
There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle. � Albert Einstein
|
128
|
+
A champion needs a motivation above and beyond winning. � Pat Riley
|
129
|
+
Autumn is a second spring when every leaf is a flower. � Albert Camus
|
130
|
+
Only a man who has felt ultimate despair is capable of feeling ultimate bliss. � Alexandre Dumas
|
131
|
+
Wonder if there is life on another planet? Let's suppose there is. Suppose further, that only one star in a trillion has a planet that could support life. If that were the case, then there would be at least 100 million planets that harbored life. � Ben Sweetland
|
132
|
+
Smooth runs the water where the brook is deep. � William Shakespeare
|
133
|
+
No pessimist ever discovered the secret of the stars, or sailed to an uncharted land, or opened a new doorway for the human spirit. � Helen Keller
|
134
|
+
If you spend too much time warming up, you'll miss the race. If you don't warm up at all, you may not finish the race. � Grand Heidrich
|
135
|
+
Life is like a ten speed bike. Most of us have gears we never use. � Charles Schultz
|
136
|
+
Thousands of candles can be lighted from a single candle, and the life of the candle will not be shortened. Happiness never decreases by being shared. � Buddha
|
137
|
+
Watch the stars, and from them learn. To the Master's honor all must turn, each in its track, without a sound, forever tracing Newton's ground. � Albert Einstein
|
138
|
+
Ability is what you're capable of doing. Motivation determines what you do. Attitude determines how well you do it. � Lou Holtz
|
139
|
+
It is not sufficient to see and know the beauty of a work. We must feel and be affected by it. � Voltaire
|
140
|
+
Fortune favors the brave. - Terence
|
141
|
+
Use what talents you possess; the woods would be very silent if no birds sang except those that sang best. � Henry Vandyke
|
142
|
+
There is no love sincerer than the love of food. � George Bernard Shaw
|
143
|
+
No one can see their reflection in running water. It is only in still water that we can see. � Taoist proverb
|
144
|
+
Far better to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much. � Theodore Roosevelt
|
145
|
+
Time is the greatest innovator. � Francis Bacon
|
146
|
+
There is no excellent beauty that hath not some strangeness in proportions. � Francis Bacon
|
147
|
+
The day, water, sun, moon, night � I do not have to purchase these things with money. � Plautus
|
148
|
+
Life is the only real counselor; wisdom unfiltered through personal experience does not become a part of the moral tissue. � Edith Wharton
|
149
|
+
To the world you might be one person, but to one person you might be the world. � Author unknown
|
150
|
+
Liberty means responsibility. That is why most men dread it. � George Bernard Shaw
|
151
|
+
A journey of a thousand miles must begin with a single step. � Lao-tzu
|
152
|
+
To fear death is nothing other than to think oneself wise when one is not. -Socrates
|
153
|
+
There are only two truly infinite things, the universe and stupidity. And I am unsure about the universe. - Albert Einstein
|
154
|
+
Great minds discuss ideas...Average Minds discuss events....low minds discuss people
|
155
|
+
I don't know anything about music. In my line you don't have to. - Elvis Presley
|
156
|
+
A known mistake is better than an unknown truth. � Arabian proverb
|
157
|
+
The sky is the daily bread of the eyes. � Ralph Waldo Emerson
|
158
|
+
Courage is very important. Like a muscle, it is strengthened by use. � Ruth Gordon
|
159
|
+
The fragrance always remains in the hand that gives the rose. � Hada Bejar
|
160
|
+
For we, which now behold these present days, have eyes to wonder, but lack tongues to praise. � William Shakespeare
|
161
|
+
Don't be afraid to go out on a limb. That's where the fruit is. � H. Jackson Browne
|
162
|
+
It is best to be yourself, imperial, plain and true. � Robert Browning
|
163
|
+
If you don't accept failure as a possibility, you don't set high goals, and you don't branch out, you don't try � you don't take the risk. � Rosalynn Carter
|
164
|
+
To me it is enough to wonder at the secrets. � Albert Einstein
|
165
|
+
The potential for changing the future can lie only in the present. � Gillian Butler
|
166
|
+
Look deep, deep into nature, and then you will understand everything better. � Albert Einstein
|
167
|
+
Change is inevitable, growth is intentional. � Glenda Cloud
|
168
|
+
The childhood shows the man, as morning shows the day. � John Milton
|
169
|
+
Until you make peace with who you are, you'll never be content with what you have. � Doris Mortman
|
170
|
+
The least initial deviation from the truth is multiplied later a thousandfold. � Aristotle
|
171
|
+
All truth passes through three stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident. � Arthur Schopenhauer
|
172
|
+
He who sows courtesy reaps friendship, and he who plants kindness gathers love. � Saint Basil
|
173
|
+
You must learn to be still in the midst of activity and to be vibrantly alive in repose. � Indira Gandhi
|
174
|
+
The usual approach of science of constructing a mathematical model cannot answer the questions of why there should be a universe for the model to describe. � Stephen Hawking
|
175
|
+
"Came in, Looked about, Didn't like it, Went out." - Anon (gravestone)
|
176
|
+
"There are those who look at things the way they are, and ask why... I dream of things that never were, and ask why not?" - Robert F. Kennedy
|
177
|
+
"If you're able to be yourself, then you have no competition. All you have to do is get closer and closer to that essence." - Barbara Cook
|
178
|
+
"The man who follows the crowd will usually get no further than the crowd. The man who walks alone is likely to find himself in places no one has ever been." - Alan Ashley-Pitt
|
179
|
+
"Patriotism is the last refuge of a scoundrel." - Samuel Johnson
|
180
|
+
"insanity is a term used by governments to describe free people"
|
181
|
+
It took the computing power of three Commodore 64 computers to fly to the moon. It takes a 486 66MHZ computer to run Windows 95. Anything wrong?
|
182
|
+
Anyone can hold the helm when the sea is calm. � Publius Syrus
|
183
|
+
Rest is not ideleness, and to lie sometimes on the grass on a summer day listening to the murmur of water, or wathing the clouds float across the sky, is hardly a waste of time. � J. Lubbock
|
184
|
+
Man is a goal seeking animal. His life only has meaning if he is reaching out and striving for his goals. � Aristotle
|
185
|
+
We turn not older with years, but newer every day. � Emily Dickinson
|
186
|
+
A good beginning is half the work. � Irish proverb
|
187
|
+
The whole fauna of human fantasies, their marine vegetation, drifts and luxuriates in the dimly lit zones of human activity, as though plaiting thick tresses of darkness. Here, too, appear the lighthouses of the mind. � Louis Aragon
|
188
|
+
Success is to be measured not so much by the position that one has reached in life as by the obstacles which he has overcome while trying to succeed. � Booker T. Washington
|
189
|
+
If you can look into the seeds of time, and say which grain will grow and which will not, speak. � William Shakespeare
|
190
|
+
There is a wisdom of the head, and ... a wisdom of the heart. � Charles Dickens
|
191
|
+
In the hour of adversity be not without hope for crystal rain falls from black clouds. � Nizami
|
192
|
+
The measure of success is not whether you have a tough problem to deal with, but whether its the same problem you had last year. � John Foster Dulles
|
193
|
+
Perseverance is not a long race; it is many short races one after another. � Thomas Edison
|
194
|
+
I have no Yesterdays, Time took them away. Tomorrow may not be � but I have Today. � Pearl Yeadon McGinnis
|
195
|
+
There is no happiness where there is no wisdom. � Sophocles
|
196
|
+
A society made up of individuals who were all capable of original thought would probably be unendurable. � H. L. Mencken
|
197
|
+
We are all dreaming of some magical rose garden over the horizon � instead of enjoying the roses that are blooming ouside our windows today. � Dale Carnegie
|
198
|
+
You never conquer a mountain. You stand on the summit a few moments; then the wind blows your footprints away. � Arlene Blum
|
199
|
+
Besides the noble art of getting things done, there is a noble art of leaving things undone. The wisdom of life consists in the elimination of nonessentials. � Lin Yutang
|
200
|
+
It wasn't until quite late in life that I discovered how easy it is to say, "I don't know." � W. Somerset Maugham
|
201
|
+
If you have no confidence in self, you are twice defeated in the race of life. With confidence, you have won even before you have started. � Marcus Aurelius Garvey
|
202
|
+
Ignorance is the night of the mind, but a night without moon or star. � Confucius
|
203
|
+
I have not failed. I've just found 10,000 ways that won't work. � Thomas Edison
|
204
|
+
When the rock is hard, we get harder than the rock. When the job is tough, we get tougher than the job. � George Cullem, Sr.
|
205
|
+
A man travels the world in search of what he needs and returns home to find it. � George Moore
|
206
|
+
Hit the ball over the fence and you can take your time going around the bases. � John W. Raper
|
207
|
+
Anyone can hold the helm when the sea is calm. � Publius Syrus
|
208
|
+
Rest is not ideleness, and to lie sometimes on the grass on a summer day listening to the murmur of water, or wathing the clouds float across the sky, is hardly a waste of time. � J. Lubbock
|
209
|
+
Man is a goal seeking animal. His life only has meaning if he is reaching out and striving for his goals. � Aristotle
|
210
|
+
We turn not older with years, but newer every day. � Emily Dickinson
|
211
|
+
A good beginning is half the work. � Irish proverb
|
212
|
+
The whole fauna of human fantasies, their marine vegetation, drifts and luxuriates in the dimly lit zones of human activity, as though plaiting thick tresses of darkness. Here, too, appear the lighthouses of the mind. � Louis Aragon
|
213
|
+
Success is to be measured not so much by the position that one has reached in life as by the obstacles which he has overcome while trying to succeed. � Booker T. Washington
|
214
|
+
If you can look into the seeds of time, and say which grain will grow and which will not, speak. � William Shakespeare
|
215
|
+
There is a wisdom of the head, and ... a wisdom of the heart. � Charles Dickens
|
216
|
+
In the hour of adversity be not without hope for crystal rain falls from black clouds. � Nizami
|
217
|
+
The measure of success is not whether you have a tough problem to deal with, but whether its the same problem you had last year. � John Foster Dulles
|
218
|
+
Perseverance is not a long race; it is many short races one after another. � Thomas Edison
|
219
|
+
I have no Yesterdays, Time took them away. Tomorrow may not be � but I have Today. � Pearl Yeadon McGinnis
|
220
|
+
There is no happiness where there is no wisdom. � Sophocles
|
221
|
+
A society made up of individuals who were all capable of original thought would probably be unendurable. � H. L. Mencken
|
222
|
+
We are all dreaming of some magical rose garden over the horizon � instead of enjoying the roses that are blooming ouside our windows today. � Dale Carnegie
|
223
|
+
You never conquer a mountain. You stand on the summit a few moments; then the wind blows your footprints away. � Arlene Blum
|
224
|
+
Besides the noble art of getting things done, there is a noble art of leaving things undone. The wisdom of life consists in the elimination of nonessentials. � Lin Yutang
|
225
|
+
It wasn't until quite late in life that I discovered how easy it is to say, "I don't know." � W. Somerset Maugham
|
226
|
+
If you have no confidence in self, you are twice defeated in the race of life. With confidence, you have won even before you have started. � Marcus Aurelius Garvey
|
227
|
+
"death is not the worst evil, but when we wish to die and cannot."
|
228
|
+
"I live a world of paradox. my willingness to destroy is your chance for improvement, my hate is your faith, my failure is your victory -- a victory that wont last...."
|
229
|
+
"The gifts that one receives for giving are so immeasurable that it is almost an injustice to accept them." - Rod McKuen
|
230
|
+
"Being defeated is often a temporary condition. Giving up is what makes it permanent." - Marilyn vos Savant
|
231
|
+
"Here I sit, bored as shit, if I was a woman i'd flick my--"
|
232
|
+
"Freedom of the press is limited to those who own one." - A.J. Liebling
|
233
|
+
"Death is not the worst evil, but when we wish to die and cannot."
|
234
|
+
"Give me enough medals and I'll win any war" -- Napoleon
|
235
|
+
"When written in Chinese, the word "crisis" is composed of two characters. One represents danger and the other represents opportunity." - John F. Kennedy
|
236
|
+
"share it fairly, but don't take a slice of my pie."
|
237
|
+
"A computer is just like an air-conditioner. It can't work well with open Windows."
|
238
|
+
"Never follow somebody else's path; it doesn't work the same way twice for anyone...the path follows you and rolls up behind you as you walk, forcing the next person to find their own way." - J. Michael Straczynski
|
239
|
+
"Anger is never without an argument, but seldom with a good one." - George Savile
|
240
|
+
"Most consider the evil to be bad! But without evil there is no good. So it must be good to be evil somtimes"
|
241
|
+
"I think It's the height of arrogance to go onstage and not be extraordinary and brilliant. It's the height of arrogance to make average music. You know, people are listening. - Brett Anderson, 1992
|
242
|
+
"We are what we repeatedly do. Excellence then, is not an act, but a habit." - Aristotle.
|
243
|
+
"I want to know how God created this world. I am not interested in this or that phenomenon, in the spectrum of this or that element. I want to know His thoughts; the rest are details." -- Albert Einstein
|
244
|
+
"Some people have greatness thrust upon them. Very few have excellence thrust upon them." - John W. Gardner
|
245
|
+
"Pain is Pleasure, Pleasure is Pain, Nothing is as great as a sky full of rain, Life is Pain, Death is Pleasure, Your Life is something only you can measure" - jEsYcAh (IRC)
|
246
|
+
"Death. Destruction. Disease. Horror. That's what war is all about. That's what makes it a thing to be avoided." - Kirk, "A Taste of Armageddon", stardate
|
247
|
+
"The computer revolution is over. The computers won."
|
248
|
+
"sex is like air. its only a big deal if you cant get any."
|
249
|
+
"I see you've made your decision. Now let's see you enforce it." - Eric Draven, The Crow
|
250
|
+
"sex is much like software, its better when its free" - Linus Torvalds
|
251
|
+
"Those who desire to give up freedom in order to gain security, will not have, nor do they deserve either one" - Thomas Jefferson
|
252
|
+
"The tree of liberty must be refreshed from time to time with the blood of patriots and tyrants. It is it's natural manure." - Thomas Jefferson
|
253
|
+
"That government is best which governs the least, because its people discipline themselves." - Thomas Jefferson
|
254
|
+
"In matters of style, swim with the current; in matters of principle, stand like a rock." - Thomas Jefferson
|
255
|
+
"No love, no friendship can cross the path of our destiny without leaving some mark on it forever." - Francois Muriac
|
256
|
+
"It is never too late to be what you might have been." - George Eliot
|
257
|
+
"Leadership is getting someone to do what they don't want to do, to achieve what they want to achieve." - Tom Landry
|
258
|
+
"You give but little when you give of your possessions. It is when you give of yourself that you truly give." - Kahlil Gibran
|
259
|
+
"When one door closes another door opens; but we so often look so long and so regretfully upon the closed door, that we do not see the ones which open for us." - Alexander Graham Bell
|
260
|
+
"If you are lucky enough to find a way of life you love, you have to find the courage to live it." - John Irving
|
261
|
+
"Half our life is spent trying to find something to do with the time we have rushed through life trying to save." - Will Rogers
|
262
|
+
"Man who sink into womans arms soon have arms in womans sink."
|
263
|
+
"Fight for your opinions, but do not believe that they contain the whole truth or the only truth." - Charles A. Dana
|
264
|
+
"The quality of a person's life is in direct proportion to their commitment to excellence, regardless of their chosen field of endeavor." - Vince Lombardi
|
265
|
+
"In everyone's life, at some time, our inner fire goes out. It is then burst into flame by an encounter with another human being. We should all be thankful for those people who rekindle the inner spirit." - Albert Schweitzer
|
266
|
+
"We have not passed that subtle line between childhood and adulthood until we move from the passive voice to the active voice; that is, until we have stopped saying 'It got lost,' and say, 'I lost it.'" - Sydney J. Harris
|
267
|
+
"Every great work, every big accomplishment, has been brought into manifestation through holding to the vision, and often just before the big achievement, comes apparent failure and discouragement." - Florence Scovel Shinn
|
268
|
+
"Fight for your opinions, but do not believe that they contain the whole truth or the only truth." - Charles A. Dana
|
269
|
+
"If you can imagine it, you can achieve it; if you can dream it, you can become it." - William Arthur Ward
|
270
|
+
"I've come to believe that all my past failure and frustration were actually laying the foundation for the understandings that have created the new level of living I now enjoy." - Anthony Robbins
|
271
|
+
"Every adversity, every failure, every heartache carries with it the seed of an equal or greater benefit." - Napoleon Hill
|
272
|
+
"Remember that happiness is a way of travel, not a destination." - Roy Goodman
|
273
|
+
"The bird of paradise alights only upon the hand that does not grasp." - John Berry, _Flight_of_White_Crows_
|
274
|
+
"Friendship is unnecessary, like philosophy, like art... It has no survival value; rather it is one of those things that give value to survival." - C.S. Lewis
|
275
|
+
"One never notices what has been done; one can only see what remains to be done." - Marie Curie
|
276
|
+
"Down in their hearts, wise men know this truth: the only way to help yourself is to help others." - Elbert Hubbard, _The_Philistine_
|
277
|
+
"Far away there in the sky are my highest aspirations. I may not reach them, but I can look up and see their beauty, believe in them, and follow where they lead." - Louisa May Alcott
|
278
|
+
"All successful people, men and women, are big dreamers. They imagine what their future could be, ideal in every respect, and then they work every day toward their distant vision, that goal or purpose." - Brian Tracy
|
279
|
+
"True happiness comes from the joy of deeds well done, the zest of creating things new." - Antoine De Saint-Exupery
|
280
|
+
"I have learned, that if one advances confidently in the direction of his dreams, and endeavors to live the life he has imagined, he will meet with a success unexpected in common hours." - Henry David Thoreau
|
281
|
+
"I am bigger than anything that can happen to me. All these things, sorrow, misfortune, and suffering, are outside my door. I am in the house and I have the key." - Charles Fletcher Lummis
|
282
|
+
"Men will confess to treason, murder, arson, false teeth, or a wig. How many of them will own up to a lack of humor?" - Frank Moore Cobly, _The_Colby_Essays_
|
283
|
+
"We are what we pretend to be, so we must be careful what we pretend to be." - Kurt Vonnegut, Jr.
|
284
|
+
"A leader takes people where they want to go. A great leader takes people where they don't necessarily want to go, but ought to be." - Rosalynn Carter
|
285
|
+
"Don't be afraid of the space between your dreams and reality. If you can dream it, you can make it so." - Belva Davis
|
286
|
+
"When you do nothing, you feel overwhelmed and powerless. But when you get involved, you feel the sense of hope and accomplishment that comes from knowing you are working to make things better." - Pauline R. Kezer
|
287
|
+
"Age is strictly a case of mind over matter. If you don't mind, it doesn't matter." - Jack Benny, _New_York_Times_
|
288
|
+
"Men and women are limited not by the place of their birth, not by the color of their skin, but by the size of their hope." - John Johnson
|
289
|
+
"The greatest weakness of most humans is their hesitancy to tell others how much they love them while they're alive." - O.A. Battista
|
290
|
+
"Charm: the quality in others that makes us more satisfied with ourselves." - Henri-Frederic Amiel
|
291
|
+
"You can't try to do things - - you simply must do them." - Ray Bradbury
|
292
|
+
"Character consists of what you do on the third and fourth tries." - James A. Michener
|
293
|
+
"If a man will begin with certainties, he shall end in doubts, but if he will be content to begin with doubts, he shall end in certainties." - Francis Baron, _The_Advancement_of_Learning
|
294
|
+
"As long as you keep a person down, some part of you has to be down there to hold him down, so it means you cannot soar as you otherwise might." - Marian Anderson
|
295
|
+
"Destiny is not a matter of chance, it is a matter of choice. It is not a thing to be waited for; it is a thing to be achieved." - W.J. Bryant
|
296
|
+
"Accept failure as a normal part of living. View it as part of the process of exploring your world; make a note of its lessons and move on." - Tom Greening and Dick Hobson
|
297
|
+
"Being defeated is often a temporary condition. Giving up is what makes it permanent." - Marilyn vos Savant
|
298
|
+
"Above all, be true to yourself, and if you cannot put your heart in it, take yourself out of it." - Hardy D. Jackson
|
299
|
+
"Down in their hearts, wise men know this truth: the only way to help yourself is to help others." - Elbert Hubbard, _The_Philistine_
|
300
|
+
"Courage is contagious. When a brave man takes a stand, the spines of others are stiffened." - Billy Graham
|
301
|
+
"It is better to fail in a cause that will ultimately succeed than to succeed in a cause that will ultimately fail." - Peter Marshall
|
302
|
+
"People are like stained glass windows: they sparkle and shine when the sun is out, but when the darkness sets in their true beauty is revealed only if there is a light within." - Elizabeth Kubler-Ross
|
303
|
+
"Fantasies are more than substitutes for unpleasant reality; they are also dress rehearsals, plans. All acts performed in the world begin in the imagination." - Barbara G. Harrison
|
304
|
+
"The basic difference between an ordinary person and a warrior is that a warrior takes everything as a challenge while an ordinary person takes everything as a blessing or a curse." - Carlos Castaneda
|
305
|
+
"True happiness comes from the joy of deeds well done, the zest of creating things new." - Antoine De Saint-Exupery
|
306
|
+
"Sadness is but a wall between two gardens." - Kahlil Gibran
|
307
|
+
"There is no such thing as a 'self-made' man. We are made up of thousands of others. Everyone who has ever done a kind deed for us, or spoken one word - George Matthew Adams
|
308
|
+
"The greatest of faults, I should say, is to be conscious of none." - Thomas Carlyle
|
309
|
+
"A champion views resistance as a gift of energy." - Michael J. Gelb
|
310
|
+
"It is better to be defeated on principle than to win on lies." - Arthur Calwell
|
311
|
+
"No one regards what is before his feet; we all gaze at the stars." - Quintus Ennius, _Iphigenia_
|
312
|
+
"Nothing great was ever achieved without enthusiam." - Ralph Waldo Emerson, _Essays_
|
313
|
+
"If you believe you can, you probably can. If you believe you won't, you most assuredly won't. Belief is the ignition switch that gets you off the launching pad." - Denis Waitley
|
314
|
+
"The man who lets a leader prescribe his course is a wreck being towed to the scrap heap." - Ayn Rand
|
315
|
+
"Confront your fears, list them, get to know them, and only then will you be able to put them aside and move ahead." - Jerry Gillies
|
316
|
+
"Some of the world's greatest feats were accomplished by people not smart enought to know they were impossible." - Doug Larson
|
317
|
+
"Compromise used to mean that half a loaf was better than no bread. Among modern statesmen, it really seems to mean that half a loaf is better than a whole loaf." - G.K. Chesterton, _What's_Wrong_with_the_World_
|
318
|
+
"Love all. Trust a few. Do wrong to none." - William Shakespeare
|
319
|
+
"People are like stained glass windows: they sparkle and shine when the sun is out, but when the darkness sets in their true beauty is revealed only if there is a light within." - Elizabeth Kubler-Ross
|
320
|
+
"Faith is to believe what you do not yet see; the reward for this faith is to see what you believe." - Saint Augustine, _Sermons_
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Quotey
|
2
|
+
|
3
|
+
class NoDataFile < StandardError; end
|
4
|
+
|
5
|
+
class Quoter
|
6
|
+
attr_reader :data, :size, :no_repeat, :data_file
|
7
|
+
|
8
|
+
def initialize(options = {})
|
9
|
+
@data_file = options[:file].nil? ? File.join(File.dirname(__FILE__), 'misc_quotes.txt') : options[:file]
|
10
|
+
if File.exist? @data_file
|
11
|
+
read_data_file
|
12
|
+
set_options(options)
|
13
|
+
else
|
14
|
+
raise NoDataFile, "Cannot find quotes data file - #{options[:file]}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def get_quote
|
19
|
+
if @no_repeat
|
20
|
+
read_data_file if @size == 0
|
21
|
+
|
22
|
+
index = rand(@size)
|
23
|
+
@size -= 1
|
24
|
+
@data.delete_at index
|
25
|
+
else
|
26
|
+
@data[rand(@size)]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
def set_options(options)
|
32
|
+
@no_repeat = options[:no_repeat] ? true : false
|
33
|
+
end
|
34
|
+
|
35
|
+
def read_data_file
|
36
|
+
@data = File.open(@data_file,"r").readlines.map{ |line| line.chomp }
|
37
|
+
@size = @data.size
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
data/quotey.gemspec
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/quotey/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["psychocandy"]
|
6
|
+
gem.email = ["amirf@null.co.il"]
|
7
|
+
gem.description = %q{Quotey - A gem to generate random quotes}
|
8
|
+
gem.summary = %q{Generate random quotes for fun & profit}
|
9
|
+
gem.homepage = ""
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "quotey"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Quotey::VERSION
|
17
|
+
|
18
|
+
gem.add_development_dependency "rspec", "~> 2.11"
|
19
|
+
end
|
@@ -0,0 +1,3 @@
|
|
1
|
+
"In the depths of winter I finally learned there was in me an invincible summer." - Albert Camus
|
2
|
+
"He who fights with monsters might take care lest he thereby become a monster. And if you gaze for long into an abyss, the abyss gazes also into you." - Friedrich Nietzsche
|
3
|
+
"Computers are useless. They can only give answers" - Pablo Picasso
|
data/spec/quotey_spec.rb
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'Quotey'
|
2
|
+
|
3
|
+
describe Quotey::Quoter do
|
4
|
+
|
5
|
+
before(:all) do
|
6
|
+
@local_path = File.join(File.dirname(__FILE__), 'misc_quotes.txt')
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "basic behavior" do
|
10
|
+
let(:quoter) { Quotey::Quoter.new }
|
11
|
+
it "raises NoDataFile exception if a non-existent file is given" do
|
12
|
+
random_filename = ('a'..'z').to_a.shuffle[0,10].join("") << ".txt"
|
13
|
+
expect {
|
14
|
+
Quotey::Quoter.new(file: random_filename)
|
15
|
+
}.to raise_error Quotey::NoDataFile
|
16
|
+
end
|
17
|
+
|
18
|
+
it "reads the default file" do
|
19
|
+
default_path = File.join(File.dirname(__FILE__), '..', 'lib', 'quotey', 'misc_quotes.txt')
|
20
|
+
size = File.open(default_path,"r").readlines.count
|
21
|
+
quoter.size.should == size
|
22
|
+
end
|
23
|
+
|
24
|
+
it "does not set no_repeat to true" do
|
25
|
+
quoter.no_repeat.should_not be_true
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context "when no_repeat is given" do
|
30
|
+
|
31
|
+
let(:quoter) { Quotey::Quoter.new(file: @local_path, no_repeat: true) }
|
32
|
+
|
33
|
+
it "sets no_repeat to true" do
|
34
|
+
quoter.no_repeat.should be_true
|
35
|
+
end
|
36
|
+
|
37
|
+
it "deletes the given quote from the list" do
|
38
|
+
deleted_quote = quoter.get_quote
|
39
|
+
quoter.data.include?(deleted_quote).should be_false
|
40
|
+
end
|
41
|
+
|
42
|
+
it "lowers the size by 1" do
|
43
|
+
expect{ quoter.get_quote }.to change{ quoter.size }.by(-1)
|
44
|
+
end
|
45
|
+
|
46
|
+
it "#get_quote returns a quote" do
|
47
|
+
quoter.get_quote.should_not be_nil
|
48
|
+
quoter.get_quote.class.should == String
|
49
|
+
end
|
50
|
+
|
51
|
+
it "starts again when it reaches zero" do
|
52
|
+
loop do
|
53
|
+
puts quoter.get_quote
|
54
|
+
break if quoter.size == 0
|
55
|
+
end
|
56
|
+
quoter.get_quote
|
57
|
+
quoter.size.should > 0
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
context "when custom file is given" do
|
62
|
+
before(:all) do
|
63
|
+
@quoter = Quotey::Quoter.new file: @local_path
|
64
|
+
end
|
65
|
+
|
66
|
+
it "reads all the quotes from a custom file" do
|
67
|
+
size = File.open(@local_path,"r").readlines.count
|
68
|
+
@quoter.size.should == size
|
69
|
+
end
|
70
|
+
|
71
|
+
it "#get_quote returns a quote" do
|
72
|
+
@quoter.get_quote.should_not be_nil
|
73
|
+
@quoter.get_quote.class.should == String
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
end
|
metadata
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: quotey
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- psychocandy
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-09-29 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.11'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.11'
|
30
|
+
description: Quotey - A gem to generate random quotes
|
31
|
+
email:
|
32
|
+
- amirf@null.co.il
|
33
|
+
executables: []
|
34
|
+
extensions: []
|
35
|
+
extra_rdoc_files: []
|
36
|
+
files:
|
37
|
+
- .gitignore
|
38
|
+
- .rspec
|
39
|
+
- Gemfile
|
40
|
+
- Gemfile.lock
|
41
|
+
- LICENSE
|
42
|
+
- README.md
|
43
|
+
- Rakefile
|
44
|
+
- lib/quotey.rb
|
45
|
+
- lib/quotey/misc_quotes.txt
|
46
|
+
- lib/quotey/quoter.rb
|
47
|
+
- lib/quotey/version.rb
|
48
|
+
- quotey.gemspec
|
49
|
+
- spec/misc_quotes.txt
|
50
|
+
- spec/quotey_spec.rb
|
51
|
+
homepage: ''
|
52
|
+
licenses: []
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options: []
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
requirements: []
|
70
|
+
rubyforge_project:
|
71
|
+
rubygems_version: 1.8.23
|
72
|
+
signing_key:
|
73
|
+
specification_version: 3
|
74
|
+
summary: Generate random quotes for fun & profit
|
75
|
+
test_files:
|
76
|
+
- spec/misc_quotes.txt
|
77
|
+
- spec/quotey_spec.rb
|