caboose-cms 0.5.25 → 0.5.26

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
- MzJhYjVlMzc1MzgwNzk3MzUyYzc3NDMyZTQ1OGM5M2MwNTNmMWQ4Ng==
4
+ ZDAxOGViYzYwNjhiYzBmZTBkZGI1Nzg1ZjhlYjJlNmJlOTFkM2MwMw==
5
5
  data.tar.gz: !binary |-
6
- MDBmZThjYTNiODg4MDQ1N2EwZTQxYTQ4ODg3MTJiMjliODM3MmVhNA==
6
+ Y2YyZDg3ZjZlM2Q0ODdhMjkwZjcyNWM0NjE1OWRhZTFmOThhNjhkZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Yjg3ZmM2NTFkNDcwYzQ5YWQ3ZTFhMmFhNWU0NjcwZGY5ZjRjZmYxM2U4YmJj
10
- YzRmYjYwZjQ1OWIzOTBlYjUyOWZhYTJiOTQxMTQyZTkzOGZmN2JkNGYwN2Uz
11
- ODJiMjllNTEzNTllZTEwNjNkOTZmMDFlZDA2NWY3YzQyZDRmMTk=
9
+ YjZmYmZkZjczNTA4MzdjM2MzYmMxYWQwOTI3ODZiMTljMGE0YmJmYTU1ZDQ0
10
+ YTNjYzJhYmFlM2QwZTA3NzMxYjA3MjU1M2RhOTZmMzkzNzVjYzkwMGUyY2Nm
11
+ NjhiODdmZTE5YjVjMzRhZjhjZTYwM2Y4ODc3ZjI1M2EzZmJkY2Y=
12
12
  data.tar.gz: !binary |-
13
- MmEyMDQzZDc0MjQ0YWM0NWYzMWI2NGZkYWVlMjE5M2ZmMjUyZGRiMmZhZDQy
14
- MTExZTdiYmVlMjExOGNhN2M4YmQ0Y2NlYzUyMWNlODcyYjZkMmYzYTY3ZjRh
15
- NDgxYWFjOWFjYmE4YWU5ZGZiMTZiZjE1YTNkZjMxMDA1NWJiMDM=
13
+ MDgwNGJmNjA3ZDFmMzcxMjQ3ZDc1ZWFlODIyN2EyYzJjZDk2OWQ1MGJhYjBh
14
+ ZTQ2MWMzMDQyZmYyNWEwNjY0ZDU2Mjc1YjE4N2Q5MTA1M2VmZDBhYzhiMjdl
15
+ NjkzYWUxY2Y0ZTA1YTZjNTEyMDU5ZjNiNWEwNDJjN2EwMjI3MWE=
@@ -8,10 +8,10 @@ class Caboose::Block < ActiveRecord::Base
8
8
  belongs_to :block_type
9
9
  belongs_to :parent, :foreign_key => 'parent_id', :class_name => 'Caboose::Block'
10
10
  has_many :children, :foreign_key => 'parent_id', :class_name => 'Caboose::Block', :dependent => :delete_all, :order => 'sort_order'
11
- has_attached_file :file, :url => ':cdn_domain/uploads/:id.:extension'
11
+ has_attached_file :file, :path => ':path_prefixuploads/:id.:extension'
12
12
  do_not_validate_attachment_file_type :file
13
13
  has_attached_file :image,
14
- :url => ':cdn_domain/uploads/:id_:style.:extension',
14
+ :path => ':path_prefixuploads/:id_:style.:extension',
15
15
  :default_url => "http://placehold.it/300x300",
16
16
  :styles => {
17
17
  :tiny => '160x120>',
@@ -14,7 +14,7 @@ module Caboose
14
14
  has_many :category_memberships
15
15
 
16
16
  has_attached_file :image,
17
- :url => ':cdn_domain/categories/:id_:style.:extension',
17
+ :path => ':path_prefixcategories/:id_:style.:extension',
18
18
  :default_url => 'http://placehold.it/300x300',
19
19
  :s3_protocol => :https,
20
20
  :styles => {
@@ -2,7 +2,7 @@ class Caboose::MediaFile < ActiveRecord::Base
2
2
 
3
3
  self.table_name = "media_files"
4
4
  belongs_to :media_category
5
- has_attached_file :file, :path => 'media-files/:id.:extension'
5
+ has_attached_file :file, :path => ':path_prefixmedia-files/:id.:extension'
6
6
  do_not_validate_attachment_file_type :file
7
7
  attr_accessible :id, :media_category_id, :name, :description
8
8
 
@@ -6,7 +6,7 @@ class Caboose::MediaImage < ActiveRecord::Base
6
6
  self.table_name = "media_images"
7
7
  belongs_to :media_category
8
8
  has_attached_file :image,
9
- :path => 'media-images/:id_:style.:extension',
9
+ :path => ':path_prefixmedia-images/:id_:style.:extension',
10
10
  :default_url => 'http://placehold.it/300x300',
11
11
  :styles => {
12
12
  :tiny => '150x200>',
@@ -14,7 +14,7 @@ class Caboose::Post < ActiveRecord::Base
14
14
  :published,
15
15
  :created_at
16
16
  has_attached_file :image,
17
- :path => 'posts/:id_:style.:extension',
17
+ :path => ':path_prefixposts/:id_:style.:extension',
18
18
  :default_url => 'http://placehold.it/300x300',
19
19
  :styles => {
20
20
  :tiny => '75x75>',
@@ -20,7 +20,7 @@ module Caboose
20
20
  :square_scale_factor
21
21
 
22
22
  has_attached_file :image,
23
- :path => 'products/:product_id_:id_:style.:extension',
23
+ :path => ':path_prefixproducts/:product_id_:id_:style.:extension',
24
24
  :default_url => 'http://placehold.it/300x300',
25
25
  :s3_protocol => :https,
26
26
  :styles => {
@@ -4,7 +4,7 @@ class Caboose::User < ActiveRecord::Base
4
4
  has_many :role_memberships
5
5
  has_many :roles, :through => :role_memberships
6
6
  has_attached_file :image,
7
- :path => 'users/:id_:style.:extension',
7
+ :path => ':path_prefixusers/:id_:style.:extension',
8
8
  :default_url => 'http://placehold.it/300x300',
9
9
  :styles => {
10
10
  :tiny => '150x200>',
data/lib/caboose.rb CHANGED
@@ -122,11 +122,7 @@ module Caboose
122
122
 
123
123
  end
124
124
 
125
- Paperclip.interpolates :cdn_domain do |attachment, style|
126
- return Caboose::cdn_domain == '/' ? '' : Caboose::cdn_domain
127
- end
128
-
129
- Paperclip.interpolates :path_without_cdn do |attachment, style|
130
- x = Caboose::cdn_domain.nil? || Caboose::cdn_domain == '/' ? 1 : Caboose::cdn_domain.length
131
- return attachment.url && attachment.url.length > 0 ? attachment.url[x..-1] : ''
125
+ Paperclip.interpolates :path_prefix do |attachment, style|
126
+ return "#{Rails.root}/public/" if Caboose::cdn_domain.nil? || Caboose::cdn_domain == '/'
127
+ return ''
132
128
  end
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.25'
2
+ VERSION = '0.5.26'
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.25
4
+ version: 0.5.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry