tb_cms 1.1.1 → 1.1.2
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/app/controllers/cms/sitemaps_controller.rb +1 -1
- data/app/helpers/cms/application_helper.rb +1 -1
- data/app/models/spud_page.rb +1 -1
- data/lib/spud_cms/version.rb +1 -1
- data/spec/controllers/cms/sitemaps_controller_spec.rb +2 -2
- data/spec/models/spud_page_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42c344bf641663acb745ec63487f3bc3991bdeff
|
4
|
+
data.tar.gz: 04187a4e8221bb57b592cb6cc164939267ab87ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b375f04f8021e21612a92982a3d5fa2b6242b874fe3f8826959b9be29b4ac5d7684cac3c7a9b23feb771c5e107aa9d335cad324c8b05823e722c7c9776bd29f
|
7
|
+
data.tar.gz: faa30c0d60fbe576157f9f09f51aa10a709405c170d781e7bf4a902bd0c0168771b291ddddd9cb92a7b5dbc1a130644a52609e38bc045d163bd86f333e02b4ec
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class Cms::SitemapsController < Spud::ApplicationController
|
2
2
|
respond_to :xml
|
3
3
|
def show
|
4
|
-
@pages = SpudPage.published_pages.
|
4
|
+
@pages = SpudPage.published_pages.viewable.order(:spud_page_id)
|
5
5
|
if Spud::Core.multisite_mode_enabled
|
6
6
|
site_config = Spud::Core.site_config_for_host(request.host_with_port)
|
7
7
|
@pages = @pages.site(!site_config.blank? ? site_config[:site_id] : 0)
|
@@ -22,7 +22,7 @@ module Cms::ApplicationHelper
|
|
22
22
|
|
23
23
|
def sp_list_pages(options = {})
|
24
24
|
|
25
|
-
pages = SpudPage.
|
25
|
+
pages = SpudPage.viewable.published_pages
|
26
26
|
|
27
27
|
if Spud::Core.multisite_mode_enabled
|
28
28
|
site_config = Spud::Core.site_config_for_host(request.host_with_port)
|
data/app/models/spud_page.rb
CHANGED
@@ -19,7 +19,7 @@ class SpudPage < ActiveRecord::Base
|
|
19
19
|
scope :parent_pages, ->{ where(:spud_page_id => nil)}
|
20
20
|
scope :site, lambda {|sid| where(:site_id => sid)}
|
21
21
|
scope :published_pages, ->{ where(:published => true) }
|
22
|
-
scope :
|
22
|
+
scope :viewable, ->{ where(:visibility => 0) }
|
23
23
|
|
24
24
|
def full_content_processed
|
25
25
|
self.spud_page_partials.collect{|partial| partial.content_processed }.join(' ')
|
data/lib/spud_cms/version.rb
CHANGED
@@ -12,7 +12,7 @@ describe Cms::SitemapsController do
|
|
12
12
|
|
13
13
|
it "should return the sitemap urls" do
|
14
14
|
get :show, :format => :xml
|
15
|
-
assigns(:pages).should == SpudPage.published_pages.
|
15
|
+
assigns(:pages).should == SpudPage.published_pages.viewable.order(:spud_page_id)
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should only respond to an XML format" do
|
@@ -34,7 +34,7 @@ describe Cms::SitemapsController do
|
|
34
34
|
2.times {|x| FactoryGirl.create(:spud_page) }
|
35
35
|
3.times {|x| FactoryGirl.create(:spud_page,:site_id => 1) }
|
36
36
|
get :show, :format => :xml
|
37
|
-
assigns(:pages).should == SpudPage.published_pages.
|
37
|
+
assigns(:pages).should == SpudPage.published_pages.viewable.order(:spud_page_id).site(1)
|
38
38
|
end
|
39
39
|
|
40
40
|
end
|
@@ -50,7 +50,7 @@ describe SpudPage do
|
|
50
50
|
end
|
51
51
|
|
52
52
|
it "should only show public pages" do
|
53
|
-
SpudPage.
|
53
|
+
SpudPage.viewable.to_sql.should == SpudPage.where(:visibility => 0).to_sql
|
54
54
|
end
|
55
55
|
|
56
56
|
it "should group pages by parent" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tb_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Westlake Design
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|