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.
Files changed (3) hide show
  1. data/README.md +1 -1
  2. data/app/models/spree/slide.rb +3 -3
  3. metadata +2 -2
data/README.md CHANGED
@@ -9,7 +9,7 @@ Basic Installation
9
9
 
10
10
  1. Add the following to your Gemfile
11
11
  <pre>
12
- gem 'spree_multi_slideshow', '~> 1.0.3'
12
+ gem 'spree_multi_slideshow', '~> 1.0.5'
13
13
  </pre>
14
14
  2. Run `bundle install`
15
15
  3. To copy and apply migrations run:
@@ -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, :content, :attachment, :position, :attachment_width, :attachment_height
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
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-22 00:00:00.000000000 Z
12
+ date: 2012-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core