active_assets 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |s|
3
3
  s.name = "active_assets"
4
- s.version = '1.0.1'
4
+ s.version = '1.0.2'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ["Sam Woodard"]
7
7
  s.email = ["sam@wildfireapp.com"]
@@ -85,7 +85,7 @@ module ActiveAssets
85
85
 
86
86
  def cleanse_paths!(paths)
87
87
  paths.map! do |path|
88
- if path =~ %r{://}
88
+ if path =~ %r{^[-a-z]*:?//|^cid:}
89
89
  path
90
90
  else
91
91
  dirname = File.dirname(path)
@@ -160,4 +160,16 @@ class ExpansionsTest < Test::Unit::TestCase
160
160
  assert_equal %w{vendor/jquery.mousewheel.js bar/bas.js}, Rails.application.expansions.javascripts[:foo].assets.map(&:path)
161
161
  end
162
162
 
163
+ def test_expansion_with_uri
164
+ Rails.application.expansions do
165
+ expansion :cdn, :type => :js, :namespace => :fubar do
166
+ a '//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/jquery-ui.min.js', :cache => false, :group => :deploy
167
+ end
168
+ end
169
+
170
+ Rails.application.expansions.javascripts.register!
171
+
172
+ assert ActionView::Helpers::AssetTagHelper.javascript_expansions.any? {|k, v| v.include?('//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/jquery-ui.min.js')}
173
+ end
174
+
163
175
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_assets
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sam Woodard