roadsign 0.0.0 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a27782912ff5b5b1d7ba5d97947ec81860c49ea
4
- data.tar.gz: 827eb60b4067c7b51f4066107ae4415cfb099129
3
+ metadata.gz: 48927c8f1214b4de0292d182f516bc5ecac75e8c
4
+ data.tar.gz: dba914acc5e6c100c4cd0997ac60209676d28784
5
5
  SHA512:
6
- metadata.gz: a1d3aa0f442b3da8ba57af1bcb49d16684c5597415ed172bf929301eb67f6680e249882ab361fc48d5ca0bb8f9ab69de7226ee3097b3fdcbd1093707ca07b7c8
7
- data.tar.gz: 8c6bbced7001e1d20f2db9120871dc921d5537cc80d9e49673cea50ca3c413d1129641a9c7f5b345418db09222d8267cfaa9d3976e9c9315b123fe5b6a775cf1
6
+ metadata.gz: 2c28bcce18a298b75ecbcbe533b9fc5d99bc6e71432179f62d7a22c9f257c5eddbd35836c45df6ff358c167412809d0b9908749674fdc602baedce62e6296f3f
7
+ data.tar.gz: 5ed695b01d311778c38609842b4f645bb16036bb1e2cd9410ed210161aa7b03e592acc1e4b32891a59c9795c5d41fc3048f23318d78217355e8df749d443d777
data/Rakefile CHANGED
@@ -4,7 +4,3 @@ require "rspec/core/rake_task"
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
6
  task :default => :spec
7
-
8
- task "roadsign:generate" => :environment do
9
- puts 'Hello world from roadsign'
10
- end
@@ -1,6 +1,4 @@
1
- require "roadsign/version"
2
-
3
1
  module Roadsign
4
2
  # Your code goes here...
5
-
3
+
6
4
  end
