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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29ed12dca3e942e4ee2e13842af13957f9ddbd78
4
- data.tar.gz: 4437788f0073809f050876e5595e192aabf87e96
3
+ metadata.gz: 42c344bf641663acb745ec63487f3bc3991bdeff
4
+ data.tar.gz: 04187a4e8221bb57b592cb6cc164939267ab87ee
5
5
  SHA512:
6
- metadata.gz: d64be12a48126572e2b31dec5aa5ed13305e11c415d9ea30a1286337a42c76f8d221731dd9b95f5446cde01b18b8b56d60a96c2b84e151b918cc404061187de6
7
- data.tar.gz: cc7cf7203a6963802c198ee3869fc3b531a9b2032dedaa933ba32860a72d01e4879cbfab42e0e43e19892ba524e48f225d117e7aca08cf9e5f8900ee802f4935
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.public.order(:spud_page_id)
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.public.published_pages
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)
@@ -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 :public, ->{ where(:visibility => 0) }
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(' ')
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Cms
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.2"
4
4
  end
5
5
  end
@@ -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.public.order(:spud_page_id)
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.public.order(:spud_page_id).site(1)
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.public.to_sql.should == SpudPage.where(:visibility => 0).to_sql
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.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-05-08 00:00:00.000000000 Z
11
+ date: 2014-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails