kittynames 0.0.3

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 757f5cc25d854083477e4c6caa8949e16fbb85ed
4
+ data.tar.gz: 89c5e067be89cddb65cfd8dcd8f4ab86a0fba9e3
5
+ SHA512:
6
+ metadata.gz: 01066a0e4fe00f8a5548cfc16f914b1a36d7f2f9f02fde434e5d8659bf72bbe3c7f34097456236bdab2099688792defb1e766afb361bf7b045694cde452cd331
7
+ data.tar.gz: d46798aeba29694191f732cb37624ff6410a4388f97d2bbd2d353dbd1310e276b63b8084451aeb49f53cae8dd9b8e1430fdec7d2a98c90cb6dfd01ba19a1604d
@@ -0,0 +1,37 @@
1
+ # rcov generated
2
+ coverage
3
+
4
+ # rdoc generated
5
+ rdoc
6
+
7
+ # yard generated
8
+ doc
9
+ .yardoc
10
+
11
+ # bundler
12
+ .bundle
13
+
14
+ # jeweler generated
15
+ pkg
16
+
17
+ # For MacOS:
18
+ #
19
+ #.DS_Store
20
+
21
+ # For TextMate
22
+ #*.tmproj
23
+ #tmtags
24
+
25
+ # For emacs:
26
+ #*~
27
+ #\#*
28
+ #.\#*
29
+
30
+ # For vim:
31
+ #*.swp
32
+
33
+ # For redcar:
34
+ #.redcar
35
+
36
+ # For rubinius:
37
+ #*.rbc
data/.rvmrc ADDED
@@ -0,0 +1,2 @@
1
+ rvm --create 2.2.3@kittynames_gem
2
+
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "http://rubygems.org"
2
+ gemspec
@@ -0,0 +1,20 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ kittynames (0.0.1)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ shoulda (3.0.1)
10
+ shoulda-context (~> 1.0.0)
11
+ shoulda-matchers (~> 1.0.0)
12
+ shoulda-context (1.0.0)
13
+ shoulda-matchers (1.0.0)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ kittynames!
20
+ shoulda
@@ -0,0 +1,2 @@
1
+ Kitty Name generator!
2
+ It's free :D
@@ -0,0 +1,2 @@
1
+ # kitty-names
2
+ Kitty Name Generator
@@ -0,0 +1,28 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ require "bundler/gem_tasks"
6
+
7
+ begin
8
+ Bundler.setup(:default, :development)
9
+ rescue Bundler::BundlerError => e
10
+ $stderr.puts e.message
11
+ $stderr.puts "Run `bundle install` to install missing gems"
12
+ exit e.status_code
13
+ end
14
+
15
+ task :default => :test_rubies
16
+
17
+ desc "Runs tests on Ruby 1.8.7, 1.9.2 and 1.9.3"
18
+ task :test_rubies do
19
+ versions = %w( 1.8.7 1.9.2 1.9.3)
20
+ versions.each do |version|
21
+ system <<-BASH
22
+ bash -c 'source ~/.rvm/scripts/rvm;
23
+ rvm use #{version}@kittynames;
24
+ echo "-------- `ruby -v` ---------\n";
25
+ ruby -I"lib:lib:test" test/test_*.rb'
26
+ BASH
27
+ end
28
+ end
@@ -0,0 +1,16 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require "kittynames/version"
3
+ Gem::Specification.new do |s|
4
+ s.name = "kittynames"
5
+ s.authors = "Zola"
6
+ s.email = "m.a.solano93@gmail.com"
7
+ s.description = "Cat names yo"
8
+ s.homepage = "https://github.com/m-a-solano93/kitty-names"
9
+ s.version = Kittynames::VERSION
10
+ s.rubyforge_project = "kittynames"
11
+ s.summary = "Hola"
12
+ s.files = `git ls-files`.split("\n")
13
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
14
+ s.require_paths = ["lib"]
15
+ s.add_development_dependency "shoulda", "~> 0"
16
+ end
@@ -0,0 +1,58 @@
1
+ KITTY
2
+ CATTY
3
+ KITNESA
4
+ KITTENEVA
5
+ CATHY
6
+ KIMMY
7
+ CAPRI
8
+ DAME
9
+ ELLA
10
+ CECIL
11
+ CIERA
12
+ MOCHA
13
+ CAT
14
+ VERONICA
15
+ ISABELLA
16
+ MELISSA
17
+ CATINESA
18
+ CATTEE
19
+ CATERONICA
20
+ KIT
21
+ KAT
22
+ KAM
23
+ KIM
24
+ KI
25
+ KATTY
26
+ KATNIS
27
+ CATNIS
28
+ JENICAT
29
+ JENNIFER
30
+ JAMI
31
+ JESSIE
32
+ MEOWSY
33
+ WHISKERLY
34
+ KIMMY
35
+ MEEOW
36
+ CATZ
37
+ FRANCATSCA
38
+ LANA
39
+ TAYLOR
40
+ CHELSEA
41
+ CATTERINA
42
+ CATTERINALY
43
+ FANCY
44
+ LESLIE
45
+ LEANDRA
46
+ BETHANY
47
+ CATINEE
48
+ CATTERNESA
49
+ KIBBERLY
50
+ CATHERINE
51
+ LUSY
52
+ CATYE
53
+ CATERLY
54
+ FUZZ
55
+ MEOWLY
56
+ MEOW
57
+ MISSES
58
+ TATROAR
@@ -0,0 +1,242 @@
1
+ WHISKERTON
2
+ PURRDEE
3
+ FELINE
4
+ CATTY
5
+ KITTEN
6
+ KIBBLES
7
+ KIBBLER
8
+ WHISKY
9
+ WHISKER
10
+ MEOWSER
11
+ SNUGGLE
12
+ SNUGGLER
13
+ TOM
14
+ CAT
15
+ KITTER
16
+ KAT
17
+ KITTEL
18
+ KIB
19
+ KIBBLER
20
+ WISK
21
+ WHISK
22
+ TIGGER
23
+ TIGER
24
+ LION
25
+ LEON
26
+ GATO
27
+ GATITO
28
+ GAT
29
+ VIGOTE
30
+ CLAWS
31
+ CLAWY
32
+ STREET
33
+ KIT
34
+ KAT
35
+ K.T.
36
+ GARFIELD
37
+ FITZGERALD
38
+ FITZ
39
+ GARD
40
+ FIELD
41
+ SNUGGLES
42
+ SNUGGGLERS
43
+ WHISKERS
44
+ WHISKY
45
+ WHISKEE
46
+ FAT
47
+ FATEE
48
+ IAMS
49
+ FRISKIES
50
+ FRISK
51
+ FRISKY
52
+ PURINA
53
+ ALPO
54
+ BENEFUL
55
+ MERRICK
56
+ BRAVO
57
+ SPANISH
58
+ WHISKAS
59
+ CESAR
60
+ PEDIGREE
61
+ SPADE
62
+ NEUTER
63
+ CHOW
64
+ EUKANUBA
65
+ LADY
66
+ MEOW
67
+ WOW
68
+ LIFE
69
+ SPHINX
70
+ ANIMALIA
71
+ FELIS
72
+ FELINAE
73
+ FELIFORMIA
74
+ SYLVESTER
75
+ SILVESTRIS
76
+ TABBY
77
+ PUSS
78
+ KIII
79
+ KIKI
80
+ MONTY
81
+ MARMALADE
82
+ HONEY
83
+ VENUS
84
+ BUB
85
+ MARU
86
+ GRUMPY
87
+ SAM
88
+ GARFI
89
+ SHIRONEKO
90
+ HELLO
91
+ SNOOPY
92
+ LAZARUS
93
+ HAMILTON
94
+ HIPSTER
95
+ FUKUMARU
96
+ BANYE
97
+ COLONEL
98
+ NALA
99
+ KITLER
100
+ LILU
101
+ SMOKEY
102
+ TINKERBELL
103
+ MUFFIN
104
+ JINX
105
+ LUNA
106
+ COOKIE
107
+ SALEM
108
+ SNICKERS
109
+ SOPHIE
110
+ FLUFFY
111
+ PATCHES
112
+ GIZMO
113
+ MAX
114
+ ANGEL
115
+ BABY
116
+ CALI
117
+ CASPER
118
+ LEO
119
+ BUSTER
120
+ TROUBLE
121
+ CLEO
122
+ CALI
123
+ OLIVER
124
+ FELIX
125
+ GINGER
126
+ PEANUT
127
+ SIMON
128
+ BANDIT
129
+ HARLEY
130
+ COCO
131
+ MIMI
132
+ MITTENS
133
+ OSCAR
134
+ BELLA
135
+ SIMBA
136
+ BOOTS
137
+ JACK
138
+ PEPPER
139
+ SAMMY
140
+ LILY
141
+ ELLIE
142
+ GOULDING
143
+ PERRY
144
+ AZELEA
145
+ SWIFT
146
+ KARDASHIAN
147
+ RIHANNA
148
+ LAWRENCE
149
+ ALBA
150
+ JOHANSSON
151
+ JOLIE
152
+ WATSON
153
+ FOX
154
+ GAGA
155
+ MADONNA
156
+ STONE
157
+ PORTMAN
158
+ MINAJ
159
+ AUGILERA
160
+ THERON
161
+ GOMEZ
162
+ SPEARS
163
+ ANISTON
164
+ BERRY
165
+ GRANDE
166
+ BIEL
167
+ SHAKIRA
168
+ VERGARA
169
+ WHISKERSPOON
170
+ WHITERSPOON
171
+ CATHAWAY
172
+ DIAZ
173
+ MOORE
174
+ HUDGENS
175
+ BULLOCK
176
+ STEWART
177
+ BARRYMORE
178
+ KNIGHTLEY
179
+ MENDES
180
+ CAREY
181
+ DESCHANEL
182
+ LIVELY
183
+ HILTON
184
+ CRUZ
185
+ SIMPSON
186
+ BANDERAS
187
+ EFRON
188
+ PITT
189
+ GOSLING
190
+ TATUM
191
+ BIEBER
192
+ TIMBERLAKE
193
+ HEMSWORTH
194
+ PATTINSON
195
+ CATTINSON
196
+ DICATIO
197
+ DICAPRIO
198
+ BECKHAM
199
+ FRANCO
200
+ CLOONEY
201
+ PINE
202
+ LETO
203
+ LAUTNER
204
+ CRAIG
205
+ CRUISE
206
+ LEVINE
207
+ LAW
208
+ RADCLIFFE
209
+ LEVITT
210
+ JONAS
211
+ WALKER
212
+ LUTZ
213
+ BUTLER
214
+ BALE
215
+ BLOOM
216
+ KUTCHER
217
+ JOHNSON
218
+ AFFLECK
219
+ HAHN
220
+ CASH
221
+ WEST
222
+ PURRY
223
+ PURRMEN
224
+ WHISKERSTEEN
225
+ WHISKERLES
226
+ CHAIRMEN
227
+ HARRYMORE
228
+ PAW
229
+ ALDREN
230
+ BITE
231
+ BYTE
232
+ ROMNEY
233
+ PURRTON
234
+ SCRATCHER
235
+ CYRUS
236
+ THURMAN
237
+ GRANGER
238
+ FURRGENDY
239
+ FLEECREST
240
+ HUFFLEPUP
241
+ HUFFLEPUFF
242
+ SNIFFERON
@@ -0,0 +1,56 @@
1
+ MATT
2
+ TOM
3
+ CAT
4
+ BENTLEY
5
+ WINSTON
6
+ GATO
7
+ GAT
8
+ MAT
9
+ CAT
10
+ TAT
11
+ TATO
12
+ CATO
13
+ LEON
14
+ LION
15
+ TIGGER
16
+ LEONS
17
+ LE
18
+ LEE
19
+ LEVI
20
+ BOOTS
21
+ CASPER
22
+ OREO
23
+ CAYLOR
24
+ MEO
25
+ OWESER
26
+ GATITO
27
+ TITO
28
+ CA
29
+ CK
30
+ CATTER
31
+ CATER
32
+ KITTER
33
+ KIN
34
+ CATTERON
35
+ MEOWFFRED
36
+ MEOWFFERY
37
+ MEOWSTEN
38
+ MEOWTER
39
+ MOWEFER
40
+ MEOWSEER
41
+ MEOWSE
42
+ MEOWFU
43
+ DAVID
44
+ TOMMY
45
+ TEEDY
46
+ TED
47
+ JIM
48
+ BOOT
49
+ WHISKERLY
50
+ WHISKERMEN
51
+ LEPER
52
+ LAVAR
53
+ LEOPAWRDO
54
+ CATRICK
55
+ PUMA
56
+ RYAN
@@ -0,0 +1,137 @@
1
+ module KittyNames
2
+ class << self
3
+
4
+ def probability_of_male(k=0.41217441657656521951277712)
5
+ @probability_of_male ||= k
6
+ end
7
+
8
+ # Set the seed or use randomly
9
+ def seed(s=nil)
10
+ if s.nil?
11
+ if @seed.nil?
12
+ @seed = (rand * 9999).to_i
13
+ srand(@seed)
14
+ @seed
15
+ else
16
+ @seed
17
+ end
18
+ else
19
+ @seed = s
20
+ srand(@seed)
21
+ end
22
+ end
23
+
24
+ def kitty(gender=male_or_female?)
25
+ f = first_name(gender)
26
+ l = last_name
27
+ Kitty.new(:first_name => f,
28
+ :last_name => l,
29
+ :email => email_for(f,l),
30
+ :gender => gender)
31
+ end
32
+
33
+ def email(gender=nil)
34
+ f, l = kittys_name(gender)
35
+ email_for(f,l)
36
+ end
37
+
38
+ def email_for(f,l)
39
+ if l
40
+ r ["#{f.downcase}.#{l.downcase}@#{domain}",
41
+ "#{f.split('').first.downcase}.#{l.downcase}@#{domain}"]
42
+ else
43
+ r ["#{f.downcase}.#{l.downcase}@#{domain}",
44
+ "#{f.downcase}.#{l.downcase}@#{domain}",
45
+ "#{f.split('').first.downcase}.#{l.downcase}@#{domain}",
46
+ "#{f.split('').first.downcase}.#{l.downcase}@#{domain}",
47
+ "#{f.split('').first.downcase}#{l.downcase}@#{domain}"]
48
+ end
49
+ end
50
+
51
+ def kittys_name(gender=nil)
52
+ gender ||= male_or_female?
53
+ [first_name(gender), last_name]
54
+ end
55
+
56
+ def male_or_female?
57
+ rand > probability_of_male ? :female : :male
58
+ end
59
+
60
+ def first_name(gender = nil)
61
+ if gender
62
+ (gender == :male ? male_names : female_names).shuffle.first
63
+ else
64
+ names.shuffle.first
65
+ end
66
+ end
67
+
68
+ def name
69
+ r names
70
+ end
71
+
72
+ def names
73
+ @names ||= male_names + female_names
74
+ end
75
+
76
+ def female_name
77
+ r female_names
78
+ end
79
+
80
+ def female_names
81
+ @female_names ||= read_lines("female_names")
82
+ end
83
+
84
+ def male_name
85
+ r male_names
86
+ end
87
+
88
+ def male_names
89
+ @male_names ||= read_lines("male_names")
90
+ end
91
+
92
+ def last_name
93
+ r last_names
94
+ end
95
+
96
+ def last_names
97
+ @last_names ||= read_lines("last_names")
98
+ end
99
+
100
+ def domain
101
+ r domains
102
+ end
103
+
104
+ def domains
105
+ @domains ||= ["d1g1t1ze.xyz", "bigBrwonBears.net", "philozophia.xyz", "whiskerrubies.net"]
106
+ end
107
+
108
+ protected
109
+
110
+ def read_lines(file_name)
111
+ file = "../data/#{file_name}.txt"
112
+ File.read(File.expand_path(file, __FILE__)).split("\n").collect(&:capitalize)
113
+ end
114
+
115
+ def r(array)
116
+ array[rand(array.size)]
117
+ end
118
+ end
119
+
120
+ class Kitty
121
+ attr_accessor :first_name, :last_name, :email, :gender
122
+
123
+ def initialize(params)
124
+ params.each do |key, value|
125
+ send("#{key}=", value)
126
+ end
127
+ end
128
+
129
+ def male?
130
+ gender == :male
131
+ end
132
+
133
+ def female?
134
+ !male?
135
+ end
136
+ end
137
+ end
@@ -0,0 +1,6 @@
1
+ module Kittynames
2
+ VERSION = "0.0.3"
3
+ end
4
+
5
+
6
+
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kittynames
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Zola
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: shoulda
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
+ description: Cat names yo
28
+ email: m.a.solano93@gmail.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - ".gitignore"
34
+ - ".rvmrc"
35
+ - Gemfile
36
+ - Gemfile.lock
37
+ - LICENSE.txt
38
+ - README.md
39
+ - Rakefile
40
+ - kittynames.gemspec
41
+ - lib/data/female_names.txt
42
+ - lib/data/last_names.txt
43
+ - lib/data/male_names.txt
44
+ - lib/kittynames.rb
45
+ - lib/kittynames/version.rb
46
+ homepage: https://github.com/m-a-solano93/kitty-names
47
+ licenses: []
48
+ metadata: {}
49
+ post_install_message:
50
+ rdoc_options: []
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ requirements: []
64
+ rubyforge_project: kittynames
65
+ rubygems_version: 2.4.5.1
66
+ signing_key:
67
+ specification_version: 4
68
+ summary: Hola
69
+ test_files: []