spud_cms 0.8.11 → 0.8.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/README.markdown +90 -0
  2. data/Rakefile +2 -14
  3. data/app/controllers/pages_controller.rb +12 -10
  4. data/lib/spud_cms/configuration.rb +4 -3
  5. data/lib/spud_cms/page_route.rb +4 -2
  6. data/lib/spud_cms/version.rb +1 -1
  7. data/spec/controllers/spud/admin/cms_controller_spec.rb +5 -0
  8. data/spec/controllers/spud/cms/sitemaps_controller_spec.rb +17 -0
  9. data/{test → spec}/dummy/README.rdoc +0 -0
  10. data/{test → spec}/dummy/Rakefile +0 -0
  11. data/{test → spec}/dummy/app/assets/javascripts/application.js +0 -0
  12. data/{test → spec}/dummy/app/assets/stylesheets/application.css +0 -0
  13. data/{test → spec}/dummy/app/controllers/application_controller.rb +0 -0
  14. data/{test → spec}/dummy/app/helpers/application_helper.rb +0 -0
  15. data/{test → spec}/dummy/app/views/layouts/application.html.erb +0 -0
  16. data/{test → spec}/dummy/config.ru +0 -0
  17. data/{test → spec}/dummy/config/application.rb +0 -0
  18. data/{test → spec}/dummy/config/boot.rb +0 -0
  19. data/{test → spec}/dummy/config/database.yml +0 -0
  20. data/{test → spec}/dummy/config/environment.rb +0 -0
  21. data/{test → spec}/dummy/config/environments/development.rb +0 -0
  22. data/{test → spec}/dummy/config/environments/production.rb +0 -0
  23. data/{test → spec}/dummy/config/environments/test.rb +0 -0
  24. data/{test → spec}/dummy/config/initializers/backtrace_silencers.rb +0 -0
  25. data/{test → spec}/dummy/config/initializers/inflections.rb +0 -0
  26. data/{test → spec}/dummy/config/initializers/mime_types.rb +0 -0
  27. data/{test → spec}/dummy/config/initializers/secret_token.rb +0 -0
  28. data/{test → spec}/dummy/config/initializers/session_store.rb +0 -0
  29. data/{test → spec}/dummy/config/initializers/wrap_parameters.rb +0 -0
  30. data/{test → spec}/dummy/config/locales/en.yml +0 -0
  31. data/{test → spec}/dummy/config/routes.rb +0 -0
  32. data/{test → spec}/dummy/db/migrate/20120307002859_create_spud_admin_permissions.spud_core.rb +0 -0
  33. data/{test → spec}/dummy/db/migrate/20120307002860_create_spud_users.spud_core.rb +0 -0
  34. data/{test → spec}/dummy/db/migrate/20120307003559_create_spud_permalinks.spud_permalinks.rb +0 -0
  35. data/spec/dummy/db/migrate/20120610123555_add_time_zone_to_spud_user.spud_core.rb +7 -0
  36. data/spec/dummy/db/migrate/20120610123556_add_scope_to_spud_admin_permissions.spud_core.rb +7 -0
  37. data/spec/dummy/db/migrate/20120610123557_create_spud_user_settings.spud_core.rb +12 -0
  38. data/spec/dummy/db/migrate/20120610123615_add_site_id_to_spud_permalinks.spud_permalinks.rb +7 -0
  39. data/{test → spec}/dummy/db/schema.rb +33 -1
  40. data/spec/dummy/log/development.log +77 -0
  41. data/{test → spec}/dummy/public/404.html +0 -0
  42. data/{test → spec}/dummy/public/422.html +0 -0
  43. data/{test → spec}/dummy/public/500.html +0 -0
  44. data/{test → spec}/dummy/public/favicon.ico +0 -0
  45. data/{test → spec}/dummy/script/rails +0 -0
  46. data/spec/helpers/spud/admin/cms_helper_spec.rb +15 -0
  47. data/spec/models/spud_page_partial_revision_spec.rb +5 -0
  48. data/spec/models/spud_page_spec.rb +58 -0
  49. data/spec/models/spud_template_spec.rb +34 -0
  50. data/spec/spec_helper.rb +40 -0
  51. data/spec/support/authlogic_helper.rb +2 -0
  52. metadata +210 -110
  53. data/README.rdoc +0 -3
  54. data/app/helpers/spud/admin/cms_helper.rb +0 -2
  55. data/test/dummy/log/development.log +0 -437
  56. data/test/dummy/log/test.log +0 -2280
  57. data/test/integration/navigation_test.rb +0 -10
  58. data/test/spud_cms_test.rb +0 -7
  59. data/test/test_helper.rb +0 -10