@@ -0,0 +1,7 @@
1
+ module Roadsign
2
+ class Railtie < Rails::Railtie
3
+ rake_tasks do
4
+ Dir[File.join(File.dirname(__FILE__),'../tasks/*.rake')].each { |f| load f }
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,849 @@
1
+ module CSS
2
+ NORMALIZE = %{<style>/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
3
+
4
+ /**
5
+ * 1. Set default font family to sans-serif.
6
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
7
+ * user zoom.
8
+ */
9
+
10
+ html {
11
+ font-family: sans-serif; /* 1 */
12
+ -ms-text-size-adjust: 100%; /* 2 */
13
+ -webkit-text-size-adjust: 100%; /* 2 */
14
+ }
15
+
16
+ /**
17
+ * Remove default margin.
18
+ */
19
+
20
+ body {
21
+ margin: 0;
22
+ }
23
+
24
+ /* HTML5 display definitions
25
+ ========================================================================== */
26
+
27
+ /**
28
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
29
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11
30
+ * and Firefox.
31
+ * Correct `block` display not defined for `main` in IE 11.
32
+ */
33
+
34
+ article,
35
+ aside,
36
+ details,
37
+ figcaption,
38
+ figure,
39
+ footer,
40
+ header,
41
+ hgroup,
42
+ main,
43
+ menu,
44
+ nav,
45
+ section,
46
+ summary {
47
+ display: block;
48
+ }
49
+
50
+ /**
51
+ * 1. Correct `inline-block` display not defined in IE 8/9.
52
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
53
+ */
54
+
55
+ audio,
56
+ canvas,
57
+ progress,
58
+ video {
59
+ display: inline-block; /* 1 */
60
+ vertical-align: baseline; /* 2 */
61
+ }
62
+
63
+ /**
64
+ * Prevent modern browsers from displaying `audio` without controls.
65
+ * Remove excess height in iOS 5 devices.
66
+ */
67
+
68
+ audio:not([controls]) {
69
+ display: none;
70
+ height: 0;
71
+ }
72
+
73
+ /**
74
+ * Address `[hidden]` styling not present in IE 8/9/10.
75
+ * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
76
+ */
77
+
78
+ [hidden],
79
+ template {
80
+ display: none;
81
+ }
82
+
83
+ /* Links
84
+ ========================================================================== */
85
+
86
+ /**
87
+ * Remove the gray background color from active links in IE 10.
88
+ */
89
+
90
+ a {
91
+ background-color: transparent;
92
+ }
93
+
94
+ /**
95
+ * Improve readability when focused and also mouse hovered in all browsers.
96
+ */
97
+
98
+ a:active,
99
+ a:hover {
100
+ outline: 0;
101
+ }
102
+
103
+ /* Text-level semantics
104
+ ========================================================================== */
105
+
106
+ /**
107
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
108
+ */
109
+
110
+ abbr[title] {
111
+ border-bottom: 1px dotted;
112
+ }
113
+
114
+ /**
115
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
116
+ */
117
+
118
+ b,
119
+ strong {
120
+ font-weight: bold;
121
+ }
122
+
123
+ /**
124
+ * Address styling not present in Safari and Chrome.
125
+ */
126
+
127
+ dfn {
128
+ font-style: italic;
129
+ }
130
+
131
+ /**
132
+ * Address variable `h1` font-size and margin within `section` and `article`
133
+ * contexts in Firefox 4+, Safari, and Chrome.
134
+ */
135
+
136
+ h1 {
137
+ font-size: 2em;
138
+ margin: 0.67em 0;
139
+ }
140
+
141
+ /**
142
+ * Address styling not present in IE 8/9.
143
+ */
144
+
145
+ mark {
146
+ background: #ff0;
147
+ color: #000;
148
+ }
149
+
150
+ /**
151
+ * Address inconsistent and variable font size in all browsers.
152
+ */
153
+
154
+ small {
155
+ font-size: 80%;
156
+ }
157
+
158
+ /**
159
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
160
+ */
161
+
162
+ sub,
163
+ sup {
164
+ font-size: 75%;
165
+ line-height: 0;
166
+ position: relative;
167
+ vertical-align: baseline;
168
+ }
169
+
170
+ sup {
171
+ top: -0.5em;
172
+ }
173
+
174
+ sub {
175
+ bottom: -0.25em;
176
+ }
177
+
178
+ /* Embedded content
179
+ ========================================================================== */
180
+
181
+ /**
182
+ * Remove border when inside `a` element in IE 8/9/10.
183
+ */
184
+
185
+ img {
186
+ border: 0;
187
+ }
188
+
189
+ /**
190
+ * Correct overflow not hidden in IE 9/10/11.
191
+ */
192
+
193
+ svg:not(:root) {
194
+ overflow: hidden;
195
+ }
196
+
197
+ /* Grouping content
198
+ ========================================================================== */
199
+
200
+ /**
201
+ * Address margin not present in IE 8/9 and Safari.
202
+ */
203
+
204
+ figure {
205
+ margin: 1em 40px;
206
+ }
207
+
208
+ /**
209
+ * Address differences between Firefox and other browsers.
210
+ */
211
+
212
+ hr {
213
+ -moz-box-sizing: content-box;
214
+ box-sizing: content-box;
215
+ height: 0;
216
+ }
217
+
218
+ /**
219
+ * Contain overflow in all browsers.
220
+ */
221
+
222
+ pre {
223
+ overflow: auto;
224
+ }
225
+
226
+ /**
227
+ * Address odd `em`-unit font size rendering in all browsers.
228
+ */
229
+
230
+ code,
231
+ kbd,
232
+ pre,
233
+ samp {
234
+ font-family: monospace, monospace;
235
+ font-size: 1em;
236
+ }
237
+
238
+ /* Forms
239
+ ========================================================================== */
240
+
241
+ /**
242
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
243
+ * styling of `select`, unless a `border` property is set.
244
+ */
245
+
246
+ /**
247
+ * 1. Correct color not being inherited.
248
+ * Known issue: affects color of disabled elements.
249
+ * 2. Correct font properties not being inherited.
250
+ * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
251
+ */
252
+
253
+ button,
254
+ input,
255
+ optgroup,
256
+ select,
257
+ textarea {
258
+ color: inherit; /* 1 */
259
+ font: inherit; /* 2 */
260
+ margin: 0; /* 3 */
261
+ }
262
+
263
+ /**
264
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
265
+ */
266
+
267
+ button {
268
+ overflow: visible;
269
+ }
270
+
271
+ /**
272
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
273
+ * All other form control elements do not inherit `text-transform` values.
274
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
275
+ * Correct `select` style inheritance in Firefox.
276
+ */
277
+
278
+ button,
279
+ select {
280
+ text-transform: none;
281
+ }
282
+
283
+ /**
284
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
285
+ * and `video` controls.
286
+ * 2. Correct inability to style clickable `input` types in iOS.
287
+ * 3. Improve usability and consistency of cursor style between image-type
288
+ * `input` and others.
289
+ */
290
+
291
+ button,
292
+ html input[type="button"], /* 1 */
293
+ input[type="reset"],
294
+ input[type="submit"] {
295
+ -webkit-appearance: button; /* 2 */
296
+ cursor: pointer; /* 3 */
297
+ }
298
+
299
+ /**
300
+ * Re-set default cursor for disabled elements.
301
+ */
302
+
303
+ button[disabled],
304
+ html input[disabled] {
305
+ cursor: default;
306
+ }
307
+
308
+ /**
309
+ * Remove inner padding and border in Firefox 4+.
310
+ */
311
+
312
+ button::-moz-focus-inner,
313
+ input::-moz-focus-inner {
314
+ border: 0;
315
+ padding: 0;
316
+ }
317
+
318
+ /**
319
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
320
+ * the UA stylesheet.
321
+ */
322
+
323
+ input {
324
+ line-height: normal;
325
+ }
326
+
327
+ /**
328
+ * It's recommended that you don't attempt to style these elements.
329
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
330
+ *
331
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
332
+ * 2. Remove excess padding in IE 8/9/10.
333
+ */
334
+
335
+ input[type="checkbox"],
336
+ input[type="radio"] {
337
+ box-sizing: border-box; /* 1 */
338
+ padding: 0; /* 2 */
339
+ }
340
+
341
+ /**
342
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
343
+ * `font-size` values of the `input`, it causes the cursor style of the
344
+ * decrement button to change from `default` to `text`.
345
+ */
346
+
347
+ input[type="number"]::-webkit-inner-spin-button,
348
+ input[type="number"]::-webkit-outer-spin-button {
349
+ height: auto;
350
+ }
351
+
352
+ /**
353
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
354
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
355
+ * (include `-moz` to future-proof).
356
+ */
357
+
358
+ input[type="search"] {
359
+ -webkit-appearance: textfield; /* 1 */
360
+ -moz-box-sizing: content-box;
361
+ -webkit-box-sizing: content-box; /* 2 */
362
+ box-sizing: content-box;
363
+ }
364
+
365
+ /**
366
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
367
+ * Safari (but not Chrome) clips the cancel button when the search input has
368
+ * padding (and `textfield` appearance).
369
+ */
370
+
371
+ input[type="search"]::-webkit-search-cancel-button,
372
+ input[type="search"]::-webkit-search-decoration {
373
+ -webkit-appearance: none;
374
+ }
375
+
376
+ /**
377
+ * Define consistent border, margin, and padding.
378
+ */
379
+
380
+ fieldset {
381
+ border: 1px solid #c0c0c0;
382
+ margin: 0 2px;
383
+ padding: 0.35em 0.625em 0.75em;
384
+ }
385
+
386
+ /**
387
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
388
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
389
+ */
390
+
391
+ legend {
392
+ border: 0; /* 1 */
393
+ padding: 0; /* 2 */
394
+ }
395
+
396
+ /**
397
+ * Remove default vertical scrollbar in IE 8/9/10/11.
398
+ */
399
+
400
+ textarea {
401
+ overflow: auto;
402
+ }
403
+
404
+ /**
405
+ * Don't inherit the `font-weight` (applied by a rule above).
406
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
407
+ */
408
+
409
+ optgroup {
410
+ font-weight: bold;
411
+ }
412
+
413
+ /* Tables
414
+ ========================================================================== */
415
+
416
+ /**
417
+ * Remove most spacing between table cells.
418
+ */
419
+
420
+ table {
421
+ border-collapse: collapse;
422
+ border-spacing: 0;
423
+ }
424
+
425
+ td,
426
+ th {
427
+ padding: 0;
428
+ }</style>}
429
+ SKELETON = %{<style>/*
430
+ * Skeleton V2.0.4
431
+ * Copyright 2014, Dave Gamache
432
+ * www.getskeleton.com
433
+ * Free to use under the MIT license.
434
+ * http://www.opensource.org/licenses/mit-license.php
435
+ * 12/29/2014
436
+ */
437
+
438
+
439
+ /* Table of contents
440
+ ––––––––––––––––––––––––––––––––––––––––––––––––––
441
+ - Grid
442
+ - Base Styles
443
+ - Typography
444
+ - Links
445
+ - Buttons
446
+ - Forms
447
+ - Lists
448
+ - Code
449
+ - Tables
450
+ - Spacing
451
+ - Utilities
452
+ - Clearing
453
+ - Media Queries
454
+ */
455
+
456
+
457
+ /* Grid
458
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
459
+ .container {
460
+ position: relative;
461
+ width: 100%;
462
+ max-width: 960px;
463
+ margin: 0 auto;
464
+ padding: 0 20px;
465
+ box-sizing: border-box; }
466
+ .column,
467
+ .columns {
468
+ width: 100%;
469
+ float: left;
470
+ box-sizing: border-box; }
471
+
472
+ /* For devices larger than 400px */
473
+ @media (min-width: 400px) {
474
+ .container {
475
+ width: 85%;
476
+ padding: 0; }
477
+ }
478
+
479
+ /* For devices larger than 550px */
480
+ @media (min-width: 550px) {
481
+ .container {
482
+ width: 80%; }
483
+ .column,
484
+ .columns {
485
+ margin-left: 4%; }
486
+ .column:first-child,
487
+ .columns:first-child {
488
+ margin-left: 0; }
489
+
490
+ .one.column,
491
+ .one.columns { width: 4.66666666667%; }
492
+ .two.columns { width: 13.3333333333%; }
493
+ .three.columns { width: 22%; }
494
+ .four.columns { width: 30.6666666667%; }
495
+ .five.columns { width: 39.3333333333%; }
496
+ .six.columns { width: 48%; }
497
+ .seven.columns { width: 56.6666666667%; }
498
+ .eight.columns { width: 65.3333333333%; }
499
+ .nine.columns { width: 74.0%; }
500
+ .ten.columns { width: 82.6666666667%; }
501
+ .eleven.columns { width: 91.3333333333%; }
502
+ .twelve.columns { width: 100%; margin-left: 0; }
503
+
504
+ .one-third.column { width: 30.6666666667%; }
505
+ .two-thirds.column { width: 65.3333333333%; }
506
+
507
+ .one-half.column { width: 48%; }
508
+
509
+ /* Offsets */
510
+ .offset-by-one.column,
511
+ .offset-by-one.columns { margin-left: 8.66666666667%; }
512
+ .offset-by-two.column,
513
+ .offset-by-two.columns { margin-left: 17.3333333333%; }
514
+ .offset-by-three.column,
515
+ .offset-by-three.columns { margin-left: 26%; }
516
+ .offset-by-four.column,
517
+ .offset-by-four.columns { margin-left: 34.6666666667%; }
518
+ .offset-by-five.column,
519
+ .offset-by-five.columns { margin-left: 43.3333333333%; }
520
+ .offset-by-six.column,
521
+ .offset-by-six.columns { margin-left: 52%; }
522
+ .offset-by-seven.column,
523
+ .offset-by-seven.columns { margin-left: 60.6666666667%; }
524
+ .offset-by-eight.column,
525
+ .offset-by-eight.columns { margin-left: 69.3333333333%; }
526
+ .offset-by-nine.column,
527
+ .offset-by-nine.columns { margin-left: 78.0%; }
528
+ .offset-by-ten.column,
529
+ .offset-by-ten.columns { margin-left: 86.6666666667%; }
530
+ .offset-by-eleven.column,
531
+ .offset-by-eleven.columns { margin-left: 95.3333333333%; }
532
+
533
+ .offset-by-one-third.column,
534
+ .offset-by-one-third.columns { margin-left: 34.6666666667%; }
535
+ .offset-by-two-thirds.column,
536
+ .offset-by-two-thirds.columns { margin-left: 69.3333333333%; }
537
+
538
+ .offset-by-one-half.column,
539
+ .offset-by-one-half.columns { margin-left: 52%; }
540
+
541
+ }
542
+
543
+
544
+ /* Base Styles
545
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
546
+ /* NOTE
547
+ html is set to 62.5% so that all the REM measurements throughout Skeleton
548
+ are based on 10px sizing. So basically 1.5rem = 15px :) */
549
+ html {
550
+ font-size: 62.5%; }
551
+ body {
552
+ font-size: 1.5em; /* currently ems cause chrome bug misinterpreting rems on body element */
553
+ line-height: 1.6;
554
+ font-weight: 400;
555
+ font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
556
+ color: #222; }
557
+
558
+
559
+ /* Typography
560
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
561
+ h1, h2, h3, h4, h5, h6 {
562
+ margin-top: 0;
563
+ margin-bottom: 2rem;
564
+ font-weight: 300; }
565
+ h1 { font-size: 4.0rem; line-height: 1.2; letter-spacing: -.1rem;}
566
+ h2 { font-size: 3.6rem; line-height: 1.25; letter-spacing: -.1rem; }
567
+ h3 { font-size: 3.0rem; line-height: 1.3; letter-spacing: -.1rem; }
568
+ h4 { font-size: 2.4rem; line-height: 1.35; letter-spacing: -.08rem; }
569
+ h5 { font-size: 1.8rem; line-height: 1.5; letter-spacing: -.05rem; }
570
+ h6 { font-size: 1.5rem; line-height: 1.6; letter-spacing: 0; }
571
+
572
+ /* Larger than phablet */
573
+ @media (min-width: 550px) {
574
+ h1 { font-size: 5.0rem; }
575
+ h2 { font-size: 4.2rem; }
576
+ h3 { font-size: 3.6rem; }
577
+ h4 { font-size: 3.0rem; }
578
+ h5 { font-size: 2.4rem; }
579
+ h6 { font-size: 1.5rem; }
580
+ }
581
+
582
+ p {
583
+ margin-top: 0; }
584
+
585
+
586
+ /* Links
587
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
588
+ a {
589
+ color: #1EAEDB; }
590
+ a:hover {
591
+ color: #0FA0CE; }
592
+
593
+
594
+ /* Buttons
595
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
596
+ .button,
597
+ button,
598
+ input[type="submit"],
599
+ input[type="reset"],
600
+ input[type="button"] {
601
+ display: inline-block;
602
+ height: 38px;
603
+ padding: 0 30px;
604
+ color: #555;
605
+ text-align: center;
606
+ font-size: 11px;
607
+ font-weight: 600;
608
+ line-height: 38px;
609
+ letter-spacing: .1rem;
610
+ text-transform: uppercase;
611
+ text-decoration: none;
612
+ white-space: nowrap;
613
+ background-color: transparent;
614
+ border-radius: 4px;
615
+ border: 1px solid #bbb;
616
+ cursor: pointer;
617
+ box-sizing: border-box; }
618
+ .button:hover,
619
+ button:hover,
620
+ input[type="submit"]:hover,
621
+ input[type="reset"]:hover,
622
+ input[type="button"]:hover,
623
+ .button:focus,
624
+ button:focus,
625
+ input[type="submit"]:focus,
626
+ input[type="reset"]:focus,
627
+ input[type="button"]:focus {
628
+ color: #333;
629
+ border-color: #888;
630
+ outline: 0; }
631
+ .button.button-primary,
632
+ button.button-primary,
633
+ input[type="submit"].button-primary,
634
+ input[type="reset"].button-primary,
635
+ input[type="button"].button-primary {
636
+ color: #FFF;
637
+ background-color: #33C3F0;
638
+ border-color: #33C3F0; }
639
+ .button.button-primary:hover,
640
+ button.button-primary:hover,
641
+ input[type="submit"].button-primary:hover,
642
+ input[type="reset"].button-primary:hover,
643
+ input[type="button"].button-primary:hover,
644
+ .button.button-primary:focus,
645
+ button.button-primary:focus,
646
+ input[type="submit"].button-primary:focus,
647
+ input[type="reset"].button-primary:focus,
648
+ input[type="button"].button-primary:focus {
649
+ color: #FFF;
650
+ background-color: #1EAEDB;
651
+ border-color: #1EAEDB; }
652
+
653
+
654
+ /* Forms
655
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
656
+ input[type="email"],
657
+ input[type="number"],
658
+ input[type="search"],
659
+ input[type="text"],
660
+ input[type="tel"],
661
+ input[type="url"],
662
+ input[type="password"],
663
+ textarea,
664
+ select {
665
+ height: 38px;
666
+ padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */
667
+ background-color: #fff;
668
+ border: 1px solid #D1D1D1;
669
+ border-radius: 4px;
670
+ box-shadow: none;
671
+ box-sizing: border-box; }
672
+ /* Removes awkward default styles on some inputs for iOS */
673
+ input[type="email"],
674
+ input[type="number"],
675
+ input[type="search"],
676
+ input[type="text"],
677
+ input[type="tel"],
678
+ input[type="url"],
679
+ input[type="password"],
680
+ textarea {
681
+ -webkit-appearance: none;
682
+ -moz-appearance: none;
683
+ appearance: none; }
684
+ textarea {
685
+ min-height: 65px;
686
+ padding-top: 6px;
687
+ padding-bottom: 6px; }
688
+ input[type="email"]:focus,
689
+ input[type="number"]:focus,
690
+ input[type="search"]:focus,
691
+ input[type="text"]:focus,
692
+ input[type="tel"]:focus,
693
+ input[type="url"]:focus,
694
+ input[type="password"]:focus,
695
+ textarea:focus,
696
+ select:focus {
697
+ border: 1px solid #33C3F0;
698
+ outline: 0; }
699
+ label,
700
+ legend {
701
+ display: block;
702
+ margin-bottom: .5rem;
703
+ font-weight: 600; }
704
+ fieldset {
705
+ padding: 0;
706
+ border-width: 0; }
707
+ input[type="checkbox"],
708
+ input[type="radio"] {
709
+ display: inline; }
710
+ label > .label-body {
711
+ display: inline-block;
712
+ margin-left: .5rem;
713
+ font-weight: normal; }
714
+
715
+
716
+ /* Lists
717
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
718
+ ul {
719
+ list-style: circle inside; }
720
+ ol {
721
+ list-style: decimal inside; }
722
+ ol, ul {
723
+ padding-left: 0;
724
+ margin-top: 0; }
725
+ ul ul,
726
+ ul ol,
727
+ ol ol,
728
+ ol ul {
729
+ margin: 1.5rem 0 1.5rem 3rem;
730
+ font-size: 90%; }
731
+ li {
732
+ margin-bottom: 1rem; }
733
+
734
+
735
+ /* Code
736
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
737
+ code {
738
+ padding: .2rem .5rem;
739
+ margin: 0 .2rem;
740
+ font-size: 90%;
741
+ white-space: nowrap;
742
+ background: #F1F1F1;
743
+ border: 1px solid #E1E1E1;
744
+ border-radius: 4px; }
745
+ pre > code {
746
+ display: block;
747
+ padding: 1rem 1.5rem;
748
+ white-space: pre; }
749
+
750
+
751
+ /* Tables
752
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
753
+ th,
754
+ td {
755
+ padding: 12px 15px;
756
+ text-align: left;
757
+ border-bottom: 1px solid #E1E1E1; }
758
+ th:first-child,
759
+ td:first-child {
760
+ padding-left: 0; }
761
+ th:last-child,
762
+ td:last-child {
763
+ padding-right: 0; }
764
+
765
+
766
+ /* Spacing
767
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
768
+ button,
769
+ .button {
770
+ margin-bottom: 1rem; }
771
+ input,
772
+ textarea,
773
+ select,
774
+ fieldset {
775
+ margin-bottom: 1.5rem; }
776
+ pre,
777
+ blockquote,
778
+ dl,
779
+ figure,
780
+ table,
781
+ p,
782
+ ul,
783
+ ol,
784
+ form {
785
+ margin-bottom: 2.5rem; }
786
+
787
+
788
+ /* Utilities
789
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
790
+ .u-full-width {
791
+ width: 100%;
792
+ box-sizing: border-box; }
793
+ .u-max-full-width {
794
+ max-width: 100%;
795
+ box-sizing: border-box; }
796
+ .u-pull-right {
797
+ float: right; }
798
+ .u-pull-left {
799
+ float: left; }
800
+
801
+
802
+ /* Misc
803
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
804
+ hr {
805
+ margin-top: 3rem;
806
+ margin-bottom: 3.5rem;
807
+ border-width: 0;
808
+ border-top: 1px solid #E1E1E1; }
809
+
810
+
811
+ /* Clearing
812
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
813
+
814
+ /* Self Clearing Goodness */
815
+ .container:after,
816
+ .row:after,
817
+ .u-cf {
818
+ content: "";
819
+ display: table;
820
+ clear: both; }
821
+
822
+
823
+ /* Media Queries
824
+ –––––––––––––––––––––––––––––––––––––––––––––––––– */
825
+ /*
826
+ Note: The best way to structure the use of media queries is to create the queries
827
+ near the relevant code. For example, if you wanted to change the styles for buttons
828
+ on small devices, paste the mobile query code up in the buttons section and style it
829
+ there.
830
+ */
831
+
832
+
833
+ /* Larger than mobile */
834
+ @media (min-width: 400px) {}
835
+
836
+ /* Larger than phablet (also point when grid becomes active) */
837
+ @media (min-width: 550px) {}
838
+
839
+ /* Larger than tablet */
840
+ @media (min-width: 750px) {}
841
+
842
+ /* Larger than desktop */
843
+ @media (min-width: 1000px) {}
844
+
845
+ /* Larger than Desktop HD */
846
+ @media (min-width: 1200px) {}
847
+ </style>}
848
+
849
+ end
@@ -0,0 +1,103 @@
1
+
2
+
3
+ namespace :roadsign do
4
+
5
+
6
+ desc 'Creates an api documentation file from current '
7
+ task :generate do
8
+
9
+ puts "Reading routes file..."
10
+ #I am not sure if reading a file like this is any good
11
+ routesFile = File.read('config/routes.rb')
12
+ routesFile = routesFile.gsub(/(.*)(end)(.*)/, '')
13
+ puts "Routes file read, parsing..."
14
+ currentState = 0
15
+ currentComments = ''
16
+
17
+ roadsignString = '<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">'
18
+
19
+ banged = false #Used to determine if we'll need to skip one route
20
+ idCounter = 0 #Used to create unique id's for individual api endpoints
21
+ uncommentedRoutes = []
22
+ routesFile.each_line do |line|
23
+ idCounter+=1
24
+
25
+ strippedLine = line.strip
26
+
27
+ if strippedLine == ''
28
+ next
29
+ end
30
+
31
+ if currentState == 0 #Means we not found a comment yet
32
+ if strippedLine[0] == '#'
33
+ currentState =1
34
+ next
35
+ end
36
+ next
37
+ end
38
+
39
+ if currentState == 1 #Means that we already skipped first parts.
40
+ if strippedLine[0]=='#'
41
+ if strippedLine[1] == '!'
42
+ banged = true #Banged means we need to skip this function
43
+ currentState =2
44
+ next
45
+ end
46
+ currentComments += (strippedLine[1..-1] + "<br/>") #Lines first character must be a space, othervise it is a dev comment
47
+
48
+ else
49
+ currentState = 2
50
+ end
51
+
52
+ end
53
+
54
+
55
+ if currentState == 2
56
+ if banged
57
+ banged = false
58
+ next
59
+ end
60
+ if strippedLine[0] != '#'
61
+ puts "Parsing route #{strippedLine}..."
62
+ puts currentComments
63
+ if currentComments == '' #Means that the route is not commented
64
+ uncommentedRoutes << strippedLine
65
+ else
66
+ roadsignString += '<div class="panel panel-default"><div class="panel-heading"><h5><code><a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse'+idCounter.to_s+'" aria-controls="collapse'+idCounter.to_s+'">' + strippedLine.split(',').first+"</a></code></h5></div>"
67
+ roadsignString += '<div id="collapse'+idCounter.to_s+'" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading'+idCounter.to_s+'"><div class="panel-body">' + currentComments + '</div></div></div>'
68
+ currentComments = ''
69
+ end
70
+
71
+ currentState = 1
72
+ end
73
+ end
74
+
75
+ end
76
+
77
+
78
+ roadsignString += '<div class="panel panel-default"><div class="panel-heading"><h5>Uncommented Routes</h5></div><div class="panel-body"><ul class="list-group">'
79
+
80
+ uncommentedRoutes.each do |route|
81
+ roadsignString += '<li class="list-group-item">'+route+'</li>'
82
+ end
83
+ roadsignString += '</ul></div></div>'
84
+
85
+ rsPath = 'tmp/roadsign_api.rss'
86
+ File.write(rsPath,roadsignString)
87
+ puts "Wrote roadsign at #{rsPath}"
88
+
89
+ htmlPath = 'tmp/roadsign_api.html'
90
+
91
+ renderedHtml = '<html><head><title>Roadsign for : Application</title><script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.10.0/styles/default.min.css"><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.10.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="container"><div class="row">'
92
+
93
+ renderedHtml += roadsignString
94
+
95
+ renderedHtml += '</div></div></div></body></html>'
96
+
97
+
98
+
99
+ File.write(htmlPath,renderedHtml)
100
+ puts "Wrote HTML at #{htmlPath}"
101
+ end
102
+
103
+ end
@@ -1,3 +1,3 @@
1
1
  module Roadsign
