aidan_ipsum 0.1.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 +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +64 -0
- data/Rakefile +6 -0
- data/aidan_ipsum.gemspec +25 -0
- data/bin/console +7 -0
- data/lib/aidan_ipsum/version.rb +3 -0
- data/lib/aidan_ipsum/words.txt +122 -0
- data/lib/aidan_ipsum.rb +69 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c781a38a2852c62951c3ee05e630abe6a0477560
|
4
|
+
data.tar.gz: e52487633a13c60db8e89bcb3b350cc04d1127f1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ea3fde2248422a91a3ebe1cc96c5b9c9167c0c3affe7e720d01c307df6b0623fafef7bac1cb5db7acd6d3f6b8e8e108c839efb209d866cdcfc8c39335325e82a
|
7
|
+
data.tar.gz: a0e71db7fd15bf725de8e5d0f1cac9284d74f2abf7d1ba0345676b0d791ef59353513d00c234b962967b50a6d4baba3b5257ac2aaf556fee40d57906b424c4f0
|
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) 2016 Tom Dracz
|
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,64 @@
|
|
1
|
+
# AidanIpsum
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/aidan_ipsum`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem "aidan_ipsum", :git => "git://github.com/tomdracz/aidan_ipsum.git"
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
```bash
|
17
|
+
$ bundle
|
18
|
+
```
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
```bash
|
22
|
+
$ gem install aidan_ipsum
|
23
|
+
```
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
You can run the gem from included console file
|
28
|
+
```bash
|
29
|
+
bin/console
|
30
|
+
```
|
31
|
+
Sentence
|
32
|
+
```bash
|
33
|
+
AidanIpsum.sentence
|
34
|
+
```
|
35
|
+
Paragraph
|
36
|
+
```bash
|
37
|
+
AidanIpsum.paragraph(optional_number_of_sentences)
|
38
|
+
```
|
39
|
+
Quote
|
40
|
+
```bash
|
41
|
+
AidanIpsum.quote
|
42
|
+
```
|
43
|
+
Gibberish
|
44
|
+
```bash
|
45
|
+
AidanIpsum.gibberish(optional_level_of_nonsense)
|
46
|
+
```
|
47
|
+
BONUS Bingo card
|
48
|
+
```bash
|
49
|
+
AidanIpsum.bingo
|
50
|
+
```
|
51
|
+
|
52
|
+
## TODO
|
53
|
+
|
54
|
+
Tests, because I'm lazy
|
55
|
+
|
56
|
+
## Contributing
|
57
|
+
|
58
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/aidan_ipsum.
|
59
|
+
|
60
|
+
|
61
|
+
## License
|
62
|
+
|
63
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
64
|
+
|
data/Rakefile
ADDED
data/aidan_ipsum.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'aidan_ipsum/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "aidan_ipsum"
|
8
|
+
spec.version = AidanIpsum::VERSION
|
9
|
+
spec.authors = ["Tom Dracz"]
|
10
|
+
spec.email = ["tjdracz@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = "AidanIpsum generator"
|
13
|
+
spec.description = "Generate comedy gold"
|
14
|
+
spec.homepage = "https://github.com/tomdracz/aidan_ipsum"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%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
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
25
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
quick question
|
2
|
+
did you know
|
3
|
+
shut your face, Tom
|
4
|
+
so i turned around and ...
|
5
|
+
** puts up middle finger **
|
6
|
+
I've broken it
|
7
|
+
Git Kracken
|
8
|
+
this is my suitcase
|
9
|
+
unfortunately we have no skip rule
|
10
|
+
voted no. 4 in American X-factor
|
11
|
+
or was it 6th
|
12
|
+
Suicide Squad is the greatest film of all time
|
13
|
+
we have to queue up, we only have 3 hours left
|
14
|
+
to be fair
|
15
|
+
the thing is
|
16
|
+
I'd like to point out
|
17
|
+
no no no no no, right
|
18
|
+
is there an ATM?
|
19
|
+
WordPress
|
20
|
+
** exhales loudly while someone is explaining their point of view **
|
21
|
+
can I just say something
|
22
|
+
trip 1 tell Trip 2 he has to wear our t-shirts
|
23
|
+
James Street is much closer than Central
|
24
|
+
Mike you look like you've been in a war
|
25
|
+
it won't render
|
26
|
+
just finished my 2 hour sound check
|
27
|
+
roman empire
|
28
|
+
ridiculously curly hair
|
29
|
+
minecraft
|
30
|
+
works on mine
|
31
|
+
yyyyeeeesss?
|
32
|
+
that was me
|
33
|
+
sorry about that
|
34
|
+
I find that really amusing
|
35
|
+
why are you clicking
|
36
|
+
fun fact
|
37
|
+
I slept through my alarm
|
38
|
+
it's my tablet
|
39
|
+
good one...
|
40
|
+
I dont know but its now my fault
|
41
|
+
I've checked it
|
42
|
+
definitely works
|
43
|
+
trip 1
|
44
|
+
100% sure
|
45
|
+
I got confused
|
46
|
+
or I've confused myself
|
47
|
+
the Spanish armada was great wasn't it...
|
48
|
+
I've updated the firmware
|
49
|
+
I smell of people on the train
|
50
|
+
James Street is closer than central
|
51
|
+
Mordor
|
52
|
+
I've sneezed
|
53
|
+
my nose is bleeding
|
54
|
+
what did I do?
|
55
|
+
that was rude
|
56
|
+
working on it now
|
57
|
+
I'll have it done by the end of the day, give or take 10 minutes
|
58
|
+
do you know what's really bizzare
|
59
|
+
gosh darn it
|
60
|
+
I'll take 12% ownership
|
61
|
+
that branch is scary
|
62
|
+
AI-dan
|
63
|
+
can of monster
|
64
|
+
Doom
|
65
|
+
Barcelona
|
66
|
+
do me a favour
|
67
|
+
I did not drink that beer
|
68
|
+
shush ya face
|
69
|
+
Michael Jackson
|
70
|
+
moonwalk with me
|
71
|
+
unfortunately not every problem can be solved with stress relieving hand sanitiser
|
72
|
+
I've booked a hotel
|
73
|
+
I've booked the wrong dates
|
74
|
+
I've never said anything but nice things about Tom
|
75
|
+
** nodding head **
|
76
|
+
** more gasps **
|
77
|
+
I should be really offended by this
|
78
|
+
because simple is cool
|
79
|
+
anyone can name 4 Barcelona players
|
80
|
+
it's easier that way
|
81
|
+
stop stealing my job titles
|
82
|
+
Chief
|
83
|
+
I am on schedule
|
84
|
+
huffs loudly
|
85
|
+
efficiency is the name of the game
|
86
|
+
wait! What?
|
87
|
+
*** mumbles to himself ***
|
88
|
+
fucking blazer
|
89
|
+
can you do a master deploy?
|
90
|
+
no it doesn't
|
91
|
+
holy mother of jesus
|
92
|
+
very crafty
|
93
|
+
magic Aidan
|
94
|
+
I've been getting far too sassy recently
|
95
|
+
Lucifer was not an angel
|
96
|
+
I'm a wizard
|
97
|
+
you're a star
|
98
|
+
this is mine
|
99
|
+
I want to know what you're talking about
|
100
|
+
ahhhh itchy nose
|
101
|
+
shut your face
|
102
|
+
** elaborate 1st person story from an alarms point of view **
|
103
|
+
** something irrelevant about fan fiction **
|
104
|
+
I can promise you that
|
105
|
+
I remain convinced you have a secret slack about me
|
106
|
+
you're more preferable to Jason
|
107
|
+
yur hair isn't black it's just dark grey
|
108
|
+
IBM is relatively unkown
|
109
|
+
A.I is a massive subject so I'll try and condense it as much as I can
|
110
|
+
...
|
111
|
+
A.I is a massive subject so I'll try and condense it as much as I can
|
112
|
+
I used to have an iPhone
|
113
|
+
if I hit you with a pickaxe, it wouldn't kill you
|
114
|
+
I have changed bed since then
|
115
|
+
my bunk bed gives me more room for activities
|
116
|
+
sorry, just got excited about a WYSIWYG editor
|
117
|
+
I feel sorry for your mouse
|
118
|
+
(Name) turned around and said...
|
119
|
+
it will fall over if you’re not careful
|
120
|
+
no pressure
|
121
|
+
I'm not sick at all
|
122
|
+
if you haven't accounted for it by now, it's your fault
|
data/lib/aidan_ipsum.rb
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
module AidanIpsum
|
2
|
+
PUNCTUATION = ['.', ',', '!']
|
3
|
+
|
4
|
+
def self.sentence
|
5
|
+
l = WordLoader.new
|
6
|
+
l.quotes.shuffle!
|
7
|
+
quotes_to_use = l.quotes.sample(rand(2..3))
|
8
|
+
sentence = quotes_to_use.join(PUNCTUATION.sample + " ")
|
9
|
+
sentence << "." unless PUNCTUATION.include?(sentence[-1])
|
10
|
+
sanitise_sentence(sentence)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.paragraph(sentences = 5)
|
14
|
+
paragraph = []
|
15
|
+
sentences.times do |s|
|
16
|
+
paragraph << self.sentence
|
17
|
+
end
|
18
|
+
paragraph.join(" ")
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.quote
|
22
|
+
l = WordLoader.new
|
23
|
+
sanitise_sentence(l.quotes.shuffle!.sample)
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.gibberish(words = 20)
|
27
|
+
l = WordLoader.new
|
28
|
+
all_words = l.quotes.join(" ").split(" ")
|
29
|
+
all_words.shuffle!
|
30
|
+
sanitise_sentence(all_words.sample(words).join(" "))
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.bingo
|
34
|
+
l = WordLoader.new
|
35
|
+
bingo = Hash.new
|
36
|
+
columns = [:a1, :a2, :a3,:b1, :b2, :b3,:c1, :c2, :c3]
|
37
|
+
columns.each do |c|
|
38
|
+
value = l.quotes.sample
|
39
|
+
l.quotes.delete(value)
|
40
|
+
bingo[c] = value
|
41
|
+
end
|
42
|
+
puts "*** Your AidanBingo card ***"
|
43
|
+
puts " 1 #{bingo[:a1]} | #{bingo[:b1]} | #{bingo[:c1]}"
|
44
|
+
puts " ----------------------------------------------"
|
45
|
+
puts " 2 #{bingo[:a2]} | #{bingo[:b2]} | #{bingo[:c2]}"
|
46
|
+
puts " ----------------------------------------------"
|
47
|
+
puts " 3 #{bingo[:a3]} | #{bingo[:b3]} | #{bingo[:c3]}"
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.sanitise_sentence(sentence)
|
51
|
+
sentence.gsub(/([a-z])((?:[^.?!]|\.(?=[a-z]))*)/i) { $1.upcase + $2.rstrip }
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.method_missing(method_sym, *arguments, &block)
|
55
|
+
return "** puts up middle finger **"
|
56
|
+
end
|
57
|
+
|
58
|
+
class WordLoader
|
59
|
+
attr_accessor :quotes
|
60
|
+
|
61
|
+
def initialize
|
62
|
+
self.quotes = []
|
63
|
+
File.open(File.dirname(__FILE__) << '/aidan_ipsum/words.txt').each_line do |quote|
|
64
|
+
self.quotes << quote.gsub!(/\n/, '')
|
65
|
+
end
|
66
|
+
self.quotes.compact!
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
metadata
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aidan_ipsum
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tom Dracz
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-10-18 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.12'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.12'
|
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
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description: Generate comedy gold
|
56
|
+
email:
|
57
|
+
- tjdracz@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
|
+
- ".travis.yml"
|
65
|
+
- Gemfile
|
66
|
+
- LICENSE.txt
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- aidan_ipsum.gemspec
|
70
|
+
- bin/console
|
71
|
+
- lib/aidan_ipsum.rb
|
72
|
+
- lib/aidan_ipsum/version.rb
|
73
|
+
- lib/aidan_ipsum/words.txt
|
74
|
+
homepage: https://github.com/tomdracz/aidan_ipsum
|
75
|
+
licenses:
|
76
|
+
- MIT
|
77
|
+
metadata: {}
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options: []
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
requirements: []
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 2.5.1
|
95
|
+
signing_key:
|
96
|
+
specification_version: 4
|
97
|
+
summary: AidanIpsum generator
|
98
|
+
test_files: []
|