nandoc 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/README +124 -0
  2. data/Rakefile +53 -0
  3. data/bin/nandoc +6 -0
  4. data/doc/CREDITS.md +6 -0
  5. data/doc/FAQ/why-not-wiki.md +20 -0
  6. data/doc/FAQ.md +68 -0
  7. data/doc/TODOs-and-BUGs.md +15 -0
  8. data/doc/bar/baz.md +4 -0
  9. data/doc/bar/bliff.md +8 -0
  10. data/doc/foo.md +5 -0
  11. data/doc/getting-started.rb +13 -0
  12. data/doc/svg/less-fonts.svg +21 -0
  13. data/lib/nandoc/commands/create-nandoc-site.rb +225 -0
  14. data/lib/nandoc/commands/diff.rb +279 -0
  15. data/lib/nandoc/config.rb +58 -0
  16. data/lib/nandoc/cri-hacks.rb +13 -0
  17. data/lib/nandoc/data-source.rb +239 -0
  18. data/lib/nandoc/filters.rb +661 -0
  19. data/lib/nandoc/helpers/menu-bouncy.rb +109 -0
  20. data/lib/nandoc/helpers/site-map.rb +157 -0
  21. data/lib/nandoc/helpers/top-nav.rb +47 -0
  22. data/lib/nandoc/helpers.rb +42 -0
  23. data/lib/nandoc/item-class-hacks.rb +57 -0
  24. data/lib/nandoc/nandoc.persistent.json +3 -0
  25. data/lib/nandoc/parse-readme.rb +95 -0
  26. data/lib/nandoc/spec-doc/mini-test/spec-instance-methods.rb +0 -0
  27. data/lib/nandoc/spec-doc/mini-test.rb +105 -0
  28. data/lib/nandoc/spec-doc/mock-prompt.rb +121 -0
  29. data/lib/nandoc/spec-doc/support-modules.rb +158 -0
  30. data/lib/nandoc/spec-doc/test-case-agent.rb +57 -0
  31. data/lib/nandoc/spec-doc/test-framework-dispatcher.rb +15 -0
  32. data/lib/nandoc/spec-doc/test-framework-proxy.rb +78 -0
  33. data/lib/nandoc/spec-doc.rb +46 -0
  34. data/lib/nandoc/support/diff-proxy.rb +113 -0
  35. data/lib/nandoc/support/orphanage.rb +77 -0
  36. data/lib/nandoc/support/path-tardo.rb +85 -0
  37. data/lib/nandoc/support/regexp-enhance.rb +76 -0
  38. data/lib/nandoc/support/site-diff.rb +46 -0
  39. data/lib/nandoc/support/site-merge.rb +62 -0
  40. data/lib/nandoc/support/site-methods.rb +69 -0
  41. data/lib/nandoc/support/stream-colorizer.rb +203 -0
  42. data/lib/nandoc/support-modules.rb +270 -0
  43. data/lib/nandoc/test/diff-to-string.rb +251 -0
  44. data/lib/nandoc/test/minitest-extlib.rb +53 -0
  45. data/lib/nandoc/treebis/NOGIT-DOCS/NEWS.md +5 -0
  46. data/lib/nandoc/treebis/NOGIT-README.md +65 -0
  47. data/lib/nandoc/treebis/nandoc.persistent.json +3 -0
  48. data/lib/nandoc.rb +48 -0
  49. data/proto/README.md +31 -0
  50. data/proto/default/Rakefile +1 -0
  51. data/proto/default/Rules +46 -0
  52. data/proto/default/config.yaml +57 -0
  53. data/proto/default/content/css/nanoc-dist-altered.css +213 -0
  54. data/proto/default/content/css/trollop-subset.css +116 -0
  55. data/proto/default/content/js/menu-bouncy.js +126 -0
  56. data/proto/default/content/stylesheet.css.diff +20 -0
  57. data/proto/default/content/vendor/jquery-1.3.js +4241 -0
  58. data/proto/default/content/vendor/jquery.easing.1.3.js +205 -0
  59. data/proto/default/layouts/default.html +70 -0
  60. data/proto/default/lib/default.orig.rb +2 -0
  61. data/proto/default/lib/default.rb +5 -0
  62. data/proto/default/treebis-task.rb +28 -0
  63. data/proto/misc/orphan-surrogate.md +6 -0
  64. data/test/test.rb +102 -0
  65. metadata +166 -0