2
- VERSION = "0.0.0"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,2 @@
1
+ /*! highlight.js v9.10.0 | BSD3 License | git.io/hljslicense */
2
+ !function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/[&<>]/gm,function(e){return j[e]})}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset<r[0].offset?e:r:"start"===r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}l+="<"+t(e)+E.map.call(e.attributes,r).join("")+">"}function u(e){l+="</"+t(e)+">"}function c(e){("start"===e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substring(s,g[0].offset)),s=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===s);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function l(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):x(a.k).forEach(function(e){u(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return s("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var c=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=c.length?t(c.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function s(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":I.classPrefix,i='<span class="'+a,o=t?"":C;return i+=e+'">',i+n+o}function h(){var e,t,r,a;if(!E.k)return n(k);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(k);r;)a+=n(k.substring(t,r.index)),e=s(E,r),e?(B+=e[1],a+=p(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(k);return a+n(k.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!L[E.sL])return n(k);var t=e?f(E.sL,k,!0,x[E.sL]):g(k,E.sL.length?E.sL:void 0);return E.r>0&&(B+=t.r),e&&(x[E.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){y+=null!=E.sL?d():h(),k=""}function v(e){y+=e.cN?p(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(k+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?k+=n:(t.eB&&(k+=n),b(),t.rB||t.eB||(k=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?k+=n:(a.rE||a.eE||(k+=n),b(),a.eE&&(k=n));do E.cN&&(y+=C),E.skip||(B+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"<unnamed>")+'"');return k+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');l(N);var R,E=i||N,x={},y="";for(R=E;R!==N;R=R.parent)R.cN&&(y=p(R.cN,"",!0)+y);var k="",B=0;try{for(var M,j,O=0;;){if(E.t.lastIndex=O,M=E.t.exec(t),!M)break;j=m(t.substring(O,M.index),M[0]),O=M.index+j}for(m(t.substr(O)),R=E;R.parent;R=R.parent)R.cN&&(y+=C);return{r:B,value:y,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function g(e,t){t=t||I.languages||x(L);var r={r:0,value:n(e)},a=r;return t.filter(w).forEach(function(n){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function p(e){return I.tabReplace||I.useBR?e.replace(M,function(e,n){return I.useBR&&"\n"===e?"<br>":I.tabReplace?n.replace(/\t/g,I.tabReplace):""}):e}function h(e,n,t){var r=n?y[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function d(e){var n,t,r,o,s,l=i(e);a(l)||(I.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):n=e,s=n.textContent,r=l?f(l,s,!0):g(s),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),s)),r.value=p(r.value),e.innerHTML=r.value,e.className=h(e.className,l,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function b(e){I=o(I,e)}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,d)}}function m(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)}function N(n,t){var r=L[n]=t(e);r.aliases&&r.aliases.forEach(function(e){y[e]=n})}function R(){return x(L)}function w(e){return e=(e||"").toLowerCase(),L[e]||L[y[e]]}var E=[],x=Object.keys,L={},y={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="</span>",I={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},j={"&":"&amp;","<":"&lt;",">":"&gt;"};return e.highlight=f,e.highlightAuto=g,e.fixMarkup=p,e.highlightBlock=d,e.configure=b,e.initHighlighting=v,e.initHighlightingOnLoad=m,e.registerLanguage=N,e.listLanguages=R,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/</,r:0,c:[{cN:"attr",b:e,r:0},{b:/=\s*/,r:0,c:[{cN:"string",endsParent:!0,v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s"'=<>`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("<!--","-->",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{name:"style"},c:[t],starts:{e:"</style>",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{name:"script"},c:[t],starts:{e:"</script>",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},c={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[c]}),e.C("^\\=begin","^\\=end",{c:[c],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+"|unless)\\s*",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var l="[>?]>",o="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",w=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+l+"|"+o+"|"+u+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:s.concat(w).concat(d)}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b:/</,e:/(\/\w+|\w+\/)>/,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});
@@ -0,0 +1,106 @@
1
+ /*
2
+
3
+ Railscasts-like style (c) Visoft, Inc. (Damien White)
4
+
5
+ */
6
+
7
+ .hljs {
8
+ display: block;
9
+ overflow-x: auto;
10
+ padding: 0.5em;
11
+ background: #232323;
12
+ color: #e6e1dc;
13
+ }
14
+
15
+ .hljs-comment,
16
+ .hljs-quote {
17
+ color: #bc9458;
18
+ font-style: italic;
19
+ }
20
+
21
+ .hljs-keyword,
22
+ .hljs-selector-tag {
23
+ color: #c26230;
24
+ }
25
+
26
+ .hljs-string,
27
+ .hljs-number,
28
+ .hljs-regexp,
29
+ .hljs-variable,
30
+ .hljs-template-variable {
31
+ color: #a5c261;
32
+ }
33
+
34
+ .hljs-subst {
35
+ color: #519f50;
36
+ }
37
+
38
+ .hljs-tag,
39
+ .hljs-name {
40
+ color: #e8bf6a;
41
+ }
42
+
43
+ .hljs-type {
44
+ color: #da4939;
45
+ }
46
+
47
+
48
+ .hljs-symbol,
49
+ .hljs-bullet,
50
+ .hljs-built_in,
51
+ .hljs-builtin-name,
52
+ .hljs-attr,
53
+ .hljs-link {
54
+ color: #6d9cbe;
55
+ }
56
+
57
+ .hljs-params {
58
+ color: #d0d0ff;
59
+ }
60
+
61
+ .hljs-attribute {
62
+ color: #cda869;
63
+ }
64
+
65
+ .hljs-meta {
66
+ color: #9b859d;
67
+ }
68
+
69
+ .hljs-title,
70
+ .hljs-section {
71
+ color: #ffc66d;
72
+ }
73
+
74
+ .hljs-addition {
75
+ background-color: #144212;
76
+ color: #e6e1dc;
77
+ display: inline-block;
78
+ width: 100%;
79
+ }
80
+
81
+ .hljs-deletion {
82
+ background-color: #600;
83
+ color: #e6e1dc;
84
+ display: inline-block;
85
+ width: 100%;
86
+ }
87
+
88
+ .hljs-selector-class {
89
+ color: #9b703f;
90
+ }
91
+
92
+ .hljs-selector-id {
93
+ color: #8b98ab;
94
+ }
95
+
96
+ .hljs-emphasis {
97
+ font-style: italic;
98
+ }
99
+
100
+ .hljs-strong {
101
+ font-weight: bold;
102
+ }
103
+
104
+ .hljs-link {
105
+ text-decoration: underline;
106
+ }
@@ -1,6 +1,6 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+
4
4
  require 'roadsign/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
@@ -32,4 +32,9 @@ Gem::Specification.new do |spec|
32
32
  spec.add_development_dependency "bundler", "~> 1.14"
33
33
  spec.add_development_dependency "rake", "~> 10.0"
34
34
  spec.add_development_dependency "rspec", "~> 3.0"
35
+ spec.add_dependency 'rails','~> 5.0.2'
36
+
37
+ spec.add_runtime_dependency "confluence-api-client" , "~> 0"
38
+ spec.add_runtime_dependency "rails-erd", "~> 1.5.0"
39
+ spec.add_runtime_dependency "redcarpet","~> 2.3.0"
35
40
  end
@@ -0,0 +1,48 @@
1
+ # task "roadsign:update_doc" => :environment do
2
+ # require 'confluence/api/client'
3
+ # require "rails_erd/diagram/graphviz"
4
+ # require 'base64'
5
+ #
6
+ # confluenceConfig = YAML.load_file(Rails.root + 'config/confluence.yml')
7
+ #
8
+ # client = Confluence::Api::Client.new(confluenceConfig['username'], confluenceConfig['password'], confluenceConfig['url'])
9
+ #
10
+ # result = client.get_by_id(confluenceConfig['erdpage_id'])
11
+ #
12
+ # #p result
13
+ # #puts JSON.pretty_generate(result)
14
+ # page_title = result['title']
15
+ # version_number =result['version']['number'].to_i
16
+ # Rake::Task['erd:load_models'].invoke
17
+ # erd_file_name = RailsERD::Diagram::Graphviz.create({filetype: 'png'})
18
+ #
19
+ #
20
+ #
21
+ #
22
+ # response = client.get_attachments_by_name(confluenceConfig['erdpage_id'],erd_file_name)
23
+ # if response['results'].count > 0
24
+ # update_result = client.update_file(confluenceConfig['erdpage_id'],response['results'][0]['id'],Rails.root+erd_file_name)
25
+ # puts JSON.pretty_generate(update_result)
26
+ # end
27
+ #
28
+ #
29
+ #
30
+ # erd_file_remote_path = confluenceConfig['url'] + '/wiki/download/thumbnails/' + confluenceConfig['erdpage_id'] + '/' + erd_file_name
31
+ #
32
+ # params = {version: {number: version_number+1},
33
+ # type:'page',
34
+ # title:page_title,
35
+ # body: {
36
+ # storage: {
37
+ # value: '<img src="'+erd_file_remote_path+'"></img>',
38
+ # representation: 'storage'
39
+ # }
40
+ # }
41
+ # }
42
+ # result = client.update(confluenceConfig['erdpage_id'], params)
43
+ #
44
+ # end
45
+
46
+ task "roadsign:generate" => :environment do
47
+ puts 'Hello world from roadsign'
48
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roadsign
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gokay Kucuk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-28 00:00:00.000000000 Z
11
+ date: 2017-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,62 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 5.0.2
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 5.0.2
69
+ - !ruby/object:Gem::Dependency
70
+ name: confluence-api-client
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rails-erd
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 1.5.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 1.5.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: redcarpet
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 2.3.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 2.3.0
55
111
  description:
56
112
  email:
57
113
  - m@gokaykucuk.com
@@ -70,8 +126,14 @@ files:
70
126
  - bin/console
71
127
  - bin/setup
72
128
  - lib/roadsign.rb
129
+ - lib/roadsign/railtie.rb
130
+ - lib/roadsign/static.rb
131
+ - lib/roadsign/tasks.rb
73
132
  - lib/roadsign/version.rb
133
+ - lib/static/highlight.pack.js
134
+ - lib/static/railscasts.css
74
135
  - roadsign.gemspec
136
+ - tasks/roadsign.rake
75
137
  homepage: https://github.com/gkaykck/roadsign
76
138
  licenses:
77
139
  - MIT