middleman 0.5.5 → 0.9.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +1 -2
- data/.gitignore +3 -2
- data/LICENSE +0 -0
- data/README.rdoc +4 -0
- data/Rakefile +28 -36
- data/VERSION +1 -1
- data/bin/mm-build +7 -113
- data/bin/mm-init +11 -5
- data/bin/mm-server +56 -3
- data/features/asset_host.feature +12 -0
- data/features/automatic_image_sizes.feature +14 -0
- data/features/cache_buster.feature +22 -0
- data/features/generator.feature +8 -0
- data/features/minify_css.feature +22 -0
- data/features/minify_javascript.feature +12 -0
- data/features/page_alias_and_layouts.feature +12 -0
- data/features/relative_assets.feature +12 -0
- data/features/step_definitions/asset_host_steps.rb +7 -0
- data/features/step_definitions/env.rb +3 -0
- data/features/step_definitions/generator_steps.rb +24 -0
- data/features/step_definitions/middleman_steps.rb +28 -0
- data/features/step_definitions/page_layout_steps.rb +13 -0
- data/lib/middleman.rb +6 -132
- data/lib/middleman/assets.rb +33 -0
- data/lib/middleman/base.rb +147 -0
- data/lib/middleman/builder.rb +59 -0
- data/lib/middleman/config.ru +2 -0
- data/lib/middleman/features.rb +39 -0
- data/lib/middleman/features/asset_host.rb +21 -0
- data/lib/middleman/features/automatic_image_sizes.rb +31 -0
- data/lib/middleman/features/automatic_image_sizes/fastimage.rb +282 -0
- data/lib/middleman/features/cache_buster.rb +43 -0
- data/lib/middleman/features/default_helpers.rb +68 -0
- data/lib/middleman/features/livereload.rb +19 -0
- data/lib/middleman/features/minify_css.rb +9 -0
- data/lib/middleman/features/minify_javascript.rb +20 -0
- data/lib/middleman/features/minify_javascript/rack.rb +31 -0
- data/lib/middleman/features/relative_assets.rb +35 -0
- data/lib/middleman/features/slickmap.rb +118 -0
- data/lib/middleman/features/smush_pngs.rb +38 -0
- data/lib/middleman/features/ugly_haml.rb +7 -0
- data/lib/middleman/renderers.rb +26 -0
- data/lib/middleman/renderers/coffee.rb +28 -0
- data/lib/middleman/renderers/haml.rb +47 -0
- data/lib/middleman/renderers/sass.rb +67 -0
- data/lib/middleman/template/init.rbt +57 -0
- data/lib/middleman/template/views/index.html.haml +4 -0
- data/lib/middleman/template/views/layout.haml +11 -4
- data/lib/middleman/template/views/stylesheets/site.css.sass +27 -0
- data/lib/middleman/templater+dynamic_renderer.rb +26 -0
- data/middleman.gemspec +121 -107
- data/spec/builder_spec.rb +17 -16
- data/spec/fixtures/sample/init.rb +28 -2
- data/spec/fixtures/sample/public/images/blank.gif +0 -0
- data/spec/fixtures/sample/public/static.html +0 -0
- data/{vendor/sinatra-maruku/examples/public/javascripts/application.js → spec/fixtures/sample/public/stylesheets/auto-css.css} +0 -0
- data/spec/fixtures/sample/public/stylesheets/static.css +0 -0
- data/{vendor/sinatra-maruku/examples/public/stylesheets/print.css → spec/fixtures/sample/public/stylesheets/sub1/auto-css.css} +0 -0
- data/spec/fixtures/sample/public/stylesheets/sub1/sub2/auto-css.css +0 -0
- data/spec/fixtures/sample/views/_partial.haml +0 -0
- data/spec/fixtures/sample/views/asset_host.html.haml +1 -0
- data/spec/fixtures/sample/views/auto-css.html.haml +1 -0
- data/spec/fixtures/sample/views/auto-image-sizes.html.haml +1 -0
- data/spec/fixtures/sample/views/cache-buster.html.haml +2 -0
- data/spec/fixtures/sample/views/{index.haml → custom-layout.html.haml} +0 -0
- data/spec/fixtures/sample/views/custom.haml +5 -0
- data/spec/fixtures/sample/views/index.html.haml +1 -0
- data/spec/fixtures/sample/views/inline-css.html.haml +4 -0
- data/spec/fixtures/sample/views/{inline-js.haml → inline-js.html.haml} +0 -0
- data/spec/fixtures/sample/views/layout.haml +1 -1
- data/spec/fixtures/sample/views/{maruku.maruku → maruku.html.maruku} +0 -0
- data/spec/fixtures/sample/views/page-classes.html.haml +1 -0
- data/spec/fixtures/sample/views/services/{index.haml → index.html.haml} +0 -0
- data/spec/fixtures/sample/views/stylesheets/asset_host.css.sass +3 -0
- data/spec/fixtures/sample/views/stylesheets/relative_assets.css.sass +3 -0
- data/spec/fixtures/sample/views/stylesheets/site.css.sass +1 -0
- data/spec/fixtures/sample/views/stylesheets/site_scss.css.scss +1 -0
- data/spec/fixtures/sample/views/stylesheets/test_less.css.less +5 -0
- data/spec/helpers_spec.rb +43 -0
- data/spec/spec_helper.rb +3 -5
- metadata +298 -127
- data/lib/middleman/helpers.rb +0 -131
- data/lib/middleman/markaby.rb +0 -4
- data/lib/middleman/maruku.rb +0 -4
- data/lib/middleman/sprockets_ext.rb +0 -29
- data/lib/middleman/template/init.rb +0 -22
- data/lib/middleman/template/views/index.haml +0 -1
- data/lib/middleman/template/views/stylesheets/site.sass +0 -1
- data/spec/fixtures/sample/views/markaby.mab +0 -5
- data/spec/fixtures/sample/views/stylesheets/site.sass +0 -1
- data/spec/generator_spec.rb +0 -34
- data/vendor/rack-test/History.txt +0 -64
- data/vendor/rack-test/MIT-LICENSE.txt +0 -19
- data/vendor/rack-test/README.rdoc +0 -57
- data/vendor/rack-test/Rakefile +0 -62
- data/vendor/rack-test/lib/rack/mock_session.rb +0 -57
- data/vendor/rack-test/lib/rack/test.rb +0 -246
- data/vendor/rack-test/lib/rack/test/cookie_jar.rb +0 -169
- data/vendor/rack-test/lib/rack/test/methods.rb +0 -73
- data/vendor/rack-test/lib/rack/test/mock_digest_request.rb +0 -27
- data/vendor/rack-test/lib/rack/test/uploaded_file.rb +0 -36
- data/vendor/rack-test/lib/rack/test/utils.rb +0 -75
- data/vendor/rack-test/spec/fixtures/config.ru +0 -3
- data/vendor/rack-test/spec/fixtures/fake_app.rb +0 -109
- data/vendor/rack-test/spec/fixtures/foo.txt +0 -1
- data/vendor/rack-test/spec/rack/test/cookie_spec.rb +0 -176
- data/vendor/rack-test/spec/rack/test/digest_auth_spec.rb +0 -48
- data/vendor/rack-test/spec/rack/test/multipart_spec.rb +0 -85
- data/vendor/rack-test/spec/rack/test/utils_spec.rb +0 -44
- data/vendor/rack-test/spec/rack/test_spec.rb +0 -363
- data/vendor/rack-test/spec/rcov.opts +0 -1
- data/vendor/rack-test/spec/spec.opts +0 -1
- data/vendor/rack-test/spec/spec_helper.rb +0 -48
- data/vendor/sinatra-content-for/LICENSE +0 -22
- data/vendor/sinatra-content-for/README.rdoc +0 -49
- data/vendor/sinatra-content-for/Rakefile +0 -33
- data/vendor/sinatra-content-for/lib/sinatra/content_for.rb +0 -58
- data/vendor/sinatra-content-for/sinatra-content-for.gemspec +0 -34
- data/vendor/sinatra-content-for/test/content_for_test.rb +0 -156
- data/vendor/sinatra-markaby/CHANGES +0 -7
- data/vendor/sinatra-markaby/LICENSE +0 -20
- data/vendor/sinatra-markaby/README.rdoc +0 -33
- data/vendor/sinatra-markaby/Rakefile +0 -45
- data/vendor/sinatra-markaby/TODO +0 -3
- data/vendor/sinatra-markaby/VERSION.yml +0 -4
- data/vendor/sinatra-markaby/lib/sinatra/markaby.rb +0 -31
- data/vendor/sinatra-markaby/sinatra-markaby.gemspec +0 -49
- data/vendor/sinatra-markaby/test/sinatra_markaby_test.rb +0 -72
- data/vendor/sinatra-markaby/test/test_helper.rb +0 -19
- data/vendor/sinatra-markaby/test/views/hello.mab +0 -1
- data/vendor/sinatra-markaby/test/views/html.mab +0 -4
- data/vendor/sinatra-maruku/LICENSE +0 -22
- data/vendor/sinatra-maruku/README.markdown +0 -85
- data/vendor/sinatra-maruku/Rakefile +0 -34
- data/vendor/sinatra-maruku/VERSION.yml +0 -4
- data/vendor/sinatra-maruku/examples/app.rb +0 -8
- data/vendor/sinatra-maruku/examples/config.ru +0 -4
- data/vendor/sinatra-maruku/examples/mapp.rb +0 -15
- data/vendor/sinatra-maruku/examples/public/stylesheets/application.css +0 -23
- data/vendor/sinatra-maruku/examples/views/index.maruku +0 -32
- data/vendor/sinatra-maruku/examples/views/layout.maruku +0 -9
- data/vendor/sinatra-maruku/lib/sinatra/maruku.rb +0 -25
- data/vendor/sinatra-maruku/sinatra-maruku.gemspec +0 -70
- data/vendor/sinatra-maruku/test/sinatra_maruku_test.rb +0 -91
- data/vendor/sinatra-maruku/test/test_helper.rb +0 -21
- data/vendor/sinatra-maruku/test/views/hello.maruku +0 -1
- data/vendor/sinatra-maruku/test/views/layout2.maruku +0 -2
@@ -0,0 +1,57 @@
|
|
1
|
+
# Automatic sitemaps
|
2
|
+
# enable :slickmap
|
3
|
+
|
4
|
+
# Automatic image dimension calculations
|
5
|
+
# enable :automatic_image_sizes
|
6
|
+
|
7
|
+
# Per-page layout changes
|
8
|
+
# With no layout
|
9
|
+
# page "/path/to/file.html", :layout => false
|
10
|
+
# With alternative layout
|
11
|
+
# page "/path/to/file.html", :layout => :otherlayout
|
12
|
+
|
13
|
+
# Helpers
|
14
|
+
helpers do
|
15
|
+
def some_helper(*args)
|
16
|
+
"Helping"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
<% if css_dir %>
|
21
|
+
set :css_dir, "<%= css_dir -%>"
|
22
|
+
<% else %>
|
23
|
+
# Change the CSS directory
|
24
|
+
# set :css_dir, "alternative_css_directory"
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<% if js_dir %>
|
28
|
+
set :js_dir, "<%= js_dir -%>"
|
29
|
+
<% else %>
|
30
|
+
# Change the JS directory
|
31
|
+
# set :js_dir, "alternative_js_directory"
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
<% if images_dir %>
|
35
|
+
set :images_dir, "<%= images_dir -%>"
|
36
|
+
<% else %>
|
37
|
+
# Change the images directory
|
38
|
+
# set :images_dir, "alternative_image_directory"
|
39
|
+
<% end %>
|
40
|
+
|
41
|
+
# Build-specific configuration
|
42
|
+
configure :build do
|
43
|
+
# For example, change the Compass output style for deployment
|
44
|
+
# enable :minify_css
|
45
|
+
|
46
|
+
# Minify Javascript on build
|
47
|
+
# enable :minify_javascript
|
48
|
+
|
49
|
+
# Shrink/smush PNG/JPEGs on build
|
50
|
+
# enable :smush_pngs
|
51
|
+
|
52
|
+
# Enable cache buster
|
53
|
+
# enable :cache_buster
|
54
|
+
|
55
|
+
# Or use a different image path
|
56
|
+
# set :http_path, "/Content/images/"
|
57
|
+
end
|
@@ -1,6 +1,13 @@
|
|
1
|
-
|
1
|
+
!!! Strict
|
2
|
+
%html{ :xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en" }
|
2
3
|
%head
|
3
|
-
%
|
4
|
+
%meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" }
|
5
|
+
/ Comment in layout
|
6
|
+
= stylesheet_link_tag "site.css"
|
7
|
+
:javascript
|
8
|
+
// Comment in javascript
|
9
|
+
= yield_content :head
|
4
10
|
|
5
|
-
%body
|
6
|
-
|
11
|
+
%body{ :class => page_classes }
|
12
|
+
#frame
|
13
|
+
= yield
|
@@ -0,0 +1,27 @@
|
|
1
|
+
@import "compass"
|
2
|
+
@import "blueprint"
|
3
|
+
|
4
|
+
$font-color: #2a2a2a
|
5
|
+
$link-color: #0388a6
|
6
|
+
$link-hover-color: #009ce0
|
7
|
+
$link-focus-color: $link-color
|
8
|
+
$link-active-color: $link-color
|
9
|
+
$link-visited-color: $link-color
|
10
|
+
|
11
|
+
$blueprint-font-family: 'Century Gothic', 'Apple Gothic', 'Helvetica Neue', arial, sans-serif
|
12
|
+
$blueprint-font-size: 13px
|
13
|
+
$blueprint-grid-columns: 12
|
14
|
+
$blueprint-grid-width: 60px
|
15
|
+
$blueprint-grid-margin: 20px
|
16
|
+
|
17
|
+
+global-reset
|
18
|
+
|
19
|
+
+blueprint-typography
|
20
|
+
|
21
|
+
a
|
22
|
+
+link-colors($link-color, $link-hover-color, $link-focus-color, $link-active-color, $link-visited-color)
|
23
|
+
|
24
|
+
#frame
|
25
|
+
padding: 50px
|
26
|
+
text-align: center
|
27
|
+
+container
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rack/test' # Use Rack::Test to access Sinatra without starting up a full server
|
2
|
+
|
3
|
+
# Monkey-patch to use a dynamic renderer
|
4
|
+
class Templater::Actions::File
|
5
|
+
def identical?
|
6
|
+
if exists?
|
7
|
+
return true if File.mtime(source) < File.mtime(destination)
|
8
|
+
FileUtils.identical?(source, destination)
|
9
|
+
else
|
10
|
+
false
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class Templater::Actions::Template
|
16
|
+
def render
|
17
|
+
@@rack_test ||= Rack::Test::Session.new(Rack::MockSession.new(Middleman::Base))
|
18
|
+
|
19
|
+
@render_cache ||= begin
|
20
|
+
# The default render just requests the page over Rack and writes the response
|
21
|
+
request_path = destination.gsub(File.join(Dir.pwd, Middleman::Base.build_dir), "")
|
22
|
+
@@rack_test.get(request_path)
|
23
|
+
@@rack_test.last_response.body
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/middleman.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{middleman}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.9.0.pre"
|
9
9
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Thomas Reynolds"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2010-09-04}
|
13
13
|
s.email = %q{tdreyno@gmail.com}
|
14
14
|
s.executables = ["mm-init", "mm-build", "mm-server"]
|
15
15
|
s.extra_rdoc_files = [
|
@@ -26,99 +26,88 @@ Gem::Specification.new do |s|
|
|
26
26
|
"bin/mm-build",
|
27
27
|
"bin/mm-init",
|
28
28
|
"bin/mm-server",
|
29
|
+
"features/asset_host.feature",
|
30
|
+
"features/automatic_image_sizes.feature",
|
31
|
+
"features/cache_buster.feature",
|
32
|
+
"features/generator.feature",
|
33
|
+
"features/minify_css.feature",
|
34
|
+
"features/minify_javascript.feature",
|
35
|
+
"features/page_alias_and_layouts.feature",
|
36
|
+
"features/relative_assets.feature",
|
37
|
+
"features/step_definitions/asset_host_steps.rb",
|
38
|
+
"features/step_definitions/env.rb",
|
39
|
+
"features/step_definitions/generator_steps.rb",
|
40
|
+
"features/step_definitions/middleman_steps.rb",
|
41
|
+
"features/step_definitions/page_layout_steps.rb",
|
29
42
|
"lib/middleman.rb",
|
30
|
-
"lib/middleman/
|
31
|
-
"lib/middleman/
|
32
|
-
"lib/middleman/
|
33
|
-
"lib/middleman/
|
34
|
-
"lib/middleman/
|
35
|
-
"lib/middleman/
|
43
|
+
"lib/middleman/assets.rb",
|
44
|
+
"lib/middleman/base.rb",
|
45
|
+
"lib/middleman/builder.rb",
|
46
|
+
"lib/middleman/config.ru",
|
47
|
+
"lib/middleman/features.rb",
|
48
|
+
"lib/middleman/features/asset_host.rb",
|
49
|
+
"lib/middleman/features/automatic_image_sizes.rb",
|
50
|
+
"lib/middleman/features/automatic_image_sizes/fastimage.rb",
|
51
|
+
"lib/middleman/features/cache_buster.rb",
|
52
|
+
"lib/middleman/features/default_helpers.rb",
|
53
|
+
"lib/middleman/features/livereload.rb",
|
54
|
+
"lib/middleman/features/minify_css.rb",
|
55
|
+
"lib/middleman/features/minify_javascript.rb",
|
56
|
+
"lib/middleman/features/minify_javascript/rack.rb",
|
57
|
+
"lib/middleman/features/relative_assets.rb",
|
58
|
+
"lib/middleman/features/slickmap.rb",
|
59
|
+
"lib/middleman/features/smush_pngs.rb",
|
60
|
+
"lib/middleman/features/ugly_haml.rb",
|
61
|
+
"lib/middleman/renderers.rb",
|
62
|
+
"lib/middleman/renderers/coffee.rb",
|
63
|
+
"lib/middleman/renderers/haml.rb",
|
64
|
+
"lib/middleman/renderers/sass.rb",
|
65
|
+
"lib/middleman/template/init.rbt",
|
66
|
+
"lib/middleman/template/views/index.html.haml",
|
36
67
|
"lib/middleman/template/views/layout.haml",
|
37
|
-
"lib/middleman/template/views/stylesheets/site.sass",
|
68
|
+
"lib/middleman/template/views/stylesheets/site.css.sass",
|
69
|
+
"lib/middleman/templater+dynamic_renderer.rb",
|
38
70
|
"middleman.gemspec",
|
39
71
|
"spec/builder_spec.rb",
|
40
72
|
"spec/fixtures/sample/init.rb",
|
73
|
+
"spec/fixtures/sample/public/images/blank.gif",
|
41
74
|
"spec/fixtures/sample/public/static.html",
|
75
|
+
"spec/fixtures/sample/public/stylesheets/auto-css.css",
|
42
76
|
"spec/fixtures/sample/public/stylesheets/static.css",
|
77
|
+
"spec/fixtures/sample/public/stylesheets/sub1/auto-css.css",
|
78
|
+
"spec/fixtures/sample/public/stylesheets/sub1/sub2/auto-css.css",
|
43
79
|
"spec/fixtures/sample/views/_partial.haml",
|
44
|
-
"spec/fixtures/sample/views/
|
45
|
-
"spec/fixtures/sample/views/
|
80
|
+
"spec/fixtures/sample/views/asset_host.html.haml",
|
81
|
+
"spec/fixtures/sample/views/auto-css.html.haml",
|
82
|
+
"spec/fixtures/sample/views/auto-image-sizes.html.haml",
|
83
|
+
"spec/fixtures/sample/views/cache-buster.html.haml",
|
84
|
+
"spec/fixtures/sample/views/custom-layout.html.haml",
|
85
|
+
"spec/fixtures/sample/views/custom.haml",
|
86
|
+
"spec/fixtures/sample/views/index.html.haml",
|
87
|
+
"spec/fixtures/sample/views/inline-css.html.haml",
|
88
|
+
"spec/fixtures/sample/views/inline-js.html.haml",
|
46
89
|
"spec/fixtures/sample/views/layout.haml",
|
47
|
-
"spec/fixtures/sample/views/
|
48
|
-
"spec/fixtures/sample/views/
|
49
|
-
"spec/fixtures/sample/views/services/index.haml",
|
50
|
-
"spec/fixtures/sample/views/stylesheets/
|
51
|
-
"spec/
|
52
|
-
"spec/
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"vendor/rack-test/lib/rack/mock_session.rb",
|
58
|
-
"vendor/rack-test/lib/rack/test.rb",
|
59
|
-
"vendor/rack-test/lib/rack/test/cookie_jar.rb",
|
60
|
-
"vendor/rack-test/lib/rack/test/methods.rb",
|
61
|
-
"vendor/rack-test/lib/rack/test/mock_digest_request.rb",
|
62
|
-
"vendor/rack-test/lib/rack/test/uploaded_file.rb",
|
63
|
-
"vendor/rack-test/lib/rack/test/utils.rb",
|
64
|
-
"vendor/rack-test/spec/fixtures/config.ru",
|
65
|
-
"vendor/rack-test/spec/fixtures/fake_app.rb",
|
66
|
-
"vendor/rack-test/spec/fixtures/foo.txt",
|
67
|
-
"vendor/rack-test/spec/rack/test/cookie_spec.rb",
|
68
|
-
"vendor/rack-test/spec/rack/test/digest_auth_spec.rb",
|
69
|
-
"vendor/rack-test/spec/rack/test/multipart_spec.rb",
|
70
|
-
"vendor/rack-test/spec/rack/test/utils_spec.rb",
|
71
|
-
"vendor/rack-test/spec/rack/test_spec.rb",
|
72
|
-
"vendor/rack-test/spec/rcov.opts",
|
73
|
-
"vendor/rack-test/spec/spec.opts",
|
74
|
-
"vendor/rack-test/spec/spec_helper.rb",
|
75
|
-
"vendor/sinatra-content-for/LICENSE",
|
76
|
-
"vendor/sinatra-content-for/README.rdoc",
|
77
|
-
"vendor/sinatra-content-for/Rakefile",
|
78
|
-
"vendor/sinatra-content-for/lib/sinatra/content_for.rb",
|
79
|
-
"vendor/sinatra-content-for/sinatra-content-for.gemspec",
|
80
|
-
"vendor/sinatra-content-for/test/content_for_test.rb",
|
81
|
-
"vendor/sinatra-markaby/CHANGES",
|
82
|
-
"vendor/sinatra-markaby/LICENSE",
|
83
|
-
"vendor/sinatra-markaby/README.rdoc",
|
84
|
-
"vendor/sinatra-markaby/Rakefile",
|
85
|
-
"vendor/sinatra-markaby/TODO",
|
86
|
-
"vendor/sinatra-markaby/VERSION.yml",
|
87
|
-
"vendor/sinatra-markaby/lib/sinatra/markaby.rb",
|
88
|
-
"vendor/sinatra-markaby/sinatra-markaby.gemspec",
|
89
|
-
"vendor/sinatra-markaby/test/sinatra_markaby_test.rb",
|
90
|
-
"vendor/sinatra-markaby/test/test_helper.rb",
|
91
|
-
"vendor/sinatra-markaby/test/views/hello.mab",
|
92
|
-
"vendor/sinatra-markaby/test/views/html.mab",
|
93
|
-
"vendor/sinatra-maruku/LICENSE",
|
94
|
-
"vendor/sinatra-maruku/README.markdown",
|
95
|
-
"vendor/sinatra-maruku/Rakefile",
|
96
|
-
"vendor/sinatra-maruku/VERSION.yml",
|
97
|
-
"vendor/sinatra-maruku/examples/app.rb",
|
98
|
-
"vendor/sinatra-maruku/examples/config.ru",
|
99
|
-
"vendor/sinatra-maruku/examples/mapp.rb",
|
100
|
-
"vendor/sinatra-maruku/examples/public/javascripts/application.js",
|
101
|
-
"vendor/sinatra-maruku/examples/public/stylesheets/application.css",
|
102
|
-
"vendor/sinatra-maruku/examples/public/stylesheets/print.css",
|
103
|
-
"vendor/sinatra-maruku/examples/views/index.maruku",
|
104
|
-
"vendor/sinatra-maruku/examples/views/layout.maruku",
|
105
|
-
"vendor/sinatra-maruku/lib/sinatra/maruku.rb",
|
106
|
-
"vendor/sinatra-maruku/sinatra-maruku.gemspec",
|
107
|
-
"vendor/sinatra-maruku/test/sinatra_maruku_test.rb",
|
108
|
-
"vendor/sinatra-maruku/test/test_helper.rb",
|
109
|
-
"vendor/sinatra-maruku/test/views/hello.maruku",
|
110
|
-
"vendor/sinatra-maruku/test/views/layout2.maruku"
|
90
|
+
"spec/fixtures/sample/views/maruku.html.maruku",
|
91
|
+
"spec/fixtures/sample/views/page-classes.html.haml",
|
92
|
+
"spec/fixtures/sample/views/services/index.html.haml",
|
93
|
+
"spec/fixtures/sample/views/stylesheets/asset_host.css.sass",
|
94
|
+
"spec/fixtures/sample/views/stylesheets/relative_assets.css.sass",
|
95
|
+
"spec/fixtures/sample/views/stylesheets/site.css.sass",
|
96
|
+
"spec/fixtures/sample/views/stylesheets/site_scss.css.scss",
|
97
|
+
"spec/fixtures/sample/views/stylesheets/test_less.css.less",
|
98
|
+
"spec/helpers_spec.rb",
|
99
|
+
"spec/spec_helper.rb"
|
111
100
|
]
|
112
|
-
s.homepage = %q{http://github.com/tdreyno/middleman}
|
101
|
+
s.homepage = %q{http://wiki.github.com/tdreyno/middleman}
|
113
102
|
s.rdoc_options = ["--charset=UTF-8"]
|
114
103
|
s.require_paths = ["lib"]
|
115
104
|
s.rubyforge_project = %q{middleman}
|
116
|
-
s.rubygems_version = %q{1.3.
|
117
|
-
s.summary = %q{A static site generator utilizing Haml and
|
105
|
+
s.rubygems_version = %q{1.3.7}
|
106
|
+
s.summary = %q{A static site generator utilizing Haml, Sass and providing YUI compression and cache busting}
|
118
107
|
s.test_files = [
|
119
108
|
"spec/builder_spec.rb",
|
120
109
|
"spec/fixtures/sample/init.rb",
|
121
|
-
"spec/
|
110
|
+
"spec/helpers_spec.rb",
|
122
111
|
"spec/spec_helper.rb"
|
123
112
|
]
|
124
113
|
|
@@ -126,33 +115,58 @@ Gem::Specification.new do |s|
|
|
126
115
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
127
116
|
s.specification_version = 3
|
128
117
|
|
129
|
-
if Gem::Version.new(Gem::
|
130
|
-
s.add_runtime_dependency(%q<
|
131
|
-
s.add_runtime_dependency(%q<
|
132
|
-
s.add_runtime_dependency(%q<
|
133
|
-
s.add_runtime_dependency(%q<
|
134
|
-
s.add_runtime_dependency(%q<
|
135
|
-
s.add_runtime_dependency(%q<
|
136
|
-
s.add_runtime_dependency(%q<
|
137
|
-
s.add_runtime_dependency(%q<
|
118
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
119
|
+
s.add_runtime_dependency(%q<rack>, ["~> 1.0"])
|
120
|
+
s.add_runtime_dependency(%q<thin>, ["~> 1.2.0"])
|
121
|
+
s.add_runtime_dependency(%q<shotgun>, ["~> 0.8.0"])
|
122
|
+
s.add_runtime_dependency(%q<templater>, ["~> 1.0.0"])
|
123
|
+
s.add_runtime_dependency(%q<sinatra>, ["~> 1.0"])
|
124
|
+
s.add_runtime_dependency(%q<sinatra-content-for>, ["~> 0.2.0"])
|
125
|
+
s.add_runtime_dependency(%q<rack-test>, ["~> 0.5.0"])
|
126
|
+
s.add_runtime_dependency(%q<yui-compressor>, ["~> 0.9.0"])
|
127
|
+
s.add_runtime_dependency(%q<haml>, ["~> 3.0"])
|
128
|
+
s.add_runtime_dependency(%q<compass>, ["~> 0.10.0"])
|
129
|
+
s.add_runtime_dependency(%q<json_pure>, ["~> 1.4.0"])
|
130
|
+
s.add_runtime_dependency(%q<smusher>, ["~> 0.4.5"])
|
131
|
+
s.add_runtime_dependency(%q<compass-slickmap>, ["~> 0.3.0"])
|
132
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
133
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
134
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
138
135
|
else
|
139
|
-
s.add_dependency(%q<
|
140
|
-
s.add_dependency(%q<
|
141
|
-
s.add_dependency(%q<
|
142
|
-
s.add_dependency(%q<
|
143
|
-
s.add_dependency(%q<
|
144
|
-
s.add_dependency(%q<
|
145
|
-
s.add_dependency(%q<
|
146
|
-
s.add_dependency(%q<
|
136
|
+
s.add_dependency(%q<rack>, ["~> 1.0"])
|
137
|
+
s.add_dependency(%q<thin>, ["~> 1.2.0"])
|
138
|
+
s.add_dependency(%q<shotgun>, ["~> 0.8.0"])
|
139
|
+
s.add_dependency(%q<templater>, ["~> 1.0.0"])
|
140
|
+
s.add_dependency(%q<sinatra>, ["~> 1.0"])
|
141
|
+
s.add_dependency(%q<sinatra-content-for>, ["~> 0.2.0"])
|
142
|
+
s.add_dependency(%q<rack-test>, ["~> 0.5.0"])
|
143
|
+
s.add_dependency(%q<yui-compressor>, ["~> 0.9.0"])
|
144
|
+
s.add_dependency(%q<haml>, ["~> 3.0"])
|
145
|
+
s.add_dependency(%q<compass>, ["~> 0.10.0"])
|
146
|
+
s.add_dependency(%q<json_pure>, ["~> 1.4.0"])
|
147
|
+
s.add_dependency(%q<smusher>, ["~> 0.4.5"])
|
148
|
+
s.add_dependency(%q<compass-slickmap>, ["~> 0.3.0"])
|
149
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
150
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
151
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
147
152
|
end
|
148
153
|
else
|
149
|
-
s.add_dependency(%q<
|
150
|
-
s.add_dependency(%q<
|
151
|
-
s.add_dependency(%q<
|
152
|
-
s.add_dependency(%q<
|
153
|
-
s.add_dependency(%q<
|
154
|
-
s.add_dependency(%q<
|
155
|
-
s.add_dependency(%q<
|
156
|
-
s.add_dependency(%q<
|
154
|
+
s.add_dependency(%q<rack>, ["~> 1.0"])
|
155
|
+
s.add_dependency(%q<thin>, ["~> 1.2.0"])
|
156
|
+
s.add_dependency(%q<shotgun>, ["~> 0.8.0"])
|
157
|
+
s.add_dependency(%q<templater>, ["~> 1.0.0"])
|
158
|
+
s.add_dependency(%q<sinatra>, ["~> 1.0"])
|
159
|
+
s.add_dependency(%q<sinatra-content-for>, ["~> 0.2.0"])
|
160
|
+
s.add_dependency(%q<rack-test>, ["~> 0.5.0"])
|
161
|
+
s.add_dependency(%q<yui-compressor>, ["~> 0.9.0"])
|
162
|
+
s.add_dependency(%q<haml>, ["~> 3.0"])
|
163
|
+
s.add_dependency(%q<compass>, ["~> 0.10.0"])
|
164
|
+
s.add_dependency(%q<json_pure>, ["~> 1.4.0"])
|
165
|
+
s.add_dependency(%q<smusher>, ["~> 0.4.5"])
|
166
|
+
s.add_dependency(%q<compass-slickmap>, ["~> 0.3.0"])
|
167
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
168
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
169
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
157
170
|
end
|
158
171
|
end
|
172
|
+
|
data/spec/builder_spec.rb
CHANGED
@@ -9,18 +9,18 @@ describe "Builder" do
|
|
9
9
|
@root_dir = project_file("spec", "fixtures", "sample")
|
10
10
|
end
|
11
11
|
|
12
|
-
before :each do
|
12
|
+
before :each do
|
13
13
|
build_cmd = project_file("bin", "mm-build")
|
14
|
-
`cd #{@root_dir} && #{build_cmd}`
|
14
|
+
`cd #{@root_dir} && MM_DIR="#{@root_dir}" #{build_cmd}`
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
after :each do
|
18
18
|
FileUtils.rm_rf(File.join(@root_dir, "build"))
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
File.exists?("#{@root_dir}/build/
|
23
|
-
File.read("#{@root_dir}/build/
|
21
|
+
it "should use layout" do
|
22
|
+
File.exists?("#{@root_dir}/build/index.html").should be_true
|
23
|
+
File.read("#{@root_dir}/build/index.html").should include("Comment in layout")
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should build haml files" do
|
@@ -28,11 +28,6 @@ describe "Builder" do
|
|
28
28
|
File.read("#{@root_dir}/build/index.html").should include("<h1>Welcome</h1>")
|
29
29
|
end
|
30
30
|
|
31
|
-
it "should build maruku files" do
|
32
|
-
File.exists?("#{@root_dir}/build/maruku.html").should be_true
|
33
|
-
File.read("#{@root_dir}/build/maruku.html").should include("<h1 class='header' id='hello_maruku'>Hello Maruku</h1>")
|
34
|
-
end
|
35
|
-
|
36
31
|
it "should build static files" do
|
37
32
|
File.exists?("#{@root_dir}/build/static.html").should be_true
|
38
33
|
File.read("#{@root_dir}/build/static.html").should include("Static, no code!")
|
@@ -44,7 +39,17 @@ describe "Builder" do
|
|
44
39
|
|
45
40
|
it "should build sass files" do
|
46
41
|
File.exists?("#{@root_dir}/build/stylesheets/site.css").should be_true
|
47
|
-
File.read("#{@root_dir}/build/stylesheets/site.css").should include("html,
|
42
|
+
File.read("#{@root_dir}/build/stylesheets/site.css").gsub(/\s/, "").should include("html,body,div,span,applet,object,iframe")
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should build less files" do
|
46
|
+
File.exists?("#{@root_dir}/build/stylesheets/test_less.css").should be_true
|
47
|
+
File.read("#{@root_dir}/build/stylesheets/test_less.css").should include("666")
|
48
|
+
end
|
49
|
+
|
50
|
+
it "should build scss files" do
|
51
|
+
File.exists?("#{@root_dir}/build/stylesheets/site_scss.css").should be_true
|
52
|
+
File.read("#{@root_dir}/build/stylesheets/site_scss.css").gsub(/\s/, "").should include("html,body,div,span,applet,object,iframe")
|
48
53
|
end
|
49
54
|
|
50
55
|
it "should build static css files" do
|
@@ -54,8 +59,4 @@ describe "Builder" do
|
|
54
59
|
it "should not build partial files" do
|
55
60
|
File.exists?("#{@root_dir}/build/_partial.html").should be_false
|
56
61
|
end
|
57
|
-
|
58
|
-
it "should minify inline javascript" do
|
59
|
-
File.readlines("#{@root_dir}/build/inline-js.html").length.should == 9
|
60
|
-
end
|
61
62
|
end
|