wabur 0.5.0 → 0.6.0
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.
- checksums.yaml +4 -4
- data/bin/wabur +42 -17
- data/export/assets/css/wab.css +365 -1
- data/export/assets/css/wab.css.map +1 -1
- data/lib/wab/controller.rb +14 -10
- data/lib/wab/impl.rb +13 -0
- data/lib/wab/impl/bool_expr.rb +3 -0
- data/lib/wab/impl/configuration.rb +59 -43
- data/lib/wab/impl/data.rb +4 -4
- data/lib/wab/impl/exprs/and.rb +6 -5
- data/lib/wab/impl/exprs/between.rb +2 -2
- data/lib/wab/impl/exprs/eq.rb +2 -2
- data/lib/wab/impl/exprs/gt.rb +2 -2
- data/lib/wab/impl/exprs/gte.rb +2 -2
- data/lib/wab/impl/exprs/has.rb +2 -2
- data/lib/wab/impl/exprs/in.rb +2 -2
- data/lib/wab/impl/exprs/lt.rb +2 -2
- data/lib/wab/impl/exprs/lte.rb +2 -2
- data/lib/wab/impl/exprs/or.rb +6 -5
- data/lib/wab/impl/exprs/regex.rb +2 -2
- data/lib/wab/impl/handler.rb +10 -7
- data/lib/wab/impl/init.rb +135 -73
- data/lib/wab/impl/path_expr.rb +3 -0
- data/lib/wab/impl/shell.rb +10 -3
- data/lib/wab/impl/templates/wabur.conf.template +1 -2
- data/lib/wab/io/engine.rb +2 -2
- data/lib/wab/io/shell.rb +9 -3
- data/lib/wab/ui/flow.rb +3 -2
- data/lib/wab/version.rb +1 -1
- data/test/bench_io_shell.rb +2 -2
- data/test/test_io_shell.rb +2 -2
- data/test/tmp/lib/spawn.rb +44 -0
- data/test/tmp/lib/ui_controller.rb +20 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2480f2f3ceb62d050fd7344d3470ce6db6aa17a7
|
4
|
+
data.tar.gz: dce2ae6ae85b32528f61e528964b427cd6c5c53f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06ff3a888db5adfa4a74cf513ea722d2dfaefdc4fe664e6003c81caac1954d8bcc3aeb96eff98cd1a421d046010a6f4da87b027bde92dbd46a33b2e782b3e351
|
7
|
+
data.tar.gz: 36d7e6c73efa1023fc66579eb6e2f5f32180ab12fc66c3215dece9554a5f71c956214fb72fba094ea05d276e77d703c673323a9213e8b8f3d0675ea1d70cb6e7
|
data/bin/wabur
CHANGED
@@ -27,6 +27,8 @@ require 'wab/impl'
|
|
27
27
|
usage = %{
|
28
28
|
Usage: wabur [run|new|init] [options] [types]
|
29
29
|
|
30
|
+
version #{WAB::VERSION}
|
31
|
+
|
30
32
|
A pure Ruby WAB Runner and multi-purpose tool for WABuR development.
|
31
33
|
Configured directly via command-line options or via a configuration file which
|
32
34
|
can either be a UNIX-style conf file, or a JSON file, or a YAML file.
|
@@ -35,18 +37,22 @@ URL path to be handled.
|
|
35
37
|
|
36
38
|
Modes (the first non-option) available are:
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
+
run: Runs wabur as a runner and shell. Also the default. Any types
|
41
|
+
specified will be ignored.
|
42
|
+
|
43
|
+
new: New project directory created and set up. The `--base` options must
|
44
|
+
be provided to specify the directory to create and initialize.
|
40
45
|
|
41
|
-
|
42
|
-
provided to specify the directory to create and initialize. Not
|
43
|
-
providing the `--base` switch will revert to the `init` mode.
|
46
|
+
e.g.: wabur new Entry Article --base my_app
|
44
47
|
|
45
|
-
|
48
|
+
init: Initialize a project into the current directory or into an existing
|
49
|
+
sub-directory.
|
46
50
|
|
47
|
-
|
51
|
+
e.g.: wabur init Entry Article
|
48
52
|
|
49
|
-
|
53
|
+
version: Displays the current version.
|
54
|
+
|
55
|
+
help: Displays this help page.
|
50
56
|
|
51
57
|
}
|
52
58
|
|
@@ -114,20 +120,35 @@ options = {
|
|
114
120
|
doc: 'Log level. (ERROR, WARN, INFO, DEBUG)',
|
115
121
|
arg: 'LEVEL',
|
116
122
|
},
|
123
|
+
site: {
|
124
|
+
val: false,
|
125
|
+
doc: 'populate site directory',
|
126
|
+
short: '-s',
|
127
|
+
},
|
117
128
|
}
|
118
129
|
|
119
130
|
config = WAB::Impl::Configuration.new(usage, options)
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
131
|
+
mode = config[:mode]
|
132
|
+
dir = File.expand_path(config[:base] || '.')
|
133
|
+
case mode
|
134
|
+
when 'new'
|
135
|
+
if Dir.exist?(dir)
|
136
|
+
if Dir.pwd == dir
|
137
|
+
msg = "Refusing to over-write current directory. Either try again with a path to `--base` or use `wabur init` instead."
|
138
|
+
else
|
139
|
+
msg = "#{dir} already exists. Refusing to over-write. Use `wabur init` with '--base #{config[:base]}' instead."
|
140
|
+
end
|
141
|
+
abort(WAB::Impl.format_error(msg))
|
142
|
+
end
|
143
|
+
FileUtils.mkdir_p(dir)
|
124
144
|
WAB::Impl::Init.setup(dir, config)
|
125
|
-
|
126
|
-
elsif 'init' == config[:mode]
|
127
|
-
dir = File.expand_path('.')
|
145
|
+
when 'init'
|
128
146
|
WAB::Impl::Init.setup(dir, config)
|
129
|
-
|
130
|
-
|
147
|
+
when 'version'
|
148
|
+
puts "wabur version #{WAB::VERSION}"
|
149
|
+
when 'help'
|
150
|
+
config.usage
|
151
|
+
when 'run'
|
131
152
|
# The Configuration object can be modified before initializing the Shell. By
|
132
153
|
# setting the +config[:logger]+ the Shell will use that as the logger. The
|
133
154
|
# +config[:handler]+ array can also be modified by setting path values along
|
@@ -137,4 +158,8 @@ else
|
|
137
158
|
|
138
159
|
# Start a shell initialized with the final configuration.
|
139
160
|
WAB::Impl::Shell.new(config).start
|
161
|
+
else
|
162
|
+
puts WAB::Impl.format_error("unknown mode: #{mode}.")
|
163
|
+
config.usage
|
164
|
+
Process.exit!(-1)
|
140
165
|
end
|
data/export/assets/css/wab.css
CHANGED
@@ -1,2 +1,366 @@
|
|
1
|
-
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
|
1
|
+
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
|
2
|
+
button, hr, input {
|
3
|
+
overflow: visible; }
|
4
|
+
|
5
|
+
audio, canvas, progress, video {
|
6
|
+
display: inline-block; }
|
7
|
+
|
8
|
+
progress, sub, sup {
|
9
|
+
vertical-align: baseline; }
|
10
|
+
|
11
|
+
[type=checkbox], [type=radio], legend {
|
12
|
+
box-sizing: border-box;
|
13
|
+
padding: 0; }
|
14
|
+
|
15
|
+
html {
|
16
|
+
line-height: 1.15;
|
17
|
+
-ms-text-size-adjust: 100%;
|
18
|
+
-webkit-text-size-adjust: 100%; }
|
19
|
+
|
20
|
+
body {
|
21
|
+
margin: 0; }
|
22
|
+
|
23
|
+
article, aside, details, figcaption, figure, footer, header, main, menu, nav, section {
|
24
|
+
display: block; }
|
25
|
+
|
26
|
+
h1 {
|
27
|
+
font-size: 2em;
|
28
|
+
margin: .67em 0; }
|
29
|
+
|
30
|
+
figure {
|
31
|
+
margin: 1em 40px; }
|
32
|
+
|
33
|
+
hr {
|
34
|
+
box-sizing: content-box;
|
35
|
+
height: 0; }
|
36
|
+
|
37
|
+
code, kbd, pre, samp {
|
38
|
+
font-family: monospace,monospace;
|
39
|
+
font-size: 1em; }
|
40
|
+
|
41
|
+
a {
|
42
|
+
background-color: transparent;
|
43
|
+
-webkit-text-decoration-skip: objects; }
|
44
|
+
|
45
|
+
abbr[title] {
|
46
|
+
border-bottom: none;
|
47
|
+
text-decoration: underline;
|
48
|
+
text-decoration: underline dotted; }
|
49
|
+
|
50
|
+
b, strong {
|
51
|
+
font-weight: bolder; }
|
52
|
+
|
53
|
+
dfn {
|
54
|
+
font-style: italic; }
|
55
|
+
|
56
|
+
mark {
|
57
|
+
background-color: #ff0;
|
58
|
+
color: #000; }
|
59
|
+
|
60
|
+
small {
|
61
|
+
font-size: 80%; }
|
62
|
+
|
63
|
+
sub, sup {
|
64
|
+
font-size: 75%;
|
65
|
+
line-height: 0;
|
66
|
+
position: relative; }
|
67
|
+
|
68
|
+
sub {
|
69
|
+
bottom: -.25em; }
|
70
|
+
|
71
|
+
sup {
|
72
|
+
top: -.5em; }
|
73
|
+
|
74
|
+
audio:not([controls]) {
|
75
|
+
display: none;
|
76
|
+
height: 0; }
|
77
|
+
|
78
|
+
img {
|
79
|
+
border-style: none; }
|
80
|
+
|
81
|
+
svg:not(:root) {
|
82
|
+
overflow: hidden; }
|
83
|
+
|
84
|
+
button, input, optgroup, select, textarea {
|
85
|
+
font-family: sans-serif;
|
86
|
+
font-size: 100%;
|
87
|
+
line-height: 1.15;
|
88
|
+
margin: 0; }
|
89
|
+
|
90
|
+
button, select {
|
91
|
+
text-transform: none; }
|
92
|
+
|
93
|
+
[type=reset], [type=submit], button, html [type=button] {
|
94
|
+
-webkit-appearance: button; }
|
95
|
+
|
96
|
+
[type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner, button::-moz-focus-inner {
|
97
|
+
border-style: none;
|
98
|
+
padding: 0; }
|
99
|
+
|
100
|
+
[type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring, button:-moz-focusring {
|
101
|
+
outline: ButtonText dotted 1px; }
|
102
|
+
|
103
|
+
fieldset {
|
104
|
+
padding: .35em .75em .625em; }
|
105
|
+
|
106
|
+
legend {
|
107
|
+
color: inherit;
|
108
|
+
display: table;
|
109
|
+
max-width: 100%;
|
110
|
+
white-space: normal; }
|
111
|
+
|
112
|
+
textarea {
|
113
|
+
overflow: auto; }
|
114
|
+
|
115
|
+
[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button {
|
116
|
+
height: auto; }
|
117
|
+
|
118
|
+
[type=search] {
|
119
|
+
-webkit-appearance: textfield;
|
120
|
+
outline-offset: -2px; }
|
121
|
+
[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration {
|
122
|
+
-webkit-appearance: none; }
|
123
|
+
|
124
|
+
::-webkit-file-upload-button {
|
125
|
+
-webkit-appearance: button;
|
126
|
+
font: inherit; }
|
127
|
+
|
128
|
+
summary {
|
129
|
+
display: list-item; }
|
130
|
+
|
131
|
+
[hidden], template {
|
132
|
+
display: none; }
|
133
|
+
|
134
|
+
* {
|
135
|
+
margin: 0;
|
136
|
+
padding: 0;
|
137
|
+
font-kerning: none;
|
138
|
+
box-sizing: border-box; }
|
139
|
+
|
140
|
+
html {
|
141
|
+
height: 100%; }
|
142
|
+
|
143
|
+
body {
|
144
|
+
display: flex;
|
145
|
+
height: 100%;
|
146
|
+
flex-direction: column;
|
147
|
+
font-family: sans-serif;
|
148
|
+
line-height: 1.5; }
|
149
|
+
|
150
|
+
a {
|
151
|
+
text-decoration: none; }
|
152
|
+
|
153
|
+
ul {
|
154
|
+
list-style: none; }
|
155
|
+
|
156
|
+
table {
|
157
|
+
width: 100%; }
|
158
|
+
|
159
|
+
tr, table, th, td {
|
160
|
+
border: 0;
|
161
|
+
border-collapse: collapse; }
|
162
|
+
|
163
|
+
textarea[readonly]:focus {
|
164
|
+
outline: none; }
|
165
|
+
|
166
|
+
.container {
|
167
|
+
margin: 0 auto;
|
168
|
+
width: 100%;
|
169
|
+
max-width: 1180px; }
|
170
|
+
|
171
|
+
.content {
|
172
|
+
flex: 1 0 auto; }
|
173
|
+
|
174
|
+
.view-content {
|
175
|
+
width: calc(100% - 60px);
|
176
|
+
margin: auto;
|
177
|
+
padding: 100px 15px 50px; }
|
178
|
+
|
179
|
+
.sidebar {
|
180
|
+
position: fixed;
|
181
|
+
width: 200px;
|
182
|
+
min-height: 100%;
|
183
|
+
padding: 90px 0 30px;
|
184
|
+
color: #ededed;
|
185
|
+
background: #212121; }
|
186
|
+
.sidebar li {
|
187
|
+
padding: 10px;
|
188
|
+
padding-left: 20px;
|
189
|
+
color: #3eb1c1;
|
190
|
+
border-top: 1px solid #383838;
|
191
|
+
border-bottom: 1px solid #0d0d0d; }
|
192
|
+
.sidebar li:first-of-type {
|
193
|
+
border-top-color: transparent; }
|
194
|
+
.sidebar li:last-of-type {
|
195
|
+
border-bottom-color: transparent; }
|
196
|
+
|
197
|
+
.sidebar_selected, .sidebar_item:hover {
|
198
|
+
color: #ededed !important;
|
199
|
+
background: #171717; }
|
200
|
+
|
201
|
+
.header {
|
202
|
+
position: fixed;
|
203
|
+
width: 100%;
|
204
|
+
height: 50px;
|
205
|
+
padding: 0 15px;
|
206
|
+
color: #ebebeb;
|
207
|
+
background: #333;
|
208
|
+
z-index: 2; }
|
209
|
+
.header a:hover {
|
210
|
+
color: #fafafa; }
|
211
|
+
.header .logo {
|
212
|
+
float: left;
|
213
|
+
padding: 15px; }
|
214
|
+
.header .logo .brand, .header .logo .subtitle {
|
215
|
+
display: table-cell;
|
216
|
+
vertical-align: middle; }
|
217
|
+
.header .logo .brand {
|
218
|
+
padding-right: 15px;
|
219
|
+
color: #fafafa;
|
220
|
+
font-size: 18px;
|
221
|
+
font-weight: 900;
|
222
|
+
line-height: 1; }
|
223
|
+
.header .logo .subtitle {
|
224
|
+
padding-left: 15px;
|
225
|
+
font-size: 13px;
|
226
|
+
color: #dedede;
|
227
|
+
border-left: 1px solid #999; }
|
228
|
+
.header nav {
|
229
|
+
float: right;
|
230
|
+
padding: 0 15px; }
|
231
|
+
.header nav li {
|
232
|
+
float: left; }
|
233
|
+
.header nav li a {
|
234
|
+
display: block;
|
235
|
+
padding: 13px 0 0 15px;
|
236
|
+
color: #aeaeae; }
|
237
|
+
|
238
|
+
.footer a:hover {
|
239
|
+
color: #328e9a; }
|
240
|
+
|
241
|
+
.footer {
|
242
|
+
width: 100%;
|
243
|
+
margin-left: 0px;
|
244
|
+
background: #ededed;
|
245
|
+
color: #999;
|
246
|
+
text-align: center; }
|
247
|
+
.footer .attribution {
|
248
|
+
padding: 15px 0 12px; }
|
249
|
+
.footer .brand {
|
250
|
+
color: #3eb1c1;
|
251
|
+
font-weight: bold; }
|
252
|
+
|
253
|
+
.table-wrapper {
|
254
|
+
overflow-x: auto; }
|
255
|
+
|
256
|
+
.list-items {
|
257
|
+
display: block;
|
258
|
+
max-height: 361px;
|
259
|
+
overflow: auto; }
|
260
|
+
|
261
|
+
.obj-list-table {
|
262
|
+
width: 100%;
|
263
|
+
font-size: 14px;
|
264
|
+
background: #fafafa;
|
265
|
+
border: 0;
|
266
|
+
border-collapse: collapse; }
|
267
|
+
.obj-list-table tr:hover, .obj-list-table table:hover {
|
268
|
+
background: #f5f5f5; }
|
269
|
+
.obj-list-table th, .obj-list-table td {
|
270
|
+
padding: 8px 15px;
|
271
|
+
border: 1px solid #bbb; }
|
272
|
+
.obj-list-table th {
|
273
|
+
text-align: left;
|
274
|
+
color: #ffffff;
|
275
|
+
background: #454545;
|
276
|
+
border: 1px solid #777; }
|
277
|
+
.obj-list-table th:first-of-type {
|
278
|
+
width: 269px;
|
279
|
+
border-left-color: #454545; }
|
280
|
+
.obj-list-table th:last-of-type {
|
281
|
+
text-align: center;
|
282
|
+
border-right-color: #454545; }
|
283
|
+
.obj-list-table th.list-actions {
|
284
|
+
min-width: 162px;
|
285
|
+
width: 180px; }
|
286
|
+
.obj-list-table td:first-of-type {
|
287
|
+
width: 278px; }
|
288
|
+
.obj-list-table td.actions {
|
289
|
+
width: 60px;
|
290
|
+
color: #757575;
|
291
|
+
text-align: center;
|
292
|
+
cursor: pointer;
|
293
|
+
opacity: 0.9; }
|
294
|
+
.obj-list-table td.actions:hover {
|
295
|
+
color: #2186c1;
|
296
|
+
background: #fff;
|
297
|
+
opacity: 1; }
|
298
|
+
.obj-list-table td.actions.delete:hover {
|
299
|
+
color: #da0b0b; }
|
300
|
+
.obj-list-table td.actions .icon {
|
301
|
+
font-size: 24px; }
|
302
|
+
|
303
|
+
.obj-form-frame {
|
304
|
+
display: table;
|
305
|
+
width: 100%;
|
306
|
+
padding: 15px;
|
307
|
+
background: #fafafa;
|
308
|
+
border: 1px solid #dedede; }
|
309
|
+
.obj-form-frame.readonly {
|
310
|
+
background: none;
|
311
|
+
border-color: #ededed; }
|
312
|
+
|
313
|
+
.obj-form td {
|
314
|
+
padding: 8px 15px; }
|
315
|
+
|
316
|
+
.obj-form-lock {
|
317
|
+
font-size: 24px; }
|
318
|
+
|
319
|
+
.form-field {
|
320
|
+
padding: 12px;
|
321
|
+
width: 100%;
|
322
|
+
font-family: inherit;
|
323
|
+
border: 1px solid #dedede; }
|
324
|
+
.readonly .form-field {
|
325
|
+
color: #545454;
|
326
|
+
border-color: #ededed; }
|
327
|
+
|
328
|
+
.field-label {
|
329
|
+
width: 80px;
|
330
|
+
text-align: right;
|
331
|
+
font-weight: bold; }
|
332
|
+
.field-label:after {
|
333
|
+
content: ":"; }
|
334
|
+
|
335
|
+
.btn {
|
336
|
+
float: left;
|
337
|
+
margin-right: 12px;
|
338
|
+
margin-bottom: 5px;
|
339
|
+
padding: 8px 15px;
|
340
|
+
min-width: 80px;
|
341
|
+
color: #fff;
|
342
|
+
text-align: center;
|
343
|
+
cursor: pointer;
|
344
|
+
background: #2186c1;
|
345
|
+
border-radius: 3px; }
|
346
|
+
.btn:hover {
|
347
|
+
color: #fff;
|
348
|
+
background: #3caab9; }
|
349
|
+
.table-wrapper > .btn {
|
350
|
+
margin-left: 30px;
|
351
|
+
margin-bottom: 18px; }
|
352
|
+
|
353
|
+
.create-btn {
|
354
|
+
margin-bottom: 15px; }
|
355
|
+
|
356
|
+
.lock-btn {
|
357
|
+
width: 35px;
|
358
|
+
padding: 8px 8px 5px; }
|
359
|
+
.lock-btn:hover {
|
360
|
+
color: #444;
|
361
|
+
background: #fff; }
|
362
|
+
|
363
|
+
.delete-btn:hover {
|
364
|
+
background: #c20a0a; }
|
365
|
+
|
2
366
|
/*# sourceMappingURL=wab.css.map */
|