inspirecode 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/inspirecode.gemspec +35 -0
- data/lib/inspirecode.rb +58 -0
- data/lib/inspirecode/version.rb +3 -0
- metadata +83 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b2e0947e317e1c9027cbf01a12e080b42d5813b4
|
4
|
+
data.tar.gz: b9e71a5d99877fad561af12560c91dac41b73bd8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0232deb6d78cd4d9f647d8b6e119ef836972c30929c47a47e2cfd47ef0e0b52d775840260ea872aecceab758fa5029e70c3e737a1be08280c2d1fc0ccee4f3a2
|
7
|
+
data.tar.gz: 7a6f0468569e8430cdcde7f8aca61786c7f9d0657e390f6a13a995044907f95da537e66e67a25351806944ad3697f7388d186cf9051dcfecde4467443ab5a94a
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 <github username>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Inspirecode
|
2
|
+
|
3
|
+
This is a Ruby Gem that randomly generates inspirational quotes within your terminal to help beginners stay motivated.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'inspirecode'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install inspirecode
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
After installing gem, and requiring it in ruby file.
|
24
|
+
|
25
|
+
1) Within ruby class, 'include Inspire'
|
26
|
+
|
27
|
+
2) During pry or when running the ruby file, use the method '.inspire' to generate a quote.
|
28
|
+
|
29
|
+
## Development
|
30
|
+
|
31
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
32
|
+
|
33
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/<github username>/inspirecode.
|
38
|
+
|
39
|
+
## License
|
40
|
+
|
41
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "inspirecode"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/inspirecode.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "inspirecode/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "inspirecode"
|
8
|
+
spec.version = Inspirecode::VERSION
|
9
|
+
spec.authors = ["davidhe184"]
|
10
|
+
spec.email = ["david.he184@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Inspire Beginners To Become Better Programmers!}
|
13
|
+
spec.description = %q{When you feel frustrated, this gem will display a random inspirational quote in your terminal to motivate you!}
|
14
|
+
spec.homepage = ""
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
# if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
# else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
+
# "public gem pushes."
|
24
|
+
# end
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
34
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
35
|
+
end
|
data/lib/inspirecode.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
require "inspirecode/version"
|
2
|
+
|
3
|
+
module Inspire
|
4
|
+
|
5
|
+
def inspire
|
6
|
+
random_quote_data = ["Change is not a four letter word… but often your reaction to it is!
|
7
|
+
- Jeffrey Gitomer", "Opportunity is missed by most people because it is dressed in overalls and looks like work.
|
8
|
+
-Thomas Eddison", "A day without sunshine is like, you know, night.
|
9
|
+
- Steve Martin", "If you try to fail, and succeed, which have you done?
|
10
|
+
- George Carlin", "You can’t wait for inspiration. You have to go after it with a club.
|
11
|
+
-Jack London", "If you’re going to be thinking, you may as well think big.
|
12
|
+
-Donald Trump", "Opportunity does not knock, it presents itself when you beat down the door.
|
13
|
+
-Kyle Chandler", "Great spirits have always encountered violent opposition from mediocre minds.
|
14
|
+
-Albert Einstein", "People say nothing is impossible, but I do nothing every day.
|
15
|
+
-A.A. Milne", "A diamond is merely a lump of coal that did well under pressure.
|
16
|
+
-Unknown", "Even if you are on the right track, you’ll get run over if you just sit there.
|
17
|
+
-Will Rogers", "Never put off until tomorrow what you can do the day after tomorrow.
|
18
|
+
-Mark Twain", "Try to be like the turtle – at ease in your own shell.
|
19
|
+
-Bill Copeland", "Follow your passion, stay true to yourself, never follow someone else’s path unless you’re in the woods and you’re lost and you see a path then by all means you should follow that.
|
20
|
+
- Ellen Degeneres", "Life is like a sewer… what you get out of it depends on what you put into it.
|
21
|
+
-Tom Lehrer", "Never let your sense of morals prevent you from doing what is right.
|
22
|
+
-Isaac Asimov", "Failure is the condiment that gives success its flavor.
|
23
|
+
-Truman Capote", "People often say that motivation doesn’t last. Well, neither does bathing – that’s why we recommend it daily.
|
24
|
+
-Zig Ziglar", "If you think you are too small to make a difference, try sleeping with a mosquito.
|
25
|
+
-Dalai Lama", "When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’
|
26
|
+
-Sydney Harris", "I always wanted to be somebody, but now I realize I should have been more specific.
|
27
|
+
-Lily Tomlin", "Well-behaved women seldom make history.
|
28
|
+
-Laurel Thatcher Ulrich", "If you’re going to be able to look back on something and laugh about it, you might as well laugh about it now.
|
29
|
+
-Marie Osmond", "There are no traffic jams along the extra mile.
|
30
|
+
-Roger Staubach", "Life is like photography. You need the negatives to develop.
|
31
|
+
-Unknown", "I’m bored’ is a useless thing to say. I mean, you live in a great, big, vast world that you’ve seen none percent of. Even the inside of your own mind is endless; it goes on forever, inwardly, do you understand? The fact that you’re alive is amazing, so you don’t get to say ‘I’m bored.
|
32
|
+
- Louis C.K.", "Life is a blank canvass, and you need to throw all the paint on it you can.
|
33
|
+
- Danny Kaye", "If you hit the target every time it’s too near or too big.
|
34
|
+
- Tom Hirshfield", "There’s never enough time to do all the nothing you want.
|
35
|
+
- Bill Watterson", "If you end up with a boring, miserable life because you listened to your mom, your dad, your teacher, your priest, or some guy on television telling you how to do your shit, then you deserve it.
|
36
|
+
- Frank Zappa", "If you don’t design your own life plan, chances are you’ll fall into someone else’s plan. And guess what they have planned for you? Not much.
|
37
|
+
- Unknown", "I have a simple philosophy: Fill what’s empty. Empty what’s full. Scratch where it itches.
|
38
|
+
-Alice Roosevelt Longworth", "Life is a shipwreck but we must not forget to sing in the lifeboats.
|
39
|
+
-Voltaire", "I didn’t fail the test. I just found 100 ways to do it wrong.
|
40
|
+
-Benjamin Franklin", "Consider the postage stamp: its usefulness consists in the ability to stick to one thing ’til it gets there.
|
41
|
+
- Josh Billings", "When life gives you lemons, squirt someone in the eye.
|
42
|
+
- Cathy Guisewite", "Good things come to those who wait… greater things come to those who get off their ass and do anything to make it happen.
|
43
|
+
-Unknown", "Don’t worry about the world coming to an end today. It’s already tomorrow in Australia.
|
44
|
+
-Charles Schulz", "Edison failed 10, 000 times before he made the electric light. Do not be discouraged if you fail a few times.
|
45
|
+
-Napoleon Hill", "Here is a test to find whether your mission on earth is finished: If you’re alive it isn’t.
|
46
|
+
- Richard Bach", "I’ll probably never fully become what I wanted to be when I grew up, but that’s probably because I wanted to be a ninja princess.
|
47
|
+
- Cassandra Duffy", "By working faithfully eight hours a day you may eventually get to be boss and work twelve hours a day.
|
48
|
+
- Robert Frost", "My therapist told me the way to achieve true inner peace is to finish what I start. So far I’ve finished two bags of M&Ms and a chocolate cake. I feel better already.
|
49
|
+
- Dave Barr", "Whoever said, ‘It’s not whether you win or lose that counts,’ probably lost.
|
50
|
+
- Martina Navratilova", "If you fall, I’ll always be there.
|
51
|
+
- The Floor", "Focus, focus, focus! What am I, a telescope?!
|
52
|
+
- Naruto Uzumaki", "I intend to live forever. So far, so good.
|
53
|
+
- Steven Wright"]
|
54
|
+
|
55
|
+
index = rand(50)
|
56
|
+
random_quote_data[index]
|
57
|
+
end
|
58
|
+
end
|
metadata
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: inspirecode
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- davidhe184
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-08-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description: When you feel frustrated, this gem will display a random inspirational
|
42
|
+
quote in your terminal to motivate you!
|
43
|
+
email:
|
44
|
+
- david.he184@gmail.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- ".gitignore"
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE.txt
|
52
|
+
- README.md
|
53
|
+
- Rakefile
|
54
|
+
- bin/console
|
55
|
+
- bin/setup
|
56
|
+
- inspirecode.gemspec
|
57
|
+
- lib/inspirecode.rb
|
58
|
+
- lib/inspirecode/version.rb
|
59
|
+
homepage: ''
|
60
|
+
licenses:
|
61
|
+
- MIT
|
62
|
+
metadata: {}
|
63
|
+
post_install_message:
|
64
|
+
rdoc_options: []
|
65
|
+
require_paths:
|
66
|
+
- lib
|
67
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
requirements: []
|
78
|
+
rubyforge_project:
|
79
|
+
rubygems_version: 2.6.12
|
80
|
+
signing_key:
|
81
|
+
specification_version: 4
|
82
|
+
summary: Inspire Beginners To Become Better Programmers!
|
83
|
+
test_files: []
|