data/README.markdown ADDED
@@ -0,0 +1,90 @@
1
+ Spud CMS
2
+ ========
3
+
4
+ Spud CMS is a CMS Engine designed to be robust, easy to use, and light weight.
5
+ NOTE: This project is still in its early infancy.
6
+
7
+ Installation/Usage
8
+ ------------------
9
+
10
+ 1. In your Gemfile add the following
11
+
12
+ gem 'spud_core', :git => "git://github.com/davydotcom/spud_core_admin.git"
13
+ gem 'spud_cms', :git => "git://github.com/davydotcom/spud_cms.git"
14
+
15
+ 2. Run bundle install
16
+ 3. Copy in database migrations to your new rails project
17
+
18
+ bundle exec rake spud_core:install:migrations
19
+ bundle exec rake spud_cms:install:migrations
20
+ rake db:migrate
21
+
22
+ 4. run a rails server instance and point your browser to /spud/admin
23
+
24
+ Routing to the CMS Engine
25
+ --------------------------
26
+ Routing your home page to the CMS engine is fairly straight forward.
27
+ in your applications environment.rb file add a configure block as such
28
+
29
+
30
+ Spud::Cms.configure do |config|
31
+ config.menus_enabled = true
32
+ config.templates_enabled = false
33
+ config.root_page_name = "home"
34
+ end
35
+
36
+
37
+
38
+ Where "home" is the page name you wish to use.
39
+
40
+ Pages will default render to the 'application' layout of your application. You can change this by using templates to specify base layouts.
41
+
42
+ Using Menus
43
+ -----------
44
+ A lot of cms engines allow you to render your navigation links in a ul block by using your page tree structure. In a lot of cases this is insufficient as some sites have urls that redirect to pages outside of your cms. This is where menus come in. They can be built in the spud admin control panel.
45
+ In your application layout file or any erb template you can render a ul block like so
46
+
47
+ <%=sp_list_menu({:id => "navigation",:name => "Main"})%>
48
+
49
+ This will output a <ul id="navigation"></ul> block for the menu you created in admin named "Main"
50
+
51
+
52
+ Adding Your Own Engines
53
+ -----------------------
54
+
55
+ Creating a rails engine that ties into spud admin is fairly straight forward
56
+ In your new engine add spud_admin as a dependency and create an initializer inside your engine class as such:
57
+
58
+ initializer :admin do
59
+ Spud::Core.configure do |config|
60
+ config.admin_applications += [{:name => "Pages",:thumbnail => "spud/admin/pages_thumb.png",:url => "/spud/admin/pages",:order => 0}]
61
+
62
+ end
63
+ end
64
+
65
+ You can use the layouts provided with spud admin by using 'spud/admin/application' or 'spud/admin/detail' layouts
66
+
67
+ When creating controllers for the admin panel create them in the Spud::Admin Namespace and have them extend Spud::Admin::ApplicationController for automatic user authentication restrictions.
68
+
69
+ Testing
70
+ -----------------
71
+
72
+ Spud uses RSpec for testing. Get the tests running with a few short commands:
73
+
74
+ 1. Create and migrate the databases:
75
+
76
+ rake db:create
77
+ rake db:migrate
78
+
79
+ 2. Load the schema in to the test database:
80
+
81
+ rake app:db:test:prepare
82
+
83
+ 3. Run the tests with RSpec
84
+
85
+ rspec spec
86
+
87
+ After the tests have completed the current code coverage stats is available by opening ```/coverage/index.html``` in a browser.
88
+
89
+
90
+
data/Rakefile CHANGED
@@ -20,21 +20,9 @@ RDoc::Task.new(:rdoc) do |rdoc|
20
20
  rdoc.rdoc_files.include('lib/**/*.rb')
