asset_host_selection 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e444805678d86ed814a27649ad1eb2630e4094c4
4
- data.tar.gz: c7be0cfe934d0bd2b63803164d5aaea42844253a
3
+ metadata.gz: 79e63e7d28d60eedcff353ca2c58bf345abb8ef5
4
+ data.tar.gz: 951dd3b9968b288e7809e50386fe0f6b58db4cb2
5
5
  SHA512:
6
- metadata.gz: 45f233decf3651453c08c04358cb0d5ebc3132ee96811ce3fc631131fdc0fc1f02dde050aa756e70d06d439cf19a1a9d303aea60ac9c7e29996bfacfa45c6a8c
7
- data.tar.gz: f4fe9db08a4fe2f0dec2155ab1193a345ebd3dfee49f9862283b1d5ee70530bb667a184c94ffd4400e76441629ad22b5ed14b8e7ec4ed9f1648a283a4ff4204c
6
+ metadata.gz: eb6e0da5c4d927bf350c08cbbc3b7d0887b9d9372d054e997f8e018b41e1227dd11b8871c697ec5b64ec00f7ed11e220f55f74580f8ead01f855c5bb678f361b
7
+ data.tar.gz: 200e3bdd4a76a17689156ab020206aa0f630168a37ec3133e019db5fcdda58bb04f8a78a504330efbb836948338d3cb65e59fdc4cd90ea3c2e6be21e79a4cdbd
@@ -47,7 +47,9 @@ module AssetHostSelection
47
47
  @selector = selector
48
48
  end
49
49
 
50
- def call(source, request)
50
+ def call(source, request = nil)
51
+ return unless request # rails 4 does not pass request in during asset compilation
52
+
51
53
  asset_provider = @selector.select(request)
52
54
  host = asset_provider.host if asset_provider
53
55
 
@@ -88,6 +88,12 @@ describe AssetHostSelection do
88
88
  end
89
89
  end
90
90
 
91
+ describe "on rails 4 during asset compilation / without request" do
92
+ it "uses no host" do
93
+ assert_nil @asset_host.call("hello.gif")
94
+ end
95
+ end
96
+
91
97
  end
92
98
 
93
99
  class TestProviderPool
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asset_host_selection
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Chapweske
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-07-22 00:00:00.000000000 Z
13
+ date: 2015-01-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake