genregen 0.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.
Files changed (8) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +1 -0
  3. data/LICENSE +32 -0
  4. data/README.md +24 -0
  5. data/bin/genregen +5 -0
  6. data/lib/data.yml +164 -0
  7. data/lib/genregen.rb +48 -0
  8. metadata +50 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eaf70e95c66ad31762a290dd73acb46d7e6f145e
4
+ data.tar.gz: db2eb2d98f5f7f15ce17c1d1c268dff77134a749
5
+ SHA512:
6
+ metadata.gz: 978cc2aa1569a43eb5c223dcf3d21ed33c590106c8f5e8d9d9e5f9562b10d9e8175912439a660bda56bfa82c8a12f25f275d6fcffea6f4cbca3b82065f61cc2f
7
+ data.tar.gz: 0429a29dc3ba92d4bb93f3a230fb1e95b03e54dce35470ae34ba418fd43d82593000614299836582fbfeea3a5f4c5ffb6a6dac17848d0f4dd27568bd42b7774f
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --no-private --markup-provider=redcarpet --markup=markdown - README.md LICENSE
data/LICENSE ADDED
@@ -0,0 +1,32 @@
1
+ This software is Copyright (c) 2015 by William Woodruff.
2
+
3
+ This is free software, licensed under:
4
+
5
+ The MIT (X11) License
6
+
7
+ The MIT License
8
+
9
+ Permission is hereby granted, free of charge, to any person
10
+ obtaining a copy of this software and associated
11
+ documentation files (the "Software"), to deal in the Software
12
+ without restriction, including without limitation the rights to
13
+ use, copy, modify, merge, publish, distribute, sublicense,
14
+ and/or sell copies of the Software, and to permit persons to
15
+ whom the Software is furnished to do so, subject to the
16
+ following conditions:
17
+
18
+ The above copyright notice and this permission notice shall
19
+ be included in all copies or substantial portions of the
20
+ Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT
23
+ WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
24
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR
26
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT
27
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31
+ CONNECTION WITH THE SOFTWARE OR THE USE OR
32
+ OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,24 @@
1
+ genregen
2
+ ========
3
+
4
+ A tiny music genre generator.
5
+
6
+ ## Usage
7
+
8
+ ### Installation
9
+
10
+ ``` bash
11
+ $ gem install genregen
12
+ ```
13
+
14
+ ### Ruby
15
+
16
+ ```ruby
17
+ GenreGen.generate
18
+ ```
19
+
20
+ ### Shell
21
+
22
+ ```bash
23
+ $ genregen
24
+ ```
data/bin/genregen ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'genregen'
4
+
5
+ puts GenreGen.generate
data/lib/data.yml ADDED
@@ -0,0 +1,164 @@
1
+ ---
2
+
3
+ templates:
4
+ - "%{genre}%{suffix}"
5
+ - "%{prefix}-%{genre}"
6
+ - "%{adjective} %{genre}"
7
+ - "%{adjective} %{prefix}-%{genre}"
8
+ - "%{adjective} %{genre}%{suffix}"
9
+ - "%{adjective} %{prefix}-%{genre}%{suffix}"
10
+
11
+ adjectives:
12
+ - acoustic
13
+ - alternative
14
+ - ambient
15
+ - art
16
+ - avant-garde
17
+ - celtic
18
+ - christian
19
+ - contemporary
20
+ - continental
21
+ - cool
22
+ - cosmic
23
+ - digital
24
+ - downtempo
25
+ - east-coast
26
+ - electronic
27
+ - epic
28
+ - freaky
29
+ - french
30
+ - gangsta
31
+ - garage
32
+ - german
33
+ - ghetto
34
+ - gothic
35
+ - gregorian
36
+ - gypsy
37
+ - hard
38
+ - hardcore
39
+ - heavy
40
+ - hood
41
+ - hot
42
+ - improvised
43
+ - indie
44
+ - industrial
45
+ - inspirational
46
+ - instrumental
47
+ - international
48
+ - jungle
49
+ - latin
50
+ - live
51
+ - lo-fi
52
+ - medieval
53
+ - melodic
54
+ - meme
55
+ - midwest
56
+ - modern
57
+ - new
58
+ - new-age
59
+ - old-school
60
+ - progressive
61
+ - queer
62
+ - renaissance
63
+ - scandinavian
64
+ - shoegaze
65
+ - smooth
66
+ - soft
67
+ - straightedge
68
+ - street
69
+ - traditional
70
+ - trippy
71
+ - twee
72
+ - underground
73
+ - uptempo
74
+ - urban
75
+ - western
76
+ - west-coast
77
+
78
+ prefixes:
79
+ - acid
80
+ - afro
81
+ - anarcho
82
+ - anti
83
+ - arena
84
+ - black
85
+ - break
86
+ - brit
87
+ - cow
88
+ - crust
89
+ - death
90
+ - dixie
91
+ - doom
92
+ - drone
93
+ - electro
94
+ - ethno
95
+ - euro
96
+ - freak
97
+ - funk
98
+ - glam
99
+ - glitch
100
+ - hard
101
+ - hip
102
+ - horror
103
+ - J
104
+ - K
105
+ - kraut
106
+ - metal
107
+ - neo
108
+ - noise
109
+ - nu
110
+ - post
111
+ - power
112
+ - proto
113
+ - pseudo
114
+ - riot
115
+ - sad
116
+ - surf
117
+ - synth
118
+ - teen
119
+ - thrash
120
+ - trance
121
+ - trans
122
+ - trap
123
+ - trip
124
+ - vapor
125
+
126
+ suffixes:
127
+ - beat
128
+ - billy
129
+ - bop
130
+ - clash
131
+ - core
132
+ - funk
133
+ - grind
134
+ - pop
135
+ - punk
136
+ - steady
137
+ - step
138
+ - style
139
+ - tech
140
+ - violence
141
+ - wave
142
+
143
+ genres:
144
+ - baroque
145
+ - blues
146
+ - classical
147
+ - calypso
148
+ - country
149
+ - dance
150
+ - disco
151
+ - dub
152
+ - folk
153
+ - hop
154
+ - house
155
+ - jazz
156
+ - klezmer
157
+ - latin
158
+ - polka
159
+ - reggae
160
+ - rock
161
+ - romantic
162
+ - r&b
163
+ - ska
164
+ - swing
data/lib/genregen.rb ADDED
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'yaml'
4
+
5
+ # The primary namespace for genregen.
6
+ module GenreGen
7
+ # release version
8
+ VERSION = "0.0.1".freeze
9
+
10
+ # data hash
11
+ DATA = YAML::load_file(File.join(File.dirname(__FILE__), 'data.yml'))
12
+
13
+ # Generates a new genre.
14
+ # @example
15
+ # GenreGen.generate # => "Soft smooth ethno-baroque"
16
+ # @return [String] a new genre
17
+ def self.generate
18
+ template = DATA['templates'].sample
19
+ fill_template(template).capitalize
20
+ end
21
+
22
+ private
23
+
24
+ def self.fill_template(template)
25
+ template % {
26
+ adjective: adjective,
27
+ genre: genre,
28
+ prefix: prefix,
29
+ suffix: suffix
30
+ }
31
+ end
32
+
33
+ def self.adjective
34
+ DATA['adjectives'].sample(rand(1..3)).join(' ')
35
+ end
36
+
37
+ def self.genre
38
+ DATA['genres'].sample
39
+ end
40
+
41
+ def self.prefix
42
+ DATA['prefixes'].sample
43
+ end
44
+
45
+ def self.suffix
46
+ DATA['suffixes'].sample
47
+ end
48
+ end
metadata ADDED
@@ -0,0 +1,50 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: genregen
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - William Woodruff
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-12-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A gem for generating music genres.
14
+ email: william@tuffbizz.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - ".yardopts"
20
+ - LICENSE
21
+ - README.md
22
+ - bin/genregen
23
+ - lib/data.yml
24
+ - lib/genregen.rb
25
+ homepage: https://github.com/and-the-rest/genregen
26
+ licenses:
27
+ - MIT
28
+ metadata: {}
29
+ post_install_message:
30
+ rdoc_options: []
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubyforge_project:
45
+ rubygems_version: 2.4.5.1
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: genregen - A music genre generator.
49
+ test_files: []
50
+ has_rdoc: