henshin 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardoc/checksums +1 -3
- data/.yardoc/objects/Hash.dat +0 -0
- data/.yardoc/objects/Hash/to_options_i.dat +0 -0
- data/.yardoc/objects/Henshin.dat +0 -0
- data/.yardoc/objects/Henshin/CSSGenerator.dat +0 -0
- data/.yardoc/objects/Henshin/CSSGenerator/generate_i.dat +0 -0
- data/.yardoc/objects/Henshin/Defaults.dat +0 -0
- data/.yardoc/objects/Henshin/Gen.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/config_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/config_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/content_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/content_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/date_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/date_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/extension_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/extension_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/initialize_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/layout_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/layout_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/override_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/path_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/path_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/payload_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/process_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/read_yaml_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/render_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/site_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/site_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/title_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/title_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/write_i.dat +0 -0
- data/.yardoc/objects/Henshin/HTMLGenerator.dat +0 -0
- data/.yardoc/objects/Henshin/HTMLGenerator/generate_i.dat +0 -0
- data/.yardoc/objects/Henshin/JSGenerator.dat +0 -0
- data/.yardoc/objects/Henshin/JSGenerator/generate_i.dat +0 -0
- data/.yardoc/objects/Henshin/LayoutParser.dat +0 -0
- data/.yardoc/objects/Henshin/LayoutParser/generate_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post.dat +0 -0
- data/.yardoc/objects/Henshin/Post/author_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/author_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/category_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/category_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/date_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/date_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/initialize_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/override_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/payload_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/permalink_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/process_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/read_name_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/read_yaml_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/tags_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/tags_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/title_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/title_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/write_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site.dat +0 -0
- data/.yardoc/objects/Henshin/Site/archives_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/archives_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/categories_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/categories_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/config_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/config_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/gens_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/gens_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/initialize_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/layouts_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/layouts_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/payload_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/plugins_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/plugins_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/posts_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/posts_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/process_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/read_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/read_layouts_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/read_others_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/read_posts_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/render_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/reset_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/statics_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/statics_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/tags_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/tags_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/write_i.dat +0 -0
- data/.yardoc/objects/Henshin/StandardPlugin.dat +0 -0
- data/.yardoc/objects/Henshin/configure_c.dat +0 -0
- data/.yardoc/objects/Henshin/extensions_c.dat +0 -0
- data/.yardoc/objects/Henshin/load_plugins_c.dat +0 -0
- data/.yardoc/objects/LiquidPlugin.dat +0 -0
- data/.yardoc/objects/LiquidPlugin/extensions_3D_i.dat +0 -0
- data/.yardoc/objects/LiquidPlugin/extensions_i.dat +0 -0
- data/.yardoc/objects/LiquidPlugin/generate_i.dat +0 -0
- data/.yardoc/objects/LiquidPlugin/initialize_i.dat +0 -0
- data/.yardoc/objects/LiquidPlugin/read_i.dat +0 -0
- data/.yardoc/objects/MarukuPlugin.dat +0 -0
- data/.yardoc/objects/MarukuPlugin/extensions_3D_i.dat +0 -0
- data/.yardoc/objects/MarukuPlugin/extensions_i.dat +0 -0
- data/.yardoc/objects/MarukuPlugin/generate_i.dat +0 -0
- data/.yardoc/objects/MarukuPlugin/initialize_i.dat +0 -0
- data/.yardoc/objects/PygmentsPlugin.dat +0 -0
- data/.yardoc/objects/PygmentsPlugin/extensions_3D_i.dat +0 -0
- data/.yardoc/objects/PygmentsPlugin/extensions_i.dat +0 -0
- data/.yardoc/objects/PygmentsPlugin/generate_i.dat +0 -0
- data/.yardoc/objects/PygmentsPlugin/initialize_i.dat +0 -0
- data/.yardoc/objects/SassPlugin.dat +0 -0
- data/.yardoc/objects/SassPlugin/extensions_3D_i.dat +0 -0
- data/.yardoc/objects/SassPlugin/extensions_i.dat +0 -0
- data/.yardoc/objects/SassPlugin/generate_i.dat +0 -0
- data/.yardoc/objects/SassPlugin/initialize_i.dat +0 -0
- data/.yardoc/objects/String.dat +0 -0
- data/.yardoc/objects/String/directory_i.dat +0 -0
- data/.yardoc/objects/String/extension_i.dat +0 -0
- data/.yardoc/objects/String/file_name_i.dat +0 -0
- data/.yardoc/objects/String/slugify_i.dat +0 -0
- data/VERSION +1 -1
- data/doc/Hash.html +1 -1
- data/doc/Henshin.html +2 -2
- data/doc/Henshin/CSSGenerator.html +1 -1
- data/doc/Henshin/Gen.html +1 -1
- data/doc/Henshin/HTMLGenerator.html +1 -1
- data/doc/Henshin/JSGenerator.html +1 -1
- data/doc/Henshin/LayoutParser.html +1 -1
- data/doc/Henshin/Post.html +1 -1
- data/doc/Henshin/Site.html +1 -1
- data/doc/Henshin/StandardPlugin.html +1 -1
- data/doc/LiquidPlugin.html +1 -1
- data/doc/MarukuPlugin.html +1 -1
- data/doc/PygmentsPlugin.html +1 -1
- data/doc/SassPlugin.html +1 -1
- data/doc/String.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +3 -1
- data/doc/index.html +3 -1
- data/doc/method_list.html +52 -52
- data/doc/top-level-namespace.html +1 -1
- data/henshin.gemspec +10 -4
- data/lib/henshin.rb +1 -1
- data/lib/henshin/gen.rb +27 -9
- data/lib/henshin/plugins/maruku.rb +5 -2
- data/lib/henshin/plugins/sass.rb +13 -4
- data/lib/henshin/site.rb +15 -8
- data/lib/henshin/static.rb +26 -0
- data/test/site/_site/css/print.css +33 -0
- data/test/site/_site/css/screen.css +15 -0
- data/test/site/_site/index.html +1 -25
- data/test/site/_site/static.html +19 -0
- data/test/site/css/screen.css +15 -0
- data/test/site/sass/print.sass +37 -0
- data/test/site/static.html +19 -0
- metadata +10 -4
- data/.document +0 -5
@@ -0,0 +1,26 @@
|
|
1
|
+
module Henshin
|
2
|
+
|
3
|
+
class Static
|
4
|
+
|
5
|
+
attr_accessor :path, :site, :config, :content
|
6
|
+
|
7
|
+
def initialize( path, site )
|
8
|
+
@path = path
|
9
|
+
@site = site
|
10
|
+
@config = site.config
|
11
|
+
@content = File.read( path )
|
12
|
+
end
|
13
|
+
|
14
|
+
##
|
15
|
+
# Writes the file to the correct place
|
16
|
+
def write
|
17
|
+
write_path = File.join( config[:root], config[:target], @path[ config[:root].size..-1 ] )
|
18
|
+
|
19
|
+
FileUtils.mkdir_p File.join( write_path.directory )
|
20
|
+
file = File.new( File.join( write_path ), "w" )
|
21
|
+
file.puts( @content )
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
|
2
|
+
margin: 0;
|
3
|
+
padding: 0; }
|
4
|
+
|
5
|
+
table {
|
6
|
+
border-collapse: collapse;
|
7
|
+
border-spacing: 0; }
|
8
|
+
|
9
|
+
fieldset, img {
|
10
|
+
border: 0; }
|
11
|
+
|
12
|
+
address, caption, cite, code, dfn, em, strong, th, var {
|
13
|
+
font-style: normal;
|
14
|
+
font-weight: normal; }
|
15
|
+
|
16
|
+
ol, ul {
|
17
|
+
list-style: none; }
|
18
|
+
|
19
|
+
caption, th {
|
20
|
+
text-align: left; }
|
21
|
+
|
22
|
+
h1, h2, h3, h4, h5, h6 {
|
23
|
+
font-size: 100%;
|
24
|
+
font-weight: normal; }
|
25
|
+
|
26
|
+
q:before, q:after {
|
27
|
+
content: ”; }
|
28
|
+
|
29
|
+
abbr, acronym {
|
30
|
+
border: 0; }
|
31
|
+
|
32
|
+
h1 {
|
33
|
+
font-size: 2em; }
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/* Testing whether static files, eg this, are correctly copied and ignored */
|
2
|
+
|
3
|
+
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,
|
4
|
+
blockquote,th,td {margin:0; padding:0; }
|
5
|
+
table { border-collapse:collapse; border-spacing:0; }
|
6
|
+
fieldset,img { border:0; }
|
7
|
+
address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; }
|
8
|
+
ol,ul { list-style:none; }
|
9
|
+
caption,th { text-align:left; }
|
10
|
+
h1,h2,h3,h4,h5,h6 { font-size:100%; font-weight:normal; }
|
11
|
+
q:before,q:after { content:”; }
|
12
|
+
abbr,acronym { border:0; }
|
13
|
+
html {font-size: 62.5%;}p {font-size: 1.2em;}
|
14
|
+
h1 {font-size: 2em;}
|
15
|
+
a:hover, a:active { outline: none; }
|
data/test/site/_site/index.html
CHANGED
@@ -1,29 +1,5 @@
|
|
1
|
-
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8" />
|
5
|
-
<title></title>
|
6
|
-
<link rel="stylesheet" href="" type="text/css" />
|
7
|
-
</head>
|
8
|
-
<body>
|
9
|
-
|
10
|
-
<header>
|
11
|
-
<h1></h1>
|
12
|
-
<time></time>
|
13
|
-
<ul>
|
14
|
-
<li>tags</li>
|
15
|
-
<li>should</li>
|
16
|
-
<li>be loopable</li>
|
17
|
-
</ul>
|
18
|
-
</header>
|
19
|
-
|
20
|
-
<header>
|
1
|
+
<header>
|
21
2
|
<h1>Joshua Hawxwell</h1>
|
22
3
|
</header>
|
23
4
|
|
24
5
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
25
|
-
|
26
|
-
|
27
|
-
<span>Copyright © </span>
|
28
|
-
</body>
|
29
|
-
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<title></title>
|
6
|
+
<link rel="stylesheet" href="" type="text/css" />
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
|
10
|
+
|
11
|
+
<header>
|
12
|
+
<h1>This should just be copied over</h1>
|
13
|
+
</header>
|
14
|
+
|
15
|
+
<p>I should be in the root folder! No templates or anything</p>
|
16
|
+
|
17
|
+
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/* Testing whether static files, eg this, are correctly copied and ignored */
|
2
|
+
|
3
|
+
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,
|
4
|
+
blockquote,th,td {margin:0; padding:0; }
|
5
|
+
table { border-collapse:collapse; border-spacing:0; }
|
6
|
+
fieldset,img { border:0; }
|
7
|
+
address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; }
|
8
|
+
ol,ul { list-style:none; }
|
9
|
+
caption,th { text-align:left; }
|
10
|
+
h1,h2,h3,h4,h5,h6 { font-size:100%; font-weight:normal; }
|
11
|
+
q:before,q:after { content:”; }
|
12
|
+
abbr,acronym { border:0; }
|
13
|
+
html {font-size: 62.5%;}p {font-size: 1.2em;}
|
14
|
+
h1 {font-size: 2em;}
|
15
|
+
a:hover, a:active { outline: none; }
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// This is to test whether sass files are successfully created
|
2
|
+
// and placed in the css folder (or whatever is defined
|
3
|
+
|
4
|
+
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td
|
5
|
+
margin: 0
|
6
|
+
padding: 0
|
7
|
+
|
8
|
+
table
|
9
|
+
border-collapse: collapse
|
10
|
+
border-spacing: 0
|
11
|
+
|
12
|
+
fieldset, img
|
13
|
+
border: 0
|
14
|
+
|
15
|
+
address, caption, cite, code, dfn, em, strong, th, var
|
16
|
+
font-style: normal
|
17
|
+
font-weight: normal
|
18
|
+
|
19
|
+
ol, ul
|
20
|
+
list-style: none
|
21
|
+
|
22
|
+
caption, th
|
23
|
+
text-align: left
|
24
|
+
|
25
|
+
h1, h2, h3, h4, h5, h6
|
26
|
+
font-size: 100%
|
27
|
+
font-weight: normal
|
28
|
+
|
29
|
+
q
|
30
|
+
&:before, &:after
|
31
|
+
content: ”
|
32
|
+
|
33
|
+
abbr, acronym
|
34
|
+
border: 0
|
35
|
+
|
36
|
+
h1
|
37
|
+
font-size: 2em
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<title></title>
|
6
|
+
<link rel="stylesheet" href="" type="text/css" />
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
|
10
|
+
|
11
|
+
<header>
|
12
|
+
<h1>This should just be copied over</h1>
|
13
|
+
</header>
|
14
|
+
|
15
|
+
<p>I should be in the root folder! No templates or anything</p>
|
16
|
+
|
17
|
+
|
18
|
+
</body>
|
19
|
+
</html>
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- hawx
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-20 00:00:00 +01:00
|
18
18
|
default_executable: henshin
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -51,7 +51,6 @@ extra_rdoc_files:
|
|
51
51
|
- LICENSE
|
52
52
|
- README.markdown
|
53
53
|
files:
|
54
|
-
- .document
|
55
54
|
- .gitignore
|
56
55
|
- .yardoc/checksums
|
57
56
|
- .yardoc/objects/Hash.dat
|
@@ -215,16 +214,23 @@ files:
|
|
215
214
|
- lib/henshin/plugins/sass.rb
|
216
215
|
- lib/henshin/post.rb
|
217
216
|
- lib/henshin/site.rb
|
217
|
+
- lib/henshin/static.rb
|
218
218
|
- test/helper.rb
|
219
219
|
- test/site/_site/2010/10/20-testing-stuff/index.html
|
220
220
|
- test/site/_site/2010/5/15-lorem-ipsum/index.html
|
221
|
+
- test/site/_site/css/print.css
|
222
|
+
- test/site/_site/css/screen.css
|
221
223
|
- test/site/_site/index.html
|
224
|
+
- test/site/_site/static.html
|
225
|
+
- test/site/css/screen.css
|
222
226
|
- test/site/index.html
|
223
227
|
- test/site/layouts/main.html
|
224
228
|
- test/site/layouts/post.html
|
225
229
|
- test/site/options.yaml
|
226
230
|
- test/site/posts/Testing-Stuff.markdown
|
227
231
|
- test/site/posts/lorem-ipsum.markdown
|
232
|
+
- test/site/sass/print.sass
|
233
|
+
- test/site/static.html
|
228
234
|
- test/test_henshin.rb
|
229
235
|
has_rdoc: true
|
230
236
|
homepage: http://github.com/hawx/henshin
|