spud_cms 0.8.13 → 0.8.14

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.
data/README.markdown CHANGED
@@ -18,8 +18,11 @@ Installation/Usage
18
18
  bundle exec rake spud_core:install:migrations
19
19
  bundle exec rake spud_cms:install:migrations
20
20
  rake db:migrate
21
+ 4. Change ApplicationController to inherit from Spud::ApplicationController instead of ActionController::Base
21
22
 
22
- 4. run a rails server instance and point your browser to /spud/admin
23
+ class ApplicationController < Spud::ApplicationController
24
+
25
+ 5. run a rails server instance and point your browser to /spud/admin
23
26
 
24
27
  Routing to the CMS Engine
25
28
  --------------------------
@@ -5,10 +5,17 @@ class PagesController < ApplicationController
5
5
  after_filter({:only => [:show]}) do |c|
6
6
  return if !Spud::Cms.enable_full_page_caching
7
7
  if @page && @page.is_private? == false
8
- c.cache_page(nil, nil, false)
8
+ c.cache_page(nil, nil, false)
9
9
  end
10
- end
10
+ end
11
+
11
12
  def show
13
+ # prevents 500 errors if a url like "/home.jpg" is hit
14
+ if request.format != :html
15
+ render_404
16
+ return
17
+ end
18
+
12
19
  url_name = !params[:id].blank? ? params[:id] : Spud::Cms.root_page_name
13
20
 
14
21
  # MultiSite Code Block
@@ -48,9 +55,10 @@ class PagesController < ApplicationController
48
55
  # else
49
56
  # return
50
57
  # end
51
- Spud::Cms.template_404 ? render(Spud::Cms.template_404,:status => 404) : render(:text=>nil,:status => 404)
58
+ render_404
52
59
  return
53
60
  end
61
+
54
62
  if @page.is_private?
55
63
  if defined?(require_user) && require_user == false
56
64
  logger.debug("responds to require user!")
@@ -67,18 +75,21 @@ class PagesController < ApplicationController
67
75
  layout = cms_config[:default_page_layout] if !cms_config.blank? && !cms_config[:default_page_layout].blank?
68
76
  end
69
77
 
70
-
71
78
  if !@page.spud_template.blank?
72
79
  if !@page.spud_template.base_layout.blank?
73
80
  layout = @page.spud_template.base_layout
74
81
  end
75
82
  @inline = @page.spud_template.content
76
-
77
83
  end
78
- render :layout => layout
84
+
85
+ render :layout => layout, :content_type => :html
79
86
 
80
87
  end
81
88
 
82
89
  private
83
90
 
91
+ def render_404
92
+ Spud::Cms.template_404 ? render(Spud::Cms.template_404,:status => 404) : render(:text=>nil,:status => 404)
93
+ end
94
+
84
95
  end
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Cms
3
- VERSION = "0.8.13"
3
+ VERSION = "0.8.14"
4
4
  end
5
5
  end
