spud_media 0.4.0 → 0.4.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.
- data/app/models/spud_media.rb +2 -1
- data/lib/spud_media/configuration.rb +3 -1
- metadata +6 -6
data/app/models/spud_media.rb
CHANGED
|
@@ -2,7 +2,8 @@ class SpudMedia < ActiveRecord::Base
|
|
|
2
2
|
has_attached_file :attachment,
|
|
3
3
|
:storage => Spud::Media.paperclip_storage,
|
|
4
4
|
:s3_credentials => Spud::Media.s3_credentials,
|
|
5
|
-
:path =>
|
|
5
|
+
:path => Spud::Media.storage_path,
|
|
6
|
+
:url => Spud::Media.storage_url
|
|
6
7
|
|
|
7
8
|
def image_from_type
|
|
8
9
|
if self.attachment_content_type.blank?
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
module Spud
|
|
2
2
|
module Media
|
|
3
3
|
include ActiveSupport::Configurable
|
|
4
|
-
config_accessor :paperclip_storage,:s3_credentials
|
|
4
|
+
config_accessor :paperclip_storage,:s3_credentials,:storage_path,:storage_url
|
|
5
5
|
self.paperclip_storage = :filesystem
|
|
6
6
|
self.s3_credentials = "#{Rails.root}/config/s3.yml"
|
|
7
|
+
self.storage_path = "public/system/:class/:id/attachment/:basename.:extension"
|
|
8
|
+
self.storage_url = "/system/:class/:id/attachment/:basename.:extension"
|
|
7
9
|
end
|
|
8
10
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spud_media
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,11 +9,11 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-
|
|
12
|
+
date: 2012-02-23 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: spud_core
|
|
16
|
-
requirement: &
|
|
16
|
+
requirement: &70110648581080 !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
19
|
- - ! '>='
|
|
@@ -21,10 +21,10 @@ dependencies:
|
|
|
21
21
|
version: 0.3.0
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *70110648581080
|
|
25
25
|
- !ruby/object:Gem::Dependency
|
|
26
26
|
name: paperclip
|
|
27
|
-
requirement: &
|
|
27
|
+
requirement: &70110648580600 !ruby/object:Gem::Requirement
|
|
28
28
|
none: false
|
|
29
29
|
requirements:
|
|
30
30
|
- - ! '>='
|
|
@@ -32,7 +32,7 @@ dependencies:
|
|
|
32
32
|
version: '0'
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
|
-
version_requirements: *
|
|
35
|
+
version_requirements: *70110648580600
|
|
36
36
|
description:
|
|
37
37
|
email: destes@redwindsw.com
|
|
38
38
|
executables: []
|