namey 0.0.10 → 0.0.12

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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +5 -2
  3. data/Gemfile +0 -2
  4. data/LICENSE +21 -0
  5. data/bin/namey-load-data +1 -1
  6. data/lib/namey/generator.rb +8 -6
  7. data/lib/namey/version.rb +1 -1
  8. data/namey.gemspec +4 -10
  9. data/spec/generator_spec.rb +23 -12
  10. data/specs.watchr +60 -0
  11. metadata +27 -100
  12. data/api/Gemfile +0 -12
  13. data/api/config.ru.example +0 -10
  14. data/api/namey_app.rb +0 -78
  15. data/api/public/LICENSE +0 -176
  16. data/api/public/Makefile +0 -30
  17. data/api/public/README.md +0 -105
  18. data/api/public/ajax-loader.gif +0 -0
  19. data/api/public/api.js +0 -90
  20. data/api/public/bootstrap.css +0 -2467
  21. data/api/public/bootstrap.min.css +0 -356
  22. data/api/public/docs/assets/css/docs.css +0 -317
  23. data/api/public/docs/assets/ico/bootstrap-apple-114x114.png +0 -0
  24. data/api/public/docs/assets/ico/bootstrap-apple-57x57.png +0 -0
  25. data/api/public/docs/assets/ico/bootstrap-apple-72x72.png +0 -0
  26. data/api/public/docs/assets/ico/favicon.ico +0 -0
  27. data/api/public/docs/assets/img/bird.png +0 -0
  28. data/api/public/docs/assets/img/browsers.png +0 -0
  29. data/api/public/docs/assets/img/example-diagram-01.png +0 -0
  30. data/api/public/docs/assets/img/example-diagram-02.png +0 -0
  31. data/api/public/docs/assets/img/example-diagram-03.png +0 -0
  32. data/api/public/docs/assets/img/grid-18px.png +0 -0
  33. data/api/public/docs/assets/img/twitter-logo-no-bird.png +0 -0
  34. data/api/public/docs/assets/js/application.js +0 -52
  35. data/api/public/docs/assets/js/google-code-prettify/prettify.css +0 -94
  36. data/api/public/docs/assets/js/google-code-prettify/prettify.js +0 -28
  37. data/api/public/docs/index.html +0 -2037
  38. data/api/public/docs/javascript.html +0 -798
  39. data/api/public/examples/container-app.html +0 -119
  40. data/api/public/examples/fluid.html +0 -122
  41. data/api/public/examples/hero.html +0 -79
  42. data/api/public/js/bootstrap-alerts.js +0 -113
  43. data/api/public/js/bootstrap-buttons.js +0 -62
  44. data/api/public/js/bootstrap-dropdown.js +0 -55
  45. data/api/public/js/bootstrap-modal.js +0 -260
  46. data/api/public/js/bootstrap-popover.js +0 -86
  47. data/api/public/js/bootstrap-scrollspy.js +0 -107
  48. data/api/public/js/bootstrap-tabs.js +0 -80
  49. data/api/public/js/bootstrap-twipsy.js +0 -310
  50. data/api/public/js/tests/index.html +0 -40
  51. data/api/public/js/tests/unit/bootstrap-alerts.js +0 -41
  52. data/api/public/js/tests/unit/bootstrap-buttons.js +0 -42
  53. data/api/public/js/tests/unit/bootstrap-dropdown.js +0 -52
  54. data/api/public/js/tests/unit/bootstrap-modal.js +0 -151
  55. data/api/public/js/tests/unit/bootstrap-popover.js +0 -76
  56. data/api/public/js/tests/unit/bootstrap-scrollspy.js +0 -31
  57. data/api/public/js/tests/unit/bootstrap-tabs.js +0 -77
  58. data/api/public/js/tests/unit/bootstrap-twipsy.js +0 -81
  59. data/api/public/js/tests/vendor/qunit.css +0 -232
  60. data/api/public/js/tests/vendor/qunit.js +0 -1510
  61. data/api/public/lib/bootstrap.less +0 -26
  62. data/api/public/lib/forms.less +0 -479
  63. data/api/public/lib/mixins.less +0 -222
  64. data/api/public/lib/patterns.less +0 -1060
  65. data/api/public/lib/reset.less +0 -141
  66. data/api/public/lib/scaffolding.less +0 -137
  67. data/api/public/lib/tables.less +0 -224
  68. data/api/public/lib/type.less +0 -187
  69. data/api/public/lib/variables.less +0 -60
  70. data/api/public/namey.css +0 -33
  71. data/api/public/ui.js +0 -55
  72. data/api/views/index.erb +0 -203
