awestruct 0.2.18 → 0.4.2.x1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. data/bin/awestruct +2 -274
  2. data/lib/awestruct/astruct.rb +22 -0
  3. data/lib/awestruct/astruct_mixin.rb +81 -0
  4. data/lib/awestruct/cli/auto.rb +34 -0
  5. data/lib/awestruct/cli/deploy.rb +38 -0
  6. data/lib/awestruct/{commands → cli}/generate.rb +3 -3
  7. data/lib/awestruct/cli/invoker.rb +120 -0
  8. data/lib/awestruct/cli/options.rb +116 -0
  9. data/lib/awestruct/{commands → cli}/server.rb +1 -1
  10. data/lib/awestruct/config.rb +20 -8
  11. data/lib/awestruct/context.rb +22 -0
  12. data/lib/awestruct/dependencies.rb +102 -0
  13. data/lib/awestruct/deploy/github_pages_deploy.rb +61 -0
  14. data/lib/awestruct/{commands/deploy.rb → deploy/rsync_deploy.rb} +10 -6
  15. data/lib/awestruct/deployers.rb +15 -0
  16. data/lib/awestruct/engine.rb +172 -411
  17. data/lib/awestruct/extensions/atomizer.rb +7 -4
  18. data/lib/awestruct/extensions/coffeescripttransform.rb +42 -0
  19. data/lib/awestruct/extensions/minify.rb +21 -23
  20. data/lib/awestruct/extensions/paginator.rb +6 -4
  21. data/lib/awestruct/extensions/partial.rb +0 -1
  22. data/lib/awestruct/extensions/pipeline.rb +5 -0
  23. data/lib/awestruct/extensions/posts.rb +11 -9
  24. data/lib/awestruct/extensions/sitemap.rb +2 -1
  25. data/lib/awestruct/extensions/tagger.rb +0 -2
  26. data/lib/awestruct/extensions/template.atom.haml +4 -3
  27. data/lib/awestruct/handler_chain.rb +28 -0
  28. data/lib/awestruct/handler_chains.rb +48 -0
  29. data/lib/awestruct/handlers/asciidoc_handler.rb +57 -0
  30. data/lib/awestruct/handlers/base_handler.rb +111 -0
  31. data/lib/awestruct/handlers/base_sass_handler.rb +42 -0
  32. data/lib/awestruct/handlers/coffeescript_handler.rb +48 -0
  33. data/lib/awestruct/handlers/erb_handler.rb +44 -0
  34. data/lib/awestruct/handlers/file_handler.rb +64 -0
  35. data/lib/awestruct/handlers/front_matter_handler.rb +85 -0
  36. data/lib/awestruct/handlers/haml_handler.rb +54 -0
  37. data/lib/awestruct/handlers/interpolation_handler.rb +28 -0
  38. data/lib/awestruct/handlers/layout_handler.rb +63 -0
  39. data/lib/awestruct/handlers/markdown_handler.rb +50 -0
  40. data/lib/awestruct/handlers/no_op_handler.rb +34 -0
  41. data/lib/awestruct/handlers/orgmode_handler.rb +48 -0
  42. data/lib/awestruct/handlers/page_delegating_handler.rb +54 -0
  43. data/lib/awestruct/handlers/restructuredtext_handler.rb +67 -0
  44. data/lib/awestruct/handlers/sass_handler.rb +21 -0
  45. data/lib/awestruct/handlers/scss_handler.rb +21 -0
  46. data/lib/awestruct/handlers/string_handler.rb +29 -0
  47. data/lib/awestruct/handlers/textile_handler.rb +58 -0
  48. data/lib/awestruct/handlers/yaml_handler.rb +25 -0
  49. data/lib/awestruct/layouts.rb +16 -0
  50. data/lib/awestruct/page.rb +141 -0
  51. data/lib/awestruct/page_loader.rb +82 -0
  52. data/lib/awestruct/pipeline.rb +56 -0
  53. data/lib/awestruct/site.rb +29 -35
  54. data/lib/awestruct/version.rb +1 -1
  55. data/lib/guard/awestruct.rb +38 -0
  56. metadata +115 -88
  57. data/lib/awestruct.rb +0 -2
  58. data/lib/awestruct/asciidoc_file.rb +0 -24
  59. data/lib/awestruct/asciidocable.rb +0 -35
  60. data/lib/awestruct/commands/frameworks/960/base_layout.html.haml +0 -10
  61. data/lib/awestruct/commands/frameworks/base_index.html.haml +0 -5
  62. data/lib/awestruct/commands/frameworks/base_pipeline.rb +0 -6
  63. data/lib/awestruct/commands/frameworks/blueprint/base_layout.html.haml +0 -12
  64. data/lib/awestruct/commands/frameworks/bootstrap/base_index.html.haml +0 -27
  65. data/lib/awestruct/commands/frameworks/bootstrap/base_layout.html.haml +0 -29
  66. data/lib/awestruct/commands/git_hub_pages.rb +0 -55
  67. data/lib/awestruct/commands/init.rb +0 -40
  68. data/lib/awestruct/commands/manifest.rb +0 -205
  69. data/lib/awestruct/erb_file.rb +0 -24
  70. data/lib/awestruct/erbable.rb +0 -19
  71. data/lib/awestruct/front_matter_file.rb +0 -54
  72. data/lib/awestruct/haml/filters/asciidoc.rb +0 -8
  73. data/lib/awestruct/haml_file.rb +0 -27
  74. data/lib/awestruct/hamlable.rb +0 -19
  75. data/lib/awestruct/markdown_file.rb +0 -23
  76. data/lib/awestruct/markdownable.rb +0 -18
  77. data/lib/awestruct/orgmode_file.rb +0 -23
  78. data/lib/awestruct/orgmodeable.rb +0 -15
  79. data/lib/awestruct/renderable.rb +0 -18
  80. data/lib/awestruct/renderable_file.rb +0 -39
  81. data/lib/awestruct/restructuredtext_file.rb +0 -23
  82. data/lib/awestruct/restructuredtextable.rb +0 -38
  83. data/lib/awestruct/sass_file.rb +0 -24
  84. data/lib/awestruct/sassable.rb +0 -33
  85. data/lib/awestruct/scss_file.rb +0 -24
  86. data/lib/awestruct/textilable.rb +0 -22
  87. data/lib/awestruct/textile_file.rb +0 -23
  88. data/lib/awestruct/verbatim_file.rb +0 -12
