spree_banner 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
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_banner', '~> 1.0.5'
12
+ gem 'spree_banner', '~> 1.0.6'
13
13
  </pre>
14
14
  2. Run `bundle install`
15
15
  3. To copy and apply migrations run:
@@ -13,12 +13,13 @@ module Spree
13
13
  :convert_options => {
14
14
  :thumbnail => "-gravity center"
15
15
  }
16
+
16
17
  after_post_process :find_dimensions
17
18
 
18
19
  validates_presence_of :category, :attachment_width, :attachment_height
19
20
  validates_attachment_presence :attachment
20
- validates_attachment_content_type :attachment, :content_type => ['image/jpeg', 'image/png', 'image/gif'], :message => "deve essere JPG, JPEG o PNG"
21
- #process_in_background :image UTILE MA OCCORRE ATTIVARE ANCHE LA GEMMA DELAYED-PAPERCLIP
21
+ 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"
22
+
22
23
  scope :enable, lambda { |category| {:conditions => {:enabled => true, :category => category}} }
23
24
 
24
25
  # Load S3 settings
@@ -1,7 +1,16 @@
1
1
  module SpreeBanner
2
2
  module Generators
3
3
  class InstallGenerator < Rails::Generators::Base
4
-
4
+
5
+ def add_formtastic
6
+ res = ask "Would you like to run the formtastic install now? [Y/n]"
7
+ if res == "" || res.downcase == "y"
8
+ run 'rails generate formtastic:install'
9
+ else
10
+ puts "Skiping rails generate formtastic:install, don't forget to run it!"
11
+ end
12
+ end
13
+
5
14
  def add_stylesheets
6
15
  inject_into_file "app/assets/stylesheets/admin/all.css", " *= require admin/spree_banner\n", :before => /\*\//, :verbose => true
7
16
  inject_into_file "app/assets/stylesheets/store/all.css", " *= require store/spree_banner\n", :before => /\*\//, :verbose => true
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.5
4
+ version: 1.0.6
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-09 00:00:00.000000000 Z
12
+ date: 2012-07-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
@@ -27,22 +27,6 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
- - !ruby/object:Gem::Dependency
31
- name: spree_auth
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
30
  - !ruby/object:Gem::Dependency
47
31
  name: formtastic
48
32
  requirement: !ruby/object:Gem::Requirement