@@ -75,3 +75,93 @@ Migrating to AddSiteIdToSpudPermalinks (20120610123615)
75
75
   (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120329132322')
76
76
   (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120329132330')
77
77
   (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120510195151')
78
+  (6.2ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
79
+  (0.3ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
80
+ Migrating to CreateSpudPages (20120101192412)
81
+ Migrating to CreateSpudMenus (20120101193138)
82
+ Migrating to CreateSpudMenuItems (20120101193255)
83
+ Migrating to CreateSpudTemplates (20120101194124)
84
+ Migrating to CreateSpudPagePartials (20120103034659)
85
+ Migrating to AddVisibilityToSpudPages (20120104194032)
86
+ Migrating to AddMenuNameToSpudMenuItems (20120107181337)
87
+ Migrating to AddUseCustomUrlNameToSpudPages (20120111134754)
88
+ Migrating to AddNotesToSpudPages (20120118141852)
89
+ Migrating to AddMenuIdToSpudMenuItems (20120126232428)
90
+ Migrating to AddClassesToSpudMenuItems (20120128163601)
91
+ Migrating to CreateSpudAdminPermissions (20120307002859)
92
+ Migrating to CreateSpudUsers (20120307002860)
93
+ Migrating to CreateSpudPermalinks (20120307003559)
94
+ Migrating to AddSiteIdToSpudPages (20120329132314)
95
+  (67.0ms) ALTER TABLE `spud_pages` ADD `site_id` int(11)
96
+  (21.2ms) CREATE INDEX `index_spud_pages_on_site_id` ON `spud_pages` (`site_id`)
97
+  (1.3ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120329132314')
98
+ Migrating to AddSiteIdToSpudTemplates (20120329132322)
99
+  (16.8ms) ALTER TABLE `spud_templates` ADD `site_id` int(11)
100
+  (17.7ms) CREATE INDEX `index_spud_templates_on_site_id` ON `spud_templates` (`site_id`)
101
+  (0.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120329132322')
102
+ Migrating to AddSiteIdToSpudMenus (20120329132330)
103
+  (16.2ms) ALTER TABLE `spud_menus` ADD `site_id` int(11)
104
+  (17.6ms) CREATE INDEX `index_spud_menus_on_site_id` ON `spud_menus` (`site_id`)
105
+  (1.0ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120329132330')
106
+ Migrating to CreateSpudPagePartialRevisions (20120510195151)
107
+  (13.0ms) CREATE TABLE `spud_page_partial_revisions` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `content` text, `format` varchar(255), `spud_page_id` int(11), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
108
+  (16.6ms) CREATE INDEX `revision_idx` ON `spud_page_partial_revisions` (`spud_page_id`, `name`)
109
+  (0.9ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120510195151')
110
+ Migrating to AddTimeZoneToSpudUser (20120610123555)
111
+  (19.9ms) ALTER TABLE `spud_users` ADD `time_zone` varchar(255)
112
+  (2.0ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610123555')
113
+ Migrating to AddScopeToSpudAdminPermissions (20120610123556)
114
+  (21.5ms) ALTER TABLE `spud_admin_permissions` ADD `scope` varchar(255)
115
+  (0.3ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610123556')
116
+ Migrating to CreateSpudUserSettings (20120610123557)
117
+  (10.5ms) CREATE TABLE `spud_user_settings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_user_id` int(11), `key` varchar(255), `value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
118
+  (0.4ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610123557')
119
+ Migrating to AddSiteIdToSpudPermalinks (20120610123615)
120
+  (15.8ms) ALTER TABLE `spud_permalinks` ADD `site_id` int(11)
121
+  (12.7ms) CREATE INDEX `index_spud_permalinks_on_site_id` ON `spud_permalinks` (`site_id`)
122
+  (1.2ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610123615')
123
+  (0.5ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
124
+  (0.2ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
125
+  (4.6ms) DROP DATABASE IF EXISTS `spud_cms_test`
126
+  (2.5ms) CREATE DATABASE `spud_cms_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
127
+  (12.8ms) CREATE TABLE `spud_admin_permissions` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `name` varchar(255), `access` tinyint(1), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `scope` varchar(255)) ENGINE=InnoDB
128
+  (14.6ms) CREATE TABLE `spud_menu_items` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `parent_type` varchar(255), `parent_id` int(11), `item_type` int(11), `spud_page_id` int(11), `menu_order` int(11) DEFAULT 0, `url` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `name` varchar(255), `spud_menu_id` int(11), `classes` varchar(255)) ENGINE=InnoDB
129
+  (15.8ms) CREATE INDEX `index_spud_menu_items_on_menu_order` ON `spud_menu_items` (`menu_order`)
130
+  (15.0ms) CREATE INDEX `index_spud_menu_items_on_parent_type_and_parent_id` ON `spud_menu_items` (`parent_type`, `parent_id`)
131
+  (16.6ms) CREATE INDEX `index_spud_menu_items_on_spud_menu_id` ON `spud_menu_items` (`spud_menu_id`)
132
+  (14.5ms) CREATE TABLE `spud_menus` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `description` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `site_id` int(11)) ENGINE=InnoDB
133
+  (15.5ms) CREATE INDEX `index_spud_menus_on_site_id` ON `spud_menus` (`site_id`)
134
+  (11.1ms) CREATE TABLE `spud_page_partial_revisions` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `content` text, `format` varchar(255), `spud_page_id` int(11), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
135
+  (13.7ms) CREATE INDEX `revision_idx` ON `spud_page_partial_revisions` (`spud_page_id`, `name`)
136
+  (9.4ms) CREATE TABLE `spud_page_partials` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_page_id` int(11), `name` varchar(255), `content` text, `format` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
137
+  (15.4ms) CREATE INDEX `index_spud_page_partials_on_spud_page_id` ON `spud_page_partials` (`spud_page_id`)
138
+  (11.2ms) CREATE TABLE `spud_pages` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `url_name` varchar(255), `publish_at` datetime, `created_by` int(11), `updated_by` int(11), `format` varchar(255) DEFAULT 'html', `spud_page_id` int(11), `meta_description` text, `meta_keywords` varchar(255), `page_order` int(11), `template_id` int(11), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `visibility` int(11) DEFAULT 0, `published` tinyint(1) DEFAULT 1, `use_custom_url_name` tinyint(1) DEFAULT 0, `notes` text, `site_id` int(11)) ENGINE=InnoDB
139
+  (15.6ms) CREATE INDEX `index_spud_pages_on_site_id` ON `spud_pages` (`site_id`)
140
+  (11.4ms) CREATE TABLE `spud_permalinks` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `url_name` varchar(255), `attachment_type` varchar(255), `attachment_id` int(11), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `site_id` int(11)) ENGINE=InnoDB
141
+  (12.6ms) CREATE INDEX `index_spud_permalinks_on_attachment_type_and_attachment_id` ON `spud_permalinks` (`attachment_type`, `attachment_id`)
142
+  (15.6ms) CREATE INDEX `index_spud_permalinks_on_site_id` ON `spud_permalinks` (`site_id`)
143
+  (12.4ms) CREATE TABLE `spud_templates` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `base_layout` varchar(255), `content` text, `page_parts` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `site_id` int(11)) ENGINE=InnoDB
144
+  (14.7ms) CREATE INDEX `index_spud_templates_on_site_id` ON `spud_templates` (`site_id`)
145
+  (8.4ms) CREATE TABLE `spud_user_settings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_user_id` int(11), `key` varchar(255), `value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
146
+  (12.7ms) CREATE TABLE `spud_users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `first_name` varchar(255), `last_name` varchar(255), `super_admin` tinyint(1), `login` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `crypted_password` varchar(255) NOT NULL, `password_salt` varchar(255) NOT NULL, `persistence_token` varchar(255) NOT NULL, `single_access_token` varchar(255) NOT NULL, `perishable_token` varchar(255) NOT NULL, `login_count` int(11) DEFAULT 0 NOT NULL, `failed_login_count` int(11) DEFAULT 0 NOT NULL, `last_request_at` datetime, `current_login_at` datetime, `last_login_at` datetime, `current_login_ip` varchar(255), `last_login_ip` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `time_zone` varchar(255)) ENGINE=InnoDB
147
+  (16.4ms) CREATE INDEX `index_spud_users_on_email` ON `spud_users` (`email`)
148
+  (11.1ms) CREATE INDEX `index_spud_users_on_login` ON `spud_users` (`login`)
149
+  (11.1ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
150
+  (14.4ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
151
+  (0.2ms) SELECT version FROM `schema_migrations`
152
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120610123615')
153
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120101192412')
154
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120101193138')
155
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120101193255')
156
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120101194124')
157
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120103034659')
158
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120104194032')
159
+  (0.6ms) INSERT INTO `schema_migrations` (version) VALUES ('20120107181337')
160
+  (0.8ms) INSERT INTO `schema_migrations` (version) VALUES ('20120111134754')
161
+  (0.4ms) INSERT INTO `schema_migrations` (version) VALUES ('20120118141852')
162
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120126232428')
163
+  (0.4ms) INSERT INTO `schema_migrations` (version) VALUES ('20120128163601')
164
+  (0.4ms) INSERT INTO `schema_migrations` (version) VALUES ('20120329132314')
165
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120329132322')
166
+  (0.2ms) INSERT INTO `schema_migrations` (version) VALUES ('20120329132330')
167
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120510195151')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spud_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.13
4
+ version: 0.8.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-28 00:00:00.000000000 Z
12
+ date: 2012-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -332,7 +332,6 @@ files:
332
332
  - spec/dummy/Rakefile
333
333
  - spec/dummy/README.rdoc
334
334
  - spec/dummy/script/rails
335
- - spec/helpers/spud/admin/cms_helper_spec.rb
336
335
  - spec/models/spud_page_partial_revision_spec.rb
337
336
  - spec/models/spud_page_spec.rb
338
337
  - spec/models/spud_template_spec.rb
@@ -352,7 +351,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
352
351
  version: '0'
353
352
  segments:
354
353
  - 0
355
- hash: -1127340414212299381
354
+ hash: -1245758938193748243
356
355
  required_rubygems_version: !ruby/object:Gem::Requirement
357
356
  none: false
358
357
  requirements:
@@ -361,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
361
360
  version: '0'
362
361
  segments:
363
362
  - 0
364
- hash: -1127340414212299381
363
+ hash: -1245758938193748243
365
364
  requirements: []
366
365
  rubyforge_project:
367
366
  rubygems_version: 1.8.24
@@ -408,7 +407,6 @@ test_files:
408
407
  - spec/dummy/Rakefile
409
408
  - spec/dummy/README.rdoc
410
409
  - spec/dummy/script/rails
411
- - spec/helpers/spud/admin/cms_helper_spec.rb
412
410
  - spec/models/spud_page_partial_revision_spec.rb
413
411
  - spec/models/spud_page_spec.rb
414
412
  - spec/models/spud_template_spec.rb
@@ -1,15 +0,0 @@
1
- require 'spec_helper'
2
-
3
- # Specs in this file have access to a helper object that includes
4
- # the Spud::Admin::CmsHelper. For example:
5
- #
6
- # describe Spud::Admin::CmsHelper do
7
- # describe "string concat" do
8
- # it "concats two strings with spaces" do
9
- # helper.concat_strings("this","that").should == "this that"
10
- # end
11
- # end
12
- # end
13
- describe Spud::Admin::CmsHelper do
14
- pending "add some examples to (or delete) #{__FILE__}"
15
- end