@@ -1,22 +0,0 @@
1
- module Awestruct
2
-
3
- module Textilable
4
- def render(context)
5
- rendered = ''
6
- # security and rendering restrictions
7
- # ex. site.textile = ['no_span_caps']
8
- restrictions = (site.textile || []).map { |r| r.to_sym }
9
- # a module of rule functions is included in RedCloth using RedCloth.send(:include, MyRules)
10
- # rule functions on that module are activated by setting the property site.textile_rules
11
- # ex. site.textile_rules = ['emoticons']
12
- rules = context.site.textile_rules ? context.site.textile_rules.map { |r| r.to_sym } : []
13
- RedCloth.new( context.interpolate_string( raw_page_content ), restrictions ).to_html(*rules)
14
- end
15
-
16
- def content
17
- context = site.engine.create_context(self)
18
- render(context)
19
- end
20
- end
21
-
22
- end
@@ -1,23 +0,0 @@
1
- require 'awestruct/front_matter_file'
2
- require 'awestruct/textilable'
3
- require 'redcloth'
4
-
5
- module Awestruct
6
- class TextileFile < FrontMatterFile
7
-
8
- include Textilable
9
-
10
- def initialize(site, source_path, relative_source_path, options = {})
11
- super(site, source_path, relative_source_path, options)
12
- end
13
-
14
- def output_filename
15
- File.basename( self.source_path, '.textile' ) + output_extension
16
- end
17
-
18
- def output_extension
19
- '.html'
20
- end
21
-
22
- end
23
- end
@@ -1,12 +0,0 @@
1
- require 'awestruct/renderable_file'
2
-
3
- module Awestruct
4
-
5
- class VerbatimFile < RenderableFile
6
-
7
- def initialize(site, source_path, relative_source_path, options = {})
8
- super( site, source_path, relative_source_path, options )
9
- end
10
-
11
- end
12
- end