caboose-cms 0.5.54 → 0.5.55
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/caboose/category.rb +5 -1
- data/app/models/caboose/product_image.rb +5 -5
- data/app/models/caboose/schema.rb +8 -4
- data/app/models/caboose/vendor.rb +12 -2
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWFiNTgyMjY5NzczYmMzNjA4NDY5MjAxOGQxNzI2MmM2NmNlMGIzNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2E4YzI3MzkwNjk0ZTYwMjU0OWQyMjFjMzkxN2E3M2RhM2ExNmViMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmM3MDdkMGU3M2ZhZjNiZmI2NjhiOTY0ZmMyZmIzZGU1MDMzNjg3MjAxNWNl
|
10
|
+
YjFmODAyMDIyOWY0YTQ5Mzk4YTViNGVmMGQwZWMzNDljN2NjNjk4MTA4ZjBm
|
11
|
+
YmQ3OTk5ZmQwZjQ3MDRlNThmOWM2ZTkyZmQxNWFhZjU4MGFiY2E=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWY1Y2E4MjUzMTc5MDFhZjk1ZWIzMTJhZmFhYzE4MTAzMTg0ZTQ0YzgwOTM4
|
14
|
+
OTNlZmJhNjc3OGNmOTVkZWEzNTc4MzhmMjgzNWZjNDI5NDdhOTI1M2RkZjc4
|
15
|
+
MWFjYzYwMDI1YzkwZWZhOTczYzAyMmE2NzkzNWU0MzIxYzE2YzU=
|
@@ -30,6 +30,7 @@ module Caboose
|
|
30
30
|
attr_accessible :id,
|
31
31
|
:site_id,
|
32
32
|
:parent_id,
|
33
|
+
:alternate_id,
|
33
34
|
:name,
|
34
35
|
:url,
|
35
36
|
:slug,
|
@@ -42,6 +43,9 @@ module Caboose
|
|
42
43
|
:square_offset_x,
|
43
44
|
:square_offset_y,
|
44
45
|
:square_scale_factor
|
46
|
+
|
47
|
+
STATUS_ACTIVE = 'Active'
|
48
|
+
STATUS_INACTIVE = 'Inactive'
|
45
49
|
|
46
50
|
#
|
47
51
|
# Class Methods
|
@@ -77,7 +81,7 @@ module Caboose
|
|
77
81
|
end
|
78
82
|
|
79
83
|
def active_products
|
80
|
-
self.products.where(:status => 'Active')
|
84
|
+
self.products.where(:status => 'Active')
|
81
85
|
end
|
82
86
|
|
83
87
|
def ancestry
|
@@ -5,9 +5,9 @@ module Caboose
|
|
5
5
|
belongs_to :product
|
6
6
|
has_many :product_image_variants
|
7
7
|
has_many :variants, :through => :product_image_variants
|
8
|
-
|
9
|
-
|
8
|
+
|
10
9
|
attr_accessible :id,
|
10
|
+
:alternate_id,
|
11
11
|
:product_id,
|
12
12
|
:title,
|
13
13
|
:position,
|
@@ -30,11 +30,11 @@ module Caboose
|
|
30
30
|
large: '800x800>',
|
31
31
|
huge: '1200x1200>'
|
32
32
|
}
|
33
|
+
do_not_validate_attachment_file_type :image
|
34
|
+
#validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png"]
|
33
35
|
|
34
36
|
default_scope order('position ASC')
|
35
|
-
|
36
|
-
validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png"]
|
37
|
-
|
37
|
+
|
38
38
|
def process
|
39
39
|
config = AssetSync.config
|
40
40
|
bucket = config.fog_directory
|
@@ -56,7 +56,7 @@ class Caboose::Schema < Caboose::Utilities::Schema
|
|
56
56
|
],
|
57
57
|
#Caboose::PageCache => [:block],
|
58
58
|
Caboose::Variant => [:quantity],
|
59
|
-
Caboose::Vendor => [:vendor]
|
59
|
+
Caboose::Vendor => [:vendor, :vendor_id]
|
60
60
|
}
|
61
61
|
end
|
62
62
|
|
@@ -200,6 +200,7 @@ class Caboose::Schema < Caboose::Utilities::Schema
|
|
200
200
|
Caboose::Category => [
|
201
201
|
[ :site_id , :integer ],
|
202
202
|
[ :parent_id , :integer ],
|
203
|
+
[ :alternate_id , :string ],
|
203
204
|
[ :name , :string ],
|
204
205
|
[ :url , :string ],
|
205
206
|
[ :slug , :string ],
|
@@ -419,6 +420,7 @@ class Caboose::Schema < Caboose::Utilities::Schema
|
|
419
420
|
],
|
420
421
|
Caboose::ProductImage => [
|
421
422
|
[ :product_id , :integer ],
|
423
|
+
[ :alternate_id , :string ],
|
422
424
|
[ :title , :string ],
|
423
425
|
[ :position , :integer ],
|
424
426
|
[ :image_file_name , :string ],
|
@@ -577,9 +579,11 @@ class Caboose::Schema < Caboose::Utilities::Schema
|
|
577
579
|
[ :sort_order , :integer , { :defult => 0 }]
|
578
580
|
],
|
579
581
|
Caboose::Vendor => [
|
580
|
-
[ :site_id
|
581
|
-
[ :
|
582
|
-
[ :
|
582
|
+
[ :site_id , :integer ],
|
583
|
+
[ :alternate_id , :string ],
|
584
|
+
[ :name , :string ],
|
585
|
+
[ :status , :string , { :default => 'Active' } ],
|
586
|
+
[ :image , :attachment ]
|
583
587
|
]
|
584
588
|
}
|
585
589
|
|
@@ -5,13 +5,23 @@ module Caboose
|
|
5
5
|
|
6
6
|
belongs_to :site
|
7
7
|
has_many :products
|
8
|
-
|
8
|
+
has_attached_file :image,
|
9
|
+
:path => ':path_prefixvendors/:id_:style.:extension',
|
10
|
+
:default_url => 'http://placehold.it/300x300',
|
11
|
+
:styles => {
|
12
|
+
:tiny => '150x200>',
|
13
|
+
:thumb => '300x400>',
|
14
|
+
:large => '600x800>'
|
15
|
+
}
|
16
|
+
do_not_validate_attachment_file_type :image
|
17
|
+
attr_accessible :id,
|
9
18
|
:site_id,
|
19
|
+
:alternate_id,
|
10
20
|
:name,
|
11
21
|
:status,
|
12
22
|
:sort_order
|
13
23
|
after_save :clear_filters
|
14
|
-
|
24
|
+
|
15
25
|
def self.active
|
16
26
|
where(:status => 'Active')
|
17
27
|
end
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.55
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|