middleman 0.2.9 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.9
1
+ 0.3.0
data/lib/middleman.rb CHANGED
@@ -50,21 +50,24 @@ class Middleman < Sinatra::Base
50
50
  puts "== The Middleman is already standing watch on port #{port}!"
51
51
  end
52
52
 
53
+ # Check for local config
54
+ local_config = File.join(self.root, "init.rb")
55
+ if File.exists? local_config
56
+ puts "== Local config at: #{local_config}"
57
+ class_eval File.read(local_config)
58
+ end
59
+
53
60
  configure do
54
61
  Compass.configuration do |config|
55
62
  config.project_path = Dir.pwd
56
- config.sass_dir = File.join(File.expand_path(self.views), "stylesheets")
63
+ config.sass_dir = File.join(File.basename(self.views), "stylesheets")
57
64
  config.output_style = :nested
58
65
  config.images_dir = File.join(File.basename(self.public), "images")
59
66
  config.http_images_path = "/images/"
67
+ config.add_import_path(config.sass_dir)
60
68
  end
61
- end
62
-
63
- # Check for local config
64
- local_config = File.join(self.root, "init.rb")
65
- if File.exists? local_config
66
- puts "== Local config at: #{local_config}"
67
- class_eval File.read(local_config)
69
+
70
+ Compass.configure_sass_plugin!
68
71
  end
69
72
 
70
73
  get /(.*)/ do |path|
@@ -14,4 +14,8 @@ Middleman.helpers do
14
14
  classes += additional unless additional.empty?
15
15
  classes.join(' ')
16
16
  end
17
+
18
+ def asset_url(path, tld_length = 1)
19
+ "/#{path}"
20
+ end
17
21
  end
data/middleman.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{middleman}
5
- s.version = "0.2.9"
5
+ s.version = "0.3.0"
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"]
9
- s.date = %q{2009-07-31}
9
+ s.date = %q{2009-08-04}
10
10
  s.email = %q{tdreyno@gmail.com}
11
11
  s.executables = ["mm-init", "mm-build", "mm-server"]
12
12
  s.extra_rdoc_files = [
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.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-31 00:00:00 -07:00
12
+ date: 2009-08-04 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency