poopypants 0.0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cdaea73535b0ea63594dd7c0ecf2eae6d9c3de86
4
+ data.tar.gz: 8f2a7caf02cc26e04b97c06b887da65eeca68515
5
+ SHA512:
6
+ metadata.gz: 2526c120535299f5c1934154e955c6caef0a438f5a0aa2bb3ed9064b164be8a1fb7bcf97d725a29b0be650dffb24d885a56c60e9e8c87467b74e348be1a937cc
7
+ data.tar.gz: d49b8329a2e4ea5a63e744719e94258c8777f873ca84a51ab0df1b20230a73cbbebae0bdc93f11130743e5ad89513c360556e293f093a0859c74ed6e864768f5
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.1
5
+ before_install: gem install bundler -v 1.13.6
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at elimduke@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in poopypants.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Eli Duke
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,57 @@
1
+ # Poopypants
2
+
3
+ This all started a long time ago.
4
+
5
+ http://www.poopypants.net/about
6
+
7
+ And now it's a full-fledged Ruby Gem!
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'poopypants'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ ```
20
+ $ bundle
21
+ ```
22
+
23
+ Or install it yourself as:
24
+
25
+ ```
26
+ $ gem install poopypants
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ It's really simple! Just create a new Poopypants object:
32
+
33
+ ```ruby
34
+ name = Poopypants::Name.new("Eli", "Duke")
35
+ ```
36
+
37
+ And then call `poopify` on it!
38
+
39
+ ```ruby
40
+ name.poopify
41
+ => "Crusty Bubbletush"
42
+ ```
43
+
44
+
45
+ That's it!
46
+
47
+ # CLI
48
+
49
+ There's also a super awesome command line interface. After you've installed the gem, just call `poopypants` in the terminal and see what fun you can have!
50
+
51
+ ## Contributing
52
+
53
+ Bug reports and pull requests are welcome on GitHub at https://github.com/eliduke/poopypants. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
54
+
55
+ ## License
56
+
57
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "poopypants"
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/poopypants ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'poopypants'
4
+
5
+ first = ""
6
+ while first == ""
7
+ print "What is your first name: "
8
+ first = gets.chomp
9
+ end
10
+
11
+ last = ""
12
+ while last == ""
13
+ print "What is your last name: "
14
+ last = gets.chomp
15
+ end
16
+
17
+ name = Poopypants::Name.new(first, last)
18
+
19
+ puts ""
20
+ puts "\u{1f4a9} " * 40
21
+ puts ""
22
+ puts "Hello, #{name.first} #{name.last}!"
23
+ puts ""
24
+ puts "According to Professor Poopypants, your new name is #{name.change}."
25
+ puts ""
26
+ puts "Haha! :)"
27
+ puts ""
28
+ puts "\u{1f4a9} " * 40
29
+ puts ""
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/lib/poopypants.rb CHANGED
@@ -1,34 +1,38 @@
1
- ### PROFESSOR POOPYPANTS NAME CHANGE-O-GEM 2000 ###
2
- class Poopypants
3
-
4
- def self.run
5
-
6
- first_firsts = [["A", "Stinky"], ["B", "Lumpy"], ["C", "Buttercup"], ["D", "Gidget"], ["E", "Crusty"], ["F", "Greasy"], ["G", "Fluffy"], ["H", "Cheeseball"], ["I", "Chim-Chim"], ["J", "Poopsie"], ["K", "Flunky"], ["L", "Booger"], ["M", "Pinky"], ["N", "Zippy"], ["O", "Goober"], ["P", "Doofus"], ["Q", "Slimy"], ["R", "Loopy"], ["S", "Snotty"], ["T", "Falafel"], ["U", "Dorky"], ["V", "Squeezit"], ["W", "Oprah"], ["X", "Skipper"], ["Y", "Dinky"], ["Z", "Zsa-Zsa"]]
7
- first_lasts = [["A", "Diaper"], ["B", "Toilet"], ["C", "Giggle"], ["D", "Bubble"], ["E", "Girdle"], ["F", "Barf"], ["G", "Lizard"], ["H", "Waffle"], ["I", "Cootie"], ["J", "Monkey"], ["K", "Potty"], ["L", "Liver"], ["M", "Banana"], ["N", "Rhino"], ["O", "Burger"], ["P", "Hamster"], ["Q", "Toad"], ["R", "Gizzard"], ["S", "Pizza"], ["T", "Gerbil"], ["U", "Chicken"], ["V", "Pickle"], ["W", "Chuckle"], ["X", "Tofu"], ["Y", "Gorilla"], ["Z", "Stinker"]]
8
- last_lasts = [["A", "Head"], ["B", "Mouth"], ["C", "Face"], ["D", "Nose"], ["E", "Tush"], ["F", "Breath"], ["G", "Pants"], ["H", "Shorts"], ["I", "Lips"], ["J", "Honker"], ["K", "Butt"], ["L", "Brain"], ["M", "Tushie"], ["N", "Chunks"], ["O", "Hiney"], ["P", "Biscuits"], ["Q", "Toes"], ["R", "Buns"], ["S", "Fanny"], ["T", "Sniffer"], ["U", "Sprinkles"], ["V", "Kisser"], ["W", "Squirt"], ["X", "Humperdinck"], ["Y", "Brains"], ["Z", "Juice"]]
9
-
10
- first_name = ""
11
- while first_name == ""
12
- print "What is your FIRST name? "
13
- first_name = gets.chomp
1
+ require "poopypants/version"
2
+
3
+ module Poopypants
4
+ class Name
5
+ FIRSTS = {"A" => "Stinky", "B" => "Lumpy", "C" => "Buttercup", "D" => "Gidget", "E" => "Crusty", "F" => "Greasy", "G" => "Fluffy", "H" => "Cheeseball", "I" => "Chim-Chim", "J" => "Poopsie", "K" => "Flunky", "L" => "Booger", "M" => "Pinky", "N" => "Zippy", "O" => "Goober", "P" => "Doofus", "Q" => "Slimy", "R" => "Loopy", "S" => "Snotty", "T" => "Falafel", "U" => "Dorky", "V" => "Squeezit", "W" => "Oprah", "X" => "Skipper", "Y" => "Dinky", "Z" => "Zsa-Zsa"}.freeze
6
+ MIDDLES = {"A" => "Diaper", "B" => "Toilet", "C" => "Giggle", "D" => "Bubble", "E" => "Girdle", "F" => "Barf", "G" => "Lizard", "H" => "Waffle", "I" => "Cootie", "J" => "Monkey", "K" => "Potty", "L" => "Liver", "M" => "Banana", "N" => "Rhino", "O" => "Burger", "P" => "Hamster", "Q" => "Toad", "R" => "Gizzard", "S" => "Pizza", "T" => "Gerbil", "U" => "Chicken", "V" => "Pickle", "W" => "Chuckle", "X" => "Tofu", "Y" => "Gorilla", "Z" => "Stinker"}.freeze
7
+ LASTS = {"A" => "head", "B" => "mouth", "C" => "face", "D" => "nose", "E" => "tush", "F" => "breath", "G" => "pants", "H" => "shorts", "I" => "lips", "J" => "honker", "K" => "butt", "L" => "brain", "M" => "tushie", "N" => "chunks", "O" => "hiney", "P" => "biscuits", "Q" => "toes", "R" => "buns", "S" => "fanny", "T" => "sniffer", "U" => "sprinkles", "V" => "kisser", "W" => "squirt", "X" => "humperdinck", "Y" => "brains", "Z" => "juice"}.freeze
8
+
9
+ attr_accessor :first, :last
10
+
11
+ def initialize(first, last)
12
+ @first = first.gsub(/\W+|\d+|_/, '')
13
+ @last = last.gsub(/\W+|\d+|_/, '')
14
14
  end
15
15
 
16
- last_name = ""
17
- while last_name == ""
18
- print "What is your LAST name? "
19
- last_name = gets.chomp
16
+ def poopify
17
+ new_name unless @first.empty? || @last.empty?
20
18
  end
21
19
 
22
- first_first = first_name.gsub(/\W+|\d+/, '')[0].chr.capitalize
23
- first_last = last_name.gsub(/\W+|\d+/, '')[0].chr.capitalize
24
- last_last = last_name.gsub(/\W+|\d+/, '')[-1].chr.capitalize
20
+ private
25
21
 
26
- new_first_first = first_firsts.select{|f| f[0] == first_first}
27
- new_first_last = first_lasts.select{|f| f[0] == first_last}
28
- new_last_last = last_lasts.select{|f| f[0] == last_last}
22
+ def new_first
23
+ FIRSTS["#{@first[0].upcase}"]
24
+ end
29
25
 
30
- puts "According to Professor Poopypants, your new name is #{new_first_first[0][1]} #{new_first_last[0][1]} #{new_last_last[0][1]}."
31
-
32
- end
26
+ def new_middle
27
+ MIDDLES["#{@last[0].upcase}"]
28
+ end
29
+
30
+ def new_last
31
+ LASTS["#{@last[-1].upcase}"]
32
+ end
33
33
 
34
- end
34
+ def new_name
35
+ "#{new_first} #{new_middle}#{new_last}"
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,3 @@
1
+ module Poopypants
2
+ VERSION = "0.1.1"
3
+ end
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'poopypants/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "poopypants"
8
+ spec.version = Poopypants::VERSION
9
+ spec.authors = ["Eli Duke"]
10
+ spec.email = ["elimduke@gmail.com"]
11
+
12
+ spec.summary = %q{Professor Poopypants' Name-Change-o-Gem}
13
+ spec.description = %q{If you love silly names, you're gonna love Professor Poopypants' Name-Change-o-Gem.}
14
+ spec.homepage = "https://github.com/eliduke/poopypants"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+
21
+ spec.bindir = "bin"
22
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
23
+ spec.require_paths = ["lib"]
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.13"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec", "~> 3.0"
28
+ end
metadata CHANGED
@@ -1,46 +1,103 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poopypants
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Eli Duke
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-01-31 00:00:00.000000000 Z
13
- dependencies: []
14
- description: You know you love wacky names, so give it a try! irb> require 'poopypants';
15
- Poopypants.run
16
- email: elimduke@gmail.com
17
- executables: []
11
+ date: 2017-01-03 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.13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.13'
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: If you love silly names, you're gonna love Professor Poopypants' Name-Change-o-Gem.
56
+ email:
57
+ - elimduke@gmail.com
58
+ executables:
59
+ - console
60
+ - poopypants
61
+ - setup
18
62
  extensions: []
19
63
  extra_rdoc_files: []
20
64
  files:
65
+ - ".gitignore"
66
+ - ".rspec"
67
+ - ".travis.yml"
68
+ - CODE_OF_CONDUCT.md
69
+ - Gemfile
70
+ - LICENSE.txt
71
+ - README.md
72
+ - Rakefile
73
+ - bin/console
74
+ - bin/poopypants
75
+ - bin/setup
21
76
  - lib/poopypants.rb
22
- homepage: http://rubygems.org/gems/poopypants
23
- licenses: []
77
+ - lib/poopypants/version.rb
78
+ - poopypants.gemspec
79
+ homepage: https://github.com/eliduke/poopypants
80
+ licenses:
81
+ - MIT
82
+ metadata: {}
24
83
  post_install_message:
25
84
  rdoc_options: []
26
85
  require_paths:
27
86
  - lib
28
87
  required_ruby_version: !ruby/object:Gem::Requirement
29
- none: false
30
88
  requirements:
31
- - - ! '>='
89
+ - - ">="
32
90
  - !ruby/object:Gem::Version
33
91
  version: '0'
34
92
  required_rubygems_version: !ruby/object:Gem::Requirement
35
- none: false
36
93
  requirements:
37
- - - ! '>='
94
+ - - ">="
38
95
  - !ruby/object:Gem::Version
39
96
  version: '0'
40
97
  requirements: []
41
98
  rubyforge_project:
42
- rubygems_version: 1.8.15
99
+ rubygems_version: 2.5.1
43
100
  signing_key:
44
- specification_version: 3
45
- summary: Professor Poopypants's Name Change-O-Gem 2000
101
+ specification_version: 4
102
+ summary: Professor Poopypants' Name-Change-o-Gem
46
103
  test_files: []