@@ -1,187 +0,0 @@
1
- /* Typography.less
2
- * Headings, body text, lists, code, and more for a versatile and durable typography system
3
- * ---------------------------------------------------------------------------------------- */
4
-
5
-
6
- // BODY TEXT
7
- // ---------
8
-
9
- p {
10
- #font > .shorthand(normal,@basefont,@baseline);
11
- margin-bottom: @baseline / 2;
12
- small {
13
- font-size: @basefont - 2;
14
- color: @grayLight;
15
- }
16
- }
17
-
18
-
19
- // HEADINGS
20
- // --------
21
-
22
- h1, h2, h3, h4, h5, h6 {
23
- font-weight: bold;
24
- color: @grayDark;
25
- small {
26
- color: @grayLight;
27
- }
28
- }
29
- h1 {
30
- margin-bottom: @baseline;
31
- font-size: 30px;
32
- line-height: @baseline * 2;
33
- small {
34
- font-size: 18px;
35
- }
36
- }
37
- h2 {
38
- font-size: 24px;
39
- line-height: @baseline * 2;
40
- small {
41
- font-size: 14px;
42
- }
43
- }
44
- h3, h4, h5, h6 {
45
- line-height: @baseline * 2;
46
- }
47
- h3 {
48
- font-size: 18px;
49
- small {
50
- font-size: 14px;
51
- }
52
- }
53
- h4 {
54
- font-size: 16px;
55
- small {
56
- font-size: 12px;
57
- }
58
- }
59
- h5 {
60
- font-size: 14px;
61
- }
62
- h6 {
63
- font-size: 13px;
64
- color: @grayLight;
65
- text-transform: uppercase;
66
- }
67
-
68
-
69
- // COLORS
70
- // ------
71
-
72
- // Unordered and Ordered lists
73
- ul, ol {
74
- margin: 0 0 @baseline 25px;
75
- }
76
- ul ul,
77
- ul ol,
78
- ol ol,
79
- ol ul {
80
- margin-bottom: 0;
81
- }
82
- ul {
83
- list-style: disc;
84
- }
85
- ol {
86
- list-style: decimal;
87
- }
88
- li {
89
- line-height: @baseline;
90
- color: @gray;
91
- }
92
- ul.unstyled {
93
- list-style: none;
94
- margin-left: 0;
95
- }
96
-
97
- // Description Lists
98
- dl {
99
- margin-bottom: @baseline;
100
- dt, dd {
101
- line-height: @baseline;
102
- }
103
- dt {
104
- font-weight: bold;
105
- }
106
- dd {
107
- margin-left: @baseline / 2;
108
- }
109
- }
110
-
111
- // MISC
112
- // ----
113
-
114
- // Horizontal rules
115
- hr {
116
- margin: 20px 0 19px;
117
- border: 0;
118
- border-bottom: 1px solid #eee;
119
- }
120
-
121
- // Emphasis
122
- strong {
123
- font-style: inherit;
124
- font-weight: bold;
125
- }
126
- em {
127
- font-style: italic;
128
- font-weight: inherit;
129
- line-height: inherit;
130
- }
131
- .muted {
132
- color: @grayLight;
133
- }
134
-
135
- // Blockquotes
136
- blockquote {
137
- margin-bottom: @baseline;
138
- border-left: 5px solid #eee;
139
- padding-left: 15px;
140
- p {
141
- #font > .shorthand(300,14px,@baseline);
142
- margin-bottom: 0;
143
- }
144
- small {
145
- display: block;
146
- #font > .shorthand(300,12px,@baseline);
147
- color: @grayLight;
148
- &:before {
149
- content: '\2014 \00A0';
150
- }
151
- }
152
- }
153
-
154
- // Addresses
155
- address {
156
- display: block;
157
- line-height: @baseline;
158
- margin-bottom: @baseline;
159
- }
160
-
161
- // Inline and block code styles
162
- code, pre {
163
- padding: 0 3px 2px;
164
- font-family: Monaco, Andale Mono, Courier New, monospace;
165
- font-size: 12px;
166
- .border-radius(3px);
167
- }
168
- code {
169
- background-color: lighten(@orange, 40%);
170
- color: rgba(0,0,0,.75);
171
- padding: 1px 3px;
172
- }
173
- pre {
174
- background-color: #f5f5f5;
175
- display: block;
176
- padding: (@baseline - 1) / 2;
177
- margin: 0 0 @baseline;
178
- line-height: @baseline;
179
- font-size: 12px;
180
- border: 1px solid #ccc;
181
- border: 1px solid rgba(0,0,0,.15);
182
- .border-radius(3px);
183
- white-space: pre;
184
- white-space: pre-wrap;
185
- word-wrap: break-word;
186
-
187
- }
@@ -1,60 +0,0 @@
1
- /* Variables.less
2
- * Variables to customize the look and feel of Bootstrap
3
- * ----------------------------------------------------- */
4
-
5
-
6
- // Links
7
- @linkColor: #0069d6;
8
- @linkColorHover: darken(@linkColor, 15);
9
-
10
- // Grays
11
- @black: #000;
12
- @grayDark: lighten(@black, 25%);
13
- @gray: lighten(@black, 50%);
14
- @grayLight: lighten(@black, 75%);
15
- @grayLighter: lighten(@black, 90%);
16
- @white: #fff;
17
-
18
- // Accent Colors
19
- @blue: #049CDB;
20
- @blueDark: #0064CD;
21
- @green: #46a546;
22
- @red: #9d261d;
23
- @yellow: #ffc40d;
24
- @orange: #f89406;
25
- @pink: #c3325f;
26
- @purple: #7a43b6;
27
-
28
- // Baseline grid
29
- @basefont: 13px;
30
- @baseline: 18px;
31
-
32
- // Griditude
33
- // Modify the grid styles in mixins.less
34
- @gridColumns: 16;
35
- @gridColumnWidth: 40px;
36
- @gridGutterWidth: 20px;
37
- @extraSpace: (@gridGutterWidth * 2); // For our grid calculations
38
- @siteWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
39
-
40
- // Color Scheme
41
- // Use this to roll your own color schemes if you like (unused by Bootstrap by default)
42
- @baseColor: @blue; // Set a base color
43
- @complement: spin(@baseColor, 180); // Determine a complementary color
44
- @split1: spin(@baseColor, 158); // Split complements
45
- @split2: spin(@baseColor, -158);
46
- @triad1: spin(@baseColor, 135); // Triads colors
47
- @triad2: spin(@baseColor, -135);
48
- @tetra1: spin(@baseColor, 90); // Tetra colors
49
- @tetra2: spin(@baseColor, -90);
50
- @analog1: spin(@baseColor, 22); // Analogs colors
51
- @analog2: spin(@baseColor, -22);
52
-
53
-
54
-
55
- // More variables coming soon:
56
- // - @basefont to @baseFontSize
57
- // - @baseline to @baseLineHeight
58
- // - @baseFontFamily
59
- // - @primaryButtonColor
60
- // - anything else? File an issue on GitHub
@@ -1,33 +0,0 @@
1
- body {
2
- padding-top: 10px;
3
- }
4
- .hero-unit {
5
- padding-top: 10px;
6
- padding-bottom: 10px;
7
- margin-bottom: 10px;
8
- }
9
- .hero-unit h1 {
10
- font-size: 48px;
11
- }
12
- .hero-unit p {
13
- font-size: 16px;
14
- line-height: 18px;
15
- font-weight: 100;
16
- }
17
-
18
- .custom_range_wrapper {
19
- display: none;
20
- }
21
-
22
- form#name-results textarea, .biglabel {
23
- color: black;
24
- font-size: 110%;
25
- }
26
- .spinny {
27
- display: none;
28
- padding-left: 5px;
29
- }
30
-
31
- #about {
32
- margin-top: 45px;
33
- }
@@ -1,55 +0,0 @@
1
- $(document).ready(function() {
2
- $("input[name=frequency]").change(function() {
3
- if ( $("input[name=frequency]:checked").val() == "custom" ) {
4
- $(".custom_range_wrapper").fadeIn();
5
- $("#min_freq,#max_freq").removeClass("disabled").removeAttr("disabled");
6
- }
7
- else {
8
- $(".custom_range_wrapper").fadeOut();
9
- $("#min_freq,#max_freq").addClass("disabled").attr("disabled", true); ;
10
- }
11
- });
12
-
13
- $("input[name=type]").change(function() {
14
- if ( $("input[name=type]:checked").val() != "surname" ) {
15
- $(".surname-wrapper").fadeIn();
16
- }
17
- else {
18
- $(".surname-wrapper").fadeOut();
19
- }
20
- });
21
-
22
-
23
- $('#name-params').submit(function() {
24
-
25
- $(".spinny").show();
26
-
27
- var opts = {
28
- count: $("select[name=count]").val(),
29
- with_surname: $("input[name=with_surname]:checked").val() === "true"
30
- };
31
-
32
- var frequency = $("input[name=frequency]:checked").val();
33
- if ( frequency == "custom" ) {
34
- opts.min_freq = $("input[name=min_freq]").val();
35
- opts.max_freq = $("input[name=max_freq]").val();
36
- }
37
- else {
38
- opts.frequency = frequency;
39
- }
40
-
41
-
42
- var type = $("input[name=type]:checked").val();
43
- if ( type != "both" ) {
44
- opts.type = type;
45
- }
46
-
47
- opts.callback = function(r) {
48
- $(".spinny").hide();
49
- $("#nameList").val(r.join("\n"));
50
- }
51
- namey.get(opts);
52
-
53
- return false;
54
- });
55
- });
@@ -1,203 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <!-- shamelessly stolen from view-source:http://twitter.github.com/bootstrap/examples/hero.html -->
4
- <head>
5
- <meta charset="utf-8">
6
- <title>Namey - A random name generator</title>
7
- <meta name="description" content="a simple tool for generating random names">
8
- <meta name="author" content="Colin Mitchell">
9
-
10
- <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
11
- <!--[if lt IE 9]>
12
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
13
- <![endif]-->
14
- <script type="text/javascript" src="https://www.google.com/jsapi"></script>
15
- <script>
16
- google.load("jquery", "1.6.4");
17
- </script>
18
- <script type="text/javascript" src="/api.js"></script>
19
- <script type="text/javascript" src="/ui.js"></script>
20
-
21
- <!-- Le styles -->
22
- <link href="/bootstrap.css" rel="stylesheet">
23
- <link href="/namey.css" rel="stylesheet">
24
- <!---
25
- <link rel="shortcut icon" href="images/favicon.ico">
26
- --->
27
- </head>
28
-
29
- <body>
30
- <div class="container">
31
-
32
- <!-- Main hero unit for a primary marketing message or call to action -->
33
- <div class="hero-unit">
34
- <h1>Namey! <small>A random name generator</small></h1>
35
- <p>Welcome to Namey, your friendly neighborhood random name
36
- generator. It uses the
37
- <a href="http://www.census.gov/genealogy/names/">US Census
38
- Bureau database</a> of first and last names to generate random
39
- names. You can specify gender, whether you want a common or
40
- rare name, and so on. It's pretty easy, so... Lets make
41
- some names!</p>
42
- </div>
43
-
44
- <section id="forms">
45
- <div class="page-header">
46
- <h1>Options <small>What sort of names do you want?</small></h1>
47
- </div>
48
-
49
- <div class="row">
50
- <div class="span8">
51
- <form id="name-params" class="form-stacked">
52
- <fieldset>
53
- <div class="clearfix">
54
- <label id="type-opts">Name Type</label>
55
- <div class="input">
56
- <ul class="inputs-list">
57
- <li>
58
- <label>
59
- <input type="radio" checked name="type" value="both" />
60
- <span>Any Gender</span>
61
- </label>
62
- </li>
63
- <li>
64
- <label>
65
- <input type="radio" name="type" value="female" />
66
- <span>Female</span>
67
- </label>
68
- </li>
69
- <li>
70
- <label>
71
- <input type="radio" name="type" value="male" />
72
- <span>Male</span>
73
- </label>
74
- </li>
75
- <li>
76
- <label>
77
- <input type="radio" name="type" value="surname" />
78
- <span>Just a surname</span>
79
- </label>
80
- </li>
81
- </ul>
82
- </div>
83
- </div><!-- /clearfix -->
84
-
85
- <div class="clearfix surname-wrapper">
86
- <div class="input">
87
- <ul class="inputs-list">
88
- <li>
89
- <label>
90
- <input type="checkbox" name="with_surname" value="true" checked />
91
- <span>Include a surname?</span>
92
- </label>
93
- </li>
94
- </ul>
95
- <span class="help-block">
96
- <strong>Note:</strong> If you uncheck this, you'll only get a first name.
97
- </span>
98
- </div>
99
- </div><!-- /clearfix -->
100
-
101
- <div class="clearfix">
102
- <label id="optionsRadio">Name Frequency</label>
103
- <div class="input">
104
- <ul class="inputs-list">
105
- <li>
106
- <label>
107
- <input type="radio" checked name="frequency" value="common" />
108
- <span>'Common' names</span>
109
- </label>
110
- </li>
111
- <li>
112
- <label>
113
- <input type="radio" name="frequency" value="rare" />
114
- <span>Rare names</span>
115
- </label>
116
- </li>
117
- <li>
118
- <label>
119
- <input type="radio" name="frequency" value="all" />
120
- <span>All names</span>
121
- </label>
122
- </li>
123
- <li>
124
- <label>
125
- <input type="radio" name="frequency" value="custom" />
126
- <span>Custom range </span>
127
-
128
- <span class="custom_range_wrapper">
129
- - From: <input class="span2 disabled" id="min_freq" name="min_freq" type="text" placeholder="(1-100)" disabled />
130
- To: <input class="span2 disabled" id="max_freq" name="max_freq" type="text" placeholder="(1-100)" disabled /><br />
131
- <small>(1 is super-common, 100 is super-rare)</small>
132
- </span>
133
- </label>
134
- </li>
135
- </ul>
136
- </div>
137
- </div><!-- /clearfix -->
138
-
139
-
140
- <div class="clearfix">
141
- <label for="count">How many names to generate?</label>
142
- <div class="input">
143
- <select name="count" id="count">
144
- <option>1</option>
145
- <option>2</option>
146
- <option>3</option>
147
- <option>4</option>
148
- <option>5</option>
149
- </select>
150
- </div>
151
- </div><!-- /clearfix -->
152
-
153
- <div class="clearfix">
154
- <input type="submit" class="btn primary" value="Let's go!">
155
- <span class="spinny"><img src="/ajax-loader.gif" /></span>
156
- </div>
157
- </fieldset>
158
- </form>
159
- </div>
160
-
161
- <div class="span8" id="results">
162
- <form id="name-results" class="form-stacked">
163
- <label for="nameList" class="biglabel">Results:</label>
164
- <fieldset>
165
- <div class="clearfix">
166
- <div class="input">
167
- <textarea class="large" name="nameList" id="nameList" rows="5"></textarea>
168
- </div>
169
- </div><!-- /clearfix -->
170
- </fieldset>
171
- </form>
172
- </div>
173
- </div><!-- /row -->
174
- </section>
175
-
176
- <section id="about">
177
- <div class="row">
178
- <div class="span5">
179
- <h2>Open Source</h2>
180
- <p>Namey is powered by a ruby gem. The code is totally open source, do what you
181
- like with it! <a href="https://github.com/muffinista/namey">Check it out on github</a></p>
182
- </div>
183
- <div class="span6">
184
- <h2>I have an API!</h2>
185
- <p>Are you a nerd? Do you like APIs? You're in luck! Namey
186
- has a <a href="/api.js">Javascript API</a> available so
187
- you can generate names however you would like.</p>
188
- </div>
189
- <div class="span5">
190
- <h2>Muffinlabs</h2>
191
- <p>Namey is
192
- a <a href="http://muffinlabs.com">muffinlabs</a>
193
- production. Please visit anytime!</p>
194
- </div>
195
- </div>
196
- </section>
197
-
198
- <footer>
199
- <p>&copy; Colin Mitchell 2011, <a href="http://muffinlabs.com">http://muffinlabs.com</a></p>
200
- </footer>
201
- </div> <!-- /container -->
202
- </body>
203
- </html>