transmarkdownifier 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/bin/transmarkdownify +770 -0
  3. metadata +106 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 08ca42de328144cf42fc6f58188ab7f790142c0c
4
+ data.tar.gz: b80b1c64376dbf94d97c08acea0a05cfb8756735
5
+ SHA512:
6
+ metadata.gz: 70755fa5b93fa2390f4995528e8c6622b47be928525af5964666cedbb540c3dd185475eb3d4f721bdfc491a8ee29726e7bfbebcfdb72b228ec22491cd18cab6b
7
+ data.tar.gz: 92ddbcdb4845a530e699732f5c9a862d5948208bb772cbb5c3d0b1ef6d90eb6c292804781661f0e7d663c74a676f01b7f725944726176a522974910ea3044bea
@@ -0,0 +1,770 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ def transmarkdownify
4
+ # Load external dependencies
5
+ begin
6
+ # To listen to file changes
7
+ require 'listen'
8
+
9
+ # Github Markup API
10
+ require 'github/markup'
11
+
12
+ # Templating
13
+ require 'erb'
14
+
15
+ # Pretty output
16
+ require 'colorize'
17
+
18
+ rescue LoadError => e
19
+ gem_name = e.path
20
+ puts "Oops. Looks like you're missing the '#{gem_name}' gem."
21
+ puts "Try running 'gem install #{gem_name}' to resolve this."
22
+ exit(1)
23
+ end
24
+ %x(which chrome-cli)
25
+ if $?.exitstatus != 0
26
+ puts "Oops. Looks like you don't have the 'chrome-cli' installed.".red
27
+ puts "Try running 'brew install chrome-cli to resolve this.".red
28
+ exit(1)
29
+ end
30
+
31
+
32
+ filename_arg = ARGV[0]
33
+ if filename_arg.nil? or !File.exists? filename_arg
34
+ puts "Please specify a filename".red
35
+ exit(1)
36
+ end
37
+
38
+ file = File.new(filename_arg)
39
+ filename = File.basename(file)
40
+ path = File.absolute_path(File.dirname(file))
41
+
42
+ html_file = convert_markdown_to_html(file)
43
+ tab_id = open_in_chrome(html_file)
44
+
45
+ listener = Listen.to(path, only: /^#{filename}$/) do |modified, added, removed|
46
+ convert_markdown_to_html(file)
47
+ %x( chrome-cli reload -t #{tab_id} )
48
+ end
49
+
50
+ listener.start
51
+ puts "Climbing under the box...".green
52
+ puts "[Ctrl+C to quit]".green
53
+ begin
54
+ sleep
55
+ # Gotta catch 'em all
56
+ rescue SystemExit, Interrupt, StandardError, Exception => e
57
+ puts ""
58
+ puts "Transmarkdownification complete!".green
59
+ exit(0)
60
+ end
61
+ end
62
+
63
+ def convert_markdown_to_html(filename)
64
+ filename = File.expand_path(filename)
65
+
66
+ doc_name = File.basename(filename, ".*")
67
+ path = File.absolute_path(File.dirname(filename))
68
+
69
+ html_filename = "#{path}/#{doc_name}.html"
70
+
71
+ template = ERB.new(template_string)
72
+ content = GitHub::Markup.render(filename, File.read(filename))
73
+
74
+ File.open(html_filename, 'w') {|f| f.write(template.result(binding)) }
75
+
76
+ return html_filename
77
+ end
78
+
79
+ def open_in_chrome( html_file )
80
+ output = %x( chrome-cli open "file://#{File.expand_path(html_file)}" )
81
+ return output.match(/^Id: (\d+)\n/)[1]
82
+ end
83
+
84
+ def template_string
85
+
86
+ html = <<EOF
87
+ <style>
88
+ @font-face {
89
+ font-family: octicons-anchor;
90
+ src: url(data:font/woff;charset=utf-8;base64,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) format('woff');
91
+ }
92
+
93
+ .markdown-body {
94
+ -ms-text-size-adjust: 100%;
95
+ -webkit-text-size-adjust: 100%;
96
+ color: #333;
97
+ overflow: hidden;
98
+ font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
99
+ font-size: 16px;
100
+ line-height: 1.6;
101
+ word-wrap: break-word;
102
+ }
103
+
104
+ .markdown-body a {
105
+ background: transparent;
106
+ }
107
+
108
+ .markdown-body a:active,
109
+ .markdown-body a:hover {
110
+ outline: 0;
111
+ }
112
+
113
+ .markdown-body strong {
114
+ font-weight: bold;
115
+ }
116
+
117
+ .markdown-body h1 {
118
+ font-size: 2em;
119
+ margin: 0.67em 0;
120
+ }
121
+
122
+ .markdown-body img {
123
+ border: 0;
124
+ }
125
+
126
+ .markdown-body hr {
127
+ box-sizing: content-box;
128
+ height: 0;
129
+ }
130
+
131
+ .markdown-body pre {
132
+ overflow: auto;
133
+ }
134
+
135
+ .markdown-body code,
136
+ .markdown-body kbd,
137
+ .markdown-body pre {
138
+ font-family: monospace, monospace;
139
+ font-size: 1em;
140
+ }
141
+
142
+ .markdown-body input {
143
+ color: inherit;
144
+ font: inherit;
145
+ margin: 0;
146
+ }
147
+
148
+ .markdown-body html input[disabled] {
149
+ cursor: default;
150
+ }
151
+
152
+ .markdown-body input {
153
+ line-height: normal;
154
+ }
155
+
156
+ .markdown-body input[type="checkbox"] {
157
+ box-sizing: border-box;
158
+ padding: 0;
159
+ }
160
+
161
+ .markdown-body table {
162
+ border-collapse: collapse;
163
+ border-spacing: 0;
164
+ }
165
+
166
+ .markdown-body td,
167
+ .markdown-body th {
168
+ padding: 0;
169
+ }
170
+
171
+ .markdown-body * {
172
+ box-sizing: border-box;
173
+ }
174
+
175
+ .markdown-body input {
176
+ font: 13px/1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
177
+ }
178
+
179
+ .markdown-body a {
180
+ color: #4183c4;
181
+ text-decoration: none;
182
+ }
183
+
184
+ .markdown-body a:hover,
185
+ .markdown-body a:active {
186
+ text-decoration: underline;
187
+ }
188
+
189
+ .markdown-body hr {
190
+ height: 0;
191
+ margin: 15px 0;
192
+ overflow: hidden;
193
+ background: transparent;
194
+ border: 0;
195
+ border-bottom: 1px solid #ddd;
196
+ }
197
+
198
+ .markdown-body hr:before {
199
+ display: table;
200
+ content: "";
201
+ }
202
+
203
+ .markdown-body hr:after {
204
+ display: table;
205
+ clear: both;
206
+ content: "";
207
+ }
208
+
209
+ .markdown-body h1,
210
+ .markdown-body h2,
211
+ .markdown-body h3,
212
+ .markdown-body h4,
213
+ .markdown-body h5,
214
+ .markdown-body h6 {
215
+ margin-top: 15px;
216
+ margin-bottom: 15px;
217
+ line-height: 1.1;
218
+ }
219
+
220
+ .markdown-body h1 {
221
+ font-size: 30px;
222
+ }
223
+
224
+ .markdown-body h2 {
225
+ font-size: 21px;
226
+ }
227
+
228
+ .markdown-body h3 {
229
+ font-size: 16px;
230
+ }
231
+
232
+ .markdown-body h4 {
233
+ font-size: 14px;
234
+ }
235
+
236
+ .markdown-body h5 {
237
+ font-size: 12px;
238
+ }
239
+
240
+ .markdown-body h6 {
241
+ font-size: 11px;
242
+ }
243
+
244
+ .markdown-body blockquote {
245
+ margin: 0;
246
+ }
247
+
248
+ .markdown-body ul,
249
+ .markdown-body ol {
250
+ padding: 0;
251
+ margin-top: 0;
252
+ margin-bottom: 0;
253
+ }
254
+
255
+ .markdown-body ol ol,
256
+ .markdown-body ul ol {
257
+ list-style-type: lower-roman;
258
+ }
259
+
260
+ .markdown-body ul ul ol,
261
+ .markdown-body ul ol ol,
262
+ .markdown-body ol ul ol,
263
+ .markdown-body ol ol ol {
264
+ list-style-type: lower-alpha;
265
+ }
266
+
267
+ .markdown-body dd {
268
+ margin-left: 0;
269
+ }
270
+
271
+ .markdown-body code {
272
+ font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
273
+ font-size: 12px;
274
+ }
275
+
276
+ .markdown-body pre {
277
+ margin-top: 0;
278
+ margin-bottom: 0;
279
+ font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
280
+ }
281
+
282
+ .markdown-body .octicon {
283
+ font: normal normal normal 16px/1 octicons-anchor;
284
+ display: inline-block;
285
+ text-decoration: none;
286
+ text-rendering: auto;
287
+ -webkit-font-smoothing: antialiased;
288
+ -moz-osx-font-smoothing: grayscale;
289
+ -webkit-user-select: none;
290
+ -moz-user-select: none;
291
+ -ms-user-select: none;
292
+ user-select: none;
293
+ }
294
+
295
+ .markdown-body .octicon-link:before {
296
+ content: '\\f05c';
297
+ }
298
+
299
+ .markdown-body>*:first-child {
300
+ margin-top: 0 !important;
301
+ }
302
+
303
+ .markdown-body>*:last-child {
304
+ margin-bottom: 0 !important;
305
+ }
306
+
307
+ .markdown-body a:not(:link):not(:visited) {
308
+ color: inherit;
309
+ text-decoration: none;
310
+ }
311
+
312
+ .markdown-body .anchor {
313
+ position: absolute;
314
+ top: 0;
315
+ left: 0;
316
+ display: block;
317
+ padding-right: 6px;
318
+ padding-left: 30px;
319
+ margin-left: -30px;
320
+ }
321
+
322
+ .markdown-body .anchor:focus {
323
+ outline: none;
324
+ }
325
+
326
+ .markdown-body h1,
327
+ .markdown-body h2,
328
+ .markdown-body h3,
329
+ .markdown-body h4,
330
+ .markdown-body h5,
331
+ .markdown-body h6 {
332
+ position: relative;
333
+ margin-top: 1em;
334
+ margin-bottom: 16px;
335
+ font-weight: bold;
336
+ line-height: 1.4;
337
+ }
338
+
339
+ .markdown-body h1 .octicon-link,
340
+ .markdown-body h2 .octicon-link,
341
+ .markdown-body h3 .octicon-link,
342
+ .markdown-body h4 .octicon-link,
343
+ .markdown-body h5 .octicon-link,
344
+ .markdown-body h6 .octicon-link {
345
+ display: none;
346
+ color: #000;
347
+ vertical-align: middle;
348
+ }
349
+
350
+ .markdown-body h1:hover .anchor,
351
+ .markdown-body h2:hover .anchor,
352
+ .markdown-body h3:hover .anchor,
353
+ .markdown-body h4:hover .anchor,
354
+ .markdown-body h5:hover .anchor,
355
+ .markdown-body h6:hover .anchor {
356
+ padding-left: 8px;
357
+ margin-left: -30px;
358
+ text-decoration: none;
359
+ }
360
+
361
+ .markdown-body h1:hover .anchor .octicon-link,
362
+ .markdown-body h2:hover .anchor .octicon-link,
363
+ .markdown-body h3:hover .anchor .octicon-link,
364
+ .markdown-body h4:hover .anchor .octicon-link,
365
+ .markdown-body h5:hover .anchor .octicon-link,
366
+ .markdown-body h6:hover .anchor .octicon-link {
367
+ display: inline-block;
368
+ }
369
+
370
+ .markdown-body h1 {
371
+ padding-bottom: 0.3em;
372
+ font-size: 2.25em;
373
+ line-height: 1.2;
374
+ border-bottom: 1px solid #eee;
375
+ }
376
+
377
+ .markdown-body h1 .anchor {
378
+ line-height: 1;
379
+ }
380
+
381
+ .markdown-body h2 {
382
+ padding-bottom: 0.3em;
383
+ font-size: 1.75em;
384
+ line-height: 1.225;
385
+ border-bottom: 1px solid #eee;
386
+ }
387
+
388
+ .markdown-body h2 .anchor {
389
+ line-height: 1;
390
+ }
391
+
392
+ .markdown-body h3 {
393
+ font-size: 1.5em;
394
+ line-height: 1.43;
395
+ }
396
+
397
+ .markdown-body h3 .anchor {
398
+ line-height: 1.2;
399
+ }
400
+
401
+ .markdown-body h4 {
402
+ font-size: 1.25em;
403
+ }
404
+
405
+ .markdown-body h4 .anchor {
406
+ line-height: 1.2;
407
+ }
408
+
409
+ .markdown-body h5 {
410
+ font-size: 1em;
411
+ }
412
+
413
+ .markdown-body h5 .anchor {
414
+ line-height: 1.1;
415
+ }
416
+
417
+ .markdown-body h6 {
418
+ font-size: 1em;
419
+ color: #777;
420
+ }
421
+
422
+ .markdown-body h6 .anchor {
423
+ line-height: 1.1;
424
+ }
425
+
426
+ .markdown-body p,
427
+ .markdown-body blockquote,
428
+ .markdown-body ul,
429
+ .markdown-body ol,
430
+ .markdown-body dl,
431
+ .markdown-body table,
432
+ .markdown-body pre {
433
+ margin-top: 0;
434
+ margin-bottom: 16px;
435
+ }
436
+
437
+ .markdown-body hr {
438
+ height: 4px;
439
+ padding: 0;
440
+ margin: 16px 0;
441
+ background-color: #e7e7e7;
442
+ border: 0 none;
443
+ }
444
+
445
+ .markdown-body ul,
446
+ .markdown-body ol {
447
+ padding-left: 2em;
448
+ }
449
+
450
+ .markdown-body ul ul,
451
+ .markdown-body ul ol,
452
+ .markdown-body ol ol,
453
+ .markdown-body ol ul {
454
+ margin-top: 0;
455
+ margin-bottom: 0;
456
+ }
457
+
458
+ .markdown-body li>p {
459
+ margin-top: 16px;
460
+ }
461
+
462
+ .markdown-body dl {
463
+ padding: 0;
464
+ }
465
+
466
+ .markdown-body dl dt {
467
+ padding: 0;
468
+ margin-top: 16px;
469
+ font-size: 1em;
470
+ font-style: italic;
471
+ font-weight: bold;
472
+ }
473
+
474
+ .markdown-body dl dd {
475
+ padding: 0 16px;
476
+ margin-bottom: 16px;
477
+ }
478
+
479
+ .markdown-body blockquote {
480
+ padding: 0 15px;
481
+ color: #777;
482
+ border-left: 4px solid #ddd;
483
+ }
484
+
485
+ .markdown-body blockquote>:first-child {
486
+ margin-top: 0;
487
+ }
488
+
489
+ .markdown-body blockquote>:last-child {
490
+ margin-bottom: 0;
491
+ }
492
+
493
+ .markdown-body table {
494
+ display: block;
495
+ width: 100%;
496
+ overflow: auto;
497
+ word-break: normal;
498
+ word-break: keep-all;
499
+ }
500
+
501
+ .markdown-body table th {
502
+ font-weight: bold;
503
+ }
504
+
505
+ .markdown-body table th,
506
+ .markdown-body table td {
507
+ padding: 6px 13px;
508
+ border: 1px solid #ddd;
509
+ }
510
+
511
+ .markdown-body table tr {
512
+ background-color: #fff;
513
+ border-top: 1px solid #ccc;
514
+ }
515
+
516
+ .markdown-body table tr:nth-child(2n) {
517
+ background-color: #f8f8f8;
518
+ }
519
+
520
+ .markdown-body img {
521
+ max-width: 100%;
522
+ box-sizing: border-box;
523
+ }
524
+
525
+ .markdown-body code {
526
+ padding: 0;
527
+ padding-top: 0.2em;
528
+ padding-bottom: 0.2em;
529
+ margin: 0;
530
+ font-size: 85%;
531
+ background-color: rgba(0,0,0,0.04);
532
+ border-radius: 3px;
533
+ }
534
+
535
+ .markdown-body code:before,
536
+ .markdown-body code:after {
537
+ letter-spacing: -0.2em;
538
+ content: "\\00a0";
539
+ }
540
+
541
+ .markdown-body pre>code {
542
+ padding: 0;
543
+ margin: 0;
544
+ font-size: 100%;
545
+ word-break: normal;
546
+ white-space: pre;
547
+ background: transparent;
548
+ border: 0;
549
+ }
550
+
551
+ .markdown-body .highlight {
552
+ margin-bottom: 16px;
553
+ }
554
+
555
+ .markdown-body .highlight pre,
556
+ .markdown-body pre {
557
+ padding: 16px;
558
+ overflow: auto;
559
+ font-size: 85%;
560
+ line-height: 1.45;
561
+ background-color: #f7f7f7;
562
+ border-radius: 3px;
563
+ }
564
+
565
+ .markdown-body .highlight pre {
566
+ margin-bottom: 0;
567
+ word-break: normal;
568
+ }
569
+
570
+ .markdown-body pre {
571
+ word-wrap: normal;
572
+ }
573
+
574
+ .markdown-body pre code {
575
+ display: inline;
576
+ max-width: initial;
577
+ padding: 0;
578
+ margin: 0;
579
+ overflow: initial;
580
+ line-height: inherit;
581
+ word-wrap: normal;
582
+ background-color: transparent;
583
+ border: 0;
584
+ }
585
+
586
+ .markdown-body pre code:before,
587
+ .markdown-body pre code:after {
588
+ content: normal;
589
+ }
590
+
591
+ .markdown-body kbd {
592
+ display: inline-block;
593
+ padding: 3px 5px;
594
+ font-size: 11px;
595
+ line-height: 10px;
596
+ color: #555;
597
+ vertical-align: middle;
598
+ background-color: #fcfcfc;
599
+ border: solid 1px #ccc;
600
+ border-bottom-color: #bbb;
601
+ border-radius: 3px;
602
+ box-shadow: inset 0 -1px 0 #bbb;
603
+ }
604
+
605
+ .markdown-body .pl-c {
606
+ color: #969896;
607
+ }
608
+
609
+ .markdown-body .pl-c1,
610
+ .markdown-body .pl-mdh,
611
+ .markdown-body .pl-mm,
612
+ .markdown-body .pl-mp,
613
+ .markdown-body .pl-mr,
614
+ .markdown-body .pl-s1 .pl-v,
615
+ .markdown-body .pl-s3,
616
+ .markdown-body .pl-sc,
617
+ .markdown-body .pl-sv {
618
+ color: #0086b3;
619
+ }
620
+
621
+ .markdown-body .pl-e,
622
+ .markdown-body .pl-en {
623
+ color: #795da3;
624
+ }
625
+
626
+ .markdown-body .pl-s1 .pl-s2,
627
+ .markdown-body .pl-smi,
628
+ .markdown-body .pl-smp,
629
+ .markdown-body .pl-stj,
630
+ .markdown-body .pl-vo,
631
+ .markdown-body .pl-vpf {
632
+ color: #333;
633
+ }
634
+
635
+ .markdown-body .pl-ent {
636
+ color: #63a35c;
637
+ }
638
+
639
+ .markdown-body .pl-k,
640
+ .markdown-body .pl-s,
641
+ .markdown-body .pl-st {
642
+ color: #a71d5d;
643
+ }
644
+
645
+ .markdown-body .pl-pds,
646
+ .markdown-body .pl-s1,
647
+ .markdown-body .pl-s1 .pl-pse .pl-s2,
648
+ .markdown-body .pl-sr,
649
+ .markdown-body .pl-sr .pl-cce,
650
+ .markdown-body .pl-sr .pl-sra,
651
+ .markdown-body .pl-sr .pl-sre,
652
+ .markdown-body .pl-src {
653
+ color: #183691;
654
+ }
655
+
656
+ .markdown-body .pl-v {
657
+ color: #ed6a43;
658
+ }
659
+
660
+ .markdown-body .pl-id {
661
+ color: #b52a1d;
662
+ }
663
+
664
+ .markdown-body .pl-ii {
665
+ background-color: #b52a1d;
666
+ color: #f8f8f8;
667
+ }
668
+
669
+ .markdown-body .pl-sr .pl-cce {
670
+ color: #63a35c;
671
+ font-weight: bold;
672
+ }
673
+
674
+ .markdown-body .pl-ml {
675
+ color: #693a17;
676
+ }
677
+
678
+ .markdown-body .pl-mh,
679
+ .markdown-body .pl-mh .pl-en,
680
+ .markdown-body .pl-ms {
681
+ color: #1d3e81;
682
+ font-weight: bold;
683
+ }
684
+
685
+ .markdown-body .pl-mq {
686
+ color: #008080;
687
+ }
688
+
689
+ .markdown-body .pl-mi {
690
+ color: #333;
691
+ font-style: italic;
692
+ }
693
+
694
+ .markdown-body .pl-mb {
695
+ color: #333;
696
+ font-weight: bold;
697
+ }
698
+
699
+ .markdown-body .pl-md,
700
+ .markdown-body .pl-mdhf {
701
+ background-color: #ffecec;
702
+ color: #bd2c00;
703
+ }
704
+
705
+ .markdown-body .pl-mdht,
706
+ .markdown-body .pl-mi1 {
707
+ background-color: #eaffea;
708
+ color: #55a532;
709
+ }
710
+
711
+ .markdown-body .pl-mdr {
712
+ color: #795da3;
713
+ font-weight: bold;
714
+ }
715
+
716
+ .markdown-body .pl-mo {
717
+ color: #1d3e81;
718
+ }
719
+
720
+ .markdown-body kbd {
721
+ display: inline-block;
722
+ padding: 3px 5px;
723
+ font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
724
+ line-height: 10px;
725
+ color: #555;
726
+ vertical-align: middle;
727
+ background-color: #fcfcfc;
728
+ border: solid 1px #ccc;
729
+ border-bottom-color: #bbb;
730
+ border-radius: 3px;
731
+ box-shadow: inset 0 -1px 0 #bbb;
732
+ }
733
+
734
+ .markdown-body .task-list-item {
735
+ list-style-type: none;
736
+ }
737
+
738
+ .markdown-body .task-list-item+.task-list-item {
739
+ margin-top: 3px;
740
+ }
741
+
742
+ .markdown-body .task-list-item input {
743
+ margin: 0 0.35em 0.25em -1.6em;
744
+ vertical-align: middle;
745
+ }
746
+
747
+ .markdown-body :checked+.radio-label {
748
+ z-index: 1;
749
+ position: relative;
750
+ border-color: #4183c4;
751
+ }
752
+ </style>
753
+ <style>
754
+ .markdown-body {
755
+ min-width: 200px;
756
+ max-width: 790px;
757
+ margin: 0 auto;
758
+ padding: 30px;
759
+ }
760
+ </style>
761
+ <article class="markdown-body">
762
+ <%= content %>
763
+ </article>
764
+ EOF
765
+
766
+
767
+ end
768
+
769
+ # Begin the Transmarkdownification process muhahahaha!
770
+ transmarkdownify
metadata ADDED
@@ -0,0 +1,106 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: transmarkdownifier
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Vidur Murali
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: listen
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.9.0
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.9.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: 2.9.0
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 2.9.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: github-markup
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: 1.3.3
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 1.3.3
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: 1.3.3
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 1.3.3
53
+ - !ruby/object:Gem::Dependency
54
+ name: colorize
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: 0.7.5
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 0.7.5
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: 0.7.5
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 0.7.5
73
+ description: Loads up a live preview of a markdown file in Chrome
74
+ email:
75
+ - vidur.murali@gmail.com
76
+ executables:
77
+ - transmarkdownify
78
+ extensions: []
79
+ extra_rdoc_files: []
80
+ files:
81
+ - bin/transmarkdownify
82
+ homepage: http://github.com/vyder/transmarkdownifier
83
+ licenses:
84
+ - LICENSE
85
+ metadata: {}
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ requirements: []
101
+ rubyforge_project:
102
+ rubygems_version: 2.2.2
103
+ signing_key:
104
+ specification_version: 4
105
+ summary: Live preview of a markdown file in Chrome
106
+ test_files: []