21
21
  end
22
22
 
23
- APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
23
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
24
24
  load 'rails/tasks/engine.rake'
25
25
 
26
-
27
-
28
26
  Bundler::GemHelper.install_tasks
29
27
 
30
- require 'rake/testtask'
31
-
32
- # Rake::TestTask.new(:test) do |t|
33
- # t.libs << 'lib'
34
- # t.libs << 'test'
35
- # t.pattern = 'test/**/*_test.rb'
36
- # t.verbose = false
37
- # end
38
-
39
-
40
- task :default => [:spec]
28
+ require 'rake'
@@ -25,7 +25,7 @@ class PagesController < ApplicationController
25
25
  # MultiSite Code Block
26
26
  if Spud::Core.multisite_mode_enabled
27
27
  site_config = Spud::Core.site_config_for_host(request.host_with_port)
28
- @page = @page.site(!site_config.blank? ? site_config[:site_id] : nil)
28
+ @page = @page.site(!site_config.blank? ? site_config[:site_id] : nil)
29
29
  end
30
30
 
31
31
  @page = @page.first
@@ -42,12 +42,14 @@ class PagesController < ApplicationController
42
42
  redirect_to @permalink.attachment.url_name == Spud::Cms.root_page_name ? root_url() : page_url(:id => @permalink.attachment.url_name) , :status => :moved_permanently and return
43
43
  end
44
44
 
45
- flash[:error] = "Page not found"
46
- if !params[:id].blank?
47
- redirect_to root_url() and return
48
- else
49
- return
50
- end
45
+ # flash[:error] = "Page not found"
46
+ # if !params[:id].blank?
47
+ # redirect_to root_url() and return
48
+ # else
49
+ # return
50
+ # end
51
+ Spud::Cms.template_404 ? render(Spud::Cms.template_404,:status => 404) : render(:text=>nil,:status => 404)
52
+ return
51
53
  end
52
54
  if @page.is_private?
53
55
  if defined?(require_user) && require_user == false
@@ -63,7 +65,7 @@ class PagesController < ApplicationController
63
65
  if Spud::Core.multisite_mode_enabled && !site_config.blank?
64
66
  cms_config = Spud::Cms.site_config_for_short_name(site_config[:short_name])
65
67
  layout = cms_config[:default_page_layout] if !cms_config.blank? && !cms_config[:default_page_layout].blank?
66
- end
68
+ end
67
69
 
68
70
 
69
71
  if !@page.spud_template.blank?
@@ -71,10 +73,10 @@ class PagesController < ApplicationController
71
73
  layout = @page.spud_template.base_layout
72
74
  end
73
75
  @inline = @page.spud_template.content
74
-
76
+
75
77
  end
76
78
  render :layout => layout
77
-
79
+
78
80
  end
79
81
 
80
82
  private
@@ -2,18 +2,19 @@ module Spud
2
2
  module Cms
3
3
  include ActiveSupport::Configurable
4
4
 
5
- config_accessor :menus_enabled,:templates_enabled,:root_page_name,:default_page_parts,:yield_body_as_content_block,:default_page_layout,:enable_sitemap,:enable_full_page_caching,:enable_action_caching,:multisite_config,:max_revisions
5
+ config_accessor :menus_enabled,:templates_enabled,:root_page_name,:default_page_parts,:yield_body_as_content_block,:default_page_layout,:enable_sitemap,:enable_full_page_caching,:enable_action_caching,:multisite_config,:max_revisions,:template_404
6
6
 
