name_change_o_chart 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/PPP.gif +0 -0
- data/README.md +35 -0
- data/Rakefile +1 -0
- data/lib/name_change_o_chart.rb +105 -0
- data/lib/name_change_o_chart/version.rb +3 -0
- data/name_change_o_chart.gemspec +23 -0
- metadata +82 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bbcc9e268121d72c9cddd368e0de1374c02fc9dc
|
4
|
+
data.tar.gz: 095c2dec1ec5d4afc43a0fecb63be340cc7b4be9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3c4694a82ef74d043cce8803f135d95da5df8d340983178c675dd44aedd3b6fe8783974a2c6e2e50c8807b4f5cbb91e9480a5e06b3a588fa6ed3391c6e729fb5
|
7
|
+
data.tar.gz: ab31127cff4b19f10a48b7bddc73bf8c4a57220047c0735578d9a4b11a720bcea123a663f92db232486eefaed4d16ecc2ced5c898ff17d972ba5f5f1ee77cee6
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 'Poopsie Lizardbrains'
|
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/PPP.gif
ADDED
Binary file
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# NameChangeOChart
|
2
|
+
|
3
|
+
Finally, you can convert your currently boring name to something far more exciting. This name converter is based on "Captain Underpants and the Perilous Plot of Professor Poopypants", by [Dav Pilkey](http://www.pilkey.com).
|
4
|
+
|
5
|
+
![Professor Poopypants](PPP.gif "Professor Poopypants")
|
6
|
+
|
7
|
+
The name conversion is copyright of Dav Pilkey.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
gem 'name_change_o_chart'
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install name_change_o_chart
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
NameChangeOChart.convert('Yukohiro Matsumoto') #=> "dinky bananahiney"
|
27
|
+
```
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
1. Fork it
|
32
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
33
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
34
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
35
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,105 @@
|
|
1
|
+
require "name_change_o_chart/version"
|
2
|
+
|
3
|
+
module NameChangeOChart
|
4
|
+
def convert(name)
|
5
|
+
parts = name.to_s.downcase.split
|
6
|
+
start = parts.first.to_s
|
7
|
+
ending = parts.last.to_s
|
8
|
+
|
9
|
+
first = start[0]
|
10
|
+
second = ending[0]
|
11
|
+
third = ending[-1]
|
12
|
+
|
13
|
+
%{#{first_of_first(first)} #{first_of_last(second)}#{last_of_last(third)}}
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
def first_of_first(letter)
|
18
|
+
{"a" => "stinky",
|
19
|
+
"b" => "lumpy",
|
20
|
+
"c" => "buttercup",
|
21
|
+
"d" => "gidget",
|
22
|
+
"e" => "crusty",
|
23
|
+
"f" => "greasy",
|
24
|
+
"g" => "fluffy",
|
25
|
+
"h" => "cheeseball",
|
26
|
+
"i" => "chim-chim",
|
27
|
+
"j" => "poopsie",
|
28
|
+
"k" => "flunky",
|
29
|
+
"l" => "booger",
|
30
|
+
"m" => "pinky",
|
31
|
+
"n" => "zippy",
|
32
|
+
"o" => "goober",
|
33
|
+
"p" => "doofus",
|
34
|
+
"q" => "slimy",
|
35
|
+
"r" => "loopy",
|
36
|
+
"s" => "snotty",
|
37
|
+
"t" => "falafel",
|
38
|
+
"u" => "dorkey",
|
39
|
+
"v" => "squeezit",
|
40
|
+
"w" => "oprah",
|
41
|
+
"x" => "skipper",
|
42
|
+
"y" => "dinky",
|
43
|
+
"z" => "zsa-zsa"}.fetch(letter)
|
44
|
+
end
|
45
|
+
|
46
|
+
def first_of_last(letter)
|
47
|
+
{"a" => "diaper",
|
48
|
+
"b" => "toilet",
|
49
|
+
"c" => "giggle",
|
50
|
+
"d" => "bubble",
|
51
|
+
"e" => "girdle",
|
52
|
+
"f" => "barf",
|
53
|
+
"g" => "lizard",
|
54
|
+
"h" => "waffle",
|
55
|
+
"i" => "cootie",
|
56
|
+
"j" => "monkey",
|
57
|
+
"k" => "potty",
|
58
|
+
"l" => "liver",
|
59
|
+
"m" => "banana",
|
60
|
+
"n" => "rhino",
|
61
|
+
"o" => "burger",
|
62
|
+
"p" => "hamster",
|
63
|
+
"q" => "toad",
|
64
|
+
"r" => "gizzard",
|
65
|
+
"s" => "pizza",
|
66
|
+
"t" => "gerbil",
|
67
|
+
"u" => "chicken",
|
68
|
+
"v" => "pickle",
|
69
|
+
"w" => "chuckle",
|
70
|
+
"x" => "tofu",
|
71
|
+
"y" => "gorilla",
|
72
|
+
"z" => "stinker"}.fetch(letter)
|
73
|
+
end
|
74
|
+
|
75
|
+
def last_of_last(letter)
|
76
|
+
{"a" => "head",
|
77
|
+
"b" => "mouth",
|
78
|
+
"c" => "face",
|
79
|
+
"d" => "nose",
|
80
|
+
"e" => "tush",
|
81
|
+
"f" => "breath",
|
82
|
+
"g" => "pants",
|
83
|
+
"h" => "shorts",
|
84
|
+
"i" => "lips",
|
85
|
+
"j" => "honker",
|
86
|
+
"k" => "butt",
|
87
|
+
"l" => "brain",
|
88
|
+
"m" => "tushie",
|
89
|
+
"n" => "chunks",
|
90
|
+
"o" => "hiney",
|
91
|
+
"p" => "biscuits",
|
92
|
+
"q" => "toes",
|
93
|
+
"r" => "buns",
|
94
|
+
"s" => "fanny",
|
95
|
+
"t" => "sniffer",
|
96
|
+
"u" => "sprinkles",
|
97
|
+
"v" => "kisser",
|
98
|
+
"w" => "squirt",
|
99
|
+
"x" => "humperdinck",
|
100
|
+
"y" => "brains",
|
101
|
+
"z" => "juice"}.fetch(letter)
|
102
|
+
end
|
103
|
+
|
104
|
+
module_function *self.instance_methods(false)
|
105
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'name_change_o_chart/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "name_change_o_chart"
|
8
|
+
spec.version = NameChangeOChart::VERSION
|
9
|
+
spec.authors = ["'Jim Gay'"]
|
10
|
+
spec.email = ["jim@saturnflyer.com"]
|
11
|
+
spec.description = %q{Name converter based on "Captain Underpants and the Perilous Plot of Professor Poopypants", by Dav Pilkey}
|
12
|
+
spec.summary = %q{Convert your boring name to something more fun.}
|
13
|
+
spec.homepage = "https://github.com/saturnflyer/name_change_o_chart"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: name_change_o_chart
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- "'Jim Gay'"
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-11-30 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.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
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: Name converter based on "Captain Underpants and the Perilous Plot of
|
42
|
+
Professor Poopypants", by Dav Pilkey
|
43
|
+
email:
|
44
|
+
- jim@saturnflyer.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- ".gitignore"
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE.txt
|
52
|
+
- PPP.gif
|
53
|
+
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- lib/name_change_o_chart.rb
|
56
|
+
- lib/name_change_o_chart/version.rb
|
57
|
+
- name_change_o_chart.gemspec
|
58
|
+
homepage: https://github.com/saturnflyer/name_change_o_chart
|
59
|
+
licenses:
|
60
|
+
- MIT
|
61
|
+
metadata: {}
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options: []
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
requirements: []
|
77
|
+
rubyforge_project:
|
78
|
+
rubygems_version: 2.2.0
|
79
|
+
signing_key:
|
80
|
+
specification_version: 4
|
81
|
+
summary: Convert your boring name to something more fun.
|
82
|
+
test_files: []
|