caboose-cms 0.5.230 → 0.5.231

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
- NWNlZWMzNmQ2NDU3YTZiMTlmYTNlNjUwNjNmZGI0MzA2ZTdkY2NiZg==
4
+ NTM1NzEwNTE3MjkyZjdmMzU4NTk0Y2UwMDQzZmUyOTk0YThhODM4ZA==
5
5
  data.tar.gz: !binary |-
6
- YmI1OTY1YWJhYWUxMDU0NGMxMzI5NjJkMTUyZDNkYTk3MWZkYjkxOA==
6
+ NjBlYTgyMmMwMjNlMzBlYTliYTQ4NGFiMjc0YTJjZmU0NjI4YWY3OA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzZiMDA4YjAyN2Y2YzAxZTljZGQwZWVkYTAyZTY0OGM5OTc5M2NhYWYzYjll
10
- ODc1NDk0NjQxMThiNjlmYzEyZTJlMTJmYWNkNmQyOTE0YzMyY2UyZjZmNTQx
11
- Y2QzNzhmMmJkYWMxMTM0MTBhMTdlZTJjMDAzYjk0MjY0YzRmNmY=
9
+ MDIzNDdlZTk3MzJiMWU3N2FjN2NiN2U3OTk1YzY0MGY2MDViN2VjYTg4ZTU1
10
+ NGI5NTEyNGUzNTg1MjdhNmU0NDc1ZDlhNzNhOGZjZjRiY2MzODcxYTY5Njlk
11
+ YmIxNjk0ZTliNTE2Yzc3Yzc1ZTZjNGIzMjFkZWY3ZmQ4ZjI0OWE=
12
12
  data.tar.gz: !binary |-
13
- MjRiMDMwMWIyYjQzOTM2NDUyNTA3Nzg3OGU1ODc1NDAxNmRhYmE1Mjk1MDAy
14
- YzgzYWEyYjhhMjY2MjQ3ZWE4MjMzMmMxMzdkMThmNGFiNjM4YzY0ZmIyZmEx
15
- NjBlOWMxNTZhOGRmMDUzZmUzYjhkZjJmMDVkZjZjNmFiNDU3Mzg=
13
+ ODEyZDRlYzVkOWZkODg2NmY3ZmQ3Mzk2MzRhM2RiODRjMTk5ZjM4ZmQyNWI4
14
+ Yzk4ODY2ZDJiODc5YmU2OGVlNDAyZjZiNDViY2I2YWQxZWE5YWNhMzEyYWZj
15
+ NjJhMDEyZTg2YzFmYWFhZGM1MmUyYWYxMjAzMzE0NjQxN2MzZjA=
@@ -96,5 +96,9 @@ class Caboose::Media < ActiveRecord::Base
96
96
  return self.image.url(:original) if self.image && !self.image.url(:original).starts_with?('http://placehold.it')
97
97
  return self.file.url
98
98
  end
99
+
100
+ def reprocess_image
101
+ self.image.reprocess!
102
+ end
99
103
 
100
104
  end
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.230'
2
+ VERSION = '0.5.231'
3
3
  end
@@ -2,13 +2,16 @@ require "caboose/version"
2
2
 
3
3
  namespace :caboose do
4
4
 
5
+ desc "Reprocess media images"
6
+ task :reprocess_media_images => :environment do
7
+ Caboose::Media.where("image_file_name is not null").reorder(:id).all.each do |m|
8
+ m.delay.reprocess_image
9
+ end
10
+ end
11
+
5
12
  desc "Migrate block images to media"
6
13
  task :migrate_block_images_to_media => :environment do
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
14
+ Caboose::Block.where("image_file_name is not null and media_id is null").reorder(:id).all.each do |b|
12
15
  b.delay.migrate_media
13
16
  end
14
17
  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.230
4
+ version: 0.5.231
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry