chili_presentations 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,9 @@
1
+ === 0.1.2 / 2012-09-26
2
+
3
+ * 1 bug fix:
4
+
5
+ * Remove zipped files & directory when deleted
6
+
1
7
  === 0.1.1 / 2012-09-25
2
8
 
3
9
  * 1 bug fix:
@@ -4,7 +4,7 @@ require 'find'
4
4
 
5
5
  class PresentationObserver < ActiveRecord::Observer
6
6
  def after_save(presentation)
7
- Rails.logger.info "Executing PresentationObserver (#{__FILE__}:#{__LINE__})"
7
+ Rails.logger.info "Executing PresentationObserver after_save hook (#{__FILE__}:#{__LINE__})"
8
8
 
9
9
  # location of existing compressed (zipped) file
10
10
  compressed_file = presentation.contents.path
@@ -32,4 +32,10 @@ class PresentationObserver < ActiveRecord::Observer
32
32
  Rails.logger.info "Uncompressing uploaded presentation completed successfully."
33
33
  }
34
34
  end
35
+
36
+ def after_destroy(presentation)
37
+ Rails.logger.info "Executing PresentationObserver after_destroy hook (#{__FILE__}:#{__LINE__})"
38
+ Paperclip.run("rm", "-rf #{File.dirname presentation.unzipped_location}")
39
+ Rails.logger.info "Cleaned up all unzipped files from #{presentation.unzipped_location}"
40
+ end
35
41
  end
@@ -1,4 +1,4 @@
1
1
  module ChiliPresentations
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chili_presentations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -36,7 +36,7 @@ cert_chain:
36
36
  L1dHTHNEVk9tZ0orZzR4b09pQ2U5WkVrZGE4SytsL0YKeVhXcUluUmxGSWxU
37
37
  dXdGVHhqMjZqYXVCb3NrQlBvejViZmtaRmphVlJoeVVuUm5Ha2E2Nmx2Y0RP
38
38
  R2ZrUlpXUQpOVkFESkE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
39
- date: 2012-09-25 00:00:00.000000000 Z
39
+ date: 2012-09-26 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: friendly_id
metadata.gz.sig CHANGED
Binary file