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.
- data/bin/awestruct +2 -274
- data/lib/awestruct/astruct.rb +22 -0
- data/lib/awestruct/astruct_mixin.rb +81 -0
- data/lib/awestruct/cli/auto.rb +34 -0
- data/lib/awestruct/cli/deploy.rb +38 -0
- data/lib/awestruct/{commands → cli}/generate.rb +3 -3
- data/lib/awestruct/cli/invoker.rb +120 -0
- data/lib/awestruct/cli/options.rb +116 -0
- data/lib/awestruct/{commands → cli}/server.rb +1 -1
- data/lib/awestruct/config.rb +20 -8
- data/lib/awestruct/context.rb +22 -0
- data/lib/awestruct/dependencies.rb +102 -0
- data/lib/awestruct/deploy/github_pages_deploy.rb +61 -0
- data/lib/awestruct/{commands/deploy.rb → deploy/rsync_deploy.rb} +10 -6
- data/lib/awestruct/deployers.rb +15 -0
- data/lib/awestruct/engine.rb +172 -411
- data/lib/awestruct/extensions/atomizer.rb +7 -4
- data/lib/awestruct/extensions/coffeescripttransform.rb +42 -0
- data/lib/awestruct/extensions/minify.rb +21 -23
- data/lib/awestruct/extensions/paginator.rb +6 -4
- data/lib/awestruct/extensions/partial.rb +0 -1
- data/lib/awestruct/extensions/pipeline.rb +5 -0
- data/lib/awestruct/extensions/posts.rb +11 -9
- data/lib/awestruct/extensions/sitemap.rb +2 -1
- data/lib/awestruct/extensions/tagger.rb +0 -2
- data/lib/awestruct/extensions/template.atom.haml +4 -3
- data/lib/awestruct/handler_chain.rb +28 -0
- data/lib/awestruct/handler_chains.rb +48 -0
- data/lib/awestruct/handlers/asciidoc_handler.rb +57 -0
- data/lib/awestruct/handlers/base_handler.rb +111 -0
- data/lib/awestruct/handlers/base_sass_handler.rb +42 -0
- data/lib/awestruct/handlers/coffeescript_handler.rb +48 -0
- data/lib/awestruct/handlers/erb_handler.rb +44 -0
- data/lib/awestruct/handlers/file_handler.rb +64 -0
- data/lib/awestruct/handlers/front_matter_handler.rb +85 -0
- data/lib/awestruct/handlers/haml_handler.rb +54 -0
- data/lib/awestruct/handlers/interpolation_handler.rb +28 -0
- data/lib/awestruct/handlers/layout_handler.rb +63 -0
- data/lib/awestruct/handlers/markdown_handler.rb +50 -0
- data/lib/awestruct/handlers/no_op_handler.rb +34 -0
- data/lib/awestruct/handlers/orgmode_handler.rb +48 -0
- data/lib/awestruct/handlers/page_delegating_handler.rb +54 -0
- data/lib/awestruct/handlers/restructuredtext_handler.rb +67 -0
- data/lib/awestruct/handlers/sass_handler.rb +21 -0
- data/lib/awestruct/handlers/scss_handler.rb +21 -0
- data/lib/awestruct/handlers/string_handler.rb +29 -0
- data/lib/awestruct/handlers/textile_handler.rb +58 -0
- data/lib/awestruct/handlers/yaml_handler.rb +25 -0
- data/lib/awestruct/layouts.rb +16 -0
- data/lib/awestruct/page.rb +141 -0
- data/lib/awestruct/page_loader.rb +82 -0
- data/lib/awestruct/pipeline.rb +56 -0
- data/lib/awestruct/site.rb +29 -35
- data/lib/awestruct/version.rb +1 -1
- data/lib/guard/awestruct.rb +38 -0
- metadata +115 -88
- data/lib/awestruct.rb +0 -2
- data/lib/awestruct/asciidoc_file.rb +0 -24
- data/lib/awestruct/asciidocable.rb +0 -35
- data/lib/awestruct/commands/frameworks/960/base_layout.html.haml +0 -10
- data/lib/awestruct/commands/frameworks/base_index.html.haml +0 -5
- data/lib/awestruct/commands/frameworks/base_pipeline.rb +0 -6
- data/lib/awestruct/commands/frameworks/blueprint/base_layout.html.haml +0 -12
- data/lib/awestruct/commands/frameworks/bootstrap/base_index.html.haml +0 -27
- data/lib/awestruct/commands/frameworks/bootstrap/base_layout.html.haml +0 -29
- data/lib/awestruct/commands/git_hub_pages.rb +0 -55
- data/lib/awestruct/commands/init.rb +0 -40
- data/lib/awestruct/commands/manifest.rb +0 -205
- data/lib/awestruct/erb_file.rb +0 -24
- data/lib/awestruct/erbable.rb +0 -19
- data/lib/awestruct/front_matter_file.rb +0 -54
- data/lib/awestruct/haml/filters/asciidoc.rb +0 -8
- data/lib/awestruct/haml_file.rb +0 -27
- data/lib/awestruct/hamlable.rb +0 -19
- data/lib/awestruct/markdown_file.rb +0 -23
- data/lib/awestruct/markdownable.rb +0 -18
- data/lib/awestruct/orgmode_file.rb +0 -23
- data/lib/awestruct/orgmodeable.rb +0 -15
- data/lib/awestruct/renderable.rb +0 -18
- data/lib/awestruct/renderable_file.rb +0 -39
- data/lib/awestruct/restructuredtext_file.rb +0 -23
- data/lib/awestruct/restructuredtextable.rb +0 -38
- data/lib/awestruct/sass_file.rb +0 -24
- data/lib/awestruct/sassable.rb +0 -33
- data/lib/awestruct/scss_file.rb +0 -24
- data/lib/awestruct/textilable.rb +0 -22
- data/lib/awestruct/textile_file.rb +0 -23
- data/lib/awestruct/verbatim_file.rb +0 -12
data/lib/awestruct/textilable.rb
DELETED
@@ -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
|