locomotivecms 3.1.0.rc2 → 3.1.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68959375952f5af98ae54eaa4803399910c58c4a
4
- data.tar.gz: a3d522c11a07ba0378869fe223216d49454a7e29
3
+ metadata.gz: 75dfd7e431d496abe209050d2cf12bf789766106
4
+ data.tar.gz: 8ea4b2aacb6aaf505f95bc98a4b97e070ad64d27
5
5
  SHA512:
6
- metadata.gz: 7dc2fd75507c0bbd07a43de5f48f447714b46386fa5a1a7df23f018f3c636b481507e4166ba0ee539cc6c6bf4e698549af5cbc0274db72f56f01623ca91cd5dd
7
- data.tar.gz: 0ae3cb47025dd58f397cddfe2ac438d703e6c95e66bfb04985e1403bb0680c39517471eb3bfa6fe7e513a0d6a51affe4de76d2c48eda3d47f4d6afd54fb849a6
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: 'c44f003', require: false
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
@@ -45,6 +45,7 @@ module Locomotive
45
45
  class FullpathPageEntity < BaseEntity
46
46
 
47
47
  expose :fullpath
48
+ expose :handle
48
49
 
49
50
  unexpose :created_at
50
51
  unexpose :updated_at
@@ -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
 
@@ -20,6 +20,8 @@ module Locomotive
20
20
  500
21
21
  end)
22
22
 
23
+ puts "Backtrace:\n\t#{exception.backtrace.join("\n\t")}" if Rails.env.development? || Rails.env.test?
24
+
23
25
  if request.xhr?
24
26
  render json: { error: exception.message }, status: status, layout: false
25
27
  else
@@ -16,6 +16,7 @@ module Locomotive
16
16
  @content_for_title
17
17
  else
18
18
  if request.xhr?
19
+ @content_for_title = '' # won't raise an exception if a layout is applied.
19
20
  concat content_tag(:h1, title)
20
21
  else
21
22
  @content_for_title = title
@@ -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
@@ -2,5 +2,5 @@
2
2
  # MAJOR.MINOR.PATCH format.
3
3
  # 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0
4
4
  module Locomotive #:nodoc
5
- VERSION = '3.1.0.rc2'
5
+ VERSION = '3.1.0.rc3'
6
6
  end
@@ -39,7 +39,7 @@ describe Locomotive::Steam::Middlewares::Cache do
39
39
 
40
40
  subject { middleware.send(:cache_key, steam_env) }
41
41
 
42
- it { expect(subject).to eq '2bf770af7c75d80bb8e87d21bde9ac4f' }
42
+ it { expect(subject).to eq '76ecaab214311e09f51d2f2673d13a2b' }
43
43
 
44
44
  end
45
45
 
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.rc2
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-17 00:00:00.000000000 Z
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.rc2
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.rc2
180
+ version: 1.1.0.rc3
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: slim
183
183
  requirement: !ruby/object:Gem::Requirement