monad 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. data/CONTRIBUTING.md +68 -0
  2. data/Gemfile +2 -0
  3. data/LICENSE +21 -0
  4. data/README.md +88 -0
  5. data/Rakefile +136 -0
  6. data/bin/monad +102 -0
  7. data/cucumber.yml +3 -0
  8. data/features/create_sites.feature +112 -0
  9. data/features/data_sources.feature +76 -0
  10. data/features/drafts.feature +25 -0
  11. data/features/embed_filters.feature +60 -0
  12. data/features/markdown.feature +30 -0
  13. data/features/pagination.feature +54 -0
  14. data/features/permalinks.feature +65 -0
  15. data/features/post_data.feature +214 -0
  16. data/features/site_configuration.feature +206 -0
  17. data/features/site_data.feature +101 -0
  18. data/features/step_definitions/monad_steps.rb +175 -0
  19. data/features/support/env.rb +25 -0
  20. data/lib/monad.rb +90 -0
  21. data/lib/monad/command.rb +27 -0
  22. data/lib/monad/commands/build.rb +64 -0
  23. data/lib/monad/commands/doctor.rb +29 -0
  24. data/lib/monad/commands/new.rb +50 -0
  25. data/lib/monad/commands/serve.rb +33 -0
  26. data/lib/monad/configuration.rb +183 -0
  27. data/lib/monad/converter.rb +48 -0
  28. data/lib/monad/converters/identity.rb +21 -0
  29. data/lib/monad/converters/markdown.rb +43 -0
  30. data/lib/monad/converters/markdown/kramdown_parser.rb +44 -0
  31. data/lib/monad/converters/markdown/maruku_parser.rb +47 -0
  32. data/lib/monad/converters/markdown/rdiscount_parser.rb +35 -0
  33. data/lib/monad/converters/markdown/redcarpet_parser.rb +70 -0
  34. data/lib/monad/converters/textile.rb +50 -0
  35. data/lib/monad/convertible.rb +152 -0
  36. data/lib/monad/core_ext.rb +68 -0
  37. data/lib/monad/deprecator.rb +32 -0
  38. data/lib/monad/draft.rb +35 -0
  39. data/lib/monad/drivers/json_driver.rb +39 -0
  40. data/lib/monad/drivers/yaml_driver.rb +23 -0
  41. data/lib/monad/errors.rb +4 -0
  42. data/lib/monad/filters.rb +154 -0
  43. data/lib/monad/generator.rb +4 -0
  44. data/lib/monad/generators/pagination.rb +143 -0
  45. data/lib/monad/layout.rb +42 -0
  46. data/lib/monad/logger.rb +54 -0
  47. data/lib/monad/mime.types +85 -0
  48. data/lib/monad/page.rb +163 -0
  49. data/lib/monad/plugin.rb +75 -0
  50. data/lib/monad/post.rb +377 -0
  51. data/lib/monad/site.rb +455 -0
  52. data/lib/monad/static_file.rb +70 -0
  53. data/lib/monad/tags/gist.rb +30 -0
  54. data/lib/monad/tags/highlight.rb +85 -0
  55. data/lib/monad/tags/include.rb +37 -0
  56. data/lib/monad/tags/post_url.rb +61 -0
  57. data/lib/site_template/.gitignore +1 -0
  58. data/lib/site_template/_config.yml +2 -0
  59. data/lib/site_template/_layouts/default.html +46 -0
  60. data/lib/site_template/_layouts/post.html +9 -0
  61. data/lib/site_template/_posts/0000-00-00-welcome-to-monad.markdown.erb +24 -0
  62. data/lib/site_template/css/main.css +165 -0
  63. data/lib/site_template/css/syntax.css +60 -0
  64. data/lib/site_template/index.html +13 -0
  65. data/monad.gemspec +197 -0
  66. data/script/bootstrap +2 -0
  67. data/test/fixtures/broken_front_matter1.erb +5 -0
  68. data/test/fixtures/broken_front_matter2.erb +4 -0
  69. data/test/fixtures/broken_front_matter3.erb +7 -0
  70. data/test/fixtures/exploit_front_matter.erb +4 -0
  71. data/test/fixtures/front_matter.erb +4 -0
  72. data/test/fixtures/members.yaml +7 -0
  73. data/test/helper.rb +62 -0
  74. data/test/source/.htaccess +8 -0
  75. data/test/source/_includes/sig.markdown +3 -0
  76. data/test/source/_layouts/default.html +27 -0
  77. data/test/source/_layouts/simple.html +1 -0
  78. data/test/source/_plugins/dummy.rb +8 -0
  79. data/test/source/_posts/2008-02-02-not-published.textile +8 -0
  80. data/test/source/_posts/2008-02-02-published.textile +8 -0
  81. data/test/source/_posts/2008-10-18-foo-bar.textile +8 -0
  82. data/test/source/_posts/2008-11-21-complex.textile +8 -0
  83. data/test/source/_posts/2008-12-03-permalinked-post.textile +9 -0
  84. data/test/source/_posts/2008-12-13-include.markdown +8 -0
  85. data/test/source/_posts/2009-01-27-array-categories.textile +10 -0
  86. data/test/source/_posts/2009-01-27-categories.textile +7 -0
  87. data/test/source/_posts/2009-01-27-category.textile +7 -0
  88. data/test/source/_posts/2009-01-27-empty-categories.textile +7 -0
  89. data/test/source/_posts/2009-01-27-empty-category.textile +7 -0
  90. data/test/source/_posts/2009-03-12-hash-#1.markdown +6 -0
  91. data/test/source/_posts/2009-05-18-empty-tag.textile +6 -0
  92. data/test/source/_posts/2009-05-18-empty-tags.textile +6 -0
  93. data/test/source/_posts/2009-05-18-tag.textile +6 -0
  94. data/test/source/_posts/2009-05-18-tags.textile +9 -0
  95. data/test/source/_posts/2009-06-22-empty-yaml.textile +3 -0
  96. data/test/source/_posts/2009-06-22-no-yaml.textile +1 -0
  97. data/test/source/_posts/2010-01-08-triple-dash.markdown +5 -0
  98. data/test/source/_posts/2010-01-09-date-override.textile +7 -0
  99. data/test/source/_posts/2010-01-09-time-override.textile +7 -0
  100. data/test/source/_posts/2010-01-09-timezone-override.textile +7 -0
  101. data/test/source/_posts/2010-01-16-override-data.textile +4 -0
  102. data/test/source/_posts/2011-04-12-md-extension.md +7 -0
  103. data/test/source/_posts/2011-04-12-text-extension.text +0 -0
  104. data/test/source/_posts/2013-01-02-post-excerpt.markdown +14 -0
  105. data/test/source/_posts/2013-01-12-nil-layout.textile +6 -0
  106. data/test/source/_posts/2013-01-12-no-layout.textile +5 -0
  107. data/test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep +0 -0
  108. data/test/source/_posts/2013-04-11-custom-excerpt.markdown +10 -0
  109. data/test/source/_posts/2013-05-10-number-category.textile +7 -0
  110. data/test/source/_posts/es/2008-11-21-nested.textile +8 -0
  111. data/test/source/about.html +6 -0
  112. data/test/source/category/_posts/2008-9-23-categories.textile +6 -0
  113. data/test/source/contacts.html +5 -0
  114. data/test/source/contacts/bar.html +5 -0
  115. data/test/source/contacts/index.html +5 -0
  116. data/test/source/css/screen.css +76 -0
  117. data/test/source/deal.with.dots.html +7 -0
  118. data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +8 -0
  119. data/test/source/index.html +22 -0
  120. data/test/source/sitemap.xml +32 -0
  121. data/test/source/symlink-test/symlinked-file +22 -0
  122. data/test/source/win/_posts/2009-05-24-yaml-linebreak.markdown +7 -0
  123. data/test/source/z_category/_posts/2008-9-23-categories.textile +6 -0
  124. data/test/suite.rb +11 -0
  125. data/test/test_command.rb +39 -0
  126. data/test/test_configuration.rb +137 -0
  127. data/test/test_convertible.rb +51 -0
  128. data/test/test_core_ext.rb +88 -0
  129. data/test/test_filters.rb +102 -0
  130. data/test/test_generated_site.rb +83 -0
  131. data/test/test_json_driver.rb +63 -0
  132. data/test/test_kramdown.rb +35 -0
  133. data/test/test_new_command.rb +104 -0
  134. data/test/test_page.rb +193 -0
  135. data/test/test_pager.rb +115 -0
  136. data/test/test_post.rb +573 -0
  137. data/test/test_rdiscount.rb +22 -0
  138. data/test/test_redcarpet.rb +61 -0
  139. data/test/test_redcloth.rb +86 -0
  140. data/test/test_site.rb +374 -0
  141. data/test/test_tags.rb +310 -0
  142. data/test/test_yaml_driver.rb +35 -0
  143. metadata +554 -0
