middleman 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/bin/mm-build +2 -2
- data/lib/middleman.rb +16 -15
- data/middleman.gemspec +2 -1
- data/pkg/middleman-0.2.2.gem +0 -0
- metadata +2 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/bin/mm-build
CHANGED
@@ -22,7 +22,7 @@ module Generators
|
|
22
22
|
|
23
23
|
if (args[0] === args[1])
|
24
24
|
newext = case File.extname(args.first)
|
25
|
-
when '.haml', '.mab', '.maruku'
|
25
|
+
when '.haml', '.erb', '.mab', '.maruku'
|
26
26
|
'.html'
|
27
27
|
when '.sass'
|
28
28
|
'.css'
|
@@ -48,7 +48,7 @@ module Generators
|
|
48
48
|
file(action.downcase.gsub(/[^a-z0-9]+/, '_').to_sym, action, action.gsub('public/', ''))
|
49
49
|
end
|
50
50
|
|
51
|
-
glob! "views", %w(haml sass mab maruku)
|
51
|
+
glob! "views", %w(haml sass erb builder mab maruku)
|
52
52
|
end
|
53
53
|
|
54
54
|
add :build, Builder
|
data/lib/middleman.rb
CHANGED
@@ -45,27 +45,28 @@ class Middleman < Sinatra::Base
|
|
45
45
|
config.http_images_path = "/images/"
|
46
46
|
end
|
47
47
|
end
|
48
|
-
|
48
|
+
|
49
49
|
get /(.*)/ do |path|
|
50
50
|
path << "index.html" if path.match(%r{/$})
|
51
51
|
path.gsub!(%r{^/}, '')
|
52
|
-
|
53
52
|
template = path.gsub(File.extname(path), '').to_sym
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
53
|
+
|
54
|
+
result = nil
|
55
|
+
|
56
|
+
%w(haml erb builder maruku mab sass).each do |renderer|
|
57
|
+
next if !File.exists?(File.join(options.views, "#{template}.#{renderer}"))
|
58
|
+
|
59
|
+
renderer = "markaby" if renderer == "mab"
|
60
|
+
result = if renderer == "sass"
|
61
|
+
content_type 'text/css', :charset => 'utf-8'
|
62
|
+
sass(template, Compass.sass_engine_options)
|
61
63
|
else
|
62
|
-
|
64
|
+
send(renderer.to_sym, template)
|
63
65
|
end
|
64
|
-
|
65
|
-
|
66
|
-
sass(template, Compass.sass_engine_options)
|
67
|
-
else
|
68
|
-
pass
|
66
|
+
|
67
|
+
break
|
69
68
|
end
|
69
|
+
|
70
|
+
result || pass
|
70
71
|
end
|
71
72
|
end
|
data/middleman.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{middleman}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Thomas Reynolds"]
|
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
"lib/middleman/template/views/stylesheets/site.sass",
|
28
28
|
"middleman.gemspec",
|
29
29
|
"pkg/middleman-0.2.1.gem",
|
30
|
+
"pkg/middleman-0.2.2.gem",
|
30
31
|
"rdoc/classes/Middleman.html",
|
31
32
|
"rdoc/created.rid",
|
32
33
|
"rdoc/files/README_rdoc.html",
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Reynolds
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- lib/middleman/template/views/stylesheets/site.sass
|
98
98
|
- middleman.gemspec
|
99
99
|
- pkg/middleman-0.2.1.gem
|
100
|
+
- pkg/middleman-0.2.2.gem
|
100
101
|
- rdoc/classes/Middleman.html
|
101
102
|
- rdoc/created.rid
|
102
103
|
- rdoc/files/README_rdoc.html
|