returning url with an external asset host if one is given
This commit is contained in:
parent
06979f6fae
commit
03449e9f33
|
@ -74,7 +74,8 @@ module Sinatra
|
||||||
end
|
end
|
||||||
|
|
||||||
def source_url(source)
|
def source_url(source)
|
||||||
source_url_timestamp url_for(source)
|
url_with_timestamp = source_url_timestamp url_for(source)
|
||||||
|
ENV['asset_host'] + url_with_timestamp if ENV['asset_host']
|
||||||
end
|
end
|
||||||
|
|
||||||
def source_url_timestamp(url)
|
def source_url_timestamp(url)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = %q{r7-sinatra-static-assets}
|
s.name = %q{sinatra-static-assets}
|
||||||
s.version = "0.5.2"
|
s.version = "0.5.2"
|
||||||
|
|
||||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||||
|
@ -69,7 +69,7 @@ Gem::Specification.new do |s|
|
||||||
s.homepage = %q{http://github.com/wbzyl/sinatra-static-assets}
|
s.homepage = %q{http://github.com/wbzyl/sinatra-static-assets}
|
||||||
s.rdoc_options = ["--charset=UTF-8"]
|
s.rdoc_options = ["--charset=UTF-8"]
|
||||||
s.require_paths = ["lib"]
|
s.require_paths = ["lib"]
|
||||||
s.rubyforge_project = %q{r7-sinatra-static-assets}
|
s.rubyforge_project = %q{sinatra-static-assets}
|
||||||
s.rubygems_version = %q{1.3.6}
|
s.rubygems_version = %q{1.3.6}
|
||||||
s.summary = %q{Sinatra extension providing helper methods to output tags for static assetgemspec.}
|
s.summary = %q{Sinatra extension providing helper methods to output tags for static assetgemspec.}
|
||||||
s.test_files = [
|
s.test_files = [
|
||||||
|
|
Loading…
Reference in New Issue