spree_multi_slideshow 1.0.4 → 1.0.5
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/slide.rb +3 -3
- metadata +2 -2
data/README.md
CHANGED
data/app/models/spree/slide.rb
CHANGED
@@ -3,7 +3,7 @@ module Spree
|
|
3
3
|
belongs_to :slideshow_type
|
4
4
|
|
5
5
|
attr_accessor :attachment_width, :attachment_height
|
6
|
-
attr_accessible :title, :url, :
|
6
|
+
attr_accessible :title, :url, :attachment_width, :attachment_height, :content, :slideshow_type_id, :attachment, :position
|
7
7
|
|
8
8
|
has_attached_file :attachment,
|
9
9
|
:url => "/spree/slides/:id/:style_:basename.:extension",
|
@@ -28,12 +28,12 @@ module Spree
|
|
28
28
|
validates_attachment_content_type :attachment, :content_type => ['image/jpeg', 'image/png', 'image/gif', 'image/jpg', 'image/x-png', 'image/pjpeg'], :message => "deve essere JPG, JPEG, PNG o GIF"
|
29
29
|
|
30
30
|
# Load S3 settings
|
31
|
-
if (!YAML.load_file(Rails.root.join('config', 's3.yml'))[Rails.env].blank?)
|
31
|
+
if (FileTest.exist?(Rails.root.join('config', 's3.yml')) && !YAML.load_file(Rails.root.join('config', 's3.yml'))[Rails.env].blank?)
|
32
32
|
S3_OPTIONS = {
|
33
33
|
:storage => 's3',
|
34
34
|
:s3_credentials => Rails.root.join('config', 's3.yml')
|
35
35
|
}
|
36
|
-
elsif (!ENV['S3_KEY'].blank? && !ENV['S3_SECRET'].blank? && !ENV['S3_BUCKET'].blank?)
|
36
|
+
elsif (FileTest.exist?(Rails.root.join('config', 's3.yml')) && !ENV['S3_KEY'].blank? && !ENV['S3_SECRET'].blank? && !ENV['S3_BUCKET'].blank?)
|
37
37
|
S3_OPTIONS = {
|
38
38
|
:storage => 's3',
|
39
39
|
:s3_credentials => {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_multi_slideshow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
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
|