cheerup 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +6 -0
- data/bin/cheer +5 -0
- data/bin/cheerup +5 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/cheerup.gemspec +35 -0
- data/lib/cheerup/version.rb +3 -0
- data/lib/cheerup.rb +37 -0
- metadata +117 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 61790270061ba0830dc4bdc5818f230fc751768c
|
4
|
+
data.tar.gz: 50534d8a0a243a5b98c640953087232b0228636f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 314d0b7f45b836f75d7479639eaaa23bfa5db97eb72daa5f8aa94d6485cd63c14197b50e5842107a4b490569981192678815310d900bdc9cc8c914f307ea81a2
|
7
|
+
data.tar.gz: 2591c6cb2511d5e5b0914b61f8265e725370eb1c85bf3bb67727cd66a78c2f98c081f5c8718e7e7e5d0103d4dee08cbd63cbd65c8dbe871c0bc566714c86f592
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Claire Parker
|
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,44 @@
|
|
1
|
+
# CheerUp
|
2
|
+
|
3
|
+
My First [Very Daft] Ruby Gem
|
4
|
+
|
5
|
+
Having a bad day? Need cheering up? Get your Mac to say something cheery to you with this Gem - although Mac isn't having a great day either.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'cheerup'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install cheerup
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
From the command line:
|
26
|
+
|
27
|
+
$ cheer up
|
28
|
+
|
29
|
+
Also accepts an optional name arg if you want to be more personal.
|
30
|
+
|
31
|
+
$ cheer up Antony
|
32
|
+
|
33
|
+
|
34
|
+
## Contributing
|
35
|
+
|
36
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/claireparker/cheer_up, although I probably don't know how to fix it.
|
37
|
+
|
38
|
+
_Wittier ways to cheer someone up are particularly welcome._
|
39
|
+
|
40
|
+
|
41
|
+
## License
|
42
|
+
|
43
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
44
|
+
|
data/Rakefile
ADDED
data/bin/cheer
ADDED
data/bin/cheerup
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "cheerup"
|
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
|
data/bin/setup
ADDED
data/cheerup.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 'cheerup/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "cheerup"
|
8
|
+
spec.version = Cheerup::VERSION
|
9
|
+
spec.authors = ["Claire Parker"]
|
10
|
+
spec.email = ["claire.parker87@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{ Mac's terminal says something to cheer you up. }
|
13
|
+
spec.description = %q{ Mac's say command says something cheery to you, although your Mac isn't as sympathetic as you think. }
|
14
|
+
spec.homepage = 'https://github.com/claireparker/cheer_up'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
|
+
# delete this section to allow pushing this gem to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
else
|
22
|
+
fail "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
spec.bindir = 'bin'
|
27
|
+
spec.executables = ['cheer']
|
28
|
+
spec.require_paths = ['lib']
|
29
|
+
|
30
|
+
spec.add_dependency 'thor'
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
33
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
34
|
+
spec.add_development_dependency "rspec"
|
35
|
+
end
|
data/lib/cheerup.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'cheerup/version'
|
2
|
+
require 'Thor'
|
3
|
+
|
4
|
+
module Cheerup
|
5
|
+
class Cli < Thor
|
6
|
+
desc 'up "name"', 'cheers you up with a name if you provide one'
|
7
|
+
long_desc <<-MEH
|
8
|
+
Mac cheers you up, although your Mac isn't having a great day either.
|
9
|
+
MEH
|
10
|
+
|
11
|
+
def up(name = nil)
|
12
|
+
phrases = [
|
13
|
+
"My heart bleeds for you",
|
14
|
+
"No one cares",
|
15
|
+
"Get over yourself",
|
16
|
+
"I'm playing the world's saddest song on the world's tiniest violin, just for you",
|
17
|
+
"Everything's gonna be alright",
|
18
|
+
"Cry me a river",
|
19
|
+
"Oh dearie me",
|
20
|
+
"It might never happen",
|
21
|
+
"As a wise fish once said, don't worry be happy",
|
22
|
+
"Calm down, calm down",
|
23
|
+
"Always look on the bright side of life"
|
24
|
+
]
|
25
|
+
|
26
|
+
cheer_up = "#{phrases.sample} #{name}".strip
|
27
|
+
system("say \"#{cheer_up}\"") if osx?
|
28
|
+
puts "#{cheer_up}"
|
29
|
+
end
|
30
|
+
|
31
|
+
no_commands do
|
32
|
+
def osx?
|
33
|
+
RbConfig::CONFIG['host_os'].downcase.include?('darwin')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cheerup
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Claire Parker
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: ' Mac''s say command says something cheery to you, although your Mac
|
70
|
+
isn''t as sympathetic as you think. '
|
71
|
+
email:
|
72
|
+
- claire.parker87@gmail.com
|
73
|
+
executables:
|
74
|
+
- cheer
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- .gitignore
|
79
|
+
- .rspec
|
80
|
+
- .travis.yml
|
81
|
+
- Gemfile
|
82
|
+
- LICENSE.txt
|
83
|
+
- README.md
|
84
|
+
- Rakefile
|
85
|
+
- bin/cheer
|
86
|
+
- bin/cheerup
|
87
|
+
- bin/console
|
88
|
+
- bin/setup
|
89
|
+
- cheerup.gemspec
|
90
|
+
- lib/cheerup.rb
|
91
|
+
- lib/cheerup/version.rb
|
92
|
+
homepage: https://github.com/claireparker/cheer_up
|
93
|
+
licenses:
|
94
|
+
- MIT
|
95
|
+
metadata:
|
96
|
+
allowed_push_host: 'TODO: Set to ''http://mygemserver.com'''
|
97
|
+
post_install_message:
|
98
|
+
rdoc_options: []
|
99
|
+
require_paths:
|
100
|
+
- lib
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - '>='
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
requirements: []
|
112
|
+
rubyforge_project:
|
113
|
+
rubygems_version: 2.0.14
|
114
|
+
signing_key:
|
115
|
+
specification_version: 4
|
116
|
+
summary: Mac's terminal says something to cheer you up.
|
117
|
+
test_files: []
|