7
7
  self.root_page_name = "home"
8
8
  self.menus_enabled = true
9
9
  self.templates_enabled = false
10
10
  self.default_page_layout = 'application'
11
11
  self.default_page_parts = ["Body"]
12
- self.yield_body_as_content_block = false
12
+ self.yield_body_as_content_block = false
13
13
  self.enable_full_page_caching = false
14
14
  self.enable_action_caching = false
15
15
  self.enable_sitemap = true
16
16
  self.max_revisions = 10
17
+ self.template_404 = nil
17
18
  self.multisite_config = []
18
19
  def self.site_config_for_short_name(short_name)
19
20
  configs = Spud::Cms.multisite_config.select{|p| p[:short_name].to_s == short_name.to_s}
@@ -25,4 +26,4 @@ module Spud
25
26
  end
26
27
 
27
28
  end
28
- end
29
+ end
@@ -1,3 +1,5 @@
1
1
  Rails.application.routes.append do
2
- match "*id", :controller => "pages",:action => "show", :as => "page"
3
- end
2
+ # constraints :path => /(?!assets)/ do
3
+ match "*id", :controller => "pages",:action => "show", :as => "page"
4
+ # end
5
+ end
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Cms
3
- VERSION = "0.8.11"
3
+ VERSION = "0.8.12"
4
4
  end
5
5
  end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spud::Admin::CmsController do
4
+
5
+ end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spud::Cms::SitemapsController do
4
+ describe :show do
5
+ it "should return the sitemap urls" do
6
+
7
+ get :show, :format => :xml
8
+
9
+ assigns(:pages).should == SpudPage.published_pages.public.order(:spud_page_id)
10
+ end
11
+
12
+ it "should only respond to an XML format" do
13
+ get :show
14
+ response.response_code.should == 406
15
+ end
16
+ end
17
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ # This migration comes from spud_core (originally 20120327124229)
2
+ class AddTimeZoneToSpudUser < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_users, :time_zone, :string
5
+
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # This migration comes from spud_core (originally 20120328235431)
2
+ class AddScopeToSpudAdminPermissions < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_admin_permissions, :scope, :string
5
+
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from spud_core (originally 20120329174000)
2
+ class CreateSpudUserSettings < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_user_settings do |t|
5
+ t.integer :spud_user_id
6
+ t.string :key
7
+ t.string :value
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,7 @@
1
+ # This migration comes from spud_permalinks (originally 20120329135522)
2
+ class AddSiteIdToSpudPermalinks < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_permalinks, :site_id, :integer
5
+ add_index :spud_permalinks,:site_id
6
+ end
7
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20120307003559) do
14
+ ActiveRecord::Schema.define(:version => 20120610123615) do
15
15
 
16
16
  create_table "spud_admin_permissions", :force => true do |t|
17
17
  t.integer "user_id"
@@ -19,6 +19,7 @@ ActiveRecord::Schema.define(:version => 20120307003559) do
19
19
  t.boolean "access"
20
20
  t.datetime "created_at", :null => false
21
21
  t.datetime "updated_at", :null => false
22
+ t.string "scope"
22
23
  end
23
24
 
24
25
  create_table "spud_menu_items", :force => true do |t|
@@ -44,8 +45,22 @@ ActiveRecord::Schema.define(:version => 20120307003559) do
44
45
  t.text "description"
45
46
  t.datetime "created_at", :null => false
46
47
  t.datetime "updated_at", :null => false
48
+ t.integer "site_id"
47
49
  end
48
50
 
51
+ add_index "spud_menus", ["site_id"], :name => "index_spud_menus_on_site_id"
52
+
53
+ create_table "spud_page_partial_revisions", :force => true do |t|
54
+ t.string "name"
55
+ t.text "content"
56
+ t.string "format"
57
+ t.integer "spud_page_id"
58
+ t.datetime "created_at", :null => false
59
+ t.datetime "updated_at", :null => false
60
+ end
61
+
62
+ add_index "spud_page_partial_revisions", ["spud_page_id", "name"], :name => "revision_idx"
63
+
49
64
  create_table "spud_page_partials", :force => true do |t|