@@ -0,0 +1,310 @@
1
+ # coding: utf-8
2
+
3
+ require 'helper'
4
+
5
+ class TestTags < Test::Unit::TestCase
6
+
7
+ def create_post(content, override = {}, converter_class = Monad::Converters::Markdown)
8
+ stub(Monad).configuration do
9
+ Monad::Configuration::DEFAULTS.deep_merge({'pygments' => true}).deep_merge(override)
10
+ end
11
+ site = Site.new(Monad.configuration)
12
+
13
+ if override['read_posts']
14
+ site.read_posts('')
15
+ end
16
+
17
+ info = { :filters => [Monad::Filters], :registers => { :site => site } }
18
+ @converter = site.converters.find { |c| c.class == converter_class }
19
+ payload = { "pygments_prefix" => @converter.pygments_prefix,
20
+ "pygments_suffix" => @converter.pygments_suffix }
21
+
22
+ @result = Liquid::Template.parse(content).render(payload, info)
23
+ @result = @converter.convert(@result)
24
+ end
25
+
26
+ def fill_post(code, override = {})
27
+ content = <<CONTENT
28
+ ---
29
+ title: This is a test
30
+ ---
31
+
32
+ This document results in a markdown error with maruku
33
+
34
+ {% highlight text %}#{code}{% endhighlight %}
35
+ {% highlight text linenos %}#{code}{% endhighlight %}
36
+ CONTENT
37
+ create_post(content, override)
38
+ end
39
+
40
+ context "language name" do
41
+ should "match only the required set of chars" do
42
+ r = Monad::Tags::HighlightBlock::SYNTAX
43
+ assert_match r, "ruby"
44
+ assert_match r, "c#"
45
+ assert_match r, "xml+cheetah"
46
+ assert_match r, "x.y"
47
+ assert_match r, "coffee-script"
48
+
49
+ assert_no_match r, "blah^"
50
+
51
+ assert_match r, "ruby key=val"
52
+ assert_match r, "ruby a=b c=d"
53
+ end
54
+ end
55
+
56
+ context "initialized tag" do
57
+ should "work" do
58
+ tag = Monad::Tags::HighlightBlock.new('highlight', 'ruby ', ["test", "{% endhighlight %}", "\n"])
59
+ assert_equal({}, tag.instance_variable_get(:@options))
60
+
61
+ tag = Monad::Tags::HighlightBlock.new('highlight', 'ruby linenos ', ["test", "{% endhighlight %}", "\n"])
62
+ assert_equal({ 'linenos' => 'inline' }, tag.instance_variable_get(:@options))
63
+
64
+ tag = Monad::Tags::HighlightBlock.new('highlight', 'ruby linenos=table ', ["test", "{% endhighlight %}", "\n"])
65
+ assert_equal({ 'linenos' => 'table' }, tag.instance_variable_get(:@options))
66
+
67
+ tag = Monad::Tags::HighlightBlock.new('highlight', 'ruby linenos=table nowrap', ["test", "{% endhighlight %}", "\n"])
68
+ assert_equal({ 'linenos' => 'table', 'nowrap' => true }, tag.instance_variable_get(:@options))
69
+
70
+ tag = Monad::Tags::HighlightBlock.new('highlight', 'ruby linenos=table cssclass=hl', ["test", "{% endhighlight %}", "\n"])
71
+ assert_equal({ 'cssclass' => 'hl', 'linenos' => 'table' }, tag.instance_variable_get(:@options))
72
+ end
73
+ end
74
+
75
+ context "post content has highlight tag" do
76
+ setup do
77
+ fill_post("test")
78
+ end
79
+
80
+ should "not cause a markdown error" do
81
+ assert_no_match /markdown\-html\-error/, @result
82
+ end
83
+
84
+ should "render markdown with pygments" do
85
+ assert_match %{<pre><code class='text'>test\n</code></pre>}, @result
86
+ end
87
+
88
+ should "render markdown with pygments with line numbers" do
89
+ assert_match %{<pre><code class='text'><span class='lineno'>1</span> test\n</code></pre>}, @result
90
+ end
91
+ end
92
+
93
+ context "post content has highlight with file reference" do
94
+ setup do
95
+ fill_post("./monad.gemspec")
96
+ end
97
+
98
+ should "not embed the file" do
99
+ assert_match %{<pre><code class='text'>./monad.gemspec\n</code></pre>}, @result
100
+ end
101
+ end
102
+
103
+ context "post content has highlight tag with UTF character" do
104
+ setup do
105
+ fill_post("Æ")
106
+ end
107
+
108
+ should "render markdown with pygments line handling" do
109
+ assert_match %{<pre><code class='text'>Æ\n</code></pre>}, @result
110
+ end
111
+ end
112
+
113
+ context "simple post with markdown and pre tags" do
114
+ setup do
115
+ @content = <<CONTENT
116
+ ---
117
+ title: Maruku vs. RDiscount
118
+ ---
119
+
120
+ _FIGHT!_
121
+
122
+ {% highlight ruby %}
123
+ puts "3..2..1.."
124
+ {% endhighlight %}
125
+
126
+ *FINISH HIM*
127
+ CONTENT
128
+ end
129
+
130
+ context "using Textile" do
131
+ setup do
132
+ create_post(@content, {}, Monad::Converters::Textile)
133
+ end
134
+
135
+ # Broken in RedCloth 4.1.9
136
+ should "not textilize highlight block" do
137
+ assert_no_match %r{3\.\.2\.\.1\.\.&quot;</span><br />}, @result
138
+ end
139
+ end
140
+
141
+ context "using Maruku" do
142
+ setup do
143
+ create_post(@content)
144
+ end
145
+
146
+ should "parse correctly" do
147
+ assert_match %r{<em>FIGHT!</em>}, @result
148
+ assert_match %r{<em>FINISH HIM</em>}, @result
149
+ end
150
+ end
151
+
152
+ context "using RDiscount" do
153
+ setup do
154
+ create_post(@content, 'markdown' => 'rdiscount')
155
+ end
156
+
157
+ should "parse correctly" do
158
+ assert_match %r{<em>FIGHT!</em>}, @result
159
+ assert_match %r{<em>FINISH HIM</em>}, @result
160
+ end
161
+ end
162
+
163
+ context "using Kramdown" do
164
+ setup do
165
+ create_post(@content, 'markdown' => 'kramdown')
166
+ end
167
+
168
+ should "parse correctly" do
169
+ assert_match %r{<em>FIGHT!</em>}, @result
170
+ assert_match %r{<em>FINISH HIM</em>}, @result
171
+ end
172
+ end
173
+
174
+ context "using Redcarpet" do
175
+ setup do
176
+ create_post(@content, 'markdown' => 'redcarpet')
177
+ end
178
+
179
+ should "parse correctly" do
180
+ assert_match %r{<em>FIGHT!</em>}, @result
181
+ assert_match %r{<em>FINISH HIM</em>}, @result
182
+ end
183
+ end
184
+ end
185
+
186
+ context "simple page with post linking" do
187
+ setup do
188
+ content = <<CONTENT
189
+ ---
190
+ title: Post linking
191
+ ---
192
+
193
+ {% post_url 2008-11-21-complex %}
194
+ CONTENT
195
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
196
+ end
197
+
198
+ should "not cause an error" do
199
+ assert_no_match /markdown\-html\-error/, @result
200
+ end
201
+
202
+ should "have the url to the \"complex\" post from 2008-11-21" do
203
+ assert_match %r{/2008/11/21/complex/}, @result
204
+ end
205
+ end
206
+
207
+ context "simple page with nested post linking" do
208
+ setup do
209
+ content = <<CONTENT
210
+ ---
211
+ title: Post linking
212
+ ---
213
+
214
+ - 1 {% post_url 2008-11-21-complex %}
215
+ - 2 {% post_url /2008-11-21-complex %}
216
+ - 3 {% post_url es/2008-11-21-nested %}
217
+ - 4 {% post_url /es/2008-11-21-nested %}
218
+ CONTENT
219
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
220
+ end
221
+
222
+ should "not cause an error" do
223
+ assert_no_match /markdown\-html\-error/, @result
224
+ end
225
+
226
+ should "have the url to the \"nested\" post from 2008-11-21" do
227
+ assert_match %r{1\s/2008/11/21/complex/}, @result
228
+ assert_match %r{2\s/2008/11/21/complex/}, @result
229
+ end
230
+
231
+ should "have the url to the \"nested\" post from 2008-11-21" do
232
+ assert_match %r{3\s/2008/11/21/nested/}, @result
233
+ assert_match %r{4\s/2008/11/21/nested/}, @result
234
+ end
235
+ end
236
+
237
+ context "gist tag" do
238
+ context "simple" do
239
+ setup do
240
+ @gist = 358471
241
+ content = <<CONTENT
242
+ ---
243
+ title: My Cool Gist
244
+ ---
245
+
246
+ {% gist #{@gist} %}
247
+ CONTENT
248
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
249
+ end
250
+
251
+ should "write script tag" do
252
+ assert_match "<script src='https://gist.github.com/#{@gist}.js'>\s</script>", @result
253
+ end
254
+ end
255
+
256
+ context "with specific file" do
257
+ setup do
258
+ @gist = 358471
259
+ @filename = 'somefile.rb'
260
+ content = <<CONTENT
261
+ ---
262
+ title: My Cool Gist
263
+ ---
264
+
265
+ {% gist #{@gist} #{@filename} %}
266
+ CONTENT
267
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
268
+ end
269
+
270
+ should "write script tag with specific file in gist" do
271
+ assert_match "<script src='https://gist.github.com/#{@gist}.js?file=#{@filename}'>\s</script>", @result
272
+ end
273
+ end
274
+
275
+ context "with blank gist id" do
276
+ setup do
277
+ content = <<CONTENT
278
+ ---
279
+ title: My Cool Gist
280
+ ---
281
+
282
+ {% gist %}
283
+ CONTENT
284
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
285
+ end
286
+
287
+ should "output error message" do
288
+ assert_match "Error parsing gist id", @result
289
+ end
290
+ end
291
+
292
+ context "with invalid gist id" do
293
+ setup do
294
+ invalid_gist = 'invalid'
295
+ content = <<CONTENT
296
+ ---
297
+ title: My Cool Gist
298
+ ---
299
+
300
+ {% gist #{invalid_gist} %}
301
+ CONTENT
302
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
303
+ end
304
+
305
+ should "output error message" do
306
+ assert_match "Error parsing gist id", @result
307
+ end
308
+ end
309
+ end
310
+ end
@@ -0,0 +1,35 @@
1
+ require 'helper'
2
+
3
+ class TestYamlDriver < Test::Unit::TestCase
4
+ context 'yaml driver' do
5
+ setup do
6
+ @base = File.expand_path('../fixtures', __FILE__)
7
+ end
8
+
9
+ should 'throw exception if path option is not parsed in' do
10
+ assert_raise FatalException do
11
+ Monad::Drivers::YamlDriver.new({})
12
+ end
13
+ end
14
+
15
+ should 'throw exception if path option is nil' do
16
+ assert_raise Monad::FatalException do
17
+ Monad::Drivers::YamlDriver.new('path' => nil)
18
+ end
19
+ end
20
+
21
+ should 'throw exception if file does not exist' do
22
+ assert_raise FatalException do
23
+ Monad::Drivers::YamlDriver.new('path' => 'nonexistfile')
24
+ end
25
+ end
26
+
27
+ should 'load valid yaml file' do
28
+ assert_nothing_raised FatalException do
29
+ members = Monad::Drivers::YamlDriver.new('path' => File.join(@base, 'members.yaml')).load
30
+
31
+ assert_equal members.size, 2
32
+ end
33
+ end
34
+ end
35
+ end
metadata ADDED
@@ -0,0 +1,554 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: monad
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - liufengyun
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-05-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: liquid
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '2.3'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '2.3'
30
+ - !ruby/object:Gem::Dependency
31
+ name: classifier
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '1.3'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '1.3'
46
+ - !ruby/object:Gem::Dependency
47
+ name: directory_watcher
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.4.1
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.4.1
62
+ - !ruby/object:Gem::Dependency
63
+ name: maruku
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '0.5'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '0.5'
78
+ - !ruby/object:Gem::Dependency
79
+ name: kramdown
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 1.0.2
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 1.0.2
94
+ - !ruby/object:Gem::Dependency
95
+ name: pygments.rb
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 0.5.0
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 0.5.0
110
+ - !ruby/object:Gem::Dependency
111
+ name: commander
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 4.1.3
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 4.1.3
126
+ - !ruby/object:Gem::Dependency
127
+ name: safe_yaml
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ~>
132
+ - !ruby/object:Gem::Version
133
+ version: 0.7.0
134
+ type: :runtime
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: 0.7.0
142
+ - !ruby/object:Gem::Dependency
143
+ name: colorator
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ~>
148
+ - !ruby/object:Gem::Version
149
+ version: '0.1'
150
+ type: :runtime
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: '0.1'
158
+ - !ruby/object:Gem::Dependency
159
+ name: rake
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ~>
164
+ - !ruby/object:Gem::Version
165
+ version: 10.0.3
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ~>
172
+ - !ruby/object:Gem::Version
173
+ version: 10.0.3
174
+ - !ruby/object:Gem::Dependency
175
+ name: rdoc
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ~>
180
+ - !ruby/object:Gem::Version
181
+ version: '3.11'
182
+ type: :development
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ~>
188
+ - !ruby/object:Gem::Version
189
+ version: '3.11'
190
+ - !ruby/object:Gem::Dependency
191
+ name: redgreen
192
+ requirement: !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ~>
196
+ - !ruby/object:Gem::Version
197
+ version: '1.2'
198
+ type: :development
199
+ prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ~>
204
+ - !ruby/object:Gem::Version
205
+ version: '1.2'
206
+ - !ruby/object:Gem::Dependency
207
+ name: shoulda
208
+ requirement: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ~>
212
+ - !ruby/object:Gem::Version
213
+ version: 3.3.2
214
+ type: :development
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ~>
220
+ - !ruby/object:Gem::Version
221
+ version: 3.3.2
222
+ - !ruby/object:Gem::Dependency
223
+ name: rr
224
+ requirement: !ruby/object:Gem::Requirement
225
+ none: false
226
+ requirements:
227
+ - - ~>
228
+ - !ruby/object:Gem::Version
229
+ version: '1.0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ~>
236
+ - !ruby/object:Gem::Version
237
+ version: '1.0'
238
+ - !ruby/object:Gem::Dependency
239
+ name: cucumber
240
+ requirement: !ruby/object:Gem::Requirement
241
+ none: false
242
+ requirements:
243
+ - - ~>
244
+ - !ruby/object:Gem::Version
245
+ version: 1.2.1
246
+ - - ! '!='
247
+ - !ruby/object:Gem::Version
248
+ version: 1.2.4
249
+ type: :development
250
+ prerelease: false
251
+ version_requirements: !ruby/object:Gem::Requirement
252
+ none: false
253
+ requirements:
254
+ - - ~>
255
+ - !ruby/object:Gem::Version
256
+ version: 1.2.1
257
+ - - ! '!='
258
+ - !ruby/object:Gem::Version
259
+ version: 1.2.4
260
+ - !ruby/object:Gem::Dependency
261
+ name: RedCloth
262
+ requirement: !ruby/object:Gem::Requirement
263
+ none: false
264
+ requirements:
265
+ - - ~>
266
+ - !ruby/object:Gem::Version
267
+ version: '4.2'
268
+ type: :development
269
+ prerelease: false
270
+ version_requirements: !ruby/object:Gem::Requirement
271
+ none: false
272
+ requirements:
273
+ - - ~>
274
+ - !ruby/object:Gem::Version
275
+ version: '4.2'
276
+ - !ruby/object:Gem::Dependency
277
+ name: rdiscount
278
+ requirement: !ruby/object:Gem::Requirement
279
+ none: false
280
+ requirements:
281
+ - - ~>
282
+ - !ruby/object:Gem::Version
283
+ version: '1.6'
284
+ type: :development
285
+ prerelease: false
286
+ version_requirements: !ruby/object:Gem::Requirement
287
+ none: false
288
+ requirements:
289
+ - - ~>
290
+ - !ruby/object:Gem::Version
291
+ version: '1.6'
292
+ - !ruby/object:Gem::Dependency
293
+ name: redcarpet
294
+ requirement: !ruby/object:Gem::Requirement
295
+ none: false
296
+ requirements:
297
+ - - ~>
298
+ - !ruby/object:Gem::Version
299
+ version: 2.2.2
300
+ type: :development
301
+ prerelease: false
302
+ version_requirements: !ruby/object:Gem::Requirement
303
+ none: false
304
+ requirements:
305
+ - - ~>
306
+ - !ruby/object:Gem::Version
307
+ version: 2.2.2
308
+ - !ruby/object:Gem::Dependency
309
+ name: launchy
310
+ requirement: !ruby/object:Gem::Requirement
311
+ none: false
312
+ requirements:
313
+ - - ~>
314
+ - !ruby/object:Gem::Version
315
+ version: 2.1.2
316
+ type: :development
317
+ prerelease: false
318
+ version_requirements: !ruby/object:Gem::Requirement
319
+ none: false
320
+ requirements:
321
+ - - ~>
322
+ - !ruby/object:Gem::Version
323
+ version: 2.1.2
324
+ - !ruby/object:Gem::Dependency
325
+ name: simplecov
326
+ requirement: !ruby/object:Gem::Requirement
327
+ none: false
328
+ requirements:
329
+ - - ~>
330
+ - !ruby/object:Gem::Version
331
+ version: '0.7'
332
+ type: :development
333
+ prerelease: false
334
+ version_requirements: !ruby/object:Gem::Requirement
335
+ none: false
336
+ requirements:
337
+ - - ~>
338
+ - !ruby/object:Gem::Version
339
+ version: '0.7'
340
+ - !ruby/object:Gem::Dependency
341
+ name: simplecov-gem-adapter
342
+ requirement: !ruby/object:Gem::Requirement
343
+ none: false
344
+ requirements:
345
+ - - ~>
346
+ - !ruby/object:Gem::Version
347
+ version: 1.0.1
348
+ type: :development
349
+ prerelease: false
350
+ version_requirements: !ruby/object:Gem::Requirement
351
+ none: false
352
+ requirements:
353
+ - - ~>
354
+ - !ruby/object:Gem::Version
355
+ version: 1.0.1
356
+ description: Monad is a simple, blog aware, static site generator based on jekyll.
357
+ email: liufengyunchina@gmail.com
358
+ executables:
359
+ - monad
360
+ extensions: []
361
+ extra_rdoc_files:
362
+ - README.md
363
+ - LICENSE
364
+ files:
365
+ - CONTRIBUTING.md
366
+ - Gemfile
367
+ - LICENSE
368
+ - README.md
369
+ - Rakefile
370
+ - bin/monad
371
+ - cucumber.yml
372
+ - features/create_sites.feature
373
+ - features/data_sources.feature
374
+ - features/drafts.feature
375
+ - features/embed_filters.feature
376
+ - features/markdown.feature
377
+ - features/pagination.feature
378
+ - features/permalinks.feature
379
+ - features/post_data.feature
380
+ - features/site_configuration.feature
381
+ - features/site_data.feature
382
+ - features/step_definitions/monad_steps.rb
383
+ - features/support/env.rb
384
+ - lib/monad.rb
385
+ - lib/monad/command.rb
386
+ - lib/monad/commands/build.rb
387
+ - lib/monad/commands/doctor.rb
388
+ - lib/monad/commands/new.rb
389
+ - lib/monad/commands/serve.rb
390
+ - lib/monad/configuration.rb
391
+ - lib/monad/converter.rb
392
+ - lib/monad/converters/identity.rb
393
+ - lib/monad/converters/markdown.rb
394
+ - lib/monad/converters/markdown/kramdown_parser.rb
395
+ - lib/monad/converters/markdown/maruku_parser.rb
396
+ - lib/monad/converters/markdown/rdiscount_parser.rb
397
+ - lib/monad/converters/markdown/redcarpet_parser.rb
398
+ - lib/monad/converters/textile.rb
399
+ - lib/monad/convertible.rb
400
+ - lib/monad/core_ext.rb
401
+ - lib/monad/deprecator.rb
402
+ - lib/monad/draft.rb
403
+ - lib/monad/drivers/json_driver.rb
404
+ - lib/monad/drivers/yaml_driver.rb
405
+ - lib/monad/errors.rb
406
+ - lib/monad/filters.rb
407
+ - lib/monad/generator.rb
408
+ - lib/monad/generators/pagination.rb
409
+ - lib/monad/layout.rb
410
+ - lib/monad/logger.rb
411
+ - lib/monad/mime.types
412
+ - lib/monad/page.rb
413
+ - lib/monad/plugin.rb
414
+ - lib/monad/post.rb
415
+ - lib/monad/site.rb
416
+ - lib/monad/static_file.rb
417
+ - lib/monad/tags/gist.rb
418
+ - lib/monad/tags/highlight.rb
419
+ - lib/monad/tags/include.rb
420
+ - lib/monad/tags/post_url.rb
421
+ - lib/site_template/.gitignore
422
+ - lib/site_template/_config.yml
423
+ - lib/site_template/_layouts/default.html
424
+ - lib/site_template/_layouts/post.html
425
+ - lib/site_template/_posts/0000-00-00-welcome-to-monad.markdown.erb
426
+ - lib/site_template/css/main.css
427
+ - lib/site_template/css/syntax.css
428
+ - lib/site_template/index.html
429
+ - monad.gemspec
430
+ - script/bootstrap
431
+ - test/fixtures/broken_front_matter1.erb
432
+ - test/fixtures/broken_front_matter2.erb
433
+ - test/fixtures/broken_front_matter3.erb
434
+ - test/fixtures/exploit_front_matter.erb
435
+ - test/fixtures/front_matter.erb
436
+ - test/fixtures/members.yaml
437
+ - test/helper.rb
438
+ - test/source/.htaccess
439
+ - test/source/_includes/sig.markdown
440
+ - test/source/_layouts/default.html
441
+ - test/source/_layouts/simple.html
442
+ - test/source/_plugins/dummy.rb
443
+ - test/source/_posts/2008-02-02-not-published.textile
444
+ - test/source/_posts/2008-02-02-published.textile
445
+ - test/source/_posts/2008-10-18-foo-bar.textile
446
+ - test/source/_posts/2008-11-21-complex.textile
447
+ - test/source/_posts/2008-12-03-permalinked-post.textile
448
+ - test/source/_posts/2008-12-13-include.markdown
449
+ - test/source/_posts/2009-01-27-array-categories.textile
450
+ - test/source/_posts/2009-01-27-categories.textile
451
+ - test/source/_posts/2009-01-27-category.textile
452
+ - test/source/_posts/2009-01-27-empty-categories.textile
453
+ - test/source/_posts/2009-01-27-empty-category.textile
454
+ - test/source/_posts/2009-03-12-hash-#1.markdown
455
+ - test/source/_posts/2009-05-18-empty-tag.textile
456
+ - test/source/_posts/2009-05-18-empty-tags.textile
457
+ - test/source/_posts/2009-05-18-tag.textile
458
+ - test/source/_posts/2009-05-18-tags.textile
459
+ - test/source/_posts/2009-06-22-empty-yaml.textile
460
+ - test/source/_posts/2009-06-22-no-yaml.textile
461
+ - test/source/_posts/2010-01-08-triple-dash.markdown
462
+ - test/source/_posts/2010-01-09-date-override.textile
463
+ - test/source/_posts/2010-01-09-time-override.textile
464
+ - test/source/_posts/2010-01-09-timezone-override.textile
465
+ - test/source/_posts/2010-01-16-override-data.textile
466
+ - test/source/_posts/2011-04-12-md-extension.md
467
+ - test/source/_posts/2011-04-12-text-extension.text
468
+ - test/source/_posts/2013-01-02-post-excerpt.markdown
469
+ - test/source/_posts/2013-01-12-nil-layout.textile
470
+ - test/source/_posts/2013-01-12-no-layout.textile
471
+ - test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep
472
+ - test/source/_posts/2013-04-11-custom-excerpt.markdown
473
+ - test/source/_posts/2013-05-10-number-category.textile
474
+ - test/source/_posts/es/2008-11-21-nested.textile
475
+ - test/source/about.html
476
+ - test/source/category/_posts/2008-9-23-categories.textile
477
+ - test/source/contacts.html
478
+ - test/source/contacts/bar.html
479
+ - test/source/contacts/index.html
480
+ - test/source/css/screen.css
481
+ - test/source/deal.with.dots.html
482
+ - test/source/foo/_posts/bar/2008-12-12-topical-post.textile
483
+ - test/source/index.html
484
+ - test/source/sitemap.xml
485
+ - test/source/symlink-test/symlinked-file
486
+ - test/source/win/_posts/2009-05-24-yaml-linebreak.markdown
487
+ - test/source/z_category/_posts/2008-9-23-categories.textile
488
+ - test/suite.rb
489
+ - test/test_command.rb
490
+ - test/test_configuration.rb
491
+ - test/test_convertible.rb
492
+ - test/test_core_ext.rb
493
+ - test/test_filters.rb
494
+ - test/test_generated_site.rb
495
+ - test/test_json_driver.rb
496
+ - test/test_kramdown.rb
497
+ - test/test_new_command.rb
498
+ - test/test_page.rb
499
+ - test/test_pager.rb
500
+ - test/test_post.rb
501
+ - test/test_rdiscount.rb
502
+ - test/test_redcarpet.rb
503
+ - test/test_redcloth.rb
504
+ - test/test_site.rb
505
+ - test/test_tags.rb
506
+ - test/test_yaml_driver.rb
507
+ homepage: http://github.com/liufengyun/monad
508
+ licenses:
509
+ - MIT
510
+ post_install_message:
511
+ rdoc_options:
512
+ - --charset=UTF-8
513
+ require_paths:
514
+ - lib
515
+ required_ruby_version: !ruby/object:Gem::Requirement
516
+ none: false
517
+ requirements:
518
+ - - ! '>='
519
+ - !ruby/object:Gem::Version
520
+ version: '0'
521
+ segments:
522
+ - 0
523
+ hash: -435190587127129160
524
+ required_rubygems_version: !ruby/object:Gem::Requirement
525
+ none: false
526
+ requirements:
527
+ - - ! '>='
528
+ - !ruby/object:Gem::Version
529
+ version: '0'
530
+ requirements: []
531
+ rubyforge_project:
532
+ rubygems_version: 1.8.24
533
+ signing_key:
534
+ specification_version: 2
535
+ summary: A simple, blog aware, static site generator based on jekyll.
536
+ test_files:
537
+ - test/test_command.rb
538
+ - test/test_configuration.rb
539
+ - test/test_convertible.rb
540
+ - test/test_core_ext.rb
541
+ - test/test_filters.rb
542
+ - test/test_generated_site.rb
543
+ - test/test_json_driver.rb
544
+ - test/test_kramdown.rb
545
+ - test/test_new_command.rb
546
+ - test/test_page.rb
547
+ - test/test_pager.rb
548
+ - test/test_post.rb
549
+ - test/test_rdiscount.rb
550
+ - test/test_redcarpet.rb
551
+ - test/test_redcloth.rb
552
+ - test/test_site.rb
553
+ - test/test_tags.rb
554
+ - test/test_yaml_driver.rb