middleman 0.9.22 → 0.9.23

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.22
1
+ 0.9.23
@@ -3,13 +3,13 @@ require "middleman/fastimage"
3
3
  class Middleman::Base
4
4
  alias_method :pre_automatic_image_tag, :image_tag
5
5
  helpers do
6
- def image_tag(path, params={})
6
+ def image_tag(path, params={})
7
7
  if (!params[:width] || !params[:height]) && !path.include?("://")
8
8
  params[:alt] ||= ""
9
- prefix = options.http_images_path rescue options.images_dir
9
+ http_prefix = options.http_images_path rescue options.images_dir
10
10
 
11
11
  begin
12
- real_path = File.join(options.public, asset_url(path, prefix))
12
+ real_path = File.join(options.public, options.images_dir, path)
13
13
  if File.exists? real_path
14
14
  dimensions = Middleman::FastImage.size(real_path, :raise_on_failure => true)
15
15
  params[:width] ||= dimensions[0]
@@ -18,7 +18,7 @@ class Middleman::Base
18
18
  rescue
19
19
  end
20
20
 
21
- params = params.merge(:src => asset_url(path, prefix))
21
+ params = params.merge(:src => asset_url(path, http_prefix))
22
22
  params = params.map { |k,v| %Q{#{k}="#{v}"}}.join(' ')
23
23
  "<img #{params} />"
24
24
  else
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{middleman}
8
- s.version = "0.9.22"
8
+ s.version = "0.9.23"
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.9.22
4
+ version: 0.9.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds