vamp 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 +10 -0
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +68 -0
- data/Rakefile +8 -0
- data/lib/vamp.rb +55 -0
- data/lib/vamp/version.rb +3 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/vamp_spec.rb +39 -0
- data/vamp.gemspec +26 -0
- metadata +85 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8fdf4303e03c8a60ff26d2d42cbb371f49412dab
|
4
|
+
data.tar.gz: befa4909be425603d0ee7a233ade6060256101e7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f20a90f3e9e735b09566f7bcf1c5e6945adaa41d8517feba91e89c18b5dade7767f2ac3dba36d9f79d8bbbcb26ee26ad09286a6de2d9be3bf1dc6bac406cd3f3
|
7
|
+
data.tar.gz: 1009f40a326542cca3f67d2daaaa96130111e696f37ed291b68a175e39bb81e233103d2abaaa7854abae99da7382e55d66efcc29b5b69593210b0d4e48d98e92
|
data/.gitignore
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 Michael Meyling
|
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,68 @@
|
|
1
|
+
# Vamp - necessaries for the elegant vampire
|
2
|
+
|
3
|
+
Want to pimp up your command line interface?
|
4
|
+
Just require this gem insert some code and your CLI makes witty vampire quotes.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'vamp'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install vamp
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
|
26
|
+
require "thor"
|
27
|
+
require "vamp"
|
28
|
+
|
29
|
+
class CLI < Thor
|
30
|
+
include Vamp
|
31
|
+
|
32
|
+
def initialize(*args)
|
33
|
+
at_exit { thats_all_folks }
|
34
|
+
super
|
35
|
+
end
|
36
|
+
|
37
|
+
desc "example", "an example task"
|
38
|
+
def example
|
39
|
+
puts "I'm a thor task!"
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def thats_all_folks
|
45
|
+
say
|
46
|
+
say VAMPIRE, :yellow
|
47
|
+
say
|
48
|
+
say " \"#{quote}\"", :blue
|
49
|
+
say
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
CLI.start(ARGV)
|
54
|
+
```
|
55
|
+
|
56
|
+
## Development
|
57
|
+
|
58
|
+
After checking out the repo, run `bundle install` to install dependencies.
|
59
|
+
|
60
|
+
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` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
61
|
+
|
62
|
+
## Contributing
|
63
|
+
|
64
|
+
1. Fork it ( https://github.com/m-31/vamp/fork )
|
65
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
66
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
67
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
68
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/lib/vamp.rb
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
require "vamp/version"
|
2
|
+
|
3
|
+
module Vamp
|
4
|
+
VAMPIRE = <<-END
|
5
|
+
=/\\ /\\=
|
6
|
+
/ \\'._ (\\_/) _.'/ \\
|
7
|
+
/ .''._'--(o.o)--'_.''. \\
|
8
|
+
/.' _/ |`'=/ " \\='`| \\_ `.\\
|
9
|
+
/` .' `\\;-,'\\___/',-;/` '. '\\
|
10
|
+
/.-' jgs `\\(-V-)/` `-.\\
|
11
|
+
` " " `
|
12
|
+
END
|
13
|
+
|
14
|
+
def quote
|
15
|
+
[
|
16
|
+
"Twilight, again. Another ending. No matter how perfect the day is, it always has to end.",
|
17
|
+
"I decided as long as I was going to hell, I might as well do it thoroughly.",
|
18
|
+
"Don't run! I never liked fast food.",
|
19
|
+
"I've been wondering ever since before why do you always look so sad whenever you're with me?",
|
20
|
+
"Hey, what's your blood type?",
|
21
|
+
"The strength of the vampire is that people will not believe in him.",
|
22
|
+
"Death is Peaceful, Life is Harder.",
|
23
|
+
"You’re still waiting for the running and the screaming, aren’t you?",
|
24
|
+
"Your number was up the first time I met you.",
|
25
|
+
"You really should stay away from me.",
|
26
|
+
"Thats the beautiful thing about being human: Things change.",
|
27
|
+
"I’ve never tried to keep a specific person alive before, and it’s much more troublesome" \
|
28
|
+
" than I would have believed.",
|
29
|
+
"Hasn’t anyone ever told you? Life isn’t fair.",
|
30
|
+
"No blood, no foul.",
|
31
|
+
"Go sit down and look pale.",
|
32
|
+
"It's not the end. It's the beginning.",
|
33
|
+
"I'd rather know what you're thinking - even if what you're thinking is insane.",
|
34
|
+
"Don't be offended, but you seem to be one of those people who just attract accidents like a magnet.",
|
35
|
+
"Without the dark, we'd never see the stars.",
|
36
|
+
"I warned you that you didn't want to know everything I was thinking.",
|
37
|
+
"Our relationship couldn’t continue to balance, as it did, on the point of a knife.",
|
38
|
+
"Why do people always assume that volume will succeed when logic won’t?",
|
39
|
+
"I hope you enjoyed your visit. You never know. You may want to join forever.",
|
40
|
+
"If you are a vampire, then a vampire is not the creature of the legends.",
|
41
|
+
"Not all vampires are created equal.",
|
42
|
+
"According to my research, in a vampire-werewolf love triangle, the vampire always gets the girl.",
|
43
|
+
"Some things aren’t meant for sunlight. The only place for them is in the shadows.",
|
44
|
+
"Is that all I was to you, a one-bite stand?",
|
45
|
+
"Though I cannot predict the future, the consequences of this night will reverberate through the halls" \
|
46
|
+
" of both great covens for many years to come",
|
47
|
+
"Whether you like it or not, you are in middle of a war that has been raging for the better part of a" \
|
48
|
+
" thousand years",
|
49
|
+
"There is a good reason why these rules were created, and they are the only reason we have survived this long!",
|
50
|
+
"First rule about vampires, don`t believe anything you read.",
|
51
|
+
"Stupid, unreliable vampire.",
|
52
|
+
"Which is tempting you more, my blood or my body?"
|
53
|
+
].sample
|
54
|
+
end
|
55
|
+
end
|
data/lib/vamp/version.rb
ADDED
data/spec/spec_helper.rb
ADDED
data/spec/vamp_spec.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Vamp do
|
4
|
+
it "has a version number" do
|
5
|
+
expect(Vamp::VERSION).not_to be nil
|
6
|
+
end
|
7
|
+
|
8
|
+
it "has a vampire" do
|
9
|
+
expect(Vamp::VAMPIRE).not_to be nil
|
10
|
+
end
|
11
|
+
|
12
|
+
it "gives string quote" do
|
13
|
+
expect(quote).to be_a(String)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "gives quote with 10 < length < 1000" do
|
17
|
+
expect(quote.length).to be_between(11, 999)
|
18
|
+
end
|
19
|
+
|
20
|
+
subject(:messages) do
|
21
|
+
messages = Set.new
|
22
|
+
maximum = 10
|
23
|
+
minimum = maximum / 1
|
24
|
+
end
|
25
|
+
it "gives different quotes" do
|
26
|
+
messages = Set.new
|
27
|
+
maximum = 10
|
28
|
+
minimum = maximum / 1
|
29
|
+
maximum.times { messages << quote }
|
30
|
+
let()
|
31
|
+
begin
|
32
|
+
expect(messages.size).to be_between(minimum, maximum)
|
33
|
+
rescue
|
34
|
+
puts messages
|
35
|
+
fail "we expected at least #{minimum} different messages for #{maximum}" \
|
36
|
+
" calls. But we just got #{messages.size}: #{messages}"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/vamp.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'vamp/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "vamp"
|
8
|
+
spec.version = Vamp::VERSION
|
9
|
+
spec.authors = ["Michael Meyling"]
|
10
|
+
spec.email = ["search@meyling.com"]
|
11
|
+
spec.summary = %q{vampire quotes}
|
12
|
+
spec.description = %q{Provide random quotes concerning vampires.}
|
13
|
+
spec.homepage = "https://github.com/m-31/vamp"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
spec.post_install_message = " .. may the blood never cease to flow .."
|
22
|
+
|
23
|
+
spec.add_development_dependency "rake"
|
24
|
+
spec.add_development_dependency "rspec"
|
25
|
+
# spec.add_development_dependency "thor"
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vamp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Meyling
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-10-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
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: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Provide random quotes concerning vampires.
|
42
|
+
email:
|
43
|
+
- search@meyling.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- ".travis.yml"
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE.txt
|
52
|
+
- README.md
|
53
|
+
- Rakefile
|
54
|
+
- lib/vamp.rb
|
55
|
+
- lib/vamp/version.rb
|
56
|
+
- spec/spec_helper.rb
|
57
|
+
- spec/vamp_spec.rb
|
58
|
+
- vamp.gemspec
|
59
|
+
homepage: https://github.com/m-31/vamp
|
60
|
+
licenses:
|
61
|
+
- MIT
|
62
|
+
metadata: {}
|
63
|
+
post_install_message: " .. may the blood never cease to flow .."
|
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.4.3
|
80
|
+
signing_key:
|
81
|
+
specification_version: 4
|
82
|
+
summary: vampire quotes
|
83
|
+
test_files:
|
84
|
+
- spec/spec_helper.rb
|
85
|
+
- spec/vamp_spec.rb
|