usernamegen 0.1.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8819bc20fd330b8b13ab13b074e19c2bcbf123b9
4
+ data.tar.gz: 3d2bd3c4b9d4a01427b3fed20694af4f5aa7b6ad
5
+ SHA512:
6
+ metadata.gz: 6f11be8975d756033be0935ade9ab2be998fcfcf930852eec9efa27ef4194d8dc3e4ea525f30812fec6601e2703677ca4c2bb9560672b147d73d1eda8d66b258
7
+ data.tar.gz: 240e75393c0e4cdcc77762b0ecceac7022ec444ac5be8c9a943894873050ece1c503554f6f0f597f811563adee3a1649a61ef1500cee0d2034e400610a28934c
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in dle.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Sven Pachnit
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/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # Usernamegen - a not so serious name generator
2
+
3
+ We thought our users should be able to comment even when they haven't choose a username yet.
4
+ To make it easier to follow conversations we didn't want to show "anonymous" or some boring incrementing name á la "guest 1234".
5
+
6
+ This gem uses two lists (descriptive words and nouns) and multiplies them with each and another resulting in a list of mostly meaningful and often silly name combinations.
7
+
8
+ **The current list generates about 50k unique usernames**. Please help increasing the size by providing more words.
9
+
10
+ ## Example names
11
+
12
+ * Delicate Puppy
13
+ * Mysterious Wheatley
14
+ * Tough Goldfish
15
+ * Chemical Rabbit
16
+ * [surprise me](https://de.gamesplanet.com/namegen)
17
+
18
+ ## Installation
19
+
20
+ Simple as:
21
+
22
+ $ gem install usernamegen
23
+
24
+ Or list in your Gemfile
25
+
26
+ gem 'usernamegen'
27
+
28
+ ## Usage
29
+
30
+ You can use the generator class like so:
31
+
32
+ # load files and assembles list each time (not that efficient)
33
+ Usernamegen.all
34
+
35
+ # same as #all but returns random entry
36
+ Usernamegen.one
37
+
38
+
39
+ You can find an example ActiveRecord model + rake import tasks in the following gist.
40
+
41
+ * [» ActiveRecord model example and rake import task](https://gist.github.com/2called-chaos/46705324d913e4f9cc6b)
42
+
43
+ ## Contributing
44
+
45
+ 1. Fork it ( http://github.com/2called-chaos/usernamegen/fork )
46
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
47
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
48
+ 4. Push to the branch (`git push origin my-new-feature`)
49
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,52 @@
1
+ require "usernamegen/version"
2
+ require "securerandom"
3
+
4
+ class Usernamegen
5
+ ROOT = File.expand_path("../..", __FILE__)
6
+
7
+ def self.one opts = {}
8
+ new(opts).one
9
+ end
10
+
11
+ def self.all opts = {}
12
+ new(opts).all
13
+ end
14
+
15
+ def self.all_for_thing thing, opts = {}
16
+ new(opts).all_for_thing(thing)
17
+ end
18
+
19
+ def self.all_for_desc desc, opts = {}
20
+ new(opts).all_for_desc(desc)
21
+ end
22
+
23
+ def initialize opts = {}
24
+ @opts = opts.reverse_merge({
25
+ descriptions: "#{ROOT}/lib/usernamegen/descriptions.txt",
26
+ things: "#{ROOT}/lib/usernamegen/things.txt",
27
+ rng: ::SecureRandom.urlsafe_base64(128),
28
+ })
29
+ @descriptions = load_file @opts[:descriptions]
30
+ @things = load_file @opts[:things]
31
+ end
32
+
33
+ def load_file file
34
+ File.read(file).split("\n").lazy.map(&:strip).reject(&:blank?).to_a.sort
35
+ end
36
+
37
+ def one
38
+ [@descriptions.sample(1, rng: @opts[:rng]), @things.sample(1, rng: @opts[:rng])].join(" ").titleize
39
+ end
40
+
41
+ def all
42
+ @descriptions.product(@things).map{|combination| combination.join(" ").titleize }
43
+ end
44
+
45
+ def all_for_thing thing
46
+ @descriptions.product([thing]).map{|combination| combination.join(" ").titleize }
47
+ end
48
+
49
+ def all_for_desc desc
50
+ [desc].product(@things).map{|combination| combination.join(" ").titleize }
51
+ end
52
+ end
@@ -0,0 +1,440 @@
1
+ abandoned
2
+ abashed
3
+ absolute
4
+ accommodating
5
+ acid
6
+ acoustic
7
+ adaxial
8
+ admissible
9
+ adopted
10
+ adroit
11
+ adulatory
12
+ affable
13
+ affectionate
14
+ affluent
15
+ afraid
16
+ agent
17
+ aggressive
18
+ aghast
19
+ agog
20
+ agricultural
21
+ almighty
22
+ amaranth
23
+ amber
24
+ ambiguous
25
+ ambitious
26
+ amethyst
27
+ amiable
28
+ amicable
29
+ amusing
30
+ ancient
31
+ angry
32
+ annoyed
33
+ antiinflammatory
34
+ antsy
35
+ anxious
36
+ appropriate
37
+ apricot
38
+ aquamarine
39
+ arbitrary
40
+ arboreal
41
+ arctic
42
+ ascetic
43
+ aseismic
44
+ astir
45
+ astute
46
+ atmospheric
47
+ attentive
48
+ attractive
49
+ authoritative
50
+ autocratic
51
+ automatic
52
+ avid
53
+ awake
54
+ awesome
55
+ awful
56
+ azure
57
+ baby blue
58
+ bad
59
+ bald
60
+ barbarous
61
+ bare
62
+ barefoot
63
+ basal
64
+ beautiful
65
+ beholden
66
+ beige
67
+ believable
68
+ belligerent
69
+ benevolent
70
+ best
71
+ big
72
+ bitter
73
+ black
74
+ blind
75
+ blissful
76
+ blistering
77
+ blithe
78
+ blue
79
+ blue-green
80
+ blue-violet
81
+ blush
82
+ boiling
83
+ boisterous
84
+ bored
85
+ brave
86
+ brawny
87
+ brazen
88
+ brilliant
89
+ bronze
90
+ brown
91
+ bucolic
92
+ bulky
93
+ bulletproof
94
+ burgundy
95
+ buried
96
+ byzantium
97
+ callow
98
+ calm
99
+ candid
100
+ canonical
101
+ captain
102
+ cardiogenic
103
+ carefree
104
+ careful
105
+ careless
106
+ caring
107
+ cariogenic
108
+ carmine
109
+ casual
110
+ caustic
111
+ cautious
112
+ cavernous
113
+ cerise
114
+ certain
115
+ cerulean
116
+ challenging
117
+ champagne
118
+ charming
119
+ chartreuse green
120
+ chary
121
+ cheeky
122
+ cheerful
123
+ chemical
124
+ childish
125
+ chilling
126
+ chilly
127
+ chippy
128
+ chirpy
129
+ chocolate
130
+ circumspectly
131
+ civil
132
+ civilized
133
+ clean
134
+ clumsy
135
+ cobalt blue
136
+ coffee
137
+ coherent
138
+ cold
139
+ compassionate
140
+ content
141
+ contrary
142
+ copper
143
+ coral
144
+ courageous
145
+ cowardly
146
+ crawling
147
+ crazy
148
+ creative
149
+ creepy
150
+ crimson
151
+ crispy
152
+ cruel
153
+ curious
154
+ cute
155
+ cyan
156
+ dangerous
157
+ dawdling
158
+ decent
159
+ decrepit
160
+ delicate
161
+ delighted
162
+ delinquent
163
+ demanding
164
+ desert sand
165
+ desperate
166
+ difficult
167
+ diligent
168
+ diminutive
169
+ dramatic
170
+ dreadful
171
+ dynamite
172
+ eager
173
+ easy
174
+ ecstatic
175
+ effortless
176
+ electric blue
177
+ emerald
178
+ enchanting
179
+ endless
180
+ enormous
181
+ entertaining
182
+ erin
183
+ eternal
184
+ evil
185
+ excellent
186
+ excited
187
+ experienced
188
+ exploding
189
+ exquisite
190
+ fabulous
191
+ fair
192
+ faithful
193
+ famous
194
+ fantastic
195
+ fast
196
+ fetid
197
+ filthy
198
+ fluttering
199
+ foul
200
+ frank
201
+ freezing
202
+ friendly
203
+ frosty
204
+ funky
205
+ funny
206
+ furious
207
+ generous
208
+ gentle
209
+ ghastly
210
+ gigantic
211
+ gilded
212
+ glad
213
+ glowing
214
+ gold
215
+ good
216
+ gorgeous
217
+ grateful
218
+ grave
219
+ gray
220
+ great
221
+ greedy
222
+ green
223
+ grimy
224
+ gullible
225
+ happy
226
+ hard
227
+ hardworking
228
+ harlequin
229
+ hasty
230
+ heavy
231
+ helpful
232
+ hideous
233
+ honest
234
+ hopeful
235
+ horrid
236
+ hot
237
+ huge
238
+ hulking
239
+ hungry
240
+ icy
241
+ immense
242
+ impatient
243
+ important
244
+ impressive
245
+ impudent
246
+ indifferent
247
+ indigo
248
+ infamous
249
+ intelligent
250
+ intense
251
+ intimidating
252
+ itty-bitty
253
+ ivory
254
+ jade
255
+ jealous
256
+ joyful
257
+ jungle green
258
+ kind
259
+ laconic
260
+ lavender
261
+ lazy
262
+ legendary
263
+ lemon
264
+ lilac
265
+ lime
266
+ lonely
267
+ lousy
268
+ lovely
269
+ loving
270
+ lucky
271
+ mad
272
+ magenta
273
+ magenta rose
274
+ maroon
275
+ marvelous
276
+ massive
277
+ mauve
278
+ mean
279
+ meandering
280
+ menacing
281
+ merry
282
+ miniscule
283
+ minute
284
+ miserable
285
+ moderate
286
+ modest
287
+ monstrous
288
+ muffled
289
+ muggy
290
+ mysterious
291
+ nasty
292
+ navy blue
293
+ nervous
294
+ nice
295
+ objective
296
+ obnoxious
297
+ ocher
298
+ odd
299
+ olive
300
+ oppressive
301
+ orange
302
+ orange-red
303
+ orchid
304
+ ornery
305
+ peach
306
+ pear
307
+ periwinkle
308
+ persian blue
309
+ petite
310
+ picturesque
311
+ pink
312
+ plain
313
+ plum
314
+ polite
315
+ powerful
316
+ pretty
317
+ profound
318
+ prudent
319
+ prussian blue
320
+ puce
321
+ punctual
322
+ puny
323
+ pure
324
+ purple
325
+ quick
326
+ quiet
327
+ rambunctious
328
+ rancid
329
+ rapid
330
+ raspberry
331
+ red
332
+ red-violet
333
+ relaxed
334
+ reliable
335
+ repulsive
336
+ resolute
337
+ respectable
338
+ revolting
339
+ ridiculous
340
+ romantic
341
+ rose
342
+ rotten
343
+ ruby
344
+ rude
345
+ rusty
346
+ sad
347
+ salmon
348
+ sangria
349
+ sapphire
350
+ scarlet
351
+ scary
352
+ scorching
353
+ scrumptious
354
+ selfish
355
+ serious
356
+ severe
357
+ sexy
358
+ shallow
359
+ shattering
360
+ shining
361
+ shocking
362
+ shy
363
+ significant
364
+ silent
365
+ silly
366
+ silver
367
+ simple
368
+ sizzling
369
+ slate gray
370
+ slick
371
+ slight
372
+ slimy
373
+ sloppy
374
+ slow
375
+ sluggish
376
+ small
377
+ smelly
378
+ soaring
379
+ soft
380
+ sparkling
381
+ speedy
382
+ spiky
383
+ splendid
384
+ spoiled
385
+ spring bud
386
+ spring green
387
+ steaming
388
+ stifling
389
+ strange
390
+ striking
391
+ stubborn
392
+ stunning
393
+ subtle
394
+ successful
395
+ suicide
396
+ sultry
397
+ superb
398
+ superficial
399
+ surprised
400
+ sweet
401
+ sweltering
402
+ swift
403
+ sympathetic
404
+ tall
405
+ tan
406
+ tasty
407
+ taupe
408
+ teal
409
+ terrible
410
+ thankful
411
+ thrifty
412
+ tiny
413
+ tired
414
+ tough
415
+ towering
416
+ tranquil
417
+ tremendous
418
+ trying
419
+ turquoise
420
+ ugly
421
+ unfair
422
+ ungrateful
423
+ unhappy
424
+ unusual
425
+ vast
426
+ verbose
427
+ vile
428
+ violent
429
+ violet
430
+ viridian
431
+ weak
432
+ white
433
+ whopping
434
+ wicked
435
+ wild
436
+ wise
437
+ yankees blue
438
+ yellow
439
+ youthful
440
+ zippy
@@ -0,0 +1,133 @@
1
+ alligator
2
+ android
3
+ ant
4
+ antelope
5
+ ape
6
+ arbiter
7
+ avatar
8
+ banana
9
+ bat
10
+ bear
11
+ beaver
12
+ bee
13
+ bird
14
+ bison
15
+ bowser
16
+ bread
17
+ bug
18
+ bunny
19
+ butterfly
20
+ camel
21
+ canary
22
+ cat
23
+ caterpillar
24
+ chicken
25
+ chipmunk
26
+ cinnamon
27
+ cow
28
+ coyote
29
+ crab
30
+ crocodile
31
+ deer
32
+ dinosaur
33
+ doctor
34
+ dog
35
+ dolphin
36
+ donkey
37
+ dove
38
+ dragon
39
+ dragonfly
40
+ duck
41
+ dude
42
+ eagle
43
+ elephant
44
+ fairy
45
+ feather
46
+ frog
47
+ gerenuk
48
+ ghost
49
+ giraffe
50
+ goat
51
+ goldfish
52
+ goose
53
+ gorilla
54
+ hamster
55
+ hedgehog
56
+ hippopotamus
57
+ hornet
58
+ horse
59
+ jellyfish
60
+ kangaroo
61
+ king
62
+ kitten
63
+ knight
64
+ ladybug
65
+ lamb
66
+ lightning
67
+ lion
68
+ lizard
69
+ lobster
70
+ marmalade
71
+ mate
72
+ mole
73
+ monkey
74
+ mosquito
75
+ moth
76
+ mouse
77
+ ocelot
78
+ octopus
79
+ ostrich
80
+ owl
81
+ panda
82
+ parrot
83
+ peacock
84
+ penguin
85
+ phoenix
86
+ pig
87
+ pigeon
88
+ planet
89
+ popcorn
90
+ prince
91
+ princess
92
+ puppy
93
+ quail
94
+ queen
95
+ rabbit
96
+ raccoon
97
+ reindeer
98
+ reptile
99
+ rhinoceros
100
+ rooster
101
+ scallop
102
+ scorpion
103
+ seacat
104
+ seal
105
+ shadow
106
+ shark
107
+ sheep
108
+ shrimp
109
+ smoke
110
+ snail
111
+ snake
112
+ sphynx
113
+ spider
114
+ squid
115
+ squirrel
116
+ starfish
117
+ starkiller
118
+ suicide
119
+ tiger
120
+ toad
121
+ toaster
122
+ turtle
123
+ unicorn
124
+ walrus
125
+ wart
126
+ wasp
127
+ weasel
128
+ whale
129
+ wheatley
130
+ wolf
131
+ woodpecker
132
+ worm
133
+ zebra
@@ -0,0 +1,3 @@
1
+ class Usernamegen
2
+ VERSION = "0.1.1"
3
+ 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 'usernamegen/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "usernamegen"
8
+ spec.version = Usernamegen::VERSION
9
+ spec.authors = ["Sven Pachnit"]
10
+ spec.email = ["sven@bmonkeys.net"]
11
+ spec.summary = %q{Usernamegen - a not so serious name generator}
12
+ spec.description = %q{This gem uses two lists (descriptive words and nouns) and multiplies them with each and another resulting in a list of mostly meaningful and often silly name combinations.}
13
+ spec.homepage = "https://github.com/2called-chaos/usernamegen"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
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.5"
22
+ spec.add_development_dependency "rake"
23
+ end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: usernamegen
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Sven Pachnit
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-14 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.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
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: This gem uses two lists (descriptive words and nouns) and multiplies
42
+ them with each and another resulting in a list of mostly meaningful and often silly
43
+ name combinations.
44
+ email:
45
+ - sven@bmonkeys.net
46
+ executables: []
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - .gitignore
51
+ - Gemfile
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - lib/usernamegen.rb
56
+ - lib/usernamegen/descriptions.txt
57
+ - lib/usernamegen/things.txt
58
+ - lib/usernamegen/version.rb
59
+ - usernamegen.gemspec
60
+ homepage: https://github.com/2called-chaos/usernamegen
61
+ licenses:
62
+ - MIT
63
+ metadata: {}
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - '>='
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubyforge_project:
80
+ rubygems_version: 2.0.14
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: Usernamegen - a not so serious name generator
84
+ test_files: []