md5_to_random_name 0.1.0
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 +7 -0
- data/.rspec +3 -0
- data/.standard.yml +3 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +87 -0
- data/Rakefile +10 -0
- data/lib/md5_to_random_name/version.rb +5 -0
- data/lib/md5_to_random_name.rb +56 -0
- data/lib/word_lists.rb +246 -0
- data/sig/md5_to_random_name.rbs +30 -0
- data/sig/word_lists.rbs +8 -0
- metadata +54 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cb8942ce57152f06a6342dda73c6f7ce38b4bdba94c290fc081059f91d2e7b81
|
4
|
+
data.tar.gz: 8cf658730f2ccaab6ee6a101651813231fb7db2dbc189ebded9704661c606c1b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 57efd2fe5f4cf2abc3a3cee845c016cb49389ea9a1a91249149c43d40601fe4a4ce003520b208a9b8f4a9d38d035d1a25e5db9e3402d67312ad7907c9d34f541
|
7
|
+
data.tar.gz: 6803ba6374844c6ef76a668a26e338ecbc9a58348f97da381c08e5c507ecc4dabdb3ac07559cf1f6cf7c1e4c182c066f85ab5716249d9ef1699d702023a5e5a3
|
data/.rspec
ADDED
data/.standard.yml
ADDED
data/CHANGELOG.md
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2025 William Tio
|
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,87 @@
|
|
1
|
+
# Md5ToRandomName
|
2
|
+
|
3
|
+
Convert MD5 hashes to human-readable names in the format of `adjective-animal-suffix`.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'md5_to_random_name'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
```bash
|
16
|
+
bundle install
|
17
|
+
```
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
```bash
|
22
|
+
gem install md5_to_random_name
|
23
|
+
```
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
### Basic Usage
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
require 'md5_to_random_name'
|
31
|
+
require 'digest/md5'
|
32
|
+
|
33
|
+
# Generate a name from an MD5 hash
|
34
|
+
md5 = Digest::MD5.hexdigest("hello world")
|
35
|
+
name = Md5ToRandomName.generate(md5)
|
36
|
+
puts name
|
37
|
+
# => "amazing-dolphin-5a0f00"
|
38
|
+
```
|
39
|
+
|
40
|
+
### Using the Generator Class
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
require 'md5_to_random_name'
|
44
|
+
|
45
|
+
generator = Md5ToRandomName::Generator.new
|
46
|
+
md5 = Digest::MD5.hexdigest("hello world")
|
47
|
+
name = generator.generate(md5)
|
48
|
+
```
|
49
|
+
|
50
|
+
### Custom Word Lists
|
51
|
+
|
52
|
+
You can provide your own adjectives and animals:
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
# Custom word lists
|
56
|
+
custom_adjectives = ["red", "blue", "green"]
|
57
|
+
custom_animals = ["cat", "dog", "fish"]
|
58
|
+
|
59
|
+
# Using the module method
|
60
|
+
name = Md5ToRandomName.generate(md5, custom_adjectives, custom_animals)
|
61
|
+
|
62
|
+
# Or using the Generator class
|
63
|
+
generator = Md5ToRandomName::Generator.new(custom_adjectives, custom_animals)
|
64
|
+
name = generator.generate(md5)
|
65
|
+
```
|
66
|
+
|
67
|
+
## Features
|
68
|
+
|
69
|
+
- Converts any valid MD5 hash to a human-readable name
|
70
|
+
- Generates consistent names for the same hash
|
71
|
+
- Uses the format: `adjective-animal-suffix`
|
72
|
+
- The suffix is the last 6 characters of the MD5 hash
|
73
|
+
- Customizable word lists
|
74
|
+
|
75
|
+
## Development
|
76
|
+
|
77
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
78
|
+
|
79
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
80
|
+
|
81
|
+
## Contributing
|
82
|
+
|
83
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/WToa/md5_to_random_name.
|
84
|
+
|
85
|
+
## License
|
86
|
+
|
87
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "md5_to_random_name/version"
|
4
|
+
require_relative "word_lists"
|
5
|
+
|
6
|
+
module Md5ToRandomName
|
7
|
+
class Error < StandardError; end
|
8
|
+
class InvalidMd5Hash < Error; end
|
9
|
+
|
10
|
+
class Generator
|
11
|
+
def initialize(adjectives = WordLists::ADJECTIVES, animals = WordLists::ANIMALS)
|
12
|
+
@adjectives = adjectives
|
13
|
+
@animals = animals
|
14
|
+
end
|
15
|
+
|
16
|
+
def generate(md5)
|
17
|
+
validate_md5!(md5)
|
18
|
+
|
19
|
+
adjective = select_adjective(md5)
|
20
|
+
animal = select_animal(md5)
|
21
|
+
hash_suffix = extract_suffix(md5)
|
22
|
+
|
23
|
+
format_name(adjective, animal, hash_suffix)
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def validate_md5!(md5)
|
29
|
+
unless md5.is_a?(String) && md5.match?(/\A[a-f0-9]{32}\z/i)
|
30
|
+
raise InvalidMd5Hash, "Invalid MD5 hash: #{md5.inspect}"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def select_adjective(md5)
|
35
|
+
index = md5[0...8].to_i(16) % @adjectives.size
|
36
|
+
@adjectives[index]
|
37
|
+
end
|
38
|
+
|
39
|
+
def select_animal(md5)
|
40
|
+
index = md5[8...16].to_i(16) % @animals.size
|
41
|
+
@animals[index]
|
42
|
+
end
|
43
|
+
|
44
|
+
def extract_suffix(md5)
|
45
|
+
md5[-6..-1]
|
46
|
+
end
|
47
|
+
|
48
|
+
def format_name(adjective, animal, suffix)
|
49
|
+
"#{adjective}-#{animal}-#{suffix}"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.generate(md5, adjectives = WordLists::ADJECTIVES, animals = WordLists::ANIMALS)
|
54
|
+
Generator.new(adjectives, animals).generate(md5)
|
55
|
+
end
|
56
|
+
end
|
data/lib/word_lists.rb
ADDED
@@ -0,0 +1,246 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Md5ToRandomName
|
4
|
+
module WordLists
|
5
|
+
ANIMALS = %w[
|
6
|
+
abyssinian
|
7
|
+
albatross
|
8
|
+
alligator
|
9
|
+
angelfish
|
10
|
+
ant
|
11
|
+
anteater
|
12
|
+
antelope
|
13
|
+
armadillo
|
14
|
+
baboon
|
15
|
+
badger
|
16
|
+
bandicoot
|
17
|
+
bat
|
18
|
+
beagle
|
19
|
+
bear
|
20
|
+
beaver
|
21
|
+
bee
|
22
|
+
beetle
|
23
|
+
bird
|
24
|
+
bison
|
25
|
+
boar
|
26
|
+
bobcat
|
27
|
+
bombay
|
28
|
+
bongo
|
29
|
+
bonobo
|
30
|
+
booby
|
31
|
+
buffalo
|
32
|
+
bulldog
|
33
|
+
bullfrog
|
34
|
+
butterfly
|
35
|
+
camel
|
36
|
+
capybara
|
37
|
+
cat
|
38
|
+
caterpillar
|
39
|
+
catfish
|
40
|
+
centipede
|
41
|
+
chameleon
|
42
|
+
cheetah
|
43
|
+
chicken
|
44
|
+
chihuahua
|
45
|
+
chimpanzee
|
46
|
+
chinchilla
|
47
|
+
chipmunk
|
48
|
+
civet
|
49
|
+
cockroach
|
50
|
+
cougar
|
51
|
+
cow
|
52
|
+
coyote
|
53
|
+
crab
|
54
|
+
crane
|
55
|
+
cuttlefish
|
56
|
+
deer
|
57
|
+
dingo
|
58
|
+
dodo
|
59
|
+
dog
|
60
|
+
dolphin
|
61
|
+
donkey
|
62
|
+
dragon
|
63
|
+
dragonfly
|
64
|
+
drever
|
65
|
+
duck
|
66
|
+
eagle
|
67
|
+
earwig
|
68
|
+
eel
|
69
|
+
elephant
|
70
|
+
emu
|
71
|
+
falcon
|
72
|
+
ferret
|
73
|
+
fish
|
74
|
+
flamingo
|
75
|
+
flounder
|
76
|
+
fox
|
77
|
+
frog
|
78
|
+
gecko
|
79
|
+
gerbil
|
80
|
+
gibbon
|
81
|
+
giraffe
|
82
|
+
goat
|
83
|
+
goose
|
84
|
+
gopher
|
85
|
+
gorilla
|
86
|
+
grasshopper
|
87
|
+
grey seal
|
88
|
+
greyhound
|
89
|
+
grizzly bear
|
90
|
+
grouse
|
91
|
+
guinea fowl
|
92
|
+
guppy
|
93
|
+
hamster
|
94
|
+
harrier
|
95
|
+
hedgehog
|
96
|
+
heron
|
97
|
+
hippopotamus
|
98
|
+
horse
|
99
|
+
hound
|
100
|
+
howler monkey
|
101
|
+
hummingbird
|
102
|
+
hyena
|
103
|
+
i
|
104
|
+
ibis
|
105
|
+
iguana
|
106
|
+
jackal
|
107
|
+
jaguar
|
108
|
+
jellyfish
|
109
|
+
kangaroo
|
110
|
+
king crab
|
111
|
+
kingfisher
|
112
|
+
kiwi
|
113
|
+
koala
|
114
|
+
lemming
|
115
|
+
lemur
|
116
|
+
leopard
|
117
|
+
lion
|
118
|
+
lionfish
|
119
|
+
lizard
|
120
|
+
llama
|
121
|
+
lobster
|
122
|
+
lynx
|
123
|
+
m
|
124
|
+
macaque
|
125
|
+
macaw
|
126
|
+
mammoth
|
127
|
+
manatee
|
128
|
+
mandrill
|
129
|
+
markhor
|
130
|
+
marmoset
|
131
|
+
meerkat
|
132
|
+
millipede
|
133
|
+
mole
|
134
|
+
mongoose
|
135
|
+
mongrel
|
136
|
+
monkey
|
137
|
+
moose
|
138
|
+
moth
|
139
|
+
mouse
|
140
|
+
mule
|
141
|
+
newt
|
142
|
+
nightingale
|
143
|
+
ocelot
|
144
|
+
octopus
|
145
|
+
opossum
|
146
|
+
orangutan
|
147
|
+
oriole
|
148
|
+
ostrich
|
149
|
+
otter
|
150
|
+
owl
|
151
|
+
oyster
|
152
|
+
panther
|
153
|
+
parrot
|
154
|
+
peacock
|
155
|
+
pelican
|
156
|
+
penguin
|
157
|
+
pheasant
|
158
|
+
pig
|
159
|
+
pike
|
160
|
+
piranha
|
161
|
+
platypus
|
162
|
+
porcupine
|
163
|
+
possum
|
164
|
+
prawn
|
165
|
+
puffin
|
166
|
+
puma
|
167
|
+
quail
|
168
|
+
rabbit
|
169
|
+
raccoon
|
170
|
+
rat
|
171
|
+
rattlesnake
|
172
|
+
reindeer
|
173
|
+
rhinoceros
|
174
|
+
robin
|
175
|
+
salamander
|
176
|
+
scorpion
|
177
|
+
seahorse
|
178
|
+
seal
|
179
|
+
shark
|
180
|
+
sheep
|
181
|
+
shrimp
|
182
|
+
skunk
|
183
|
+
sloth
|
184
|
+
snail
|
185
|
+
snake
|
186
|
+
sparrow
|
187
|
+
sponge
|
188
|
+
squid
|
189
|
+
squirrel
|
190
|
+
stingray
|
191
|
+
stoat
|
192
|
+
swan
|
193
|
+
tamarin
|
194
|
+
tapir
|
195
|
+
tarantula
|
196
|
+
termite
|
197
|
+
tiger
|
198
|
+
toad
|
199
|
+
tortoise
|
200
|
+
toucan
|
201
|
+
turkey
|
202
|
+
turtle
|
203
|
+
vole
|
204
|
+
vulture
|
205
|
+
wallaby
|
206
|
+
walrus
|
207
|
+
warthog
|
208
|
+
wasp
|
209
|
+
weasel
|
210
|
+
whale
|
211
|
+
wildebeest
|
212
|
+
wolf
|
213
|
+
wolfhound
|
214
|
+
wolverine
|
215
|
+
wombat
|
216
|
+
woodpecker
|
217
|
+
yak
|
218
|
+
zebra
|
219
|
+
].freeze
|
220
|
+
|
221
|
+
ADJECTIVES = %w[
|
222
|
+
abandoned abashed aberrant abhorrent abiding ablaze able abnormal aboard abortive abounding abrasive abrupt absent absorbed absorbing abstracted absurd abundant abusive acceptable accessible accidental acclaimed accomplished accurate acid acidic acoustic acrid action active actual adept adhesive admirable admired adorable advanced adventurous affectionate afraid aged aggravating aggressive agile agitated agonizing agreeable ajar alarmed alarming alert alienated alive all allergic allowable aloof amazing ambitious ample amused amusing ancient angelic angry animated annual another antique anxious appalling appetizing apprehensive aquatic aromatic arrogant artistic ashamed aspiring assorted astonishing athletic attached attentive attractive audacious austere authentic authorized automatic available average aware awesome awful awkward
|
223
|
+
babyish back bad baggy bald balmy bandaged barbaric barren bashful basic battered beautiful beefy befitting belated beloved beneficial benign best better bewitched big billowy biodegradable bitter bizarre bland blazing blessed blithe bloated bloody blue blunt blurry blushing bogus boiling bold bony boorish bored boring boundless brainy brash brave brawny breakable breezy brief bright brilliant brisk broken bronze brown bruised bubbly bulky bumpy buoyant burdensome burly bustling busy buttery buzzing
|
224
|
+
cagey calculating callous calm candid canine capable capital capricious careful careless caring cautious cavernous celebrated celestial charming cheap cheerful cheery chief childlike chilly chivalrous choice chubby chunky circular civic civilized clammy classy clean clear clever close cloudy clumsy cluttered coarse cold colossal comfortable common compassionate competent complete complex complicated composed concerned concrete condemned confident confused conscious considerate constant content conventional cooked cool cooperative coordinated corny costly courageous courteous crafty cranky craven crazy creamy creative creepy crooked crowded cruel cuddly cultured cumbersome curious curly curved curvy cut cute cynical
|
225
|
+
daffy daily damaged damaging damp dangerous dapper daring dark dashing dazzling dead deadpan deafening dear debonair decisive decorous deep defeated defective defiant delicate delicious delightful demonic deranged deserted detailed determined devout diligent direful dirty disagreeable disastrous discreet disguised disgusting disillusioned dispensable distant distant distraught distressed disturbed divergent dizzy domineering doubtful drab draconian dramatic dreary drowsy drunk dry dull dusty dynamic dysfunctional
|
226
|
+
eager early earnest earsplitting earthy easy eatable economic educated efficacious efficient eight elastic elated elderly electric elegant elfin elite embarrassed eminent empty enchanted enchanting encouraging endurable energetic enormous entertaining enthusiastic envious equable equal erect erratic essential esteemed ethereal ethical euphoric evanescent evasive even evergreen everlasting excellent excited exciting exclusive exotic expensive experienced expert extensive extra-large extra-small exuberant exultant
|
227
|
+
fabulous faded faint fair faithful fallacious false familiar famous fanatical fancy fantastic far fascinated fast fat faulty fearful fearless feeble feigned fertile festive few fierce filthy fine finicky first fit five fixed flagrant flaky flashy flat flawless flimsy flippant flowery fluffy fluttering foamy foolish foregoing forgetful forgotten formal forsaken forthright fortunate four fragile frail frank frantic free freezing frequent fresh fretful friendly frightened frightening full fumbling functional funny furry furtive future futuristic fuzzy
|
228
|
+
gabby gainful gamy gaping garrulous gaudy general gentle genuine giant giddy gifted gigantic glamorous gleaming glib glistening glorious glossy godly good goofy gorgeous graceful gracious grandiose grateful gratis gray greasy great greedy green gregarious grieving groovy grotesque grouchy grubby gruesome grumpy guarded guiltless gullible gusty guttural
|
229
|
+
habitual half hallowed handsome handsomely hapless happy hard harmonious harsh hateful heady healthy heartbreaking heavenly heavy hellish helpful helpless hesitant hideous high highfalutin hilarious hissing historical holistic hollow homeless homely honorable horrible hospitable hot huge hulking humdrum humorous hungry hurried hurt hushed husky hypnotic hysterical
|
230
|
+
icky icy ideal idiotic ignorant ill illegal illustrious immaculate immense imminent impartial imperfect impolite important imported impossible incandescent incompetent inconclusive industrious incredible inexpensive infamous innate innocent inquisitive insidious instinctive intelligent interesting internal invincible irate irritating itchy
|
231
|
+
jaded jagged jazzy jealous jittery jobless jolly joyous judicious juicy jumbled jumpy juvenile
|
232
|
+
kaput keen kind kindhearted kindly knotty knowing knowledgeable known
|
233
|
+
labored lacking lame lamentable languid large last late laughable lavish lazy lean learned left legal lethal level lewd light like likeable limping literate little lively living lonely long longing loose lopsided loud loutish lovely loving low lowly lucky ludicrous luminous lumpy lush luxuriant lying lyrical
|
234
|
+
macabre macho maddening madly magenta magical magnificent majestic makeshift male malicious mammoth maniacal many marked married marvelous massive material materialistic mature mean measly meaty meek mellow melodic melted merciful mere mighty military mindless miniature minor miscreant misty mixed moaning modern moldy momentous motionless mountainous muddled muddy mundane murky mushy mute mysterious
|
235
|
+
naive narrow nasty natural naughty nauseating near neat nebulous necessary needless needy neighborly nervous new next nice nifty nimble nine nippy noiseless noisy nonchalant nondescript nonstop normal nostalgic nosy noxious null numberless numerous nutritious nutty
|
236
|
+
oafish obedient obeisant obese obnoxious obscene obsequious observant obsolete obtainable oceanic odd offbeat official old omniscient one onerous open opposite optimal orange ordinary organic ossified outgoing outrageous outstanding oval overconfident overjoyed overrated overt overwrought
|
237
|
+
pacific painful painstaking pale paltry panicky panoramic parallel parched parsimonious past pastoral pathetic peaceful penitent perfect periodic permissible perpetual petite phobic physical picayune pink piquant placid plain plant plastic plausible pleasant plucky pointless poised polite political poor possessive powerful practical precious premium present pretty previous pricey prickly private probable productive profuse protective proud psychedelic psychotic public puffy pumped puny pure purple pushy puzzled puzzling
|
238
|
+
quack quaint quarrelsome quarterly queasily queasy querulous questionable quick quickest quiet quirky quixotic quizzical quotable
|
239
|
+
rabid racial radiant ragged rainy rambunctious rampant rapid rare raspy ratty ready real rebel receptive recondite red redundant reflective regal regular relieved remarkable reminiscent repulsive resolute resonant responsible rhetorical rich right righteous rightful rigid ripe ritzy roasted robust romantic roomy rotten rough round royal ruddy rude rural rustic ruthless
|
240
|
+
sable sad safe salty same sassy satisfying savory savvy scandalous scarce scared scary scattered scientific scintillating scrawny screeching second secret secretive sedate seemly selective selfish separate serious shaggy shaky shallow sharp shiny shocked shocking short shrill shy sick silent silky silly simple simplistic sincere six skillful skinny sleepy slim slimy slippery sloppy slow small smelly smiling smoggy smooth sneaky snobbish snotty soft soggy solid somber sophisticated sordid sore sound sour spacious sparkling special spectacular spicy spiffy spiritual spiteful splendid spooky spotless spotted spotty spurious squalid square squealing squeamish stable staking stale standing statuesque steadfast steady steep stereotyped sticky stiff stimulating stingy stormy straight strange striped strong stunning stupendous sturdy subdued subsequent substantial successful succinct sudden sulky super superb superficial supreme surprised suspicious swanky sweet sweltering swift sympathetic symptomatic synonymous taboo tacit tacky talented tall tame tan tangible tangy tart tasteful tasteless tasty tawdry tearful tedious teeny teeny-tiny telling temporary tender tense tenuous terrible terrific tested thankful therapeutic thick thin thinkable third thirsty thoughtful thoughtless threatening three thundering tidy tight tightfisted tiny tired tiresome toothsome torpid tough towering tranquil trashy tremendous tricky troubled truculent true truthful two typical ubiquitous ugliest ugly ultra unaccountable unarmed unbecoming unbiased uncovered understood undesirable unequal unequaled uneven unfair uninterested unique unkempt unknown unnatural unruly unsightly unsuitable untidy unused unusual unwieldy unwritten upbeat uppity upset uptight used useful useless utopian utter uttermost
|
241
|
+
vacuous vagabond vague valuable various vast vengeful venomous verdant versed victorious vigorous violent violet vivacious voiceless volatile voracious vulgar
|
242
|
+
wacky waggish waiting wakeful wandering wanting warlike warm wary wasteful watery weak wealthy weary well wet whimsical whispering white whole wholesale wicked wide wide-eyed wiggly wild willing windy wiry wise wistful witty woebegone womanly wonderful wooden woozy workable worried worthless wrathful wretched wrong wry
|
243
|
+
xenophobic yellow yielding young youthful yummy zany zealous zesty zippy zonked
|
244
|
+
].freeze
|
245
|
+
end
|
246
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# sig/md5_to_random_name.rbs
|
2
|
+
module Md5ToRandomName
|
3
|
+
VERSION: String
|
4
|
+
|
5
|
+
# Exception classes
|
6
|
+
class Error < StandardError
|
7
|
+
end
|
8
|
+
|
9
|
+
class InvalidMd5Hash < Error
|
10
|
+
end
|
11
|
+
|
12
|
+
# Generator class
|
13
|
+
class Generator
|
14
|
+
@adjectives: Array[String]
|
15
|
+
@animals: Array[String]
|
16
|
+
|
17
|
+
def initialize: (?Array[String] adjectives, ?Array[String] animals) -> void
|
18
|
+
def generate: (String md5) -> String
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def validate_md5!: (String md5) -> void
|
23
|
+
def select_adjective: (String md5) -> String
|
24
|
+
def select_animal: (String md5) -> String
|
25
|
+
def extract_suffix: (String md5) -> String
|
26
|
+
def format_name: (String adjective, String animal, String suffix) -> String
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.generate: (String md5, ?Array[String] adjectives, ?Array[String] animals) -> String
|
30
|
+
end
|
data/sig/word_lists.rbs
ADDED
metadata
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: md5_to_random_name
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- William Tio
|
8
|
+
bindir: exe
|
9
|
+
cert_chain: []
|
10
|
+
date: 2025-03-16 00:00:00.000000000 Z
|
11
|
+
dependencies: []
|
12
|
+
description: Convert MD5 hashes to human-readable names in the format of adjective-animal-suffix
|
13
|
+
email:
|
14
|
+
- 6956294+WToa@users.noreply.github.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- ".rspec"
|
20
|
+
- ".standard.yml"
|
21
|
+
- CHANGELOG.md
|
22
|
+
- LICENSE.txt
|
23
|
+
- README.md
|
24
|
+
- Rakefile
|
25
|
+
- lib/md5_to_random_name.rb
|
26
|
+
- lib/md5_to_random_name/version.rb
|
27
|
+
- lib/word_lists.rb
|
28
|
+
- sig/md5_to_random_name.rbs
|
29
|
+
- sig/word_lists.rbs
|
30
|
+
homepage: https://github.com/WToa/md5_to_random_name
|
31
|
+
licenses:
|
32
|
+
- MIT
|
33
|
+
metadata:
|
34
|
+
homepage_uri: https://github.com/WToa/md5_to_random_name
|
35
|
+
source_code_uri: https://github.com/WToa/md5_to_random_name
|
36
|
+
changelog_uri: https://github.com/WToa/md5_to_random_name/blob/main/CHANGELOG.md
|
37
|
+
rdoc_options: []
|
38
|
+
require_paths:
|
39
|
+
- lib
|
40
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 3.1.0
|
45
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
requirements: []
|
51
|
+
rubygems_version: 3.6.5
|
52
|
+
specification_version: 4
|
53
|
+
summary: Convert MD5 hashes to human-readable names
|
54
|
+
test_files: []
|