caboose-cms 0.5.227 → 0.5.228
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/caboose/media.rb +5 -4
- data/lib/caboose/version.rb +1 -1
- data/lib/tasks/caboose.rake +5 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmU1ZDMxMTQwNjIyYTBmMzBjMTRkODRlMzFhODk0YzAwMjhmMjU3MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWViOGE1NDYzYzBlZWRkMWQwOTU5NWNjODlkOTAyZTlhZWE1MjdlZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzBkYzc1YTZlMGRjMjU5ZmI1ZTY5MGQyN2FkOTJkZWY3NDYwZTBlZmU5M2Mz
|
10
|
+
ZDM3MzNiNmEwMmYxOGY2NmYyY2Y0YWVhYjRlNjkyOGZiYWExMDE5NjdmZjgz
|
11
|
+
N2UzZmJiNzk5MmVjNmZkMDVhNWM1MDE0YTQ4MmZkNzA3MmNmMWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDU0ZWZlZGZhMWZkZWQzYjY3N2JiYjY2MzYzY2I5YmEyYjhiMmI1MmUwZjQ5
|
14
|
+
NjUxY2M1M2M3MWMzN2I2NmE3ZjdkYjRkNDA2YzQ2YmY0NjkxYTAxOTNlZWMw
|
15
|
+
ZTA5YzYzOTQzZGVmN2I1NzRhMDliMmFiYWYyMGQyZWYyMjBmZjU=
|
data/app/models/caboose/media.rb
CHANGED
@@ -10,10 +10,11 @@ class Caboose::Media < ActiveRecord::Base
|
|
10
10
|
has_attached_file :image,
|
11
11
|
:path => ':path_prefixmedia/:id_:media_name_:style.:extension',
|
12
12
|
:default_url => 'http://placehold.it/300x300',
|
13
|
-
:styles => {
|
14
|
-
:tiny => '
|
15
|
-
:thumb => '
|
16
|
-
:large => '
|
13
|
+
:styles => {
|
14
|
+
:tiny => '160x120>',
|
15
|
+
:thumb => '400x300>',
|
16
|
+
:large => '640x480>',
|
17
|
+
:huge => '1400x1050>'
|
17
18
|
}
|
18
19
|
#:s3_headers => lambda { |attachment| { "Content-Disposition" => "attachment; filename=\"#{attachment.name}\"" }}
|
19
20
|
do_not_validate_attachment_file_type :image
|
data/lib/caboose/version.rb
CHANGED
data/lib/tasks/caboose.rake
CHANGED
@@ -4,12 +4,11 @@ namespace :caboose do
|
|
4
4
|
|
5
5
|
desc "Migrate block images to media"
|
6
6
|
task :migrate_block_images_to_media => :environment do
|
7
|
-
Caboose::Block.where("image_file_name is not null
|
8
|
-
next if b.page.nil?
|
9
|
-
site_id = b.page.site_id
|
10
|
-
next if site_id.nil?
|
11
|
-
next if site_id == 1
|
12
|
-
|
7
|
+
Caboose::Block.where("image_file_name is not null").reorder(:id).all.each do |b|
|
8
|
+
#next if b.page.nil?
|
9
|
+
#site_id = b.page.site_id
|
10
|
+
#next if site_id.nil?
|
11
|
+
#next if site_id == 1
|
13
12
|
b.delay.migrate_media
|
14
13
|
end
|
15
14
|
end
|