random_username 0.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: 4fb76ac2ce19ca2f6e6d2699ff8bbca192f66fc6
4
+ data.tar.gz: 133bf501789d1c2cfd3160f09681397a9cfff1ff
5
+ SHA512:
6
+ metadata.gz: 77c87847da6146ce85e42d0edaafca717c154b11a385cd0a64b2202898ee651172e3bcfac1c009fe2cd66205211662e0ee9597a96cbd296d6cfb07867b270c50
7
+ data.tar.gz: dbecb6f7b155ebeb5bd4f755127b858756469bc5110836007ce877ebaa77282b8f98efc419dc1a698d4c7e7eb54c2f6efb7e3ea3e87d3adeea8500eb85c4ca2b
data/.gitignore ADDED
@@ -0,0 +1,34 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /lib/bundler/man/
26
+
27
+ # for a library or gem, you might want to ignore these files since the code is
28
+ # intended to run in multiple environments; otherwise, check them in:
29
+ Gemfile.lock
30
+ .ruby-version
31
+ .ruby-gemset
32
+
33
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
+ .rvmrc
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Poll Everywhere
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ random_username
2
+ ===============
3
+
4
+ Generate random Heroku-style names
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new do |t|
5
+ t.libs << "test"
6
+ end
7
+
8
+ task :default => :test
@@ -0,0 +1,385 @@
1
+ able
2
+ action
3
+ active
4
+ actual
5
+ adept
6
+ adored
7
+ adroit
8
+ affectionate
9
+ agile
10
+ airy
11
+ alert
12
+ alive
13
+ alter
14
+ amiable
15
+ ample
16
+ and
17
+ anima
18
+ apt
19
+ ardent
20
+ are
21
+ arrogant
22
+ astute
23
+ august
24
+ avid
25
+ awake
26
+ aware
27
+ balmy
28
+ beefy
29
+ benevolent
30
+ big
31
+ billowing
32
+ blessed
33
+ bold
34
+ boss
35
+ brainy
36
+ brave
37
+ brawny
38
+ breezy
39
+ brief
40
+ bright
41
+ brisk
42
+ busy
43
+ calm
44
+ can
45
+ canny
46
+ cared
47
+ caring
48
+ casual
49
+ celestial
50
+ charming
51
+ chic
52
+ chief
53
+ choice
54
+ chosen
55
+ chummy
56
+ civic
57
+ civil
58
+ classy
59
+ clean
60
+ clear
61
+ clever
62
+ close
63
+ cogent
64
+ combative
65
+ composed
66
+ condemned
67
+ cool
68
+ cosmic
69
+ cozy
70
+ cuddly
71
+ cute
72
+ dainty
73
+ dandy
74
+ dapper
75
+ daring
76
+ dear
77
+ decent
78
+ deep
79
+ deft
80
+ deluxe
81
+ devout
82
+ direct
83
+ divine
84
+ doted
85
+ doting
86
+ dreamy
87
+ driven
88
+ dry
89
+ earthy
90
+ easy
91
+ elated
92
+ end
93
+ energized
94
+ enigmatic
95
+ equal
96
+ exact
97
+ exotic
98
+ expert
99
+ exuberant
100
+ fair
101
+ famed
102
+ famous
103
+ fancy
104
+ fast
105
+ fiery
106
+ fine
107
+ fit
108
+ flashy
109
+ fleet
110
+ flowing
111
+ fluent
112
+ fluffy
113
+ fluttering
114
+ flying
115
+ fond
116
+ for
117
+ frank
118
+ free
119
+ fresh
120
+ frightened
121
+ full
122
+ fun
123
+ funny
124
+ fuscia
125
+ gas
126
+ genial
127
+ gentle
128
+ giddy
129
+ gifted
130
+ giving
131
+ glad
132
+ gnarly
133
+ gold
134
+ golden
135
+ good
136
+ goodly
137
+ graceful
138
+ grand
139
+ greasy
140
+ great
141
+ green
142
+ grieving
143
+ groovy
144
+ guided
145
+ gutsy
146
+ haloed
147
+ happy
148
+ hardy
149
+ harmonious
150
+ hearty
151
+ heroic
152
+ high
153
+ hip
154
+ hollow
155
+ holy
156
+ homeless
157
+ honest
158
+ huge
159
+ human
160
+ humane
161
+ humble
162
+ hunky
163
+ icy
164
+ ideal
165
+ immune
166
+ indigo
167
+ inquisitive
168
+ jazzed
169
+ jazzy
170
+ jolly
171
+ jovial
172
+ joyful
173
+ joyous
174
+ jubilant
175
+ juicy
176
+ just
177
+ keen
178
+ khaki
179
+ kind
180
+ kingly
181
+ large
182
+ lavish
183
+ lawful
184
+ left
185
+ legal
186
+ legit
187
+ light
188
+ like
189
+ liked
190
+ likely
191
+ limber
192
+ limitless
193
+ lively
194
+ lousy
195
+ loved
196
+ lovely
197
+ loyal
198
+ lucid
199
+ lucky
200
+ lush
201
+ main
202
+ major
203
+ master
204
+ mature
205
+ max
206
+ maxed
207
+ mellow
208
+ merciful
209
+ merry
210
+ mighty
211
+ mint
212
+ mirthful
213
+ modern
214
+ modest
215
+ money
216
+ moonlit
217
+ moral
218
+ moving
219
+ mucho
220
+ mutual
221
+ mysterious
222
+ native
223
+ natural
224
+ near
225
+ neat
226
+ needed
227
+ new
228
+ nice
229
+ nifty
230
+ nimble
231
+ noble
232
+ normal
233
+ noted
234
+ novel
235
+ numero
236
+ okay
237
+ open
238
+ outrageous
239
+ overt
240
+ pacific
241
+ parched
242
+ peachy
243
+ peppy
244
+ pithy
245
+ placid
246
+ pleasant
247
+ plucky
248
+ plum
249
+ poetic
250
+ poised
251
+ polite
252
+ posh
253
+ potent
254
+ pretty
255
+ prime
256
+ primo
257
+ prized
258
+ pro
259
+ prompt
260
+ proper
261
+ proud
262
+ pumped
263
+ punchy
264
+ pure
265
+ purring
266
+ quaint
267
+ quick
268
+ quiet
269
+ rad
270
+ radioactive
271
+ rapid
272
+ rare
273
+ reach
274
+ ready
275
+ real
276
+ regal
277
+ resilient
278
+ rich
279
+ right
280
+ robust
281
+ rooted
282
+ rosy
283
+ rugged
284
+ safe
285
+ sassy
286
+ saucy
287
+ savvy
288
+ scenic
289
+ screeching
290
+ secret
291
+ seemly
292
+ sensitive
293
+ serene
294
+ sharp
295
+ showy
296
+ shrewd
297
+ simple
298
+ sleek
299
+ slick
300
+ smart
301
+ smiley
302
+ smooth
303
+ snappy
304
+ snazzy
305
+ snowy
306
+ snugly
307
+ social
308
+ sole
309
+ solitary
310
+ sound
311
+ spacial
312
+ spicy
313
+ spiffy
314
+ spry
315
+ stable
316
+ star
317
+ stark
318
+ steady
319
+ stoic
320
+ strong
321
+ stunning
322
+ sturdy
323
+ suave
324
+ subtle
325
+ sunny
326
+ sunset
327
+ super
328
+ superb
329
+ sure
330
+ swank
331
+ sweet
332
+ swell
333
+ swift
334
+ talented
335
+ tasteless
336
+ teal
337
+ the
338
+ thoughtless
339
+ thriving
340
+ tidy
341
+ timely
342
+ top
343
+ tops
344
+ tough
345
+ touted
346
+ tranquil
347
+ trim
348
+ tropical
349
+ true
350
+ trusty
351
+ try
352
+ undisturbed
353
+ unique
354
+ united
355
+ unsightly
356
+ unwavering
357
+ upbeat
358
+ uplifting
359
+ urbane
360
+ usable
361
+ useful
362
+ utmost
363
+ valid
364
+ vast
365
+ vestal
366
+ viable
367
+ vital
368
+ vivid
369
+ vocal
370
+ vogue
371
+ voiceless
372
+ volant
373
+ wandering
374
+ wanted
375
+ warm
376
+ wealthy
377
+ whispering
378
+ whole
379
+ winged
380
+ wired
381
+ wise
382
+ witty
383
+ wooden
384
+ worthy
385
+ zealous
@@ -0,0 +1,186 @@
1
+ abyss
2
+ animal
3
+ apple
4
+ atoll
5
+ aurora
6
+ autumn
7
+ bacon
8
+ badlands
9
+ ball
10
+ banana
11
+ bath
12
+ beach
13
+ bear
14
+ bed
15
+ bee
16
+ bike
17
+ bird
18
+ boat
19
+ book
20
+ bowl
21
+ branch
22
+ bread
23
+ breeze
24
+ briars
25
+ brook
26
+ brush
27
+ bunny
28
+ bush
29
+ candy
30
+ canopy
31
+ canyon
32
+ car
33
+ cat
34
+ cave
35
+ cavern
36
+ cereal
37
+ chair
38
+ chasm
39
+ chip
40
+ cliff
41
+ coal
42
+ coast
43
+ cookie
44
+ cove
45
+ cow
46
+ crater
47
+ creek
48
+ darkness
49
+ dawn
50
+ desert
51
+ dew
52
+ dog
53
+ door
54
+ dove
55
+ drylands
56
+ duck
57
+ dusk
58
+ earth
59
+ fall
60
+ farm
61
+ fern
62
+ field
63
+ firefly
64
+ fish
65
+ fjord
66
+ flood
67
+ flower
68
+ flowers
69
+ fog
70
+ foliage
71
+ forest
72
+ freeze
73
+ frog
74
+ fu
75
+ galaxy
76
+ garden
77
+ geyser
78
+ gift
79
+ glass
80
+ grove
81
+ guide
82
+ guru
83
+ hat
84
+ hug
85
+ hero
86
+ hill
87
+ horse
88
+ house
89
+ hurricane
90
+ ice
91
+ iceberg
92
+ island
93
+ juice
94
+ lagoon
95
+ lake
96
+ land
97
+ lawn
98
+ leaf
99
+ leaves
100
+ light
101
+ lion
102
+ marsh
103
+ meadow
104
+ milk
105
+ mist
106
+ moon
107
+ moss
108
+ mountain
109
+ mouse
110
+ nature
111
+ oasis
112
+ ocean
113
+ pants
114
+ peak
115
+ pebble
116
+ pine
117
+ pilot
118
+ plane
119
+ planet
120
+ plant
121
+ plateau
122
+ pond
123
+ prize
124
+ rabbit
125
+ rain
126
+ range
127
+ reef
128
+ reserve
129
+ resonance
130
+ river
131
+ rock
132
+ sage
133
+ salute
134
+ sanctuary
135
+ sand
136
+ sands
137
+ shark
138
+ shelter
139
+ shirt
140
+ shoe
141
+ silence
142
+ sky
143
+ smokescreen
144
+ snowflake
145
+ socks
146
+ soil
147
+ soul
148
+ soup
149
+ sparrow
150
+ spoon
151
+ spring
152
+ star
153
+ stone
154
+ storm
155
+ stream
156
+ summer
157
+ summit
158
+ sun
159
+ sunrise
160
+ sunset
161
+ sunshine
162
+ surf
163
+ swamp
164
+ table
165
+ teacher
166
+ temple
167
+ thorns
168
+ tiger
169
+ tigers
170
+ towel
171
+ train
172
+ tree
173
+ truck
174
+ tsunami
175
+ tundra
176
+ valley
177
+ volcano
178
+ water
179
+ waterfall
180
+ waves
181
+ wild
182
+ willow
183
+ window
184
+ winds
185
+ winter
186
+ zebra
@@ -0,0 +1,3 @@
1
+ module RandomUsername
2
+ VERSION = "0.1"
3
+ end
@@ -0,0 +1,22 @@
1
+ require "random_username/version"
2
+
3
+ module RandomUsername
4
+ def self.adjective(options = {})
5
+ get_item("adjectives", options)
6
+ end
7
+
8
+ def self.noun(options = {})
9
+ get_item("nouns", options)
10
+ end
11
+
12
+ def self.get_item(filename, options = {})
13
+ items = items_from_file(filename)
14
+ items.select!{ |item| item.length <= options[:max_length] } if options[:max_length]
15
+ items.sample
16
+ end
17
+
18
+ def self.items_from_file(filename)
19
+ filepath = File.expand_path("../random_username/#{filename}.txt", __FILE__)
20
+ File.read(filepath).split("\n")
21
+ end
22
+ end
@@ -0,0 +1,18 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/random_username/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = "random_username"
6
+ gem.version = RandomUsername::VERSION
7
+ gem.license = "MIT"
8
+ gem.authors = ["Michael Foley"]
9
+ gem.email = ["mike@polleverywhere.com"]
10
+ gem.description = %q{Generate random Heroku-style names}
11
+ gem.summary = %q{Generate random Heroku-style names}
12
+ gem.homepage = "https://github.com/polleverywhere/random_username"
13
+
14
+ gem.files = `git ls-files`.split("\n")
15
+ gem.executables = []
16
+ gem.test_files = `git ls-files -- test/*`.split("\n")
17
+ gem.require_paths = ["lib"]
18
+ end
@@ -0,0 +1,30 @@
1
+ require "minitest/autorun"
2
+ require "random_username"
3
+
4
+ class TestRandomUsername < Minitest::Test
5
+ def test_adjective
6
+ refute_empty RandomUsername.adjective
7
+ end
8
+
9
+ def test_adjective_max_length
10
+ adjective = RandomUsername.adjective(:max_length => 4)
11
+ assert adjective.length <= 4
12
+ end
13
+
14
+ def test_adjective_invalid_max_length
15
+ assert_nil RandomUsername.adjective(:max_length => 1)
16
+ end
17
+
18
+ def test_noun
19
+ refute_empty RandomUsername.noun
20
+ end
21
+
22
+ def test_noun_max_length
23
+ noun = RandomUsername.noun(:max_length => 4)
24
+ assert noun.length <= 4
25
+ end
26
+
27
+ def test_noun_invalid_max_length
28
+ assert_nil RandomUsername.noun(:max_length => 1)
29
+ end
30
+ end
metadata ADDED
@@ -0,0 +1,56 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: random_username
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ platform: ruby
6
+ authors:
7
+ - Michael Foley
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-09-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Generate random Heroku-style names
14
+ email:
15
+ - mike@polleverywhere.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - .gitignore
21
+ - LICENSE
22
+ - README.md
23
+ - Rakefile
24
+ - lib/random_username.rb
25
+ - lib/random_username/adjectives.txt
26
+ - lib/random_username/nouns.txt
27
+ - lib/random_username/version.rb
28
+ - random_username.gemspec
29
+ - test/test_random_username.rb
30
+ homepage: https://github.com/polleverywhere/random_username
31
+ licenses:
32
+ - MIT
33
+ metadata: {}
34
+ post_install_message:
35
+ rdoc_options: []
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ requirements: []
49
+ rubyforge_project:
50
+ rubygems_version: 2.3.0
51
+ signing_key:
52
+ specification_version: 4
53
+ summary: Generate random Heroku-style names
54
+ test_files:
55
+ - test/test_random_username.rb
56
+ has_rdoc: