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 +8 -8
- data/lib/caboose.rb +7 -2
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjgwMGEzMGQ2YTFmZWI2OWUzZGQ0NzZlY2MyOTllNjk4MmQ1ZDg0Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2Q4ZTJhZGQ2NjJjZWFmZjY3NjI3ZTI5MWEwZmY4N2Y2Zjg5MGM3Yw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzQxZjliY2RlMGNkNzA5NWY5NmRjNjE5MjRlNDVkZDM5YWQ1ODVmNTEyNjcz
|
10
|
+
NTdmNWE5MGE1ODk5N2M5NTUxZjY3YzE5ZGZhMTJjMTk4NzBkOTAwMTVhYzk4
|
11
|
+
YTQ3MDAxNmM3NzJiYWVkMTg3ZWQ5ZTk3NzIwZjZmMWIzNjAyZGE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
-
|
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
|
data/lib/caboose/version.rb
CHANGED