social_stream-documents 0.15.0 → 0.15.1

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.
@@ -38,6 +38,8 @@ class DocumentsController < ApplicationController
38
38
  format.any {
39
39
  path = resource.file.path(params[:style] || params[:format])
40
40
 
41
+ head(:not_found) and return unless File.exist?(path)
42
+
41
43
  send_file path,
42
44
  :filename => resource.file_file_name,
43
45
  :disposition => "inline",
@@ -50,7 +52,7 @@ class DocumentsController < ApplicationController
50
52
  def download
51
53
  path = @document.file.path(params[:style])
52
54
 
53
- head(:bad_request) and return unless File.exist?(path)
55
+ head(:not_found) and return unless File.exist?(path)
54
56
 
55
57
  send_file_options = {
56
58
  :filename => @document.file_file_name,
@@ -1,2 +1,2 @@
1
1
  <%= render :partial => 'documents/document_with_details',
2
- :locals => {:document => video} %>
2
+ :locals => {:document => document} %>
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Documents
3
- VERSION = "0.15.0".freeze
3
+ VERSION = "0.15.1".freeze
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 0.21.0')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.21.1')
16
16
  s.add_runtime_dependency('paperclip-ffmpeg', '~> 0.7.0')
17
17
  s.add_runtime_dependency('paperclip','= 2.4.5')
18
18
  s.add_runtime_dependency('delayed_paperclip','2.4.5.1')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-documents
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-27 00:00:00.000000000 Z
13
+ date: 2012-06-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: social_stream-base
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 0.21.0
22
+ version: 0.21.1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - ~>
29
29
  - !ruby/object:Gem::Version
30
- version: 0.21.0
30
+ version: 0.21.1
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: paperclip-ffmpeg
33
33
  requirement: !ruby/object:Gem::Requirement