jekyll-reloaded 0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. data/Gemfile +2 -0
  2. data/History.txt +321 -0
  3. data/LICENSE +21 -0
  4. data/README.textile +41 -0
  5. data/Rakefile +161 -0
  6. data/bin/jekyll +289 -0
  7. data/cucumber.yml +1 -0
  8. data/features/create_sites.feature +112 -0
  9. data/features/embed_filters.feature +60 -0
  10. data/features/markdown.feature +30 -0
  11. data/features/pagination.feature +27 -0
  12. data/features/permalinks.feature +65 -0
  13. data/features/post_data.feature +153 -0
  14. data/features/site_configuration.feature +145 -0
  15. data/features/site_data.feature +82 -0
  16. data/features/step_definitions/jekyll_steps.rb +145 -0
  17. data/features/support/env.rb +19 -0
  18. data/jekyll.gemspec +146 -0
  19. data/lib/guard/jekyll.rb +57 -0
  20. data/lib/jekyll/converter.rb +50 -0
  21. data/lib/jekyll/converters/identity.rb +22 -0
  22. data/lib/jekyll/converters/markdown.rb +125 -0
  23. data/lib/jekyll/converters/textile.rb +50 -0
  24. data/lib/jekyll/convertible.rb +116 -0
  25. data/lib/jekyll/core_ext.rb +52 -0
  26. data/lib/jekyll/errors.rb +6 -0
  27. data/lib/jekyll/filters.rb +118 -0
  28. data/lib/jekyll/generator.rb +7 -0
  29. data/lib/jekyll/generators/pagination.rb +113 -0
  30. data/lib/jekyll/layout.rb +51 -0
  31. data/lib/jekyll/live_site.rb +216 -0
  32. data/lib/jekyll/migrators/csv.rb +26 -0
  33. data/lib/jekyll/migrators/drupal.rb +103 -0
  34. data/lib/jekyll/migrators/enki.rb +49 -0
  35. data/lib/jekyll/migrators/joomla.rb +53 -0
  36. data/lib/jekyll/migrators/marley.rb +52 -0
  37. data/lib/jekyll/migrators/mephisto.rb +84 -0
  38. data/lib/jekyll/migrators/mt.rb +86 -0
  39. data/lib/jekyll/migrators/posterous.rb +67 -0
  40. data/lib/jekyll/migrators/rss.rb +47 -0
  41. data/lib/jekyll/migrators/textpattern.rb +58 -0
  42. data/lib/jekyll/migrators/tumblr.rb +195 -0
  43. data/lib/jekyll/migrators/typo.rb +51 -0
  44. data/lib/jekyll/migrators/wordpress.rb +294 -0
  45. data/lib/jekyll/migrators/wordpressdotcom.rb +70 -0
  46. data/lib/jekyll/page.rb +160 -0
  47. data/lib/jekyll/plugin.rb +77 -0
  48. data/lib/jekyll/post.rb +262 -0
  49. data/lib/jekyll/site.rb +339 -0
  50. data/lib/jekyll/static_file.rb +77 -0
  51. data/lib/jekyll/tags/highlight.rb +118 -0
  52. data/lib/jekyll/tags/include.rb +37 -0
  53. data/lib/jekyll/tags/post_url.rb +38 -0
  54. data/lib/jekyll.rb +134 -0
  55. data/test/helper.rb +34 -0
  56. data/test/source/.htaccess +8 -0
  57. data/test/source/_includes/sig.markdown +3 -0
  58. data/test/source/_layouts/default.html +27 -0
  59. data/test/source/_layouts/simple.html +1 -0
  60. data/test/source/_posts/2008-02-02-not-published.textile +8 -0
  61. data/test/source/_posts/2008-02-02-published.textile +8 -0
  62. data/test/source/_posts/2008-10-18-foo-bar.textile +8 -0
  63. data/test/source/_posts/2008-11-21-complex.textile +8 -0
  64. data/test/source/_posts/2008-12-03-permalinked-post.textile +9 -0
  65. data/test/source/_posts/2008-12-13-include.markdown +8 -0
  66. data/test/source/_posts/2009-01-27-array-categories.textile +10 -0
  67. data/test/source/_posts/2009-01-27-categories.textile +7 -0
  68. data/test/source/_posts/2009-01-27-category.textile +7 -0
  69. data/test/source/_posts/2009-01-27-empty-categories.textile +7 -0
  70. data/test/source/_posts/2009-01-27-empty-category.textile +7 -0
  71. data/test/source/_posts/2009-03-12-hash-#1.markdown +6 -0
  72. data/test/source/_posts/2009-05-18-empty-tag.textile +6 -0
  73. data/test/source/_posts/2009-05-18-empty-tags.textile +6 -0
  74. data/test/source/_posts/2009-05-18-tag.textile +6 -0
  75. data/test/source/_posts/2009-05-18-tags.textile +9 -0
  76. data/test/source/_posts/2009-06-22-empty-yaml.textile +3 -0
  77. data/test/source/_posts/2009-06-22-no-yaml.textile +1 -0
  78. data/test/source/_posts/2010-01-08-triple-dash.markdown +5 -0
  79. data/test/source/_posts/2010-01-09-date-override.textile +7 -0
  80. data/test/source/_posts/2010-01-09-time-override.textile +7 -0
  81. data/test/source/_posts/2010-01-09-timezone-override.textile +7 -0
  82. data/test/source/_posts/2010-01-16-override-data.textile +4 -0
  83. data/test/source/_posts/2011-04-12-md-extension.md +7 -0
  84. data/test/source/_posts/2011-04-12-text-extension.text +0 -0
  85. data/test/source/about.html +6 -0
  86. data/test/source/category/_posts/2008-9-23-categories.textile +6 -0
  87. data/test/source/contacts.html +5 -0
  88. data/test/source/css/screen.css +76 -0
  89. data/test/source/deal.with.dots.html +7 -0
  90. data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +8 -0
  91. data/test/source/index.html +22 -0
  92. data/test/source/sitemap.xml +32 -0
  93. data/test/source/win/_posts/2009-05-24-yaml-linebreak.markdown +7 -0
  94. data/test/source/z_category/_posts/2008-9-23-categories.textile +6 -0
  95. data/test/suite.rb +11 -0
  96. data/test/test_configuration.rb +29 -0
  97. data/test/test_core_ext.rb +66 -0
  98. data/test/test_filters.rb +62 -0
  99. data/test/test_generated_site.rb +72 -0
  100. data/test/test_kramdown.rb +23 -0
  101. data/test/test_page.rb +117 -0
  102. data/test/test_pager.rb +113 -0
  103. data/test/test_post.rb +450 -0
  104. data/test/test_rdiscount.rb +18 -0
  105. data/test/test_redcarpet.rb +21 -0
  106. data/test/test_redcloth.rb +86 -0
  107. data/test/test_site.rb +220 -0
  108. data/test/test_tags.rb +201 -0
  109. metadata +332 -0
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source :rubygems
2
+ gemspec
data/History.txt ADDED
@@ -0,0 +1,321 @@
1
+ == HEAD
2
+ * Minor Enhancements
3
+ * Add ability to explicitly specify included files (#261)
4
+ * Add --default-mimetype option (#279)
5
+ * Allow setting of RedCloth options (#284)
6
+ * Add post_url Liquid tag for internal post linking (#369)
7
+ * Allow multiple plugin dirs to be specified (#438)
8
+ * Bug Fixes
9
+ * Allow some special characters in highlight names
10
+ * URL escape category names in URL generation (#360)
11
+ * Fix error with limit_posts (#442)
12
+ * Properly select dotfile during directory scan (#363, #431, #377)
13
+
14
+ == 0.11.2 / 2011-12-27
15
+ * Bug Fixes
16
+ * Fix gemspec
17
+
18
+ == 0.11.1 / 2011-12-27
19
+ * Bug Fixes
20
+ * Fix extra blank line in highlight blocks (#409)
21
+ * Update dependencies
22
+
23
+ == 0.11.0 / 2011-07-10
24
+ * Major Enhancements
25
+ * Add command line importer functionality (#253)
26
+ * Add Redcarpet Markdown support (#318)
27
+ * Make markdown/textile extensions configurable (#312)
28
+ * Add `markdownify` filter
29
+ * Minor Enhancements
30
+ * Switch to Albino gem
31
+ * Bundler support
32
+ * Use English library to avoid hoops (#292)
33
+ * Add Posterous importer (#254)
34
+ * Fixes for Wordpress importer (#274, #252, #271)
35
+ * Better error message for invalid post date (#291)
36
+ * Print formatted fatal exceptions to stdout on build failure
37
+ * Add Tumblr importer (#323)
38
+ * Add Enki importer (#320)
39
+ * Bug Fixes
40
+ * Secure additional path exploits
41
+
42
+ == 0.10.0 / 2010-12-16
43
+ * Bug Fixes
44
+ * Add --no-server option.
45
+
46
+ == 0.9.0 / 2010-12-15
47
+ * Minor Enhancements
48
+ * Use OptionParser's [no-] functionality for better boolean parsing.
49
+ * Add Drupal migrator (#245)
50
+ * Complain about YAML and Liquid errors (#249)
51
+ * Remove orphaned files during regeneration (#247)
52
+ * Add Marley migrator (#28)
53
+
54
+ == 0.8.0 / 2010-11-22
55
+ * Minor Enhancements
56
+ * Add wordpress.com importer (#207)
57
+ * Add --limit-posts cli option (#212)
58
+ * Add uri_escape filter (#234)
59
+ * Add --base-url cli option (#235)
60
+ * Improve MT migrator (#238)
61
+ * Add kramdown support (#239)
62
+ * Bug Fixes
63
+ * Fixed filename basename generation (#208)
64
+ * Set mode to UTF8 on Sequel connections (#237)
65
+ * Prevent _includes dir from being a symlink
66
+
67
+ == 0.7.0 / 2010-08-24
68
+ * Minor Enhancements
69
+ * Add support for rdiscount extensions (#173)
70
+ * Bug Fixes
71
+ * Highlight should not be able to render local files
72
+ * The site configuration may not always provide a 'time' setting (#184)
73
+
74
+ == 0.6.2 / 2010-06-25
75
+ * Bug Fixes
76
+ * Fix Rakefile 'release' task (tag pushing was missing origin)
77
+ * Ensure that RedCloth is loaded when textilize filter is used (#183)
78
+ * Expand source, destination, and plugin paths (#180)
79
+ * Fix page.url to include full relative path (#181)
80
+
81
+ == 0.6.1 / 2010-06-24
82
+ * Bug Fixes
83
+ * Fix Markdown Pygments prefix and suffix (#178)
84
+
85
+ == 0.6.0 / 2010-06-23
86
+ * Major Enhancements
87
+ * Proper plugin system (#19, #100)
88
+ * Add safe mode so unsafe converters/generators can be added
89
+ * Maruku is now the only processor dependency installed by default.
90
+ Other processors will be lazy-loaded when necessary (and prompt the
91
+ user to install them when necessary) (#57)
92
+ * Minor Enhancements
93
+ * Inclusion/exclusion of future dated posts (#59)
94
+ * Generation for a specific time (#59)
95
+ * Allocate site.time on render not per site_payload invocation (#59)
96
+ * Pages now present in the site payload and can be used through the
97
+ site.pages and site.html_pages variables
98
+ * Generate phase added to site#process and pagination is now a generator
99
+ * Switch to RakeGem for build/test process
100
+ * Only regenerate static files when they have changed (#142)
101
+ * Allow arbitrary options to Pygments (#31)
102
+ * Allow URL to be set via command line option (#147)
103
+ * Bug Fixes
104
+ * Render highlighted code for non markdown/textile pages (#116)
105
+ * Fix highlighting on Ruby 1.9 (#65)
106
+ * Fix extension munging when pretty permalinks are enabled (#64)
107
+ * Stop sorting categories (#33)
108
+ * Preserve generated attributes over front matter (#119)
109
+ * Fix source directory binding using Dir.pwd (#75)
110
+
111
+ == 0.5.7 / 2010-01-12
112
+ * Minor Enhancements
113
+ * Allow overriding of post date in the front matter (#62, #38)
114
+ * Bug Fixes
115
+ * Categories isn't always an array (#73)
116
+ * Empty tags causes error in read_posts (#84)
117
+ * Fix pagination to adhere to read/render/write paradigm
118
+ * Test Enhancement
119
+ * cucumber features no longer use site.posts.first where a better
120
+ alternative is available
121
+
122
+ == 0.5.6 / 2010-01-08
123
+ * Bug Fixes
124
+ * Require redcloth >= 4.2.1 in tests (#92)
125
+ * Don't break on triple dashes in yaml frontmatter (#93)
126
+ * Minor Enhancements
127
+ * Allow .mkd as markdown extension
128
+ * Use $stdout/err instead of constants (#99)
129
+ * Properly wrap code blocks (#91)
130
+ * Add javascript mime type for webrick (#98)
131
+
132
+ == 0.5.5 / 2010-01-08
133
+ * Bug Fixes
134
+ * Fix pagination % 0 bug (#78)
135
+ * Ensure all posts are processed first (#71)
136
+
137
+ == NOTE
138
+ * After this point I will no longer be giving credit in the history;
139
+ that is what the commit log is for.
140
+
141
+ == 0.5.4 / 2009-08-23
142
+ * Bug Fixes
143
+ * Do not allow symlinks (security vulnerability)
144
+
145
+ == 0.5.3 / 2009-07-14
146
+ * Bug Fixes
147
+ * Solving the permalink bug where non-html files wouldn't work
148
+ [github.com/jeffrydegrande]
149
+
150
+ == 0.5.2 / 2009-06-24
151
+ * Enhancements
152
+ * Added --paginate option to the executable along with a paginator object
153
+ for the payload [github.com/calavera]
154
+ * Upgraded RedCloth to 4.2.1, which makes <notextile> tags work once
155
+ again.
156
+ * Configuration options set in config.yml are now available through the
157
+ site payload [github.com/vilcans]
158
+ * Posts can now have an empty YAML front matter or none at all
159
+ [github.com/bahuvrihi]
160
+ * Bug Fixes
161
+ * Fixing Ruby 1.9 issue that requires to_s on the err object
162
+ [github.com/Chrononaut]
163
+ * Fixes for pagination and ordering posts on the same day [github.com/ujh]
164
+ * Made pages respect permalinks style and permalinks in yml front matter
165
+ [github.com/eugenebolshakov]
166
+ * Index.html file should always have index.html permalink
167
+ [github.com/eugenebolshakov]
168
+ * Added trailing slash to pretty permalink style so Apache is happy
169
+ [github.com/eugenebolshakov]
170
+ * Bad markdown processor in config fails sooner and with better message
171
+ [github.com/gcnovus]
172
+ * Allow CRLFs in yaml frontmatter [github.com/juretta]
173
+ * Added Date#xmlschema for Ruby versions < 1.9
174
+
175
+ == 0.5.1 / 2009-05-06
176
+ * Major Enhancements
177
+ * Next/previous posts in site payload [github.com/pantulis,
178
+ github.com/tomo]
179
+ * Permalink templating system
180
+ * Moved most of the README out to the GitHub wiki
181
+ * Exclude option in configuration so specified files won't be brought over
182
+ with generated site [github.com/duritong]
183
+ * Bug Fixes
184
+ * Making sure config.yaml references are all gone, using only config.yml
185
+ * Fixed syntax highlighting breaking for UTF-8 code [github.com/henrik]
186
+ * Worked around RDiscount bug that prevents Markdown from getting parsed
187
+ after highlight [github.com/henrik]
188
+ * CGI escaped post titles [github.com/Chrononaut]
189
+
190
+ == 0.5.0 / 2009-04-07
191
+ * Minor Enhancements
192
+ * Ability to set post categories via YAML [github.com/qrush]
193
+ * Ability to set prevent a post from publishing via YAML
194
+ [github.com/qrush]
195
+ * Add textilize filter [github.com/willcodeforfoo]
196
+ * Add 'pretty' permalink style for wordpress-like urls
197
+ [github.com/dysinger]
198
+ * Made it possible to enter categories from YAML as an array
199
+ [github.com/Chrononaut]
200
+ * Ignore Emacs autosave files [github.com/Chrononaut]
201
+ * Bug Fixes
202
+ * Use block syntax of popen4 to ensure that subprocesses are properly
203
+ disposed [github.com/jqr]
204
+ * Close open4 streams to prevent zombies [github.com/rtomayko]
205
+ * Only query required fields from the WP Database [github.com/ariejan]
206
+ * Prevent _posts from being copied to the destination directory
207
+ [github.com/bdimcheff]
208
+ * Refactors
209
+ * Factored the filtering code into a method [github.com/Chrononaut]
210
+ * Fix tests and convert to Shoulda [github.com/qrush,
211
+ github.com/technicalpickles]
212
+ * Add Cucumber acceptance test suite [github.com/qrush,
213
+ github.com/technicalpickles]
214
+
215
+ == 0.4.1
216
+ * Minor Enhancements
217
+ * Changed date format on wordpress converter (zeropadding)
218
+ [github.com/dysinger]
219
+ * Bug Fixes
220
+ * Add jekyll binary as executable to gemspec [github.com/dysinger]
221
+
222
+ == 0.4.0 / 2009-02-03
223
+ * Major Enhancements
224
+ * Switch to Jeweler for packaging tasks
225
+ * Minor Enhancements
226
+ * Type importer [github.com/codeslinger]
227
+ * site.topics accessor [github.com/baz]
228
+ * Add array_to_sentence_string filter [github.com/mchung]
229
+ * Add a converter for textpattern [github.com/PerfectlyNormal]
230
+ * Add a working Mephisto / MySQL converter [github.com/ivey]
231
+ * Allowing .htaccess files to be copied over into the generated site
232
+ [github.com/briandoll]
233
+ * Add option to not put file date in permalink URL [github.com/mreid]
234
+ * Add line number capabilities to highlight blocks [github.com/jcon]
235
+ * Bug Fixes
236
+ * Fix permalink behavior [github.com/cavalle]
237
+ * Fixed an issue with pygments, markdown, and newlines
238
+ [github.com/zpinter]
239
+ * Ampersands need to be escaped [github.com/pufuwozu, github.com/ap]
240
+ * Test and fix the site.categories hash [github.com/zzot]
241
+ * Fix site payload available to files [github.com/matrix9180]
242
+
243
+ == 0.3.0 / 2008-12-24
244
+ * Major Enhancements
245
+ * Added --server option to start a simple WEBrick server on destination
246
+ directory [github.com/johnreilly and github.com/mchung]
247
+ * Minor Enhancements
248
+ * Added post categories based on directories containing _posts
249
+ [github.com/mreid]
250
+ * Added post topics based on directories underneath _posts
251
+ * Added new date filter that shows the full month name [github.com/mreid]
252
+ * Merge Post's YAML front matter into its to_liquid payload
253
+ [github.com/remi]
254
+ * Restrict includes to regular files underneath _includes
255
+ * Bug Fixes
256
+ * Change YAML delimiter matcher so as to not chew up 2nd level markdown
257
+ headers [github.com/mreid]
258
+ * Fix bug that meant page data (such as the date) was not available in
259
+ templates [github.com/mreid]
260
+ * Properly reject directories in _layouts
261
+
262
+ == 0.2.1 / 2008-12-15
263
+ * Major Changes
264
+ * Use Maruku (pure Ruby) for Markdown by default [github.com/mreid]
265
+ * Allow use of RDiscount with --rdiscount flag
266
+ * Minor Enhancements
267
+ * Don't load directory_watcher unless it's needed [github.com/pjhyett]
268
+
269
+ == 0.2.0 / 2008-12-14
270
+ * Major Changes
271
+ * related_posts is now found in site.related_posts
272
+
273
+ == 0.1.6 / 2008-12-13
274
+ * Major Features
275
+ * Include files in _includes with {% include x.textile %}
276
+
277
+ == 0.1.5 / 2008-12-12
278
+ * Major Features
279
+ * Code highlighting with Pygments if --pygments is specified
280
+ * Disable true LSI by default, enable with --lsi
281
+ * Minor Enhancements
282
+ * Output informative message if RDiscount is not available
283
+ [github.com/JackDanger]
284
+ * Bug Fixes
285
+ * Prevent Jekyll from picking up the output directory as a source
286
+ [github.com/JackDanger]
287
+ * Skip related_posts when there is only one post [github.com/JackDanger]
288
+
289
+ == 0.1.4 / 2008-12-08
290
+ * Bug Fixes
291
+ * DATA does not work properly with rubygems
292
+
293
+ == 0.1.3 / 2008-12-06
294
+ * Major Features
295
+ * Markdown support [github.com/vanpelt]
296
+ * Mephisto and CSV converters [github.com/vanpelt]
297
+ * Code hilighting [github.com/vanpelt]
298
+ * Autobuild
299
+ * Bug Fixes
300
+ * Accept both \r\n and \n in YAML header [github.com/vanpelt]
301
+
302
+ == 0.1.2 / 2008-11-22
303
+ * Major Features
304
+ * Add a real "related posts" implementation using Classifier
305
+ * Command Line Changes
306
+ * Allow cli to be called with 0, 1, or 2 args intuiting dir paths
307
+ if they are omitted
308
+
309
+ == 0.1.1 / 2008-11-22
310
+ * Minor Additions
311
+ * Posts now support introspectional data e.g. {{ page.url }}
312
+
313
+ == 0.1.0 / 2008-11-05
314
+ * First release
315
+ * Converts posts written in Textile
316
+ * Converts regular site pages
317
+ * Simple copy of binary files
318
+
319
+ == 0.0.0 / 2008-10-19
320
+ * Birthday!
321
+
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2008 Tom Preston-Werner
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the 'Software'), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.textile ADDED
@@ -0,0 +1,41 @@
1
+ h1. Jekyll
2
+
3
+ By Tom Preston-Werner, Nick Quaranto, and many awesome contributors!
4
+
5
+ Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server. This is also the engine behind "GitHub Pages":http://pages.github.com, which you can use to host your project's page or blog right here from GitHub.
6
+
7
+ h2. Getting Started
8
+
9
+ * "Install":http://wiki.github.com/mojombo/jekyll/install the gem
10
+ * Read up about its "Usage":http://wiki.github.com/mojombo/jekyll/usage and "Configuration":http://wiki.github.com/mojombo/jekyll/configuration
11
+ * Take a gander at some existing "Sites":http://wiki.github.com/mojombo/jekyll/sites
12
+ * Fork and "Contribute":http://wiki.github.com/mojombo/jekyll/contribute your own modifications
13
+ * Have questions? Post them on the "Mailing List":http://groups.google.com/group/jekyll-rb
14
+
15
+ h2. Diving In
16
+
17
+ * "Migrate":http://wiki.github.com/mojombo/jekyll/blog-migrations from your previous system
18
+ * Learn how the "YAML Front Matter":http://wiki.github.com/mojombo/jekyll/yaml-front-matter works
19
+ * Put information on your site with "Template Data":http://wiki.github.com/mojombo/jekyll/template-data
20
+ * Customize the "Permalinks":http://wiki.github.com/mojombo/jekyll/permalinks your posts are generated with
21
+ * Use the built-in "Liquid Extensions":http://wiki.github.com/mojombo/jekyll/liquid-extensions to make your life easier
22
+
23
+ h2. Runtime Dependencies
24
+
25
+ * RedCloth: Textile support (Ruby)
26
+ * Liquid: Templating system (Ruby)
27
+ * Classifier: Generating related posts (Ruby)
28
+ * Maruku: Default markdown engine (Ruby)
29
+ * Directory Watcher: Auto-regeneration of sites (Ruby)
30
+ * Pygments: Syntax highlighting (Python)
31
+
32
+ h2. Developer Dependencies
33
+
34
+ * Shoulda: Test framework (Ruby)
35
+ * RR: Mocking (Ruby)
36
+ * RedGreen: Nicer test output (Ruby)
37
+ * RDiscount: Discount Markdown Processor (Ruby)
38
+
39
+ h2. License
40
+
41
+ See LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,161 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'rdoc'
4
+ require 'date'
5
+
6
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[lib]))
7
+
8
+ #############################################################################
9
+ #
10
+ # Helper functions
11
+ #
12
+ #############################################################################
13
+
14
+ def name
15
+ @name ||= Dir['*.gemspec'].first.split('.').first
16
+ end
17
+
18
+ def version
19
+ line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/]
20
+ line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
21
+ end
22
+
23
+ def date
24
+ Date.today.to_s
25
+ end
26
+
27
+ def rubyforge_project
28
+ name
29
+ end
30
+
31
+ def gemspec_file
32
+ "#{name}.gemspec"
33
+ end
34
+
35
+ def gem_file
36
+ "#{name}-#{version}.gem"
37
+ end
38
+
39
+ def replace_header(head, header_name)
40
+ head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
41
+ end
42
+
43
+ #############################################################################
44
+ #
45
+ # Standard tasks
46
+ #
47
+ #############################################################################
48
+
49
+ task :default => [:test, :features]
50
+
51
+ require 'rake/testtask'
52
+ Rake::TestTask.new(:test) do |test|
53
+ if `which pygmentize` == ''
54
+ puts "You must have Pygments installed to run the tests."
55
+ exit 1
56
+ end
57
+ test.libs << 'lib' << 'test'
58
+ test.pattern = 'test/**/test_*.rb'
59
+ test.verbose = true
60
+ end
61
+
62
+ desc "Generate RCov test coverage and open in your browser"
63
+ task :coverage do
64
+ require 'rcov'
65
+ sh "rm -fr coverage"
66
+ sh "rcov test/test_*.rb"
67
+ sh "open coverage/index.html"
68
+ end
69
+
70
+ require 'rdoc/task'
71
+ Rake::RDocTask.new do |rdoc|
72
+ rdoc.rdoc_dir = 'rdoc'
73
+ rdoc.title = "#{name} #{version}"
74
+ rdoc.rdoc_files.include('README*')
75
+ rdoc.rdoc_files.include('lib/**/*.rb')
76
+ end
77
+
78
+ desc "Open an irb session preloaded with this library"
79
+ task :console do
80
+ sh "irb -rubygems -r ./lib/#{name}.rb"
81
+ end
82
+
83
+ #############################################################################
84
+ #
85
+ # Custom tasks (add your own tasks here)
86
+ #
87
+ #############################################################################
88
+
89
+ namespace :migrate do
90
+ desc "Migrate from mephisto in the current directory"
91
+ task :mephisto do
92
+ sh %q(ruby -r './lib/jekyll/migrators/mephisto' -e 'Jekyll::Mephisto.postgres(:database => "#{ENV["DB"]}")')
93
+ end
94
+ desc "Migrate from Movable Type in the current directory"
95
+ task :mt do
96
+ sh %q(ruby -r './lib/jekyll/migrators/mt' -e 'Jekyll::MT.process("#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")')
97
+ end
98
+ desc "Migrate from Typo in the current directory"
99
+ task :typo do
100
+ sh %q(ruby -r './lib/jekyll/migrators/typo' -e 'Jekyll::Typo.process("#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")')
101
+ end
102
+ end
103
+
104
+ begin
105
+ require 'cucumber/rake/task'
106
+ Cucumber::Rake::Task.new(:features) do |t|
107
+ t.cucumber_opts = "--format progress"
108
+ end
109
+ rescue LoadError
110
+ desc 'Cucumber rake task not available'
111
+ task :features do
112
+ abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
113
+ end
114
+ end
115
+
116
+ #############################################################################
117
+ #
118
+ # Packaging tasks
119
+ #
120
+ #############################################################################
121
+
122
+ task :release => :build do
123
+ unless `git branch` =~ /^\* master$/
124
+ puts "You must be on the master branch to release!"
125
+ exit!
126
+ end
127
+ sh "git commit --allow-empty -m 'Release #{version}'"
128
+ sh "git tag v#{version}"
129
+ sh "git push origin master"
130
+ sh "git push origin v#{version}"
131
+ sh "gem push pkg/#{name}-#{version}.gem"
132
+ end
133
+
134
+ task :build => :gemspec do
135
+ sh "mkdir -p pkg"
136
+ sh "gem build #{gemspec_file}"
137
+ sh "mv #{gem_file} pkg"
138
+ end
139
+
140
+ task :gemspec do
141
+ # read spec file and split out manifest section
142
+ spec = File.read(gemspec_file)
143
+ head, manifest, tail = spec.split(" # = MANIFEST =\n")
144
+
145
+ replace_header(head, :version)
146
+
147
+ # determine file list from git ls-files
148
+ files = `git ls-files`.
149
+ split("\n").
150
+ sort.
151
+ reject { |file| file =~ /^\./ }.
152
+ reject { |file| file =~ /^(rdoc|pkg|coverage)/ }.
153
+ map { |file| " #{file}" }.
154
+ join("\n")
155
+
156
+ # piece file back together and write
157
+ manifest = " s.files = %w[\n#{files}\n ]\n"
158
+ spec = [head, manifest, tail].join(" # = MANIFEST =\n")
159
+ File.open(gemspec_file, 'w') { |io| io.write(spec) }
160
+ puts "Updated #{gemspec_file}"
161
+ end