caboose-cms 0.3.47 → 0.3.48
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
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NjkzNjJlOTE3YjIxMGY5OTFkMGEzYzQ5ODM2M2QxYWY2NDVjMjllNQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
OTM3NGFlNTQxMDQwOGQwYzNlZDI0YjY1MmYwYmUyZDFhMzc3MjI5Nw==
|
|
7
7
|
!binary "U0hBNTEy":
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
MWIyZGJlMzg5YTkyNzYxM2I3MDkwNTVhMDk2M2U4ODkyNGYwNzkxNmUxOGFj
|
|
10
|
+
NGI1YmI0N2ViM2NhZTM5NmIwZTA1MmM0ODVmOGZhNjg4Mjg1YTI3Zjk0YjU2
|
|
11
|
+
ZjIwMzcwOWJlNmI5MGYwNzE3MTI3Mjc5YzU5NDhkZmQ1YzY5ODA=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NDEzNjEzNTE1MGJmYmI3MzI1OTNkMjE0YWEyNzMyNmQ1MGFlZjhhOGE4ZTM2
|
|
14
|
+
YThhNzI4ZTJlOWM3YjM2NmI5NmMzOWJjMTQ3Zjg5YzdiMGY2ZGVjYTczNWEw
|
|
15
|
+
MmZlNjJmOGIyZjAyNDFjMjRmNTYyNTMwNzQ3MjljOTZiYmEyYmY=
|
|
@@ -3,26 +3,30 @@ module Caboose
|
|
|
3
3
|
|
|
4
4
|
protect_from_forgery
|
|
5
5
|
before_filter :before_before_action
|
|
6
|
+
@find_page = true
|
|
6
7
|
|
|
7
8
|
def before_before_action
|
|
8
9
|
|
|
9
10
|
# Modify the built-in params array with URL params if necessary
|
|
10
11
|
parse_url_params if Caboose.use_url_params
|
|
11
|
-
|
|
12
|
-
# Try to find the page
|
|
13
|
-
@page = Page.page_with_uri(request.fullpath)
|
|
14
|
-
|
|
12
|
+
|
|
15
13
|
session['use_redirect_urls'] = true if session['use_redirect_urls'].nil?
|
|
16
14
|
|
|
17
15
|
# Initialize AB Testing
|
|
18
|
-
AbTesting.init(request.session_options[:id])
|
|
16
|
+
AbTesting.init(request.session_options[:id]) if Caboose.use_ab_testing
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
# Try to find the page
|
|
19
|
+
@page = Page.new
|
|
20
|
+
@crumb_trail = []
|
|
21
21
|
@subnav = {}
|
|
22
22
|
@actions = {}
|
|
23
23
|
@tasks = {}
|
|
24
24
|
@page_tasks = {}
|
|
25
|
-
@is_real_page = false
|
|
25
|
+
@is_real_page = false
|
|
26
|
+
if @find_page
|
|
27
|
+
@page = Page.page_with_uri(request.fullpath)
|
|
28
|
+
@crumb_trail = Caboose::Page.crumb_trail(@page)
|
|
29
|
+
end
|
|
26
30
|
|
|
27
31
|
# Sets an instance variable of the logged in user
|
|
28
32
|
@logged_in_user = logged_in_user
|
|
@@ -53,6 +57,12 @@ module Caboose
|
|
|
53
57
|
def before_action
|
|
54
58
|
end
|
|
55
59
|
|
|
60
|
+
# Logs a user out
|
|
61
|
+
def logout_user
|
|
62
|
+
cookies.delete(:caboose_user_id)
|
|
63
|
+
reset_session
|
|
64
|
+
end
|
|
65
|
+
|
|
56
66
|
# Logs in a user
|
|
57
67
|
def login_user(user, remember = false)
|
|
58
68
|
session["app_user"] = user
|
|
@@ -147,7 +157,7 @@ module Caboose
|
|
|
147
157
|
|
|
148
158
|
# Redirects to login if not logged in.
|
|
149
159
|
def verify_logged_in
|
|
150
|
-
if
|
|
160
|
+
if !logged_in?
|
|
151
161
|
redirect_to "/modal/login?return_url=" + URI.encode(request.fullpath)
|
|
152
162
|
return false
|
|
153
163
|
end
|
data/lib/caboose.rb
CHANGED
|
@@ -30,6 +30,10 @@ module Caboose
|
|
|
30
30
|
mattr_accessor :use_url_params
|
|
31
31
|
@@use_url_params = true
|
|
32
32
|
|
|
33
|
+
# Whether or not to use AB Testing
|
|
34
|
+
mattr_accessor :use_ab_testing
|
|
35
|
+
@@use_ab_testing = true
|
|
36
|
+
|
|
33
37
|
# Website name
|
|
34
38
|
mattr_accessor :website_name
|
|
35
39
|
@@website_name = "Website"
|
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.3.
|
|
4
|
+
version: 0.3.48
|
|
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-
|
|
11
|
+
date: 2014-03-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|