caboose-cms 0.5.176 → 0.5.177
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/app/controllers/caboose/pages_controller.rb +13 -2
- data/app/models/caboose/domain.rb +1 -1
- data/app/models/caboose/schema.rb +2 -1
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODg4ZjY4YzRiMmJiMGE1MmVlMThjZThhZjhhNjEyNWY4OTMxMWM5Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTYyYTJjYzE4M2M3ZDhhYjA2NTg3OGNjZDU2ZTUxODMyYjgxZjYxYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODkyMDJjZGM1N2EzZmE1ZjE4MGE0ZWIxMGIzNmY2YWFlMTliZWYxMzZlNmRh
|
10
|
+
YjNjNmIwOTk5MmQ5NWVjNDc3MmQ0YTc5NzA5MzdjYTYwYjlmNmVmYmFiZDRl
|
11
|
+
ZDcwMTVkMWIzNTZlODc4YjEzY2ZjMGNmOGM4ZWNhNmI1YmYzOWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzM2YTNjMWEzNTYwM2Q2YjY0YmI1MjkyOTRkNzM1MGIzZDRkNDhiY2ZmYmQx
|
14
|
+
NTkwYjdkODhjMTQyYmJhNDVhZWIxMGViMzFkOGY0YzlhY2VlZmMxODY1NWI5
|
15
|
+
NWFkNDA0YjYxMjQ1N2E0ZDc2ZGVjZjM1NDZmMjU0NDM4YjQ3YjU=
|
@@ -14,8 +14,8 @@ module Caboose
|
|
14
14
|
# Find the page with an exact URI match
|
15
15
|
page = Page.page_with_uri(request.host_with_port, request.fullpath, false)
|
16
16
|
|
17
|
-
# Make sure we're not under construction
|
18
|
-
d = Caboose::Domain.where(:domain => request.host_with_port).first
|
17
|
+
# Make sure we're not under construction or on a forwarded domain
|
18
|
+
d = Caboose::Domain.where(:domain => request.host_with_port).first
|
19
19
|
if d.nil?
|
20
20
|
Caboose.log("Could not find domain for #{request.host_with_port}\nAdd this domain to the caboose site.")
|
21
21
|
elsif d.under_construction == true
|
@@ -25,6 +25,17 @@ module Caboose
|
|
25
25
|
render :file => 'caboose/application/under_construction', :layout => false
|
26
26
|
end
|
27
27
|
return
|
28
|
+
# See if we're on a forwarding domain
|
29
|
+
elsif !d.primary && d.forward_to_primary
|
30
|
+
pd = d.site.primary_domain
|
31
|
+
if pd
|
32
|
+
url = "#{request.protocol}#{pd.domain}"
|
33
|
+
if request.fullpath && request.fullpath.strip.length > 0 && request.fullpath.strip != '/'
|
34
|
+
url << request.fullpath
|
35
|
+
end
|
36
|
+
redirect_to url
|
37
|
+
return
|
38
|
+
end
|
28
39
|
else
|
29
40
|
#Caboose.log(request.inspect)
|
30
41
|
end
|
@@ -3,6 +3,6 @@ class Caboose::Domain < ActiveRecord::Base
|
|
3
3
|
self.table_name = "domains"
|
4
4
|
|
5
5
|
belongs_to :site, :class_name => 'Caboose::Site'
|
6
|
-
attr_accessible :id, :site_id, :domain, :primary, :under_construction
|
6
|
+
attr_accessible :id, :site_id, :domain, :primary, :under_construction, :forward_to_primary
|
7
7
|
|
8
8
|
end
|
@@ -269,7 +269,8 @@ class Caboose::Schema < Caboose::Utilities::Schema
|
|
269
269
|
[ :site_id , :integer ],
|
270
270
|
[ :domain , :string ],
|
271
271
|
[ :primary , :boolean, { :default => false }],
|
272
|
-
[ :under_construction , :boolean, { :default => false }]
|
272
|
+
[ :under_construction , :boolean, { :default => false }],
|
273
|
+
[ :forward_to_primary , :boolean, { :default => false }]
|
273
274
|
],
|
274
275
|
Caboose::GiftCard => [
|
275
276
|
[ :site_id , :integer ],
|
data/lib/caboose/version.rb
CHANGED