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 +1 -1
- data/app/models/spree/banner.rb +3 -2
- data/lib/generators/spree_banner/install/install_generator.rb +10 -1
- metadata +2 -18
data/README.md
CHANGED
data/app/models/spree/banner.rb
CHANGED
@@ -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
|
21
|
-
|
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.
|
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-
|
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
|