wd_sinatra 1.0.6 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +1 -4
  3. data/CHANGELOG.md +20 -0
  4. data/Gemfile +0 -2
  5. data/LICENSE +4 -2
  6. data/README.md +28 -19
  7. data/bin/wd_sinatra +7 -25
  8. data/lib/wd_sinatra/app_loader.rb +12 -20
  9. data/lib/wd_sinatra/sinatra_ext.rb +8 -7
  10. data/lib/wd_sinatra/test_helpers.rb +1 -1
  11. data/lib/wd_sinatra/version.rb +2 -4
  12. data/templates/Gemfile +16 -11
  13. data/templates/{Rakefile → Rakefile.tt} +4 -4
  14. data/templates/Thorfile +14 -8
  15. data/templates/api/hello_world.rb +17 -10
  16. data/templates/bin/console +1 -1
  17. data/templates/config.ru.tt +6 -0
  18. data/templates/config/sinatra_config.rb.tt +50 -0
  19. data/templates/lib/{app.rb → app.rb.tt} +4 -1
  20. data/templates/lib/hooks.rb +25 -15
  21. data/templates/test/{test_helpers.rb → test_helpers.rb.tt} +8 -6
  22. data/test/test_helper.rb +0 -4
  23. data/test/ws_list_ext_test.rb +6 -6
  24. data/wd-sinatra.gemspec +11 -7
  25. metadata +72 -104
  26. data/templates/config.ru +0 -5
  27. data/templates/config/middleware.rb +0 -16
  28. data/templates/config/sinatra_config.rb +0 -18
  29. data/templates/lib/body_parser.rb +0 -24
  30. data/templates/lib/tasks/doc.rake +0 -39
  31. data/templates/lib/tasks/doc_generator/bootstrap/.gitignore +0 -4
  32. data/templates/lib/tasks/doc_generator/bootstrap/LICENSE +0 -176
  33. data/templates/lib/tasks/doc_generator/bootstrap/Makefile +0 -47
  34. data/templates/lib/tasks/doc_generator/bootstrap/README.md +0 -105
  35. data/templates/lib/tasks/doc_generator/bootstrap/bootstrap.css +0 -2467
  36. data/templates/lib/tasks/doc_generator/bootstrap/bootstrap.min.css +0 -356
  37. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/css/docs.css +0 -317
  38. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-114x114.png +0 -0
  39. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-57x57.png +0 -0
  40. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-72x72.png +0 -0
  41. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/favicon.ico +0 -0
  42. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/bird.png +0 -0
  43. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/browsers.png +0 -0
  44. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-01.png +0 -0
  45. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-02.png +0 -0
  46. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-03.png +0 -0
  47. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/grid-18px.png +0 -0
  48. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/twitter-logo-no-bird.png +0 -0
  49. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/application.js +0 -52
  50. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/google-code-prettify/prettify.css +0 -94
  51. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/google-code-prettify/prettify.js +0 -28
  52. data/templates/lib/tasks/doc_generator/bootstrap/docs/index.html +0 -2037
  53. data/templates/lib/tasks/doc_generator/bootstrap/docs/javascript.html +0 -798
  54. data/templates/lib/tasks/doc_generator/bootstrap/examples/container-app.html +0 -119
  55. data/templates/lib/tasks/doc_generator/bootstrap/examples/fluid.html +0 -122
  56. data/templates/lib/tasks/doc_generator/bootstrap/examples/hero.html +0 -79
  57. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-alerts.js +0 -124
  58. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-buttons.js +0 -64
  59. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-dropdown.js +0 -55
  60. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-modal.js +0 -260
  61. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-popover.js +0 -90
  62. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-scrollspy.js +0 -107
  63. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-tabs.js +0 -80
  64. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-twipsy.js +0 -321
  65. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/index.html +0 -40
  66. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-alerts.js +0 -41
  67. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-buttons.js +0 -42
  68. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-dropdown.js +0 -52
  69. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-modal.js +0 -151
  70. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-popover.js +0 -76
  71. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-scrollspy.js +0 -31
  72. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-tabs.js +0 -77
  73. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-twipsy.js +0 -81
  74. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/vendor/qunit.css +0 -232
  75. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/vendor/qunit.js +0 -1510
  76. data/templates/lib/tasks/doc_generator/bootstrap/lib/bootstrap.less +0 -26
  77. data/templates/lib/tasks/doc_generator/bootstrap/lib/forms.less +0 -479
  78. data/templates/lib/tasks/doc_generator/bootstrap/lib/mixins.less +0 -222
  79. data/templates/lib/tasks/doc_generator/bootstrap/lib/patterns.less +0 -1060
  80. data/templates/lib/tasks/doc_generator/bootstrap/lib/reset.less +0 -141
  81. data/templates/lib/tasks/doc_generator/bootstrap/lib/scaffolding.less +0 -139
  82. data/templates/lib/tasks/doc_generator/bootstrap/lib/tables.less +0 -224
  83. data/templates/lib/tasks/doc_generator/bootstrap/lib/type.less +0 -187
  84. data/templates/lib/tasks/doc_generator/bootstrap/lib/variables.less +0 -60
  85. data/templates/lib/tasks/doc_generator/template.erb +0 -156
