middleman 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.0
1
+ 0.10.1
@@ -34,7 +34,7 @@ module Middleman
34
34
  end
35
35
 
36
36
  @@afters = []
37
- def self.after(&block)
37
+ def self.after_feature_init(&block)
38
38
  @@afters << block
39
39
  end
40
40
 
@@ -1,3 +1,22 @@
1
+ class Middleman::Base
2
+ include Middleman::Sass
3
+
4
+ after_feature_init do
5
+ ::Compass.configuration do |config|
6
+ config.asset_cache_buster do |path, real_path|
7
+ # real_path = real_path.gsub(self.build_dir, self.public)
8
+ if File.readable?(real_path)
9
+ File.mtime(real_path).strftime("%s")
10
+ else
11
+ $stderr.puts "WARNING: '#{File.basename(path)}' was not found (or cannot be read) in #{File.dirname(real_path)}"
12
+ end
13
+ end
14
+ end
15
+
16
+ ::Compass.configure_sass_plugin!
17
+ end
18
+ end
19
+
1
20
  class << Middleman::Base
2
21
  alias_method :pre_cache_buster_asset_url, :asset_url
3
22
  def asset_url(path, prefix="", request=nil)
@@ -68,39 +68,24 @@ end
68
68
  class Middleman::Base
69
69
  include Middleman::Sass
70
70
 
71
- after do
71
+ after_feature_init do
72
72
  ::Compass.configuration do |config|
73
- config.project_path = self.root
74
- config.sass_dir = File.join(File.basename(self.views), self.css_dir)
75
- config.output_style = :nested
76
- config.css_dir = File.join(File.basename(self.public), self.css_dir)
77
- config.images_dir = File.join(File.basename(self.public), self.images_dir)
78
-
79
- config.add_import_path(config.sass_dir)
80
-
73
+ config.project_path = self.root
74
+ config.sass_dir = File.join(File.basename(self.views), self.css_dir)
75
+ config.output_style = :nested
76
+ config.css_dir = File.join(File.basename(self.public), self.css_dir)
77
+ config.images_dir = File.join(File.basename(self.public), self.images_dir)
81
78
  config.http_images_path = self.http_images_path rescue File.join(self.http_prefix, self.images_dir)
82
79
  config.http_stylesheets_path = self.http_css_path rescue File.join(self.http_prefix, self.css_dir)
83
-
84
- if self.cache_buster?
85
- config.asset_cache_buster do |path, real_path|
86
- # real_path = real_path.gsub(self.build_dir, self.public)
87
- if File.readable?(real_path)
88
- File.mtime(real_path).strftime("%s")
89
- else
90
- $stderr.puts "WARNING: '#{File.basename(path)}' was not found (or cannot be read) in #{File.dirname(real_path)}"
91
- end
92
- end
93
- else
94
- config.asset_cache_buster do
95
- false
96
- end
97
- end
80
+ config.asset_cache_buster { false }
81
+
82
+ config.add_import_path(config.sass_dir)
98
83
  end
99
84
 
100
85
  configure :build do
101
86
  ::Compass.configuration do |config|
102
- config.css_dir = File.join(File.basename(self.build_dir), self.css_dir)
103
- config.images_dir = File.join(File.basename(self.build_dir), self.images_dir)
87
+ config.css_dir = File.join(File.basename(self.build_dir), self.css_dir)
88
+ config.images_dir = File.join(File.basename(self.build_dir), self.images_dir)
104
89
  end
105
90
  end
106
91
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{middleman}
8
- s.version = "0.10.0"
8
+ s.version = "0.10.1"
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.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds