spree_banner 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/app/models/spree/banner.rb +15 -15
- metadata +2 -2
data/README.md
CHANGED
data/app/models/spree/banner.rb
CHANGED
@@ -23,23 +23,23 @@ module Spree
|
|
23
23
|
scope :enable, lambda { |category| {:conditions => {:enabled => true, :category => category}} }
|
24
24
|
|
25
25
|
# Load S3 settings
|
26
|
-
if (!YAML.load_file(Rails.root.join('config', 's3.yml'))[Rails.env].blank?)
|
26
|
+
if (FileTest.exist?(Rails.root.join('config', 's3.yml')) && !YAML.load_file(Rails.root.join('config', 's3.yml'))[Rails.env].blank?)
|
27
27
|
S3_OPTIONS = {
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
elsif (ENV['S3_KEY'] && ENV['S3_SECRET'] && ENV['S3_BUCKET'])
|
28
|
+
:storage => 's3',
|
29
|
+
:s3_credentials => Rails.root.join('config', 's3.yml')
|
30
|
+
}
|
31
|
+
elsif (FileTest.exist?(Rails.root.join('config', 's3.yml')) && ENV['S3_KEY'] && ENV['S3_SECRET'] && ENV['S3_BUCKET'])
|
32
32
|
S3_OPTIONS = {
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
33
|
+
:storage => 's3',
|
34
|
+
:s3_credentials => {
|
35
|
+
:access_key_id => ENV['S3_KEY'],
|
36
|
+
:secret_access_key => ENV['S3_SECRET']
|
37
|
+
},
|
38
|
+
:bucket => ENV['S3_BUCKET']
|
39
|
+
}
|
40
|
+
else
|
41
|
+
S3_OPTIONS = { :storage => 'filesystem' }
|
42
|
+
end
|
43
43
|
|
44
44
|
attachment_definitions[:attachment] = (attachment_definitions[:attachment] || {}).merge(S3_OPTIONS)
|
45
45
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_banner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree_core
|