@@ -1,141 +0,0 @@
1
- /* Reset.less
2
- * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
3
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
4
-
5
-
6
- // ERIC MEYER RESET
7
- // --------------------------------------------------
8
-
9
- html, body { margin: 0; padding: 0; }
10
- h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, cite, code, del, dfn, em, img, q, s, samp, small, strike, strong, sub, sup, tt, var, dd, dl, dt, li, ol, ul, fieldset, form, label, legend, button, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; font-weight: normal; font-style: normal; font-size: 100%; line-height: 1; font-family: inherit; }
11
- table { border-collapse: collapse; border-spacing: 0; }
12
- ol, ul { list-style: none; }
13
- q:before, q:after, blockquote:before, blockquote:after { content: ""; }
14
-
15
-
16
- // Normalize.css
17
- // Pulling in select resets form the normalize.css project
18
- // --------------------------------------------------
19
-
20
- // Display in IE6-9 and FF3
21
- // -------------------------
22
- // Source: http://github.com/necolas/normalize.css
23
- html {
24
- overflow-y: scroll;
25
- font-size: 100%;
26
- -webkit-text-size-adjust: 100%;
27
- -ms-text-size-adjust: 100%;
28
- }
29
- // Focus states
30
- a:focus {
31
- outline: thin dotted;
32
- }
33
- // Hover & Active
34
- a:hover,
35
- a:active {
36
- outline: 0;
37
- }
38
-
39
- // Display in IE6-9 and FF3
40
- // -------------------------
41
- // Source: http://github.com/necolas/normalize.css
42
- article,
43
- aside,
44
- details,
45
- figcaption,
46
- figure,
47
- footer,
48
- header,
49
- hgroup,
50
- nav,
51
- section {
52
- display: block;
53
- }
54
-
55
- // Display block in IE6-9 and FF3
56
- // -------------------------
57
- // Source: http://github.com/necolas/normalize.css
58
- audio,
59
- canvas,
60
- video {
61
- display: inline-block;
62
- *display: inline;
63
- *zoom: 1;
64
- }
65
-
66
- // Prevents modern browsers from displaying 'audio' without controls
67
- // -------------------------
68
- // Source: http://github.com/necolas/normalize.css
69
- audio:not([controls]) {
70
- display: none;
71
- }
72
-
73
- // Prevents sub and sup affecting line-height in all browsers
74
- // -------------------------
75
- // Source: http://github.com/necolas/normalize.css
76
- sub,
77
- sup {
78
- font-size: 75%;
79
- line-height: 0;
80
- position: relative;
81
- vertical-align: baseline;
82
- }
83
- sup {
84
- top: -0.5em;
85
- }
86
- sub {
87
- bottom: -0.25em;
88
- }
89
-
90
- // Img border in a's and image quality
91
- // -------------------------
92
- // Source: http://github.com/necolas/normalize.css
93
- img {
94
- border: 0;
95
- -ms-interpolation-mode: bicubic;
96
- }
97
-
98
- // Forms
99
- // -------------------------
100
- // Source: http://github.com/necolas/normalize.css
101
-
102
- // Font size in all browsers, margin changes, misc consistency
103
- button,
104
- input,
105
- select,
106
- textarea {
107
- font-size: 100%;
108
- margin: 0;
109
- vertical-align: baseline;
110
- *vertical-align: middle;
111
- }
112
- button,
113
- input {
114
- line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
115
- *overflow: visible; // Inner spacing ie IE6/7
116
- }
117
- button::-moz-focus-inner,
118
- input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
119
- border: 0;
120
- padding: 0;
121
- }
122
- button,
123
- input[type="button"],
124
- input[type="reset"],
125
- input[type="submit"] {
126
- cursor: pointer; // Cursors on all buttons applied consistently
127
- -webkit-appearance: button; // Style clicable inputs in iOS
128
- }
129
- input[type="search"] { // Appearance in Safari/Chrome
130
- -webkit-appearance: textfield;
131
- -webkit-box-sizing: content-box;
132
- -moz-box-sizing: content-box;
133
- box-sizing: content-box;
134
- }
135
- input[type="search"]::-webkit-search-decoration {
136
- -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
137
- }
138
- textarea {
139
- overflow: auto; // Remove vertical scrollbar in IE6-9
140
- vertical-align: top; // Readability and alignment cross-browser
141
- }
@@ -1,139 +0,0 @@
1
- /*
2
- * Scaffolding
3
- * Basic and global styles for generating a grid system, structural layout, and page templates
4
- * ------------------------------------------------------------------------------------------- */
5
-
6
-
7
- // STRUCTURAL LAYOUT
8
- // -----------------
9
-
10
- body {
11
- background-color: @white;
12
- margin: 0;
13
- #font > .sans-serif(normal,@basefont,@baseline);
14
- color: @grayDark;
15
- }
16
-
17
- // Container (centered, fixed-width layouts)
18
- .container {
19
- .fixed-container();
20
- }
21
-
22
- // Fluid layouts (left aligned, with sidebar, min- & max-width content)
23
- .container-fluid {
24
- position: relative;
25
- min-width: 940px;
26
- padding-left: 20px;
27
- padding-right: 20px;
28
- .clearfix();
29
- > .sidebar {
30
- position: absolute;
31
- top: 0;
32
- left: 20px;
33
- width: 220px;
34
- }
35
- // TODO in v2: rename this and .popover .content to be more specific
36
- > .content {
37
- margin-left: 240px;
38
- }
39
- }
40
-
41
-
42
- // BASE STYLES
43
- // -----------
44
-
45
- // Links
46
- a {
47
- color: @linkColor;
48
- text-decoration: none;
49
- line-height: inherit;
50
- font-weight: inherit;
51
- &:hover {
52
- color: @linkColorHover;
53
- text-decoration: underline;
54
- }
55
- }
56
-
57
- // Quick floats
58
- .pull-right {
59
- float: right;
60
- }
61
- .pull-left {
62
- float: left;
63
- }
64
-
65
- // Toggling content
66
- .hide {
67
- display: none;
68
- }
69
- .show {
70
- display: block;
71
- }
72
-
73
-
74
- // GRID SYSTEM
75
- // -----------
76
- // To customize the grid system, bring up the variables.less file and change the column count, size, and gutter there
77
-
78
- .row {
79
- .clearfix();
80
- margin-left: -@gridGutterWidth;
81
- }
82
-
83
- // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7)
84
- // Credit to @dhg for the idea
85
- .row > [class*="span"] {
86
- .gridColumn();
87
- }
88
-
89
- // Default columns
90
- .span1 { .columns(1); }
91
- .span2 { .columns(2); }
92
- .span3 { .columns(3); }
93
- .span4 { .columns(4); }
94
- .span5 { .columns(5); }
95
- .span6 { .columns(6); }
96
- .span7 { .columns(7); }
97
- .span8 { .columns(8); }
98
- .span9 { .columns(9); }
99
- .span10 { .columns(10); }
100
- .span11 { .columns(11); }
101
- .span12 { .columns(12); }
102
- .span13 { .columns(13); }
103
- .span14 { .columns(14); }
104
- .span15 { .columns(15); }
105
- .span16 { .columns(16); }
106
-
107
- // For optional 24-column grid
108
- .span17 { .columns(17); }
109
- .span18 { .columns(18); }
110
- .span19 { .columns(19); }
111
- .span20 { .columns(20); }
112
- .span21 { .columns(21); }
113
- .span22 { .columns(22); }
114
- .span23 { .columns(23); }
115
- .span24 { .columns(24); }
116
-
117
- // Offset column options
118
- .row {
119
- > .offset1 { .offset(1); }
120
- > .offset2 { .offset(2); }
121
- > .offset3 { .offset(3); }
122
- > .offset4 { .offset(4); }
123
- > .offset5 { .offset(5); }
124
- > .offset6 { .offset(6); }
125
- > .offset7 { .offset(7); }
126
- > .offset8 { .offset(8); }
127
- > .offset9 { .offset(9); }
128
- > .offset10 { .offset(10); }
129
- > .offset11 { .offset(11); }
130
- > .offset12 { .offset(12); }
131
- }
132
-
133
- // Unique column sizes for 16-column grid
134
- .span-one-third { width: 300px; }
135
- .span-two-thirds { width: 620px; }
136
- .row {
137
- > .offset-one-third { margin-left: 340px; }
138
- > .offset-two-thirds { margin-left: 660px; }
139
- }
@@ -1,224 +0,0 @@
1
- /*
2
- * Tables.less
3
- * Tables for, you guessed it, tabular data
4
- * ---------------------------------------- */
5
-
6
-
7
- // BASELINE STYLES
8
- // ---------------
9
-
10
- table {
11
- width: 100%;
12
- margin-bottom: @baseline;
13
- padding: 0;
14
- font-size: @basefont;
15
- border-collapse: collapse;
16
- th,
17
- td {
18
- padding: 10px 10px 9px;
19
- line-height: @baseline;
20
- text-align: left;
21
- }
22
- th {
23
- padding-top: 9px;
24
- font-weight: bold;
25
- vertical-align: middle;
26
- }
27
- td {
28
- vertical-align: top;
29
- border-top: 1px solid #ddd;
30
- }
31
- // When scoped to row, fix th in tbody
32
- tbody th {
33
- border-top: 1px solid #ddd;
34
- vertical-align: top;
35
- }
36
- }
37
-
38
-
39
- // CONDENSED VERSION
40
- // -----------------
41
- .condensed-table {
42
- th,
43
- td {
44
- padding: 5px 5px 4px;
45
- }
46
- }
47
-
48
-
49
- // BORDERED VERSION
50
- // ----------------
51
-
52
- .bordered-table {
53
- border: 1px solid #ddd;
54
- border-collapse: separate; // Done so we can round those corners!
55
- *border-collapse: collapse; /* IE7, collapse table to remove spacing */
56
- .border-radius(4px);
57
- th + th,
58
- td + td,
59
- th + td {
60
- border-left: 1px solid #ddd;
61
- }
62
- thead tr:first-child th:first-child,
63
- tbody tr:first-child td:first-child {
64
- .border-radius(4px 0 0 0);
65
- }
66
- thead tr:first-child th:last-child,
67
- tbody tr:first-child td:last-child {
68
- .border-radius(0 4px 0 0);
69
- }
70
- tbody tr:last-child td:first-child {
71
- .border-radius(0 0 0 4px);
72
- }
73
- tbody tr:last-child td:last-child {
74
- .border-radius(0 0 4px 0);
75
- }
76
- }
77
-
78
-
79
- // TABLE CELL SIZES
80
- // ----------------
81
-
82
- // This is a duplication of the main grid .columns() mixin, but subtracts 20px to account for input padding and border
83
- .tableColumns(@columnSpan: 1) {
84
- width: ((@gridColumnWidth - 20) * @columnSpan) + ((@gridColumnWidth - 20) * (@columnSpan - 1));
85
- }
86
- table {
87
- // Default columns
88
- .span1 { .tableColumns(1); }
89
- .span2 { .tableColumns(2); }
90
- .span3 { .tableColumns(3); }
91
- .span4 { .tableColumns(4); }
92
- .span5 { .tableColumns(5); }
93
- .span6 { .tableColumns(6); }
94
- .span7 { .tableColumns(7); }
95
- .span8 { .tableColumns(8); }
96
- .span9 { .tableColumns(9); }
97
- .span10 { .tableColumns(10); }
98
- .span11 { .tableColumns(11); }
99
- .span12 { .tableColumns(12); }
100
- .span13 { .tableColumns(13); }
101
- .span14 { .tableColumns(14); }
102
- .span15 { .tableColumns(15); }
103
- .span16 { .tableColumns(16); }
104
- }
105
-
106
-
107
- // ZEBRA-STRIPING
108
- // --------------
109
-
110
- // Default zebra-stripe styles (alternating gray and transparent backgrounds)
111
- .zebra-striped {
112
- tbody {
113
- tr:nth-child(odd) td,
114
- tr:nth-child(odd) th {
115
- background-color: #f9f9f9;
116
- }
117
- tr:hover td,
118
- tr:hover th {
119
- background-color: #f5f5f5;
120
- }
121
- }
122
- }
123
-
124
- table {
125
- // Tablesorting styles w/ jQuery plugin
126
- .header {
127
- cursor: pointer;
128
- &:after {
129
- content: "";
130
- float: right;
131
- margin-top: 7px;
132
- border-width: 0 4px 4px;
133
- border-style: solid;
134
- border-color: #000 transparent;
135
- visibility: hidden;
136
- }
137
- }
138
- // Style the sorted column headers (THs)
139
- .headerSortUp,
140
- .headerSortDown {
141
- background-color: rgba(141,192,219,.25);
142
- text-shadow: 0 1px 1px rgba(255,255,255,.75);
143
- }
144
- // Style the ascending (reverse alphabetical) column header
145
- .header:hover {
146
- &:after {
147
- visibility:visible;
148
- }
149
- }
150
- // Style the descending (alphabetical) column header
151
- .headerSortDown,
152
- .headerSortDown:hover {
153
- &:after {
154
- visibility:visible;
155
- .opacity(60);
156
- }
157
- }
158
- // Style the ascending (reverse alphabetical) column header
159
- .headerSortUp {
160
- &:after {
161
- border-bottom: none;
162
- border-left: 4px solid transparent;
163
- border-right: 4px solid transparent;
164
- border-top: 4px solid #000;
165
- visibility:visible;
166
- .box-shadow(none); //can't add boxshadow to downward facing arrow :(
167
- .opacity(60);
168
- }
169
- }
170
- // Blue Table Headings
171
- .blue {
172
- color: @blue;
173
- border-bottom-color: @blue;
174
- }
175
- .headerSortUp.blue,
176
- .headerSortDown.blue {
177
- background-color: lighten(@blue, 40%);
178
- }
179
- // Green Table Headings
180
- .green {
181
- color: @green;
182
- border-bottom-color: @green;
183
- }
184
- .headerSortUp.green,
185
- .headerSortDown.green {
186
- background-color: lighten(@green, 40%);
187
- }
188
- // Red Table Headings
189
- .red {
190
- color: @red;
191
- border-bottom-color: @red;
192
- }
193
- .headerSortUp.red,
194
- .headerSortDown.red {
195
- background-color: lighten(@red, 50%);
196
- }
197
- // Yellow Table Headings
198
- .yellow {
199
- color: @yellow;
200
- border-bottom-color: @yellow;
201
- }
202
- .headerSortUp.yellow,
203
- .headerSortDown.yellow {
204
- background-color: lighten(@yellow, 40%);
205
- }
206
- // Orange Table Headings
207
- .orange {
208
- color: @orange;
209
- border-bottom-color: @orange;
210
- }
211
- .headerSortUp.orange,
212
- .headerSortDown.orange {
213
- background-color: lighten(@orange, 40%);
214
- }
215
- // Purple Table Headings
216
- .purple {
217
- color: @purple;
218
- border-bottom-color: @purple;
219
- }
220
- .headerSortUp.purple,
221
- .headerSortDown.purple {
222
- background-color: lighten(@purple, 40%);
223
- }
224
- }