backframe 0.0.47 → 0.0.48

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: c55442a56fe2531ffd61625ebb0f83d7bb2fad7e
4
- data.tar.gz: acac43732000dcab3b854a44f2397478c900ed44
3
+ metadata.gz: 33bfaca0fa4068e96d0d97908d0c2aca7f2c9216
4
+ data.tar.gz: ed3776005ef5fb4892b9f4365243e74bb470db51
5
5
  SHA512:
6
- metadata.gz: a7a1f81d5205173f9b5e751971c3f23c4a8e548c678c4f573907f7a0cd35388780e2aad5b2fe828377345983544139936b2c342172e29b64ef5c628404503d2f
7
- data.tar.gz: 10f75898a2bcc40f1ba0947a33f8f4c23daefbc9f0cf3bad83804ea161fb2a2776c0e9ef52cd1c27bbeaa67f46b78a98c8fe6c1d6033f69ea799c40199383746
6
+ metadata.gz: 9bbd6976376d7370b085a3270d1e145b748ee5fb56e89ab9855c21d779ab5c41a27a995c4f448e4042b9a3a665cdc92aa9f1bb645706236dc0bfbd0cfa037df7
7
+ data.tar.gz: bbe0f17970e19ff6569ef82dd93abc6065eef6b37e86668720ec822ce10d446197ac165f8ae41b2cbc718bf19bec970e724dbe2e562e62d58712d9209a9a4e17
@@ -23,13 +23,18 @@ module Backframe
23
23
  end
24
24
 
25
25
  def url(filepath, conversions)
26
- Rails.application.config.root_url + path(filepath, conversions)
26
+ cdn_root(conversions) + path(filepath, conversions)
27
27
  end
28
28
 
29
29
  def cdn_url(filepath, conversions)
30
30
  Rails.application.config.cdn_url + path(filepath, conversions)
31
31
  end
32
32
 
33
+ def cdn_root(conversions)
34
+ root = Rails.application.config.root_url
35
+ (conversions.key?(:secure) && !conversions[:secure]) ? root.gsub('https', 'http') : root
36
+ end
37
+
33
38
  end
34
39
 
35
40
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Backframe
4
- VERSION = '0.0.47'
4
+ VERSION = '0.0.48'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backframe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.47
4
+ version: 0.0.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Kops