middleman 0.3.9 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.9
1
+ 0.3.10
data/bin/mm-build CHANGED
@@ -20,7 +20,9 @@ module Generators
20
20
  # Override template to ask staticmatic for the correct extension to output
21
21
  def self.template(name, *args, &block)
22
22
  return if args.first.include?('layout')
23
- return if File.basename(args.first)[0,1] == '_'
23
+ args.first.split('/').each do |part|
24
+ return if part[0,1] == '_'
25
+ end
24
26
 
25
27
  if (args[0] === args[1])
26
28
  newext = case File.extname(args.first)
data/lib/middleman.rb CHANGED
@@ -49,8 +49,11 @@ class Middleman < Sinatra::Base
49
49
  config.project_path = Dir.pwd
50
50
  config.sass_dir = File.join(File.basename(self.views), "stylesheets")
51
51
  config.output_style = :nested
52
+ config.css_dir = File.join(File.basename(self.public), "stylesheets")
52
53
  config.images_dir = File.join(File.basename(self.public), "images")
53
- config.http_images_path = "/images/"
54
+ config.http_path = "/"
55
+ config.http_images_path = "/images"
56
+ config.http_stylesheets_path = "/stylesheets"
54
57
  config.add_import_path(config.sass_dir)
55
58
  end
56
59
  end
@@ -73,7 +76,9 @@ class Middleman < Sinatra::Base
73
76
  get %r{/(.*).css} do |path|
74
77
  content_type 'text/css', :charset => 'utf-8'
75
78
  begin
76
- sass(path.to_sym, Compass.sass_engine_options)
79
+ location_of_sass_file = defined?(MIDDLEMAN_BUILDER) ? "build" : "views"
80
+ css_filename = File.join(Dir.pwd, location_of_sass_file) + request.path_info
81
+ sass(path.to_sym, Compass.sass_engine_options.merge({ :css_filename => css_filename }))
77
82
  rescue Exception => e
78
83
  sass_exception_string(e)
79
84
  end
data/middleman.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{middleman}
8
- s.version = "0.3.9"
8
+ s.version = "0.3.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Thomas Reynolds"]
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.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds