assets_booster 0.0.11 → 0.0.12

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.
@@ -29,7 +29,7 @@ module AssetsBooster
29
29
  # we don't want to change references to external assets
30
30
  next match if external_url?(url)
31
31
 
32
- url = url[1..-1] if url[0] == "/"
32
+ url = url[1..-1] if url[0].chr == "/"
33
33
  "url(#{quotes}#{base_url}/#{url}#{quotes})"
34
34
  end
35
35
  end
@@ -1,3 +1,3 @@
1
1
  module AssetsBooster
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
@@ -53,7 +53,7 @@ module AssetsBooster
53
53
  end
54
54
 
55
55
  describe "hostify_urls" do
56
- it "should transform relative urls into absolute urls using the given base url" do
56
+ it "should add the given base url to non-external urls" do
57
57
  subject.hostify_urls("http://webcache.eu", "{color:#f00; background:url(test.png)}").should == "{color:#f00; background:url(http://webcache.eu/test.png)}"
58
58
  subject.hostify_urls("http://webcache.eu", "{color:#f00; background:url(/test.png)}").should == "{color:#f00; background:url(http://webcache.eu/test.png)}"
59
59
  subject.hostify_urls("http://webcache.eu", "{color:#f00; background:url(nested/test.png)}").should == "{color:#f00; background:url(http://webcache.eu/nested/test.png)}"
@@ -39,7 +39,7 @@ module AssetsBooster
39
39
  subject.view_helper(@view, @options)
40
40
  end
41
41
 
42
- describe "and the hositfy_urls option set to true" do
42
+ describe "and the hostify_urls option set to true" do
43
43
  before do
44
44
  @options[:inline] = {:hostify_urls => true}
45
45
  end
@@ -52,7 +52,7 @@ module AssetsBooster
52
52
  end
53
53
  end
54
54
 
55
- describe "and the hositfy_urls option set to a string" do
55
+ describe "and the hostify_urls option set to a string" do
56
56
  before do
57
57
  @options[:inline] = {:hostify_urls => "http://myhost.eu"}
58
58
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: assets_booster
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.11
5
+ version: 0.0.12
6
6
  platform: ruby
7
7
  authors:
8
8
  - Corin Langosch