middleman 0.9.18 → 0.9.20

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 CHANGED
@@ -1 +1 @@
1
- 0.9.18
1
+ 0.9.20
@@ -93,6 +93,8 @@ class Middleman::Base
93
93
  use Middleman::Rack::Sprockets
94
94
 
95
95
  enable :compass
96
+ require "middleman/features/compass"
97
+ @@features -= [:compass]
96
98
 
97
99
  # Features disabled by default
98
100
  disable :slickmap
@@ -125,6 +127,11 @@ class Middleman::Base
125
127
  require "middleman/features/#{feature_name}"
126
128
  end
127
129
 
130
+ ::Compass.configuration do |config|
131
+ config.http_images_path = self.http_images_path rescue File.join(self.http_prefix, self.images_dir)
132
+ config.http_stylesheets_path = self.http_css_path rescue File.join(self.http_prefix, self.css_dir)
133
+ end
134
+
128
135
  super
129
136
  end
130
137
  end
@@ -5,8 +5,13 @@ class << Middleman::Base
5
5
  if http_path.include?("://") || !%w(.css .png .jpg .js .gif).include?(File.extname(http_path))
6
6
  http_path
7
7
  else
8
- real_path = File.join(self.public, prefix, path)
9
- http_path << "?" + File.mtime(real_path).strftime("%s") if File.readable?(real_path)
8
+ begin
9
+ prefix = self.images_dir if prefix == self.http_images_path
10
+ rescue
11
+ end
12
+
13
+ real_path = File.join(self.environment == "build" ? self.build_dir : self.public, prefix, path)
14
+ http_path << "?" + File.mtime(real_path).strftime("%s") if File.readable?(real_path)
10
15
  http_path
11
16
  end
12
17
  end
@@ -5,19 +5,11 @@ class Middleman::Base
5
5
 
6
6
  config.project_path = Dir.pwd
7
7
  config.sass_dir = File.join(File.basename(self.views), self.css_dir)
8
- config.output_style = self.minify_css? ? :compressed : :nested
8
+ config.output_style = :nested
9
9
  config.css_dir = File.join(File.basename(images_location), self.css_dir)
10
10
  config.images_dir = File.join(File.basename(images_location), self.images_dir)
11
11
  # File.expand_path(self.images_dir, self.public)
12
12
 
13
- if !cache_buster?
14
- config.asset_cache_buster do
15
- false
16
- end
17
- end
18
-
19
- config.http_images_path = File.join(self.http_prefix, self.images_dir)
20
- config.http_stylesheets_path = File.join(self.http_prefix, self.css_dir)
21
13
  config.add_import_path(config.sass_dir)
22
14
  end
23
15
 
@@ -1,2 +1,9 @@
1
1
  # Otherwise use YUI
2
- # Fine a way to minify inline/css
2
+ # Fine a way to minify inline/css
3
+ class Middleman::Base
4
+ configure do
5
+ ::Compass.configuration do |config|
6
+ config.output_style = :compressed
7
+ end
8
+ end
9
+ end
@@ -5,6 +5,11 @@ end
5
5
  class << Middleman::Base
6
6
  alias_method :pre_relative_asset_url, :asset_url
7
7
  def asset_url(path, prefix="", request=nil)
8
+ begin
9
+ prefix = self.images_dir if prefix == self.http_images_path
10
+ rescue
11
+ end
12
+
8
13
  path = pre_relative_asset_url(path, prefix, request)
9
14
  if path.include?("://")
10
15
  path
@@ -33,7 +33,8 @@ module Middleman
33
33
 
34
34
  def image_tag(path, params={})
35
35
  params[:alt] ||= ""
36
- params = params.merge(:src => asset_url(path, options.images_dir))
36
+ prefix = options.http_images_path rescue options.images_dir
37
+ params = params.merge(:src => asset_url(path, prefix))
37
38
  params = params.map { |k,v| %Q{#{k}="#{v}"}}.join(' ')
38
39
  "<img #{params} />"
39
40
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{middleman}
8
- s.version = "0.9.18"
8
+ s.version = "0.9.20"
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"]
@@ -23,7 +23,7 @@ describe "Builder" do
23
23
  File.read("#{@root_dir}/build/index.html").should include("<h1>Welcome</h1>")
24
24
  end
25
25
 
26
- it "should build maruku files" do
26
+ xit "should build maruku files" do
27
27
  File.exists?("#{@root_dir}/build/maruku.html").should be_true
28
28
  File.read("#{@root_dir}/build/maruku.html").should include("<h1 class='header' id='hello_maruku'>Hello Maruku</h1>")
29
29
  end
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.9.18
4
+ version: 0.9.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds