chili_presentations 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +8 -0
- data/app/models/presentation_observer.rb +6 -0
- data/assets/stylesheets/presentations.css +1 -1
- data/lib/chili_presentations/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
data/History.txt
CHANGED
|
@@ -13,6 +13,10 @@ class PresentationObserver < ActiveRecord::Observer
|
|
|
13
13
|
destination_path = File.join(File.dirname(presentation.contents.path),
|
|
14
14
|
Presentation::UNPACKED_DIRNAME)
|
|
15
15
|
|
|
16
|
+
if File.exists?(destination_path)
|
|
17
|
+
Paperclip.run("rm", "-rf #{destination_path}")
|
|
18
|
+
end
|
|
19
|
+
|
|
16
20
|
Dir.mktmpdir {|tmpdir_path|
|
|
17
21
|
Rails.logger.info "Temporarily unpacking presentation into #{tmpdir_path}"
|
|
18
22
|
Paperclip.run("unzip", "#{compressed_file} -d #{tmpdir_path}")
|
|
@@ -28,6 +32,8 @@ class PresentationObserver < ActiveRecord::Observer
|
|
|
28
32
|
# Presentation::UNPACKED_DIRNAME, regardless of original name/structure
|
|
29
33
|
Rails.logger.info "Moving #{index_container} to #{destination_path}"
|
|
30
34
|
FileUtils.move index_container, destination_path
|
|
35
|
+
# Update the #unzipped_location without executing callbacks. A bit hacky
|
|
36
|
+
Presentation.update_all({:unzipped_location => destination_path}, {:id => presentation.id})
|
|
31
37
|
end
|
|
32
38
|
Rails.logger.info "Uncompressing uploaded presentation completed successfully."
|
|
33
39
|
}
|
data.tar.gz.sig
CHANGED
|
Binary file
|
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.
|
|
4
|
+
version: 0.1.3
|
|
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-
|
|
39
|
+
date: 2012-09-27 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
|