50
65
  t.integer "spud_page_id"
51
66
  t.string "name"
@@ -75,17 +90,22 @@ ActiveRecord::Schema.define(:version => 20120307003559) do
75
90
  t.boolean "published", :default => true
76
91
  t.boolean "use_custom_url_name", :default => false
77
92
  t.text "notes"
93
+ t.integer "site_id"
78
94
  end
79
95
 
96
+ add_index "spud_pages", ["site_id"], :name => "index_spud_pages_on_site_id"
97
+
80
98
  create_table "spud_permalinks", :force => true do |t|
81
99
  t.string "url_name"
82
100
  t.string "attachment_type"
83
101
  t.integer "attachment_id"
84
102
  t.datetime "created_at", :null => false
85
103
  t.datetime "updated_at", :null => false
104
+ t.integer "site_id"
86
105
  end
87
106
 
88
107
  add_index "spud_permalinks", ["attachment_type", "attachment_id"], :name => "index_spud_permalinks_on_attachment_type_and_attachment_id"
108
+ add_index "spud_permalinks", ["site_id"], :name => "index_spud_permalinks_on_site_id"
89
109
 
90
110
  create_table "spud_templates", :force => true do |t|
91
111
  t.string "name"
@@ -94,6 +114,17 @@ ActiveRecord::Schema.define(:version => 20120307003559) do
94
114
  t.text "page_parts"
95
115
  t.datetime "created_at", :null => false
96
116
  t.datetime "updated_at", :null => false
117
+ t.integer "site_id"
118
+ end
119
+
120
+ add_index "spud_templates", ["site_id"], :name => "index_spud_templates_on_site_id"
121
+
122
+ create_table "spud_user_settings", :force => true do |t|
123
+ t.integer "spud_user_id"
124
+ t.string "key"
125
+ t.string "value"
126
+ t.datetime "created_at", :null => false
127
+ t.datetime "updated_at", :null => false
97
128
  end
98
129
 
99
130
  create_table "spud_users", :force => true do |t|
@@ -116,6 +147,7 @@ ActiveRecord::Schema.define(:version => 20120307003559) do
116
147
  t.string "last_login_ip"
117
148
  t.datetime "created_at", :null => false
118
149
  t.datetime "updated_at", :null => false
150
+ t.string "time_zone"
119
151
  end
120
152
 
121
153
  add_index "spud_users", ["email"], :name => "index_spud_users_on_email"
