henshin 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/.yardoc/checksums +12 -0
  4. data/.yardoc/objects/Hash.dat +0 -0
  5. data/.yardoc/objects/Hash/to_options_i.dat +0 -0
  6. data/.yardoc/objects/Henshin.dat +0 -0
  7. data/.yardoc/objects/Henshin/CSSGenerator.dat +0 -0
  8. data/.yardoc/objects/Henshin/CSSGenerator/generate_i.dat +0 -0
  9. data/.yardoc/objects/Henshin/Defaults.dat +0 -0
  10. data/.yardoc/objects/Henshin/Gen.dat +0 -0
  11. data/.yardoc/objects/Henshin/Gen/config_3D_i.dat +0 -0
  12. data/.yardoc/objects/Henshin/Gen/config_i.dat +0 -0
  13. data/.yardoc/objects/Henshin/Gen/content_3D_i.dat +0 -0
  14. data/.yardoc/objects/Henshin/Gen/content_i.dat +0 -0
  15. data/.yardoc/objects/Henshin/Gen/date_3D_i.dat +0 -0
  16. data/.yardoc/objects/Henshin/Gen/date_i.dat +0 -0
  17. data/.yardoc/objects/Henshin/Gen/extension_3D_i.dat +0 -0
  18. data/.yardoc/objects/Henshin/Gen/extension_i.dat +0 -0
  19. data/.yardoc/objects/Henshin/Gen/initialize_i.dat +0 -0
  20. data/.yardoc/objects/Henshin/Gen/layout_3D_i.dat +0 -0
  21. data/.yardoc/objects/Henshin/Gen/layout_i.dat +0 -0
  22. data/.yardoc/objects/Henshin/Gen/override_i.dat +0 -0
  23. data/.yardoc/objects/Henshin/Gen/path_3D_i.dat +0 -0
  24. data/.yardoc/objects/Henshin/Gen/path_i.dat +0 -0
  25. data/.yardoc/objects/Henshin/Gen/payload_i.dat +0 -0
  26. data/.yardoc/objects/Henshin/Gen/process_i.dat +0 -0
  27. data/.yardoc/objects/Henshin/Gen/read_yaml_i.dat +0 -0
  28. data/.yardoc/objects/Henshin/Gen/render_i.dat +0 -0
  29. data/.yardoc/objects/Henshin/Gen/site_3D_i.dat +0 -0
  30. data/.yardoc/objects/Henshin/Gen/site_i.dat +0 -0
  31. data/.yardoc/objects/Henshin/Gen/title_3D_i.dat +0 -0
  32. data/.yardoc/objects/Henshin/Gen/title_i.dat +0 -0
  33. data/.yardoc/objects/Henshin/Gen/write_i.dat +0 -0
  34. data/.yardoc/objects/Henshin/HTMLGenerator.dat +0 -0
  35. data/.yardoc/objects/Henshin/HTMLGenerator/generate_i.dat +0 -0
  36. data/.yardoc/objects/Henshin/JSGenerator.dat +0 -0
  37. data/.yardoc/objects/Henshin/JSGenerator/generate_i.dat +0 -0
  38. data/.yardoc/objects/Henshin/LayoutParser.dat +0 -0
  39. data/.yardoc/objects/Henshin/LayoutParser/generate_i.dat +0 -0
  40. data/.yardoc/objects/Henshin/Post.dat +0 -0
  41. data/.yardoc/objects/Henshin/Post/author_3D_i.dat +0 -0
  42. data/.yardoc/objects/Henshin/Post/author_i.dat +0 -0
  43. data/.yardoc/objects/Henshin/Post/category_3D_i.dat +0 -0
  44. data/.yardoc/objects/Henshin/Post/category_i.dat +0 -0
  45. data/.yardoc/objects/Henshin/Post/date_3D_i.dat +0 -0
  46. data/.yardoc/objects/Henshin/Post/date_i.dat +0 -0
  47. data/.yardoc/objects/Henshin/Post/initialize_i.dat +0 -0
  48. data/.yardoc/objects/Henshin/Post/override_i.dat +0 -0
  49. data/.yardoc/objects/Henshin/Post/payload_i.dat +0 -0
  50. data/.yardoc/objects/Henshin/Post/permalink_i.dat +0 -0
  51. data/.yardoc/objects/Henshin/Post/process_i.dat +0 -0
  52. data/.yardoc/objects/Henshin/Post/read_name_i.dat +0 -0
  53. data/.yardoc/objects/Henshin/Post/read_yaml_i.dat +0 -0
  54. data/.yardoc/objects/Henshin/Post/tags_3D_i.dat +0 -0
  55. data/.yardoc/objects/Henshin/Post/tags_i.dat +0 -0
  56. data/.yardoc/objects/Henshin/Post/title_3D_i.dat +0 -0
  57. data/.yardoc/objects/Henshin/Post/title_i.dat +0 -0
  58. data/.yardoc/objects/Henshin/Post/write_i.dat +0 -0
  59. data/.yardoc/objects/Henshin/Site.dat +0 -0
  60. data/.yardoc/objects/Henshin/Site/archives_3D_i.dat +0 -0
  61. data/.yardoc/objects/Henshin/Site/archives_i.dat +0 -0
  62. data/.yardoc/objects/Henshin/Site/categories_3D_i.dat +0 -0
  63. data/.yardoc/objects/Henshin/Site/categories_i.dat +0 -0
  64. data/.yardoc/objects/Henshin/Site/config_3D_i.dat +0 -0
  65. data/.yardoc/objects/Henshin/Site/config_i.dat +0 -0
  66. data/.yardoc/objects/Henshin/Site/gens_3D_i.dat +0 -0
  67. data/.yardoc/objects/Henshin/Site/gens_i.dat +0 -0
  68. data/.yardoc/objects/Henshin/Site/initialize_i.dat +0 -0
  69. data/.yardoc/objects/Henshin/Site/layouts_3D_i.dat +0 -0
  70. data/.yardoc/objects/Henshin/Site/layouts_i.dat +0 -0
  71. data/.yardoc/objects/Henshin/Site/payload_i.dat +0 -0
  72. data/.yardoc/objects/Henshin/Site/plugins_3D_i.dat +0 -0
  73. data/.yardoc/objects/Henshin/Site/plugins_i.dat +0 -0
  74. data/.yardoc/objects/Henshin/Site/posts_3D_i.dat +0 -0
  75. data/.yardoc/objects/Henshin/Site/posts_i.dat +0 -0
  76. data/.yardoc/objects/Henshin/Site/process_i.dat +0 -0
  77. data/.yardoc/objects/Henshin/Site/read_i.dat +0 -0
  78. data/.yardoc/objects/Henshin/Site/read_layouts_i.dat +0 -0
  79. data/.yardoc/objects/Henshin/Site/read_others_i.dat +0 -0
  80. data/.yardoc/objects/Henshin/Site/read_posts_i.dat +0 -0
  81. data/.yardoc/objects/Henshin/Site/render_i.dat +0 -0
  82. data/.yardoc/objects/Henshin/Site/reset_i.dat +0 -0
  83. data/.yardoc/objects/Henshin/Site/statics_3D_i.dat +0 -0
  84. data/.yardoc/objects/Henshin/Site/statics_i.dat +0 -0
  85. data/.yardoc/objects/Henshin/Site/tags_3D_i.dat +0 -0
  86. data/.yardoc/objects/Henshin/Site/tags_i.dat +0 -0
  87. data/.yardoc/objects/Henshin/Site/write_i.dat +0 -0
  88. data/.yardoc/objects/Henshin/StandardPlugin.dat +0 -0
  89. data/.yardoc/objects/Henshin/configure_c.dat +0 -0
  90. data/.yardoc/objects/Henshin/extensions_c.dat +0 -0
  91. data/.yardoc/objects/Henshin/load_plugins_c.dat +0 -0
  92. data/.yardoc/objects/LiquidPlugin.dat +0 -0
  93. data/.yardoc/objects/LiquidPlugin/extensions_3D_i.dat +0 -0
  94. data/.yardoc/objects/LiquidPlugin/extensions_i.dat +0 -0
  95. data/.yardoc/objects/LiquidPlugin/generate_i.dat +0 -0
  96. data/.yardoc/objects/LiquidPlugin/initialize_i.dat +0 -0
  97. data/.yardoc/objects/LiquidPlugin/read_i.dat +0 -0
  98. data/.yardoc/objects/MarukuPlugin.dat +0 -0
  99. data/.yardoc/objects/MarukuPlugin/extensions_3D_i.dat +0 -0
  100. data/.yardoc/objects/MarukuPlugin/extensions_i.dat +0 -0
  101. data/.yardoc/objects/MarukuPlugin/generate_i.dat +0 -0
  102. data/.yardoc/objects/MarukuPlugin/initialize_i.dat +0 -0
  103. data/.yardoc/objects/PygmentsPlugin.dat +0 -0
  104. data/.yardoc/objects/PygmentsPlugin/extensions_3D_i.dat +0 -0
  105. data/.yardoc/objects/PygmentsPlugin/extensions_i.dat +0 -0
  106. data/.yardoc/objects/PygmentsPlugin/generate_i.dat +0 -0
  107. data/.yardoc/objects/PygmentsPlugin/initialize_i.dat +0 -0
  108. data/.yardoc/objects/SassPlugin.dat +0 -0
  109. data/.yardoc/objects/SassPlugin/extensions_3D_i.dat +0 -0
  110. data/.yardoc/objects/SassPlugin/extensions_i.dat +0 -0
  111. data/.yardoc/objects/SassPlugin/generate_i.dat +0 -0
  112. data/.yardoc/objects/SassPlugin/initialize_i.dat +0 -0
  113. data/.yardoc/objects/String.dat +0 -0
  114. data/.yardoc/objects/String/directory_i.dat +0 -0
  115. data/.yardoc/objects/String/extension_i.dat +0 -0
  116. data/.yardoc/objects/String/file_name_i.dat +0 -0
  117. data/.yardoc/objects/String/slugify_i.dat +0 -0
  118. data/.yardoc/objects/root.dat +0 -0
  119. data/.yardoc/proxy_types +2 -0
  120. data/LICENSE +20 -0
  121. data/README.markdown +73 -0
  122. data/Rakefile +53 -0
  123. data/VERSION +1 -0
  124. data/bin/henshin +31 -0
  125. data/doc/Hash.html +179 -0
  126. data/doc/Henshin.html +479 -0
  127. data/doc/Henshin/CSSGenerator.html +186 -0
  128. data/doc/Henshin/Gen.html +1225 -0
  129. data/doc/Henshin/HTMLGenerator.html +186 -0
  130. data/doc/Henshin/JSGenerator.html +182 -0
  131. data/doc/Henshin/LayoutParser.html +186 -0
  132. data/doc/Henshin/Post.html +1159 -0
  133. data/doc/Henshin/Site.html +1462 -0
  134. data/doc/Henshin/StandardPlugin.html +99 -0
  135. data/doc/LiquidPlugin.html +399 -0
  136. data/doc/MarukuPlugin.html +325 -0
  137. data/doc/PygmentsPlugin.html +325 -0
  138. data/doc/SassPlugin.html +325 -0
  139. data/doc/String.html +371 -0
  140. data/doc/_index.html +239 -0
  141. data/doc/class_list.html +36 -0
  142. data/doc/css/common.css +1 -0
  143. data/doc/css/full_list.css +50 -0
  144. data/doc/css/style.css +273 -0
  145. data/doc/file.README.html +131 -0
  146. data/doc/file_list.html +38 -0
  147. data/doc/frames.html +13 -0
  148. data/doc/index.html +131 -0
  149. data/doc/js/app.js +111 -0
  150. data/doc/js/full_list.js +117 -0
  151. data/doc/js/jquery.js +19 -0
  152. data/doc/method_list.html +611 -0
  153. data/doc/top-level-namespace.html +89 -0
  154. data/henshin.gemspec +224 -0
  155. data/lib/henshin.rb +74 -0
  156. data/lib/henshin/ext.rb +42 -0
  157. data/lib/henshin/gen.rb +89 -0
  158. data/lib/henshin/plugin.rb +43 -0
  159. data/lib/henshin/plugins/liquid.rb +27 -0
  160. data/lib/henshin/plugins/maruku.rb +16 -0
  161. data/lib/henshin/plugins/pygments.rb +15 -0
  162. data/lib/henshin/plugins/sass.rb +16 -0
  163. data/lib/henshin/post.rb +127 -0
  164. data/lib/henshin/site.rb +112 -0
  165. data/test/helper.rb +10 -0
  166. data/test/site/_site/2010/10/20-testing-stuff/index.html +24 -0
  167. data/test/site/_site/2010/5/15-lorem-ipsum/index.html +24 -0
  168. data/test/site/_site/index.html +29 -0
  169. data/test/site/index.html +12 -0
  170. data/test/site/layouts/main.html +15 -0
  171. data/test/site/layouts/post.html +24 -0
  172. data/test/site/options.yaml +11 -0
  173. data/test/site/posts/Testing-Stuff.markdown +7 -0
  174. data/test/site/posts/lorem-ipsum.markdown +7 -0
  175. data/test/test_henshin.rb +7 -0
  176. metadata +261 -0
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,21 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
@@ -0,0 +1,12 @@
1
+ LICENSE 1609b88d55c5aba624ab3b06ca57c7d67326be74
2
+ bin/henshin 40a3308ecdd5f31e15ac96ef685a4e5f0d960675
3
+ lib/henshin.rb 05759a53ad067de1ea5a36843b17449ae4b7226f
4
+ lib/henshin/gen.rb bf0a476b3dfae87c6c01ed70db7ef2f95af9e958
5
+ lib/henshin/ext.rb 7ddc19383c41a838c56c819ceff660b4a7c62f80
6
+ lib/henshin/site.rb e0ea8bbca4238b1d547260ecdcd31ab3b3e5f1bc
7
+ lib/henshin/post.rb 0b233b872c0e17310dface9cfaa2c2b561459532
8
+ lib/henshin/plugin.rb 2e5daa2e21c7856e1aabafa76ff34cd4773fe090
9
+ lib/henshin/plugins/sass.rb f9cec13f09240e19983def9b9d15005cdf94c27d
10
+ lib/henshin/plugins/liquid.rb 98f9bd2069eed2f30b2bfbcb6dd8ee1b1624db59
11
+ lib/henshin/plugins/maruku.rb 49885fb83ec3dcf50fd887d12d33a90da8275e4c
12
+ lib/henshin/plugins/pygments.rb a998c21f318ba6c38d3c3ac5e91cccbc28071bf6
Binary file
Binary file
@@ -0,0 +1,2 @@
1
+ {I" Object:
2
+ class
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Joshua Hawxwell
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,73 @@
1
+ # Henshin
2
+
3
+ Henshin is a new static site generator, yeah another one. I wasn't going to release it yet but then I saw [awestruct](http://awestruct.org/) and thought I may as well now. Oh and this was totally inspired by the amazing [jekyll](http://github.com/mojombo/jekyll) (in case you hadn't guessed).
4
+
5
+
6
+ ## Main Features
7
+
8
+ - Generates posts, etc.
9
+ - More control with settings (see below)
10
+ - A plugin system (not great at the moment, still working on how best to implement it)
11
+
12
+ ## Future Goals
13
+
14
+ - Ability to regenerate only files that have changed
15
+ - Easy tag, category and archive pages
16
+ - Default templates so you can just type `henshin` with any folder of text files and create a quick site
17
+
18
+
19
+ ## How To
20
+
21
+ Install by typing `(sudo) gem install henshin`
22
+
23
+ Then create a folder for your site, in this you'll probably want to create two folders `layouts` and `posts`, to put in your layouts and posts.
24
+
25
+ Next create an `index.html` file and your kind of done, unless of course you want some content.
26
+
27
+ Build the site by running `henshin` from the command line. Help available with `henshin -h`
28
+
29
+ ### YAML Frontmatter & Options.yaml
30
+
31
+ You can create an optional `options.yaml` file at the root of your site, here are the options so far:
32
+
33
+ title: [title of your site]
34
+ description: [description for your site]
35
+ author: [your name]
36
+
37
+ layout: [the default layout to use]
38
+
39
+ post_name: [the way the post name is parsed]
40
+ eg. '{title-with-dashes}.{extension}
41
+
42
+ you can use:
43
+ {title}
44
+ {title-with-dashes}
45
+ {date}
46
+ {date-time}
47
+ {extension}
48
+
49
+ permalink: [the way you want the permalink to look]
50
+ eg. '/{year}/{month}/{date}-{title}/index.html
51
+ these are the only options at the moment for permalink
52
+
53
+ plugins: [array of plugins to
54
+
55
+
56
+ ### Plugins
57
+
58
+ The only plugins at the moment are the ones included (liquid, maruku, sass and pygments) of which only liquid and maruku work at the moment. In the future you will be able to add your own plugins, probably in a plugins folder. If you want to make your own just look at the others, it's pretty simple to work out!
59
+
60
+
61
+ ## Note on Patches/Pull Requests
62
+
63
+ - Fork the project
64
+ - Make your feature addition or bug fix
65
+ - Add tests for it. This is important so I don't break it in a
66
+ future version unintentionally.
67
+ - Commit, do not mess with rakefile, version, or history.
68
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
69
+ - Send me a pull request. Bonus points for topic branches.
70
+
71
+ ## License
72
+
73
+ Copyright (c) 2010 Joshua Hawxwell. See LICENSE for details.
@@ -0,0 +1,53 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "henshin"
8
+ gem.summary = %Q{Henshin is a static site generator}
9
+ gem.description = %Q{Henshin is a static site generator, with a plugin system and more}
10
+ gem.email = "m@hawx.me"
11
+ gem.homepage = "http://github.com/hawx/henshin"
12
+ gem.authors = ["hawx"]
13
+ gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
14
+ gem.add_development_dependency "yard", ">= 0"
15
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
+ end
17
+ Jeweler::GemcutterTasks.new
18
+ rescue LoadError
19
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
20
+ end
21
+
22
+ require 'rake/testtask'
23
+ Rake::TestTask.new(:test) do |test|
24
+ test.libs << 'lib' << 'test'
25
+ test.pattern = 'test/**/test_*.rb'
26
+ test.verbose = true
27
+ end
28
+
29
+ begin
30
+ require 'rcov/rcovtask'
31
+ Rcov::RcovTask.new do |test|
32
+ test.libs << 'test'
33
+ test.pattern = 'test/**/test_*.rb'
34
+ test.verbose = true
35
+ end
36
+ rescue LoadError
37
+ task :rcov do
38
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
39
+ end
40
+ end
41
+
42
+ task :test => :check_dependencies
43
+
44
+ task :default => :test
45
+
46
+ begin
47
+ require 'yard'
48
+ YARD::Rake::YardocTask.new
49
+ rescue LoadError
50
+ task :yardoc do
51
+ abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
52
+ end
53
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.0
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.dirname(__FILE__) + '/../lib/henshin'
4
+ require 'optparse'
5
+
6
+ banner = <<EOS
7
+ Usage: henshin
8
+ henshin [path to source]
9
+ henshin [path to source]:[path to write]
10
+ EOS
11
+
12
+
13
+ override = {}
14
+ opts = OptionParser.new do |opts|
15
+ opts.banner = banner
16
+ end
17
+ opts.parse!
18
+
19
+ if ARGV[0]
20
+ override[:root] = ARGV[0].split(':')[0]
21
+ override[:target] = ARGV[0].split(':')[1] if ARGV[0].split(':')[1]
22
+ end
23
+
24
+
25
+ config = Henshin.configure(override)
26
+ site = Henshin::Site.new(config)
27
+
28
+ site.read
29
+ site.process
30
+ site.render
31
+ site.write