@@ -0,0 +1,205 @@
1
+ /*
2
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3
+ *
4
+ * Uses the built in easing capabilities added In jQuery 1.1
5
+ * to offer multiple easing options
6
+ *
7
+ * TERMS OF USE - jQuery Easing
8
+ *
9
+ * Open source under the BSD License.
10
+ *
11
+ * Copyright © 2008 George McGinley Smith
12
+ * All rights reserved.
13
+ *
14
+ * Redistribution and use in source and binary forms, with or without modification,
15
+ * are permitted provided that the following conditions are met:
16
+ *
17
+ * Redistributions of source code must retain the above copyright notice, this list of
18
+ * conditions and the following disclaimer.
19
+ * Redistributions in binary form must reproduce the above copyright notice, this list
20
+ * of conditions and the following disclaimer in the documentation and/or other materials
21
+ * provided with the distribution.
22
+ *
23
+ * Neither the name of the author nor the names of contributors may be used to endorse
24
+ * or promote products derived from this software without specific prior written permission.
25
+ *
26
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
27
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
31
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
35
+ *
36
+ */
37
+
38
+ // t: current time, b: begInnIng value, c: change In value, d: duration
39
+ jQuery.easing['jswing'] = jQuery.easing['swing'];
40
+
41
+ jQuery.extend( jQuery.easing,
42
+ {
43
+ def: 'easeOutQuad',
44
+ swing: function (x, t, b, c, d) {
45
+ //alert(jQuery.easing.default);
46
+ return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
47
+ },
48
+ easeInQuad: function (x, t, b, c, d) {
49
+ return c*(t/=d)*t + b;
50
+ },
51
+ easeOutQuad: function (x, t, b, c, d) {
52
+ return -c *(t/=d)*(t-2) + b;
53
+ },
54
+ easeInOutQuad: function (x, t, b, c, d) {
55
+ if ((t/=d/2) < 1) return c/2*t*t + b;
56
+ return -c/2 * ((--t)*(t-2) - 1) + b;
57
+ },
58
+ easeInCubic: function (x, t, b, c, d) {
59
+ return c*(t/=d)*t*t + b;
60
+ },
61
+ easeOutCubic: function (x, t, b, c, d) {
62
+ return c*((t=t/d-1)*t*t + 1) + b;
63
+ },
64
+ easeInOutCubic: function (x, t, b, c, d) {
65
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
66
+ return c/2*((t-=2)*t*t + 2) + b;
67
+ },
68
+ easeInQuart: function (x, t, b, c, d) {
69
+ return c*(t/=d)*t*t*t + b;
70
+ },
71
+ easeOutQuart: function (x, t, b, c, d) {
72
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
73
+ },
74
+ easeInOutQuart: function (x, t, b, c, d) {
75
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
76
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
77
+ },
78
+ easeInQuint: function (x, t, b, c, d) {
79
+ return c*(t/=d)*t*t*t*t + b;
80
+ },
81
+ easeOutQuint: function (x, t, b, c, d) {
82
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
83
+ },
84
+ easeInOutQuint: function (x, t, b, c, d) {
85
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
86
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
87
+ },
88
+ easeInSine: function (x, t, b, c, d) {
89
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
90
+ },
91
+ easeOutSine: function (x, t, b, c, d) {
92
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
93
+ },
94
+ easeInOutSine: function (x, t, b, c, d) {
95
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
96
+ },
97
+ easeInExpo: function (x, t, b, c, d) {
98
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
99
+ },
100
+ easeOutExpo: function (x, t, b, c, d) {
101
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
102
+ },
103
+ easeInOutExpo: function (x, t, b, c, d) {
104
+ if (t==0) return b;
105
+ if (t==d) return b+c;
106
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
107
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
108
+ },
109
+ easeInCirc: function (x, t, b, c, d) {
110
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
111
+ },
112
+ easeOutCirc: function (x, t, b, c, d) {
113
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
114
+ },
115
+ easeInOutCirc: function (x, t, b, c, d) {
116
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
117
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
118
+ },
119
+ easeInElastic: function (x, t, b, c, d) {
120
+ var s=1.70158;var p=0;var a=c;
121
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
122
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
123
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
124
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
125
+ },
126
+ easeOutElastic: function (x, t, b, c, d) {
127
+ var s=1.70158;var p=0;var a=c;
128
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
129
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
130
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
131
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
132
+ },
133
+ easeInOutElastic: function (x, t, b, c, d) {
134
+ var s=1.70158;var p=0;var a=c;
135
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
136
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
137
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
138
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
139
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
140
+ },
141
+ easeInBack: function (x, t, b, c, d, s) {
142
+ if (s == undefined) s = 1.70158;
143
+ return c*(t/=d)*t*((s+1)*t - s) + b;
144
+ },
145
+ easeOutBack: function (x, t, b, c, d, s) {
146
+ if (s == undefined) s = 1.70158;
147
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
148
+ },
149
+ easeInOutBack: function (x, t, b, c, d, s) {
150
+ if (s == undefined) s = 1.70158;
151
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
152
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
153
+ },
154
+ easeInBounce: function (x, t, b, c, d) {
155
+ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
156
+ },
157
+ easeOutBounce: function (x, t, b, c, d) {
158
+ if ((t/=d) < (1/2.75)) {
159
+ return c*(7.5625*t*t) + b;
160
+ } else if (t < (2/2.75)) {
161
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
162
+ } else if (t < (2.5/2.75)) {
163
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
164
+ } else {
165
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
166
+ }
167
+ },
168
+ easeInOutBounce: function (x, t, b, c, d) {
169
+ if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
170
+ return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
171
+ }
172
+ });
173
+
174
+ /*
175
+ *
176
+ * TERMS OF USE - EASING EQUATIONS
177
+ *
178
+ * Open source under the BSD License.
179
+ *
180
+ * Copyright © 2001 Robert Penner
181
+ * All rights reserved.
182
+ *
183
+ * Redistribution and use in source and binary forms, with or without modification,
184
+ * are permitted provided that the following conditions are met:
185
+ *
186
+ * Redistributions of source code must retain the above copyright notice, this list of
187
+ * conditions and the following disclaimer.
188
+ * Redistributions in binary form must reproduce the above copyright notice, this list
189
+ * of conditions and the following disclaimer in the documentation and/or other materials
190
+ * provided with the distribution.
191
+ *
192
+ * Neither the name of the author nor the names of contributors may be used to endorse
193
+ * or promote products derived from this software without specific prior written permission.
194
+ *
195
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
196
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
197
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
198
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
199
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
200
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
201
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
202
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
203
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
204
+ *
205
+ */
@@ -0,0 +1,70 @@
1
+ <!DOCTYPE HTML>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>A Brand New nanDoc Site - <%= @item.nandoc_title %></title>
6
+ <link rel="stylesheet" type="text/css" href="/css/nanoc-dist-altered.css" media="screen">
7
+ <link rel="stylesheet" type="text/css" href="/css/trollop-subset.css" media="screen">
8
+ <script type="text/javascript" src="/vendor/jquery-1.3.js"></script>
9
+ <script type="text/javascript" src="/vendor/jquery.easing.1.3.js"></script>
10
+ <script type="text/javascript" src="/js/menu-bouncy.js"></script>
11
+ <meta name="generator" content="nanoc 3.1.2">
12
+ </head>
13
+ <body>
14
+ <div class="sidebar">
15
+ <h2 class='nanoc-sidebar-h2'>Documentation</h2>
16
+ <div class='nandoc-site-map'>
17
+ <%=
18
+ nandoc_sitemap(binding) do |it|
19
+ it.glyphs, it.root_identifier, it.tabs = :right, '/', 4
20
+ it.children &Nanoc3::Item.sorted_visible_children
21
+ it.render_parent do |m|<<-H
22
+ <ul class='nested'>
23
+ #{m.render_children(:tabs=>7)}
24
+ </ul>
25
+ H
26
+ end
27
+ it.render_child do |map|
28
+ <<-H
29
+ <li class='lvl#{map.level}'>
30
+ #{link_to_unless_current(map.item.nandoc_title, map.item.path)}
31
+ #{map.glyphs_right}
32
+ #{map.render_parent}
33
+ </li>
34
+ H
35
+ end
36
+ end
37
+ %>
38
+ </div><% if false %>
39
+ <h2 class='nanoc-sidebar-h2'>Documentation</h2>
40
+ <ul>
41
+ <li><a href="http://nanoc.stoneship.org/docs/">Documentation</a></li>
42
+ <li><a href="http://nanoc.stoneship.org/docs/3-getting-started/">Getting Started</a></li>
43
+ </ul>
44
+ <h2 class='nanoc-sidebar-h2'>Community</h2>
45
+ <ul>
46
+ <li><a href="http://groups.google.com/group/nanoc/">Discussion Group</a></li>
47
+ <li><a href="irc://chat.freenode.net/#nanoc">IRC Channel</a></li>
48
+ <li><a href="http://projects.stoneship.org/trac/nanoc/">Wiki</a></li>
49
+ </ul><% end %>
50
+ </div>
51
+ <div class="main">
52
+ <div class="nandoc-topnav">
53
+ <%=
54
+ These = {
55
+ '❦' => '&#10086;',
56
+ '❧' => '&#10087;',
57
+ '♠' => '&spades;'
58
+ } unless self.class.const_defined?('These') # hm
59
+ nandoc_menu_bouncy(binding) do |it|
60
+ it.separator = These['❧']
61
+ it.tabs = 4
62
+ end
63
+ %>
64
+ </div>
65
+ <div class='clear'></div>
66
+ <%= yield %>
67
+ <div class='clear'>&nbsp;</div>
68
+ </div>
69
+ </body>
70
+ </html>
@@ -0,0 +1,2 @@
1
+ # All files in the 'lib' directory will be loaded
2
+ # before nanoc starts compiling.
@@ -0,0 +1,5 @@
1
+ # All files in the 'lib' directory will be loaded
2
+ # before nanoc starts compiling.
3
+
4
+ include Nanoc3::Helpers::LinkTo
5
+ include NanDoc::Helpers::NanDocHelpers
@@ -0,0 +1,28 @@
1
+ # This is a treebis patch file for this folder and its contents.
2
+ # it is intended to be applied to a default nanoc site, and will
3
+ # mostly likely break whenever that changes. See the README sibling
4
+ # to the folder containing this file.
5
+
6
+ Treebis.tasks.task(:default) do
7
+ # opts[:patch_hack] = true
8
+ remove './content/index.html' # assume we will use README.md for now.
9
+ # we don't want multiple '/' @items.
10
+ # apply './Rules.diff'
11
+ # apply './config.yaml.diff'
12
+ # apply './content/stylesheet.css.diff'
13
+ # move './content/stylesheet.css', 'content/css/nanoc-dist-altered.css'
14
+ # apply './layouts/default.html.diff'
15
+ # apply './lib/default.rb.diff'
16
+ copy './Rules'
17
+ copy './Rakefile'
18
+ copy './config.yaml'
19
+ mkdir_p './content/css/'
20
+ remove './content/stylesheet.css'
21
+ copy './content/css/*.css'
22
+ mkdir_p './content/js/'
23
+ copy './content/js/*.js'
24
+ mkdir_p './content/vendor/'
25
+ copy './content/vendor/*.js'
26
+ copy './layouts/default.html'
27
+ copy './lib/default.rb'
28
+ end
@@ -0,0 +1,6 @@
1
+ ## <%= @item.nandoc_title %>
2
+
3
+ <% cx = @item.nandoc_sorted_visible_children %>
4
+ <% cx.each do |item| %>
5
+ * <%= link_to(item.nandoc_title, item.path) %>
6
+ <% end %>
data/test/test.rb ADDED
@@ -0,0 +1,102 @@
1
+ require 'minitest/spec'
2
+ require 'nandoc/spec-doc/mock-prompt'
3
+
4
+ MiniTest::Unit.autorun
5
+
6
+ describe 'Basic' do
7
+ Treebis::PersistentDotfile.include_to(self, '.nandoc.persistent.json')
8
+ include Treebis::DirAsHash
9
+ include Treebis::Sopen2
10
+
11
+ def file_utils
12
+ @fu ||= NanDoc::Config.file_utils
13
+ end
14
+
15
+ def prompt
16
+ NanDoc::MockPrompt.new(self)
17
+ end
18
+
19
+ before do
20
+ @pwd = tmpdir + '/foo'
21
+ file_utils.remove_entry_secure @pwd
22
+ basic_tree = {
23
+ 'README' => <<-HERE.gsub(/^ +/,'')
24
+ # Hello
25
+
26
+ ## Hi
27
+ this is some stuff
28
+ ruby:
29
+ ~~~
30
+ This::Is(:some => 'ruby'){ |x| x.code! }
31
+ ~~~
32
+ HERE
33
+ }
34
+ hash_to_dir basic_tree, @pwd, file_utils
35
+ end
36
+
37
+ it 'basic usage -- readme' do
38
+ prompt.cd(@pwd) do |p|
39
+ p.record
40
+ p.enter2 'cat README'
41
+ p.out <<-HERE
42
+ # Hello
43
+
44
+ ## Hi
45
+ this is some stuff
46
+ ruby:
47
+ ~~~
48
+ This::Is(:some => 'ruby'){ |x| x.code! }
49
+ ~~~
50
+ HERE
51
+ end
52
+ end
53
+
54
+ it 'basic usage -- create site' do
55
+ prompt.cd(@pwd) do |p|
56
+ p.record
57
+ p.enter2 'nandoc create_nandoc_site my-site'
58
+ p.out_begin <<-HERE
59
+ \e[1m\e[32m create\e[0m config.yaml
60
+ \e[1m\e[32m create\e[0m Rakefile
61
+ \e[1m\e[32m create\e[0m Rules
62
+ \e[1m\e[32m create\e[0m content/index.html
63
+ HERE
64
+ p.cosmetic_ellipsis " [...]"
65
+ p.out_end <<-HERE
66
+ \e[1;32mcp\e[0m ...oto/default/layouts/default.html layouts/default.html
67
+ \e[1;32mcp\e[0m ...oto/default/lib/default.rb lib/default.rb
68
+ Created a blank nanoc site at 'my-site'. Enjoy!
69
+ HERE
70
+ p.record_stop
71
+ p.err ""
72
+ p.record 'compile site'
73
+ p.cd(@pwd,'my-site') do
74
+ p.enter2 'nandoc compile'
75
+ p.out((
76
+ <<-HERE
77
+ Loading site data...
78
+ Compiling site...
79
+ \e[1m\e[32m create\e[0m [0.00s] output/vendor/jquery.easing.1.3.js
80
+ \e[1m\e[32m create\e[0m [0.00s] output/css/trollop-subset.css
81
+ \e[1m\e[32m create\e[0m [0.00s] output/vendor/jquery-1.3.js
82
+ \e[1m\e[32m create\e[0m [0.00s] output/js/menu-bouncy.js
83
+ \e[1m\e[32m create\e[0m [0.00s] output/css/nanoc-dist-altered.css
84
+ \e[1m\e[32m create\e[0m [0.16s] output/index.html
85
+
86
+ Site compiled in 0.17s.
87
+ HERE
88
+ ), :ignoring => /\d\.\d\ds/ )
89
+ end
90
+ weird_nokogiri_stuff(@pwd+'/my-site', p)
91
+ end
92
+ end
93
+ def weird_nokogiri_stuff path, prompt
94
+ require 'nokogiri'
95
+ path = path + '/output/index.html'
96
+ doc = Nokogiri::HTML::Document.parse(File.read(path))
97
+ body_content = doc.xpath('//body').first.inner_html
98
+ assert_match(/this is some stuff/, body_content)
99
+ prompt.record 'index page body'
100
+ prompt.note{ body_content }
101
+ end
102
+ end
metadata ADDED
@@ -0,0 +1,166 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nandoc
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - Chip Malice
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-05-11 00:00:00 -04:00
18
+ default_executable: nandoc
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: nanoc3
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 3
29
+ - 1
30
+ - 2
31
+ version: 3.1.2
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: treebis
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ - 0
44
+ - 1
45
+ version: 0.0.1
46
+ type: :runtime
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: syntax
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 1
57
+ - 0
58
+ - 0
59
+ version: 1.0.0
60
+ type: :runtime
61
+ version_requirements: *id003
62
+ description: Generate a static site to document your ruby project from your README and other markdown-formatted documentation. Inject code examples from your unit tests into the generated docs. Extremely fragile hacks and some cool additions to nanoc3.
63
+ email: chip.malice@gmail.com
64
+ executables:
65
+ - nandoc
66
+ extensions: []
67
+
68
+ extra_rdoc_files:
69
+ - README
70
+ files:
71
+ - Rakefile
72
+ - bin/nandoc
73
+ - doc/CREDITS.md
74
+ - doc/FAQ.md
75
+ - doc/FAQ/why-not-wiki.md
76
+ - doc/TODOs-and-BUGs.md
77
+ - doc/bar/baz.md
78
+ - doc/bar/bliff.md
79
+ - doc/foo.md
80
+ - doc/getting-started.rb
81
+ - doc/svg/less-fonts.svg
82
+ - lib/nandoc.rb
83
+ - lib/nandoc/commands/create-nandoc-site.rb
84
+ - lib/nandoc/commands/diff.rb
85
+ - lib/nandoc/config.rb
86
+ - lib/nandoc/cri-hacks.rb
87
+ - lib/nandoc/data-source.rb
88
+ - lib/nandoc/filters.rb
89
+ - lib/nandoc/helpers.rb
90
+ - lib/nandoc/helpers/menu-bouncy.rb
91
+ - lib/nandoc/helpers/site-map.rb
92
+ - lib/nandoc/helpers/top-nav.rb
93
+ - lib/nandoc/item-class-hacks.rb
94
+ - lib/nandoc/nandoc.persistent.json
95
+ - lib/nandoc/parse-readme.rb
96
+ - lib/nandoc/spec-doc.rb
97
+ - lib/nandoc/spec-doc/mini-test.rb
98
+ - lib/nandoc/spec-doc/mini-test/spec-instance-methods.rb
99
+ - lib/nandoc/spec-doc/mock-prompt.rb
100
+ - lib/nandoc/spec-doc/support-modules.rb
101
+ - lib/nandoc/spec-doc/test-case-agent.rb
102
+ - lib/nandoc/spec-doc/test-framework-dispatcher.rb
103
+ - lib/nandoc/spec-doc/test-framework-proxy.rb
104
+ - lib/nandoc/support-modules.rb
105
+ - lib/nandoc/support/diff-proxy.rb
106
+ - lib/nandoc/support/orphanage.rb
107
+ - lib/nandoc/support/path-tardo.rb
108
+ - lib/nandoc/support/regexp-enhance.rb
109
+ - lib/nandoc/support/site-diff.rb
110
+ - lib/nandoc/support/site-merge.rb
111
+ - lib/nandoc/support/site-methods.rb
112
+ - lib/nandoc/support/stream-colorizer.rb
113
+ - lib/nandoc/test/diff-to-string.rb
114
+ - lib/nandoc/test/minitest-extlib.rb
115
+ - lib/nandoc/treebis/NOGIT-DOCS/NEWS.md
116
+ - lib/nandoc/treebis/NOGIT-README.md
117
+ - lib/nandoc/treebis/nandoc.persistent.json
118
+ - proto/README.md
119
+ - proto/default/Rakefile
120
+ - proto/default/Rules
121
+ - proto/default/config.yaml
122
+ - proto/default/content/css/nanoc-dist-altered.css
123
+ - proto/default/content/css/trollop-subset.css
124
+ - proto/default/content/js/menu-bouncy.js
125
+ - proto/default/content/stylesheet.css.diff
126
+ - proto/default/content/vendor/jquery-1.3.js
127
+ - proto/default/content/vendor/jquery.easing.1.3.js
128
+ - proto/default/layouts/default.html
129
+ - proto/default/lib/default.orig.rb
130
+ - proto/default/lib/default.rb
131
+ - proto/default/treebis-task.rb
132
+ - proto/misc/orphan-surrogate.md
133
+ - test/test.rb
134
+ - README
135
+ has_rdoc: true
136
+ homepage: http://nandoc.hipeland.org
137
+ licenses: []
138
+
139
+ post_install_message:
140
+ rdoc_options:
141
+ - --charset=UTF-8
142
+ require_paths:
143
+ - lib
144
+ required_ruby_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ segments:
149
+ - 0
150
+ version: "0"
151
+ required_rubygems_version: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ segments:
156
+ - 0
157
+ version: "0"
158
+ requirements: []
159
+
160
+ rubyforge_project: nandoc
161
+ rubygems_version: 1.3.6
162
+ signing_key:
163
+ specification_version: 3
164
+ summary: hack of [nanoc3](http://nanoc.stoneship.org) to generate a static site of your ruby project from your README etc.
165
+ test_files:
166
+ - test/test.rb