@@ -0,0 +1,77 @@
1
+  (0.5ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
2
+ Migrating to CreateSpudPages (20120101192412)
3
+ Migrating to CreateSpudMenus (20120101193138)
4
+ Migrating to CreateSpudMenuItems (20120101193255)
5
+ Migrating to CreateSpudTemplates (20120101194124)
6
+ Migrating to CreateSpudPagePartials (20120103034659)
7
+ Migrating to AddVisibilityToSpudPages (20120104194032)
8
+ Migrating to AddMenuNameToSpudMenuItems (20120107181337)
9
+ Migrating to AddUseCustomUrlNameToSpudPages (20120111134754)
10
+ Migrating to AddNotesToSpudPages (20120118141852)
11
+ Migrating to AddMenuIdToSpudMenuItems (20120126232428)
12
+ Migrating to AddClassesToSpudMenuItems (20120128163601)
13
+ Migrating to CreateSpudAdminPermissions (20120307002859)
14
+ Migrating to CreateSpudUsers (20120307002860)
15
+ Migrating to CreateSpudPermalinks (20120307003559)
16
+ Migrating to AddSiteIdToSpudPages (20120329132314)
17
+ Migrating to AddSiteIdToSpudTemplates (20120329132322)
18
+ Migrating to AddSiteIdToSpudMenus (20120329132330)
19
+ Migrating to CreateSpudPagePartialRevisions (20120510195151)
20
+ Migrating to AddTimeZoneToSpudUser (20120610123555)
21
+  (776.3ms) ALTER TABLE `spud_users` ADD `time_zone` varchar(255)
22
+  (0.4ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610123555')
23
+ Migrating to AddScopeToSpudAdminPermissions (20120610123556)
24
+  (144.2ms) ALTER TABLE `spud_admin_permissions` ADD `scope` varchar(255)
25
+  (1.8ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610123556')
26
+ Migrating to CreateSpudUserSettings (20120610123557)
27
+  (344.0ms) 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
28
+  (0.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610123557')
29
+ Migrating to AddSiteIdToSpudPermalinks (20120610123615)
30
+  (321.7ms) ALTER TABLE `spud_permalinks` ADD `site_id` int(11)
31
+  (206.7ms) CREATE INDEX `index_spud_permalinks_on_site_id` ON `spud_permalinks` (`site_id`)
32
+  (0.6ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610123615')
33
+  (0.2ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
34
+  (0.2ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
35
+  (17.7ms) DROP DATABASE IF EXISTS `spud_cms_test`
36
+  (0.3ms) CREATE DATABASE `spud_cms_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
37
+  (130.9ms) 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
38
+  (254.0ms) 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
39
+  (191.4ms) CREATE INDEX `index_spud_menu_items_on_menu_order` ON `spud_menu_items` (`menu_order`)
40
+  (192.3ms) CREATE INDEX `index_spud_menu_items_on_parent_type_and_parent_id` ON `spud_menu_items` (`parent_type`, `parent_id`)
41
+  (210.6ms) CREATE INDEX `index_spud_menu_items_on_spud_menu_id` ON `spud_menu_items` (`spud_menu_id`)
42
+  (205.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
43
+  (372.9ms) CREATE INDEX `index_spud_menus_on_site_id` ON `spud_menus` (`site_id`)
44
+  (260.3ms) 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
45
+  (224.9ms) CREATE INDEX `revision_idx` ON `spud_page_partial_revisions` (`spud_page_id`, `name`)
46
+  (235.5ms) 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
47
+  (183.7ms) CREATE INDEX `index_spud_page_partials_on_spud_page_id` ON `spud_page_partials` (`spud_page_id`)
48
+  (184.5ms) 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
49
+  (214.5ms) CREATE INDEX `index_spud_pages_on_site_id` ON `spud_pages` (`site_id`)
50
+  (184.7ms) 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
51
+  (203.0ms) CREATE INDEX `index_spud_permalinks_on_attachment_type_and_attachment_id` ON `spud_permalinks` (`attachment_type`, `attachment_id`)
52
+  (178.1ms) CREATE INDEX `index_spud_permalinks_on_site_id` ON `spud_permalinks` (`site_id`)
53
+  (194.8ms) 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
54
+  (235.4ms) CREATE INDEX `index_spud_templates_on_site_id` ON `spud_templates` (`site_id`)
55
+  (186.6ms) 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
56
+  (241.1ms) 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
57
+  (192.6ms) CREATE INDEX `index_spud_users_on_email` ON `spud_users` (`email`)
58
+  (189.6ms) CREATE INDEX `index_spud_users_on_login` ON `spud_users` (`login`)
59
+  (205.2ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
60
+  (214.7ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
61
+  (0.1ms) SELECT version FROM `schema_migrations`
62
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120610123615')
63
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120101192412')
64
+  (0.4ms) INSERT INTO `schema_migrations` (version) VALUES ('20120101193138')
65
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120101193255')
66
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120101194124')
67
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120103034659')
68
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120104194032')
69
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120107181337')
70
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120111134754')
71
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120118141852')
72
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120126232428')
73
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120128163601')
74
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120329132314')
75
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120329132322')
76
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120329132330')
77
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120510195151')