locomotivecms 3.1.0.rc2 → 3.1.0.rc3
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 +4 -4
- data/Gemfile +1 -1
- data/app/api/locomotive/api/entities/page_entity.rb +1 -0
- data/app/api/locomotive/api/resources/page_resource.rb +1 -1
- data/app/controllers/locomotive/base_controller.rb +0 -1
- data/app/controllers/locomotive/concerns/exception_controller.rb +2 -0
- data/app/helpers/locomotive/base_helper.rb +1 -0
- data/lib/locomotive/action_controller/responder.rb +10 -0
- data/lib/locomotive/version.rb +1 -1
- data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 75dfd7e431d496abe209050d2cf12bf789766106
|
|
4
|
+
data.tar.gz: 8ea4b2aacb6aaf505f95bc98a4b97e070ad64d27
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96f2087e9e3eb1f75f6712a376a96c51e81762d50f1c035bcb0376ceeadb6691beeaa9b802cbc582e2a2e3f9a521a7a38a4ef4dccffe8854ff84f7ce9634f568
|
|
7
|
+
data.tar.gz: 989fe15d4bfbcff552501a75906f87209024d6e9d9fc295f1a7719298da1a7253c505dc06a037b07610a9aabb6c4195ab9f26737b813d80e3d6dff3ee16c7135
|
data/Gemfile
CHANGED
|
@@ -25,7 +25,7 @@ group :development do
|
|
|
25
25
|
# gem 'locomotivecms_common', github: 'locomotivecms/common', ref: '257047b', require: false
|
|
26
26
|
|
|
27
27
|
# gem 'locomotivecms_steam', path: '../gems/steam', require: false
|
|
28
|
-
# gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: '
|
|
28
|
+
# gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: 'a3054f1', require: false
|
|
29
29
|
|
|
30
30
|
# gem 'locomotive_liquid', path: '../gems/liquid' # for Developers
|
|
31
31
|
# gem 'locomotivecms_solid', path: '../gems/solid' # for Developers
|
|
@@ -23,7 +23,7 @@ module Locomotive
|
|
|
23
23
|
get '/fullpaths' do
|
|
24
24
|
authorize Page, :index?
|
|
25
25
|
|
|
26
|
-
present pages.only(:_id, :fullpath), with: Locomotive::API::Entities::FullpathPageEntity
|
|
26
|
+
present pages.only(:_id, :fullpath, :handle), with: Locomotive::API::Entities::FullpathPageEntity
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
desc "Show a page"
|
|
@@ -9,7 +9,6 @@ module Locomotive
|
|
|
9
9
|
include Locomotive::Concerns::AuthorizationController
|
|
10
10
|
include Locomotive::Concerns::StoreLocationController
|
|
11
11
|
include Locomotive::Concerns::WithinSiteController
|
|
12
|
-
include Locomotive::Concerns::WithinSiteController
|
|
13
12
|
|
|
14
13
|
layout '/locomotive/layouts/application'
|
|
15
14
|
|
|
@@ -17,6 +17,8 @@ module Locomotive
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def to_html
|
|
20
|
+
add_authenticated_header
|
|
21
|
+
|
|
20
22
|
if controller.request.headers['X-Flash'] == 'true'
|
|
21
23
|
with_flash_message(:notice, true) { super }
|
|
22
24
|
else
|
|
@@ -25,6 +27,8 @@ module Locomotive
|
|
|
25
27
|
end
|
|
26
28
|
|
|
27
29
|
def to_js
|
|
30
|
+
add_authenticated_header
|
|
31
|
+
|
|
28
32
|
if controller.request.headers['X-Flash'] == 'true'
|
|
29
33
|
with_flash_message(:notice, true) { super }
|
|
30
34
|
else
|
|
@@ -33,6 +37,8 @@ module Locomotive
|
|
|
33
37
|
end
|
|
34
38
|
|
|
35
39
|
def to_json
|
|
40
|
+
add_authenticated_header
|
|
41
|
+
|
|
36
42
|
if get?
|
|
37
43
|
add_pagination_header if resource.respond_to?(:num_pages)
|
|
38
44
|
display(resource)
|
|
@@ -89,6 +95,10 @@ module Locomotive
|
|
|
89
95
|
end
|
|
90
96
|
end
|
|
91
97
|
|
|
98
|
+
def add_authenticated_header
|
|
99
|
+
controller.headers['X-Authenticated'] = controller.current_locomotive_account.present?.to_s
|
|
100
|
+
end
|
|
101
|
+
|
|
92
102
|
def add_pagination_header
|
|
93
103
|
controller.headers['X-Total-Pages'] = resource.num_pages.to_s
|
|
94
104
|
controller.headers['X-Per-Page'] = resource.limit_value.to_s
|
data/lib/locomotive/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: locomotivecms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1.0.
|
|
4
|
+
version: 3.1.0.rc3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Didier Lafforgue
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-03-
|
|
11
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -170,14 +170,14 @@ dependencies:
|
|
|
170
170
|
requirements:
|
|
171
171
|
- - "~>"
|
|
172
172
|
- !ruby/object:Gem::Version
|
|
173
|
-
version: 1.1.0.
|
|
173
|
+
version: 1.1.0.rc3
|
|
174
174
|
type: :runtime
|
|
175
175
|
prerelease: false
|
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
177
|
requirements:
|
|
178
178
|
- - "~>"
|
|
179
179
|
- !ruby/object:Gem::Version
|
|
180
|
-
version: 1.1.0.
|
|
180
|
+
version: 1.1.0.rc3
|
|
181
181
|
- !ruby/object:Gem::Dependency
|
|
182
182
|
name: slim
|
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|