namegen 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cd9913d6e77adde4896a8a0b6e7a5bdc95337200
4
+ data.tar.gz: bf829a4e21b689e8ad10c4d31a5f68a7c20cdca6
5
+ SHA512:
6
+ metadata.gz: d0fdbb6f566eec3b68323e9b389c4fbcfc6476715bf35a61d3d5e79bdf23502660851e5d83b863999784a916195e4df34329c34174ce4b334c4207a9e6c2677e
7
+ data.tar.gz: 36dee3dab94f6d4333ddffdf5832cb870ae29320e56d58038ff5a15fd8975ff3d3fd3a5fe45fd053e767fb4d371b7e9867957593a82b877cafdd08e0f22be0d7
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in namegen.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Benjamin Hsieh
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.
@@ -0,0 +1,35 @@
1
+ # Namegen
2
+
3
+ I love the names that [Heroku](http://heroku.com) and [GitHub](http://github.com)
4
+ generate for applications and repositories, so I went ahead and wrote one of my own.
5
+ I used a list of ["exquisite"](http://www.dailywritingtips.com/100-exquisite-adjectives)
6
+ adjectives and some custom ones as well to pair with a custom list of nouns.
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ gem 'namegen'
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install namegen
21
+
22
+ ## Usage
23
+
24
+ After installing the gem, just type ```namegen``` from your command line and an
25
+ adjective-noun pair will be printed out. A verbose option ```namegen -v``` can
26
+ be specified to include a definition of the adjective (in case some of the words
27
+ are a little too "exquisite" for you like they were for me).
28
+
29
+ ## Contributing
30
+
31
+ 1. Fork it ( http://github.com/<my-github-username>/namegen/fork )
32
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
33
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
34
+ 4. Push to the branch (`git push origin my-new-feature`)
35
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'namegen'
4
+
5
+
6
+ if ARGV[0] == '-v'
7
+ puts Namegen::generate_v
8
+ else
9
+ puts Namegen::generate
10
+ end
@@ -0,0 +1,23 @@
1
+ require "namegen/version"
2
+ require "namegen/generator"
3
+ require "namegen/adjective"
4
+ require "namegen/noun"
5
+
6
+ module Namegen
7
+ def self.generate
8
+ "#{Adjective.random}-#{Noun.random}"
9
+ end
10
+
11
+ # Generate verbosely (include adjective definition)
12
+ def self.generate_v
13
+ adj = Adjective.random
14
+ defn = Adjective::EXQUISITE[adj]
15
+ rtn = "#{adj}-#{Noun.random}"
16
+
17
+ if defn
18
+ rtn += "\n #{adj}: #{defn}"
19
+ else
20
+ rtn
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,119 @@
1
+ class Adjective < Generator
2
+ # Exquisite adjectives (http://www.dailywritingtips.com/100-exquisite-adjectives/)
3
+ EXQUISITE = {
4
+ "adamant" => "unyielding; a very hard substance",
5
+ "adroit" => "clever, resourceful",
6
+ "amatory" => "sexual",
7
+ "animistic" => "quality of recurrence or reversion to earlier form",
8
+ "antic" => "clownish, frolicsome",
9
+ "arcadian" => "serene",
10
+ "baleful" => "deadly, foreboding",
11
+ "bellicose" => "quarrelsome (its synonym belligerent can also be a noun)",
12
+ "bilious" => "unpleasant, peevish",
13
+ "boorish" => "crude, insensitive",
14
+ "calamitous" => "disastrous",
15
+ "caustic" => "corrosive, sarcastic; a corrosive substance",
16
+ "cerulean" => "sky blue",
17
+ "comely" => "attractive",
18
+ "concomitant" => "accompanying",
19
+ "contumacious" => "rebellious",
20
+ "corpulent" => "obese",
21
+ "crapulous" => "immoderate in appetite",
22
+ "defamatory" => "maliciously misrepresenting",
23
+ "didactic" => "conveying information or moral instruction",
24
+ "dilatory" => "causing delay, tardy",
25
+ "dowdy" => "shabby, old-fashioned; an unkempt woman",
26
+ "efficacious" => "producing a desired effect",
27
+ "effulgent" => "brilliantly radiant",
28
+ "egregious" => "conspicuous, flagrant",
29
+ "endemic" => "prevalent, native, peculiar to an area",
30
+ "equanimous" => "even, balanced",
31
+ "execrable" => "wretched, detestable",
32
+ "fastidious" => "meticulous, overly delicate",
33
+ "feckless" => "weak, irresponsible",
34
+ "fecund" => "prolific, inventive",
35
+ "friable" => "brittle",
36
+ "fulsome" => "abundant, overdone, effusive",
37
+ "garrulous" => "wordy, talkative",
38
+ "guileless" => "naive",
39
+ "gustatory" => "having to do with taste or eating",
40
+ "heuristic" => "learning through trial-and-error or problem solving",
41
+ "histrionic" => "affected, theatrical",
42
+ "hubristic" => "proud, excessively self-confident",
43
+ "incendiary" => "inflammatory, spontaneously combustible, hot",
44
+ "insidious" => "subtle, seductive, treacherous",
45
+ "insolent" => "impudent, contemptuous",
46
+ "intransigent" => "uncompromising",
47
+ "inveterate" => "habitual, persistent",
48
+ "invidious" => "resentful, envious, obnoxious",
49
+ "irksome" => "annoying",
50
+ "jejune" => "dull, puerile",
51
+ "jocular" => "jesting, playful",
52
+ "judicious" => "discreet",
53
+ "lachrymose" => "tearful",
54
+ "limpid" => "simple, transparent, serene",
55
+ "loquacious" => "talkative",
56
+ "luminous" => "clear, shining",
57
+ "mannered" => "artificial, stilted",
58
+ "mendacious" => "deceptive",
59
+ "meretricious" => "whorish, superficially appealing, pretentious",
60
+ "minatory" => "menacing",
61
+ "mordant" => "biting, incisive, pungent",
62
+ "munificent" => "lavish, generous",
63
+ "nefarious" => "wicked",
64
+ "noxious" => "harmful, corrupting",
65
+ "obtuse" => "blunt, stupid",
66
+ "parsimonious" => "frugal, restrained",
67
+ "pendulous" => "suspended, indecisive",
68
+ "pernicious" => "injurious, deadly",
69
+ "pervasive" => "widespread",
70
+ "petulant" => "rude, ill humored",
71
+ "platitudinous" => "resembling or full of dull or banal comments",
72
+ "precipitate" => "steep, speedy",
73
+ "propitious" => "auspicious, advantageous, benevolent",
74
+ "puckish" => "impish",
75
+ "querulous" => "cranky, whining",
76
+ "quiescent" => "inactive, untroublesome",
77
+ "rebarbative" => "irritating, repellent",
78
+ "recalcitant" => "resistant, obstinate",
79
+ "redolent" => "aromatic, evocative",
80
+ "rhadamanthine" => "harshly strict",
81
+ "risible" => "laughable",
82
+ "ruminative" => "contemplative",
83
+ "sagacious" => "wise, discerning",
84
+ "salubrious" => "healthful",
85
+ "sartorial" => "relating to attire, especially tailored fashions",
86
+ "sclerotic" => "hardening",
87
+ "serpentine" => "snake-like, winding, tempting or wily",
88
+ "spasmodic" => "having to do with or resembling a spasm, excitable, intermittent",
89
+ "strident" => "harsh, discordant; obtrusively loud",
90
+ "taciturn" => "closemouthed, reticent",
91
+ "tenacious" => "persistent, cohesive,",
92
+ "tremulous" => "nervous, trembling, timid, sensitive",
93
+ "trenchant" => "sharp, penetrating, distinct",
94
+ "turbulent" => "restless, tempestuous",
95
+ "turgid" => "swollen, pompous",
96
+ "ubiquitous" => "pervasive, widespread",
97
+ "uxorious" => "inordinately affectionate or compliant with a wife",
98
+ "verdant" => "green, unripe",
99
+ "voluble" => "glib, given to speaking",
100
+ "voracious" => "ravenous, insatiable",
101
+ "wheedling" => "flattering",
102
+ "withering" => "devastating",
103
+ "zealous" => "eager, devoted"
104
+ }
105
+
106
+ VALUES =
107
+ # Favorites
108
+ %w(
109
+ turbo
110
+ shady
111
+ stupendous
112
+ sacred
113
+ deadly
114
+ silent
115
+ ethereal
116
+ ultra
117
+ ) +
118
+ EXQUISITE.keys
119
+ end
@@ -0,0 +1,7 @@
1
+ class Generator
2
+ VALUES = []
3
+
4
+ def self.random
5
+ self::VALUES[rand(self::VALUES.count)]
6
+ end
7
+ end
@@ -0,0 +1,57 @@
1
+ class Noun < Generator
2
+ VALUES =
3
+ # Favorites
4
+ %w(
5
+ happiness
6
+ throne
7
+ evening
8
+ rain
9
+ ocean
10
+ dragon
11
+ lightning
12
+ fire
13
+ ice
14
+ water
15
+ wind
16
+ knife
17
+ eon
18
+ iron
19
+ metal
20
+ ) +
21
+ # Diablo 3
22
+ %w(
23
+ crusader
24
+ hunter
25
+ barbarian
26
+ wizard
27
+ monk
28
+ hydra
29
+ ) +
30
+ # Starcraft
31
+ %w(
32
+ marine
33
+ medic
34
+ marauder
35
+ vulture
36
+ goliath
37
+ tank
38
+ ghost
39
+ valkyrie
40
+ banshee
41
+ viking
42
+ zealot
43
+ templar
44
+ archon
45
+ dragoon
46
+ reaver
47
+ corsair
48
+ carrier
49
+ tempest
50
+ phoenix
51
+ arbiter
52
+ scout
53
+ stalker
54
+ queen
55
+ overlord
56
+ )
57
+ end
@@ -0,0 +1,3 @@
1
+ module Namegen
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'namegen/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "namegen"
8
+ spec.version = Namegen::VERSION
9
+ spec.authors = ["Benjamin Hsieh, Ben's Potatoes"]
10
+ spec.email = ["benspotatoes@gmail.com"]
11
+ spec.summary = %q{Name generator, inspired by 'turbo-happiness'}
12
+ spec.description = %q{A custom name generator following the likes of
13
+ Heroku's application-name and Github's repo-name
14
+ generators.}
15
+ spec.homepage = "http://github.com/benspotatoes/calamitous-knife"
16
+ spec.license = "MIT"
17
+
18
+ spec.files = `git ls-files -z`.split("\x0")
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.5"
24
+ spec.add_development_dependency "rake", '~> 0'
25
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: namegen
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Benjamin Hsieh, Ben's Potatoes
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-04-03 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: |-
42
+ A custom name generator following the likes of
43
+ Heroku's application-name and Github's repo-name
44
+ generators.
45
+ email:
46
+ - benspotatoes@gmail.com
47
+ executables:
48
+ - namegen
49
+ extensions: []
50
+ extra_rdoc_files: []
51
+ files:
52
+ - ".gitignore"
53
+ - Gemfile
54
+ - LICENSE.txt
55
+ - README.md
56
+ - Rakefile
57
+ - bin/namegen
58
+ - lib/namegen.rb
59
+ - lib/namegen/adjective.rb
60
+ - lib/namegen/generator.rb
61
+ - lib/namegen/noun.rb
62
+ - lib/namegen/version.rb
63
+ - namegen.gemspec
64
+ homepage: http://github.com/benspotatoes/calamitous-knife
65
+ licenses:
66
+ - MIT
67
+ metadata: {}
68
+ post_install_message:
69
+ rdoc_options: []
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ requirements: []
83
+ rubyforge_project:
84
+ rubygems_version: 2.2.2
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: Name generator, inspired by 'turbo-happiness'
88
+ test_files: []