caboose-cms 0.5.27 → 0.5.28

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTM0ZGMzOWNmNTk0ODliNzZlZWFmOTJmYWEzZDc4MDE0ZDNkNDQ3Nw==
4
+ ZjgwMGEzMGQ2YTFmZWI2OWUzZGQ0NzZlY2MyOTllNjk4MmQ1ZDg0Mg==
5
5
  data.tar.gz: !binary |-
6
- ODk3M2ViYjFkOWE1NjQ5YmM1YjkzN2Q1MTUzYWM4MWFkMTE1MGEzZA==
6
+ N2Q4ZTJhZGQ2NjJjZWFmZjY3NjI3ZTI5MWEwZmY4N2Y2Zjg5MGM3Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWEwNDc0YjhjMTc4Y2YxMGU0NjdiNjAzZDk2ZTk0YjUxOWE4MzVhZGJjZmEw
10
- Y2NlNDlhM2JlZWY0NTk4MjIwMTM3NDg3ODkyMGRmZGM2NDQwMGE5Y2YyZDEx
11
- ZWE1OThlYjdjNzZkNjI0YmFhZGJiODhiMzJjZDViOGU4YzcwMmY=
9
+ NzQxZjliY2RlMGNkNzA5NWY5NmRjNjE5MjRlNDVkZDM5YWQ1ODVmNTEyNjcz
10
+ NTdmNWE5MGE1ODk5N2M5NTUxZjY3YzE5ZGZhMTJjMTk4NzBkOTAwMTVhYzk4
11
+ YTQ3MDAxNmM3NzJiYWVkMTg3ZWQ5ZTk3NzIwZjZmMWIzNjAyZGE=
12
12
  data.tar.gz: !binary |-
13
- OThhOTc2NzQ0MjU0NmIxMjVkMzMzZDM3NmJkMWUwM2UwZTJkMGZlYjA2YjMz
14
- YWE3NjYyN2EyZWI0MjYzMzIxMDQyN2IyOWU2OGJmZDRiODgzODAwNmJkYzYz
15
- MTExOTZlNzM0YTc3MGFmOTVmNGM5MzUxYTczMzhiZTk3NzNkYWM=
13
+ NzdhZGFkZmNmYWZkZjJjY2VlMGViNjUwZDE3MTdmYzEyNzE3NWFiNmMwY2Uw
14
+ NDM1Yzc0N2JlZGE5YWQxYzlmYmQ5YmQyMjJlMDk3Y2IzYWEzNDI1MjVmY2Q4
15
+ MTQ0ZTU4YzgwMDIzMDE4OWM1YTE4NzM2Yjk3Y2EzY2RkZWYwZjU=
data/lib/caboose.rb CHANGED
@@ -125,10 +125,15 @@ end
125
125
  # These are used so that both local filestorage and S3 can work without having to change paperclip paths in models
126
126
  Paperclip.interpolates :path_prefix do |attachment, style|
127
127
  return "#{Rails.root}/public/" if Caboose::cdn_domain.nil? || Caboose::cdn_domain == '/'
128
- return ''
128
+ return ''
129
129
  end
130
130
 
131
131
  Paperclip.interpolates :model_url do |attachment, style|
132
- return "/#{attachment.path}" if Caboose::cdn_domain.nil? || Caboose::cdn_domain == '/'
132
+ # Local file storeage
133
+ if Caboose::cdn_domain.nil? || Caboose::cdn_domain == '/'
134
+ p = attachment.path.gsub("#{Rails.root}/public/", '')
135
+ return "/#{p}"
136
+ end
137
+ # Otherwise S3
133
138
  return "#{Caboose::cdn_domain}/#{attachment.path}"
134
139
  end
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.27'
2
+ VERSION = '0.5.28'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.27
4
+ version: 0.5.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry