random_name_generator 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # RandomNameGenerator
2
+
3
+ [![Build Status](https://travis-ci.org/folkengine/random_name_generator.svg?branch=master)](https://travis-ci.org/folkengine/random_name_generator)
4
+
5
+ Ruby port of [java-random-name-generator](https://github.com/folkengine/java-random-name-generator).
6
+
7
+ The big difference between this random name generator and others is that it allows you to create names in various
8
+ custom styles such as Elven, and Roman. If you're looking for a quick name for a Goblin NPC, RandomNameGenerator is
9
+ your gem.
10
+
11
+ ------
12
+
13
+
14
+ ## Installation
15
+
16
+ Add this line to your application's Gemfile:
17
+
18
+ ```ruby
19
+ gem 'random_name_generator'
20
+ ```
21
+
22
+ And then execute:
23
+
24
+ $ bundle
25
+
26
+ Or install it yourself as:
27
+
28
+ $ gem install random_name_generator
29
+
30
+ ## Usage
31
+
32
+ RandomNameGenerator comes with several styles of syllable files:
33
+ [Elven](https://github.com/folkengine/random_name_generator/blob/master/lib/random_name_generator/languages/elven.txt),
34
+ [Fantasy](https://github.com/folkengine/random_name_generator/blob/master/lib/random_name_generator/languages/fantasy.txt),
35
+ [Goblin](https://github.com/folkengine/random_name_generator/blob/master/lib/random_name_generator/languages/goblin.txt),
36
+ and [Roman](https://github.com/folkengine/random_name_generator/blob/master/lib/random_name_generator/languages/roman.txt).
37
+ By default it uses Fantasy. Instantiate RandomNameGenerator and then call compose on the object to generate a random name.
38
+ If you don't pass in the number of syllables you want for your name to compose, it will randomly pick between 3 and 6.
39
+
40
+ ```ruby
41
+ require 'random_name_generator'
42
+
43
+ rng = RandomNameGenerator.new
44
+ puts rng.compose(3)
45
+ ```
46
+
47
+ Pass in a reference to specific syllable file to get different styles of random names:
48
+
49
+ ```ruby
50
+ rng = RandomNameGenerator.new(RandomNameGenerator::GOBLIN)
51
+ puts rng.compose(3)
52
+ ```
53
+
54
+ Flip mode will create a RandomNameGenerator object, randomly assigning the syllable file for you.
55
+
56
+ ```ruby
57
+ flip = RandomNameGenerator.flip_mode
58
+ puts flip.compose
59
+ ```
60
+
61
+ You can also pass in your own syllable files. See
62
+ [RNGSyllable.rb](https://github.com/folkengine/random_name_generator/blob/master/lib/random_name_generator/rng_syllable.rb)
63
+ for the required specification.
64
+
65
+ RandomNameGenerator also comes with a command line interface which will generate a first and last name for you:
66
+
67
+ ```ruby
68
+ bin/random_name_generator [-efgr?]
69
+ ```
70
+
71
+ Add the gem's bin directory to you path in order to have instant access to RandomNameGenerator.
72
+
73
+ ## Development
74
+
75
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
76
+
77
+ 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
78
+
79
+ ## Dependencies
80
+
81
+ * [Mocha](https://github.com/freerange/mocha)
82
+ * [Reek](https://github.com/troessner/reek)
83
+ * [Rubocop](https://github.com/bbatsov/rubocop)
84
+
85
+ ## Alternatives
86
+
87
+ * [Faker](https://github.com/stympy/faker)
88
+ * [Namey](https://github.com/muffinista/namey)
89
+ * [How To Write A Name Generator (In Ruby)](http://www.skorks.com/2009/07/how-to-write-a-name-generator-in-ruby/)
90
+
91
+ ## Contributing
92
+
93
+ Bug reports and pull requests are welcome on GitHub at https://github.com/folkengine/random_name_generator.
data/Rakefile ADDED
@@ -0,0 +1,18 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+ require 'reek/rake/task'
4
+ require 'rubocop/rake_task'
5
+
6
+ task default: :test
7
+
8
+ Reek::Rake::Task.new do |t|
9
+ t.fail_on_error = false
10
+ end
11
+
12
+ RuboCop::RakeTask.new
13
+
14
+ Rake::TestTask.new do |t|
15
+ t.libs << 'test'
16
+ t.test_files = FileList['test/**/test*.rb']
17
+ t.verbose = true
18
+ end
data/bin/console ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'random_name_generator'
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
+
12
+ # Override default value.inspect
13
+ Pry.config.print = proc { |output, value| output.puts "=> #{value}" }
14
+ Pry.start
15
+
16
+ # require 'irb'
17
+ # IRB.start
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'slop'
4
+ require_relative '../lib/random_name_generator'
5
+
6
+ lang = RandomNameGenerator::FANTASY
7
+
8
+ opts = Slop.parse do |o|
9
+ o.bool '-e', '--elven', 'Use Elven eyllable file'
10
+ o.bool '-g', '--goblin', 'Use Goblin eyllable file'
11
+ o.bool '-r', '--roman', 'Use Roman eyllable file'
12
+ o.bool '-f', '--flipmode', 'Flip mode in effect'
13
+ o.bool '-?', '--help', 'How to'
14
+ end
15
+
16
+ lang = RandomNameGenerator::ELVEN if opts.elven?
17
+ lang = RandomNameGenerator::GOBLIN if opts.goblin?
18
+ lang = RandomNameGenerator::ROMAN if opts.roman?
19
+
20
+ if opts.flipmode?
21
+ puts "#{RandomNameGenerator.flip_mode.compose} #{RandomNameGenerator.flip_mode.compose}"
22
+ elsif opts.help?
23
+ puts opts
24
+ else
25
+ rndgen = RandomNameGenerator.new(lang)
26
+ puts "#{rndgen.compose} #{rndgen.compose}"
27
+ end
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/config.reek ADDED
@@ -0,0 +1,14 @@
1
+ TooManyInstanceVariables:
2
+ max_instance_variables: 10
3
+
4
+ IrresponsibleModule:
5
+ enabled: false
6
+
7
+ TooManyMethods:
8
+ enabled: false
9
+
10
+ TooManyStatements:
11
+ enabled: true
12
+ exclude:
13
+ - initialize
14
+ max_statements: 8
@@ -0,0 +1,2 @@
1
+ require File.join(File.dirname(__FILE__), 'random_name_generator', 'random_name_generator')
2
+ require File.join(File.dirname(__FILE__), 'random_name_generator', 'rng_syllable')
@@ -0,0 +1,334 @@
1
+ -æ +c
2
+ -aa +c
3
+ -ab
4
+ -aby +c
5
+ -ad
6
+ -ae +c
7
+ -ag
8
+ -ahr +v
9
+ -ai +c
10
+ -ak +v
11
+ -aka +c
12
+ -ake +c
13
+ -ako +c
14
+ -al
15
+ -all
16
+ -am
17
+ -an
18
+ -anc
19
+ -ang
20
+ -anti
21
+ -ap
22
+ -hab
23
+ -mai
24
+ -mal
25
+
26
+ add -c +v
27
+ al -c
28
+ am -c
29
+ ama -c +c
30
+ ay -c
31
+ ast -c
32
+ bat
33
+ dus
34
+ ez -c +v
35
+ i -c +c
36
+ ia -c +c
37
+ it -c -v
38
+ loc +v
39
+ ma +c
40
+ oc
41
+ olly -c +v
42
+ or
43
+ ra +c
44
+ rat
45
+ rax +v
46
+ sh
47
+ thi +c
48
+
49
+ +al
50
+ +as
51
+ +bou -v
52
+ +er -c
53
+ +es -c
54
+ +ias -c
55
+ +iel
56
+ +lat
57
+ +lech
58
+ +ma
59
+ +man
60
+ +mon
61
+ +nah
62
+ +nyu
63
+ +on -c
64
+ +rept -v
65
+ +res
66
+ +van
67
+ +xas -v
68
+ +y -c
69
+ +ym
70
+ +zou
71
+
72
+ # https://en.wikipedia.org/wiki/The_infernal_names
73
+
74
+
75
+ Andhaka (Hindu mythology)
76
+ Andras (Christian demonology)
77
+ Andrealphus (Christian demonology)
78
+ Andromalius (Christian demonology)
79
+ Antichrist (Christian demonology)
80
+ Anzu (Sumerian mythology)
81
+ Armaros (Jewish demonology)
82
+ Archon (Gnosticism)
83
+ Arunasura [Hindu mythology]
84
+ Asag (Sumerian demonology)
85
+ Asakku (Babylonian mythology)
86
+ Asb'el (Jewish mythology)
87
+ Asmodai/Asmodeus (Jewish folklore and Christian demonology)
88
+ Astaroth (Christian demonology)
89
+ Asura (Hindu mythology)
90
+ Azazel / Azaz'el (Jewish demonology)
91
+ Azi Dahaka/Dahak (Zoroastrianism)
92
+
93
+ Ahpuch - Mayan devil
94
+ Ahriman - Mazdean devil
95
+ Angra Mainyu - Zoroasterism synonym for devil
96
+ Apollyon - Greek synonym for Abaddon.
97
+ Asmodeus - Hebrew devil of sensuality and luxury, originally "creature of judgment"
98
+ Azazel - Taught man to make weapons of war (Hebrew)
99
+ Baalberith - Canaanite Lord of the covenant who was later made a devil
100
+ Balaam - Hebrew devil of avarice and greed
101
+ Baphomet - symbolic of Satan
102
+ Beelzebub - Lord of the Flies, taken from the symbolism of the scarab (Hebrew)
103
+ Behemoth - Hebrew personification of Lucifer in the form of an elephant or hippopotamus
104
+ Beherit - Syriac name for Satan
105
+ Chemosh - National god of Moabites, later a devil
106
+ Cimeries - Rides a black horse and rules Africa
107
+ Dagon - Philistine avenging devil of the sea
108
+ Demogorgon - a name so terrible as to not be known to mortals
109
+ Diabolous - "Flowing downwards" (Greek)
110
+ Dracula - Romanian name for son of the devil or dragon, which would also denote a "devilish" name—Romanian isn't too clear on which meaning, if not both, is correct.
111
+ Euronymous - Greek Prince of Death (a misspelling, correct spelling Eurynomos)
112
+ Gorgo - dim. of Demogorgon, see above
113
+ Guayota - guanche devil
114
+ Haborym - Hebrew synonym for Satan
115
+ Iblis - Synonym for Shaitan
116
+ Leviathan - Hebrew personification of Lucifer in the form of a great sea reptile (usually it represents the Antichrist; the beast of the sea)
117
+ Lilith - Hebrew female devil, Adam's first wife who taught him lust
118
+ Loki - Teutonic devil
119
+ Mammon - Aramaic god of wealth and profit
120
+ Marduk - god of the city of Babylon
121
+ Mastema - Hebrew synonym for Satan
122
+ Melek Taus - Yezidi devil
123
+ Mephistopheles - he who shuns the light, q.v. Faust (Greek)
124
+ Milcom - Ammonite devil
125
+ Moloch - Phoenician and Canaanite devil
126
+ Mormo - King of the Ghouls, consort of Hecate (Greek)
127
+ Naamah - Hebrew female devil of seduction
128
+ Nihasa - American Indian devil
129
+ O-Yama - Japanese name for lord of death
130
+ Pwcca - one of the myriad of fairy (faerie) folk
131
+ Saitan - Enochian equivalent of Satan
132
+ Samael - "Venom of God" (Hebrew)
133
+ Samnu - Central Asian devil
134
+ Sedit - American Nepali devil
135
+ Shaitan - Arabic name for Satan
136
+ T'an-mo - Chinese counterpart to the devil, covetousness, desire
137
+ Tchort - Russian name for Satan, "black god"
138
+ Typhon - Greek personification of devil
139
+ Yama - The lord of death in Hinduism
140
+ Yen-lo-Wang - Chinese ruler of Hell
141
+
142
+ # https://en.wikipedia.org/wiki/List_of_theological_demons
143
+
144
+ Baal/Bael (Christian demonology)
145
+ Babi ngepet (Indonesian mythology)
146
+ Bakasura (Hindu mythology)
147
+ Balam (Christian demonology)
148
+ Balberith (Jewish demonology)
149
+ Bali Raj (Hindu mythology)
150
+ Banshee (Irish mythology)
151
+ Baphomet (Christian folklore)
152
+ Barbas (Christian demonology)
153
+ Barbatos (Christian demonology)
154
+ Barong (Indonesian mythology)
155
+ Bathin/Mathim/Bathym/Marthim (Christian demonology)
156
+ Beelzebub (Jewish demonology, Christian demonology)
157
+ Behemoth (Jewish demonology)
158
+ Belial (Jewish demonology, Christian demonology)
159
+ Beleth (Christian demonology)
160
+ Belphegor (Christian demonology)
161
+ Berith/Beherit (Phoenician mythology, Christian demonology)
162
+ Bhūta (Sanskrit)
163
+ Bifrons (Christian demonology)
164
+ Boruta (Slavic mythology)
165
+ Botis (Christian demonology)
166
+ Buer (Christian demonology)
167
+ Bukavac (Slavic mythology)
168
+ Bune (Christian demonology)
169
+ Bushyasta (Zoroastrianism)
170
+
171
+ Cain/Canio (Christian demonology)
172
+ Charun (Etruscan mythology)
173
+ Chemosh (Moabite)
174
+ Choronzon (Thelema)
175
+ Cimejes/Kimaris/Cimeies (Christian demonology)
176
+ Corson (Christian demonology)
177
+ Crocell/Procell (Christian demonology)
178
+ Culsu (Etruscan mythology)
179
+
180
+ Daeva (Zoroastrianism demonology)
181
+ Dagon (Semitic mythology)
182
+ Dajjal (Islamic demonology)
183
+ Dantalion (Christian demonology)
184
+ Danjal (Jewish mythology)
185
+ Davy Jones (nautical folklore)
186
+ Decarabia (Christian demonology)
187
+ Demiurge (Gnosticism)
188
+ Demogorgon (Christian demonology)
189
+ Devil (Christian demonology)
190
+ Div-e Sepid (Persian mythology)
191
+ Drekavac (Slavic mythology)
192
+ Dzoavits (Native American mythology)
193
+
194
+ Eblis (or Iblis) (Islamic demonology)
195
+ Eligos (Christian demonology)
196
+ Eisheth (Jewish demonology)
197
+
198
+ Focalor (Christian demonology)
199
+ Foras/Forcas/Forras/ (Christian demonology)
200
+ Forneus (Christian demonology)
201
+ Furcas/Forcas (Christian demonology)
202
+ Furfur (Christian demonology)
203
+
204
+ Gaap (Christian demonology)
205
+ Gader'el (Jewish demonology)
206
+ Gaki (Japanese mythology)
207
+ Gamigin (Christian demonology)
208
+ Ghoul (Arabian and several other mythologies)
209
+ Glasya-Labolas/Caacrinolaas/Caassimolar/Classyalabolas/Glassia-labolis (Christian demonology)
210
+ Gorgon (Greek mythology)
211
+ Gremory/Gomory (Christian demonology)
212
+ Grigori (Jewish demonology)
213
+ Gualichu (Mapuche mythology)
214
+ Guayota (Guanche)
215
+ Gusion/Gusoin/Gusoyn
216
+
217
+ Haagenti (Christian demonology)
218
+ Halphas/Malthus (Christian demonology)
219
+ Hantu Raya (Indonesian and Malaysian mythology)
220
+ Haures/Flauros/Flavros/Hauras/Havres (Christian demonology)
221
+
222
+ Ifrit (Islamic mythology)
223
+ Incubus (Christian demonology, Chaldean mythology, Jewish folklore)
224
+ Ipos/Ipes (Christian demonology)
225
+
226
+ Jinn (Islamic demonology)
227
+ Jikininki (Japanese mythology)
228
+
229
+ Kabandha/Kabhanda (Hinduism)
230
+ Kali (Hinduism)
231
+ Kasadya (Jewish demonology)
232
+ Kokabiel (Jewish demonology)
233
+ Kroni (Ayyavazhi demonology)
234
+ Krampus (Germanic-Christian Demonology)
235
+ Killakee Cat (Hell Fire Club/Satanism)
236
+ Kumbhakarna (Hinduism)
237
+ L[edit]
238
+ Legion (Christian demonology)
239
+ Lechies (Slavic mythology)
240
+ Leyak (Indonesian mythology)
241
+ Lempo (Finnish mythology)
242
+ Leraje/Leraie (Christian demonology)
243
+ Leviathan (Jewish demonology, Christian demonology)
244
+ Lili/Lilin/Lilim (Jewish demonology)
245
+ Lilith (Sumerian mythology, Akkadian mythology, Jewish folklore)
246
+ Lucifer (Christian demonology)
247
+ Lucifuge Rofocale (Christian demonology)
248
+ M[edit]
249
+ Malphas (Christian demonology)
250
+ Mammon (Christian demonology)
251
+ Mara (Buddhist mythology)
252
+ Maricha (Hindu mythology)
253
+ Marax/Morax/Foraii (Christian demonology)
254
+ Marchosias (Christian demonology)
255
+ Masih ad-Dajjal/Ad-Dajjal/Dajjal (Islamic eschatology)
256
+ Mastema (Jewish demonology)
257
+ Mephistopheles (Christian folklore, German folklore)
258
+ Merihem (Christian demonology)
259
+ Moloch (Christian demonology)
260
+ Murmur (Christian demonology)
261
+ Morpheus (Greek mythology)
262
+ N[edit]
263
+ Naamah (Jewish demonology)
264
+ Naberius/Cerbere/Naberus (Christian demonology)
265
+ Ninurta (Sumerian mythology, Akkadian mythology)
266
+ Namtar (Sumerian mythology)
267
+ O[edit]
268
+ Onoskelis (Testament of Solomon)
269
+ Orcus (Roman mythology, later Christian demonology)
270
+ Orias/Oriax (Christian demonology)
271
+ Orobas (Christian demonology)
272
+ Ose (Christian demonology)
273
+ Ördög (Hungarian mythology)
274
+ O Tokata (Indonesian mythology)
275
+ P[edit]
276
+ Paimon (Christian demonology)
277
+ Pazuzu (Babylonian demonology)
278
+ Pelesit (Indonesian and Malaysian mythology)
279
+ Phenex (Christian demonology)
280
+ Penemue (Jewish and Christian demonology)
281
+ Pithius (Christian demonology)
282
+ Pocong (Indonesian mythology)
283
+ Pontianak (Indonesian and Malaysian mythology)
284
+ Pruflas (Christian demonology)
285
+ Puloman (Hindu demonology)
286
+ R[edit]
287
+ Rahab (Jewish folklore)
288
+ Raum (Christian demonology)
289
+ Ronove (Christian demonology)
290
+ Rusalka (Slavic mythology)
291
+ Rakshasa (Hinduism)
292
+ Rangda (Hinduism in Indonesia)
293
+ Ravan (Hinduism)
294
+ S[edit]
295
+ Sabnock (Christian demonology)
296
+ Saleos (Christian demonology)
297
+ Samael (Jewish demonology)
298
+ Satan (or Shaytan) (Jewish demonology, Christian demonology, Islamic demonology)
299
+ Seir (Christian demonology)
300
+ Semyaz (Jewish demonology)
301
+ Shax/Chax (Christian demonology)
302
+ Shedim (Jewish folklore)
303
+ Sitri (Christian demonology)
304
+ Sthenno (Greek mythology)
305
+ Stolas/Solas (Christian demonology)
306
+ Suanggi (Indonesian mythology)
307
+ Succubus (Sumerian mythology, Akkadian mythology, Jewish folklore, Christian demonology)
308
+ Surgat (Christian demonology)
309
+
310
+ Tannin (Jewish demonology)
311
+ Toyol (Indonesian and Malaysian)
312
+ Tuchulcha (Etruscan mythology)
313
+
314
+ Ukobach (Christian demonology)
315
+
316
+ Valac (Christian demonology)
317
+ Valefar/Malaphar/Malephar (Christian demonology)
318
+ Vanth (Etruscan mythology)
319
+ Vapula (Christian demonology)
320
+ Vassago (Christian demonology)
321
+ Vepar (Christian demonology)
322
+ Vine (Christian demonology)
323
+
324
+ Wendigo (Algonquin)
325
+
326
+ Xaphan (Christian demonology)
327
+ Xezbeth (demonology)[clarification needed]
328
+
329
+ Yeqon
330
+ Yeter'el
331
+
332
+ Zagan (Christian demonology)
333
+ Zepar (Christian demonology)
334
+ Ziminiar (Christian demonology)