tb_cms 0.9.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.markdown +110 -0
  4. data/Rakefile +28 -0
  5. data/app/assets/images/spud/admin/menus_thumb.png +0 -0
  6. data/app/assets/images/spud/admin/menus_thumb@2x.png +0 -0
  7. data/app/assets/images/spud/admin/pages_thumb.png +0 -0
  8. data/app/assets/images/spud/admin/snippets_thumb.png +0 -0
  9. data/app/assets/images/spud/admin/snippets_thumb@2x.png +0 -0
  10. data/app/assets/javascripts/spud/admin/cms/application.js +25 -0
  11. data/app/assets/javascripts/spud/admin/cms/menu_items.js +35 -0
  12. data/app/assets/javascripts/spud/admin/cms/pages.js +29 -0
  13. data/app/assets/javascripts/spud/admin/snippets.js +2 -0
  14. data/app/assets/stylesheets/spud/admin/cms/application.css +28 -0
  15. data/app/assets/stylesheets/spud/admin/cms.css +4 -0
  16. data/app/assets/stylesheets/spud/admin/snippets.css +4 -0
  17. data/app/controllers/pages_controller.rb +90 -0
  18. data/app/controllers/spud/admin/cms_controller.rb +3 -0
  19. data/app/controllers/spud/admin/menu_items_controller.rb +115 -0
  20. data/app/controllers/spud/admin/menus_controller.rb +55 -0
  21. data/app/controllers/spud/admin/pages_controller.rb +182 -0
  22. data/app/controllers/spud/admin/snippets_controller.rb +61 -0
  23. data/app/controllers/spud/cms/sitemaps_controller.rb +13 -0
  24. data/app/helpers/spud/cms/application_helper.rb +283 -0
  25. data/app/models/spud_menu.rb +9 -0
  26. data/app/models/spud_menu_item.rb +72 -0
  27. data/app/models/spud_page.rb +131 -0
  28. data/app/models/spud_page_liquid_tag.rb +4 -0
  29. data/app/models/spud_page_partial.rb +67 -0
  30. data/app/models/spud_page_partial_revision.rb +5 -0
  31. data/app/models/spud_snippet.rb +42 -0
  32. data/app/observers/page_sweeper.rb +48 -0
  33. data/app/observers/snippet_sweeper.rb +41 -0
  34. data/app/views/pages/not_found.html.erb +2 -0
  35. data/app/views/pages/show.html.erb +24 -0
  36. data/app/views/spud/admin/menu_items/_form.html.erb +51 -0
  37. data/app/views/spud/admin/menu_items/_menu_item_row.html.erb +22 -0
  38. data/app/views/spud/admin/menu_items/edit.html.erb +10 -0
  39. data/app/views/spud/admin/menu_items/index.html.erb +17 -0
  40. data/app/views/spud/admin/menu_items/new.html.erb +12 -0
  41. data/app/views/spud/admin/menus/_form.html.erb +11 -0
  42. data/app/views/spud/admin/menus/edit.html.erb +13 -0
  43. data/app/views/spud/admin/menus/index.html.erb +24 -0
  44. data/app/views/spud/admin/menus/new.html.erb +7 -0
  45. data/app/views/spud/admin/pages/_form.html.erb +95 -0
  46. data/app/views/spud/admin/pages/_page_partials_form.html.erb +18 -0
  47. data/app/views/spud/admin/pages/_page_row.html.erb +18 -0
  48. data/app/views/spud/admin/pages/edit.html.erb +32 -0
  49. data/app/views/spud/admin/pages/index.html.erb +13 -0
  50. data/app/views/spud/admin/pages/new.html.erb +34 -0
  51. data/app/views/spud/admin/pages/show.html.erb +20 -0
  52. data/app/views/spud/admin/snippets/_form.html.erb +8 -0
  53. data/app/views/spud/admin/snippets/edit.html.erb +7 -0
  54. data/app/views/spud/admin/snippets/index.html.erb +24 -0
  55. data/app/views/spud/admin/snippets/new.html.erb +7 -0
  56. data/app/views/spud/admin/templates/_form.html.erb +43 -0
  57. data/app/views/spud/admin/templates/edit.html.erb +9 -0
  58. data/app/views/spud/admin/templates/index.html.erb +17 -0
  59. data/app/views/spud/admin/templates/new.html.erb +11 -0
  60. data/app/views/spud/cms/sitemaps/show.xml.builder +16 -0
  61. data/config/boot.rb +6 -0
  62. data/config/routes.rb +29 -0
  63. data/db/migrate/20120101192412_create_spud_pages.rb +19 -0
  64. data/db/migrate/20120101193138_create_spud_menus.rb +10 -0
  65. data/db/migrate/20120101193255_create_spud_menu_items.rb +17 -0
  66. data/db/migrate/20120101194124_create_spud_templates.rb +11 -0
  67. data/db/migrate/20120103034659_create_spud_page_partials.rb +13 -0
  68. data/db/migrate/20120104194032_add_visibility_to_spud_pages.rb +6 -0
  69. data/db/migrate/20120107181337_add_menu_name_to_spud_menu_items.rb +5 -0
  70. data/db/migrate/20120111134754_add_use_custom_url_name_to_spud_pages.rb +5 -0
  71. data/db/migrate/20120118141852_add_notes_to_spud_pages.rb +5 -0
  72. data/db/migrate/20120126232428_add_menu_id_to_spud_menu_items.rb +7 -0
  73. data/db/migrate/20120128163601_add_classes_to_spud_menu_items.rb +6 -0
  74. data/db/migrate/20120329132314_add_site_id_to_spud_pages.rb +6 -0
  75. data/db/migrate/20120329132322_add_site_id_to_spud_templates.rb +6 -0
  76. data/db/migrate/20120329132330_add_site_id_to_spud_menus.rb +6 -0
  77. data/db/migrate/20120510195151_create_spud_page_partial_revisions.rb +13 -0
  78. data/db/migrate/20120911190030_add_symbol_name_to_spud_page_partials.rb +5 -0
  79. data/db/migrate/20120912121313_modify_site_id_for_spud_pages.rb +15 -0
  80. data/db/migrate/20121016233715_add_content_processed_to_spud_page_partials.rb +5 -0
  81. data/db/migrate/20121112151110_add_layout_to_spud_pages.rb +8 -0
  82. data/db/migrate/20121112212113_create_spud_page_liquid_tags.rb +11 -0
  83. data/db/migrate/20121119025608_create_spud_snippets.rb +17 -0
  84. data/db/migrate/20121119030136_change_liquid_tags_to_polymorphic.rb +17 -0
  85. data/lib/generators/spud/cms/template_generator.rb +17 -0
  86. data/lib/generators/spud/cms/templates/template.html.erb +28 -0
  87. data/lib/spud_cms/configuration.rb +27 -0
  88. data/lib/spud_cms/engine.rb +69 -0
  89. data/lib/spud_cms/liquid_snippet.rb +29 -0
  90. data/lib/spud_cms/page_route.rb +5 -0
  91. data/lib/spud_cms/template_parser.rb +126 -0
  92. data/lib/spud_cms/test_files.rb +25 -0
  93. data/lib/spud_cms/version.rb +5 -0
  94. data/lib/spud_cms.rb +10 -0
  95. data/lib/tasks/spud_cms_tasks.rake +4 -0
  96. data/spec/controllers/pages_controller_spec.rb +108 -0
  97. data/spec/controllers/spud/admin/cms_controller_spec.rb +11 -0
  98. data/spec/controllers/spud/admin/menu_items_controller_spec.rb +148 -0
  99. data/spec/controllers/spud/admin/menus_controller_spec.rb +121 -0
  100. data/spec/controllers/spud/admin/pages_controller_spec.rb +111 -0
  101. data/spec/controllers/spud/admin/snippets_controller_spec.rb +5 -0
  102. data/spec/controllers/spud/cms/sitemaps_controller_spec.rb +48 -0
  103. data/spec/dummy/README.rdoc +261 -0
  104. data/spec/dummy/Rakefile +7 -0
  105. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  106. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  107. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  108. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  109. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  110. data/spec/dummy/app/views/layouts/content_left.html.erb +0 -0
  111. data/spec/dummy/config/application.rb +59 -0
  112. data/spec/dummy/config/boot.rb +10 -0
  113. data/spec/dummy/config/database.yml +15 -0
  114. data/spec/dummy/config/environment.rb +5 -0
  115. data/spec/dummy/config/environments/development.rb +37 -0
  116. data/spec/dummy/config/environments/production.rb +67 -0
  117. data/spec/dummy/config/environments/test.rb +37 -0
  118. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  119. data/spec/dummy/config/initializers/inflections.rb +15 -0
  120. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  121. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  122. data/spec/dummy/config/initializers/session_store.rb +8 -0
  123. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  124. data/spec/dummy/config/locales/en.yml +5 -0
  125. data/spec/dummy/config/routes.rb +3 -0
  126. data/spec/dummy/config.ru +4 -0
  127. data/spec/dummy/db/migrate/20120307002859_create_spud_admin_permissions.spud_core.rb +12 -0
  128. data/spec/dummy/db/migrate/20120307002860_create_spud_users.spud_core.rb +30 -0
  129. data/spec/dummy/db/migrate/20120307003559_create_spud_permalinks.spud_permalinks.rb +12 -0
  130. data/spec/dummy/db/migrate/20120610123555_add_time_zone_to_spud_user.spud_core.rb +7 -0
  131. data/spec/dummy/db/migrate/20120610123556_add_scope_to_spud_admin_permissions.spud_core.rb +7 -0
  132. data/spec/dummy/db/migrate/20120610123557_create_spud_user_settings.spud_core.rb +12 -0
  133. data/spec/dummy/db/migrate/20120610123615_add_site_id_to_spud_permalinks.spud_permalinks.rb +7 -0
  134. data/spec/dummy/db/schema.rb +171 -0
  135. data/spec/dummy/log/test.log +1874 -0
  136. data/spec/dummy/public/404.html +26 -0
  137. data/spec/dummy/public/422.html +26 -0
  138. data/spec/dummy/public/500.html +25 -0
  139. data/spec/dummy/public/favicon.ico +0 -0
  140. data/spec/dummy/script/rails +6 -0
  141. data/spec/helpers/spud/cms/application_helper_spec.rb +160 -0
  142. data/spec/models/spud_menu_item_spec.rb +31 -0
  143. data/spec/models/spud_page_liquid_tag_spec.rb +5 -0
  144. data/spec/models/spud_page_partial_revision_spec.rb +5 -0
  145. data/spec/models/spud_page_partial_spec.rb +44 -0
  146. data/spec/models/spud_page_spec.rb +163 -0
  147. data/spec/models/spud_snippet_spec.rb +5 -0
  148. data/spec/spec_helper.rb +40 -0
  149. data/spec/support/authlogic_helper.rb +2 -0
  150. metadata +427 -0
@@ -0,0 +1,67 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ config.serve_static_assets = false
13
+
14
+ # Compress JavaScripts and CSS
15
+ config.assets.compress = true
16
+
17
+ # Don't fallback to assets pipeline if a precompiled asset is missed
18
+ config.assets.compile = false
19
+
20
+ # Generate digests for assets URLs
21
+ config.assets.digest = true
22
+
23
+ # Defaults to Rails.root.join("public/assets")
24
+ # config.assets.manifest = YOUR_PATH
25
+
26
+ # Specifies the header that your server uses for sending files
27
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
+
30
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
+ # config.force_ssl = true
32
+
33
+ # See everything in the log (default is :info)
34
+ # config.log_level = :debug
35
+
36
+ # Prepend all log lines with the following tags
37
+ # config.log_tags = [ :subdomain, :uuid ]
38
+
39
+ # Use a different logger for distributed setups
40
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
+
42
+ # Use a different cache store in production
43
+ # config.cache_store = :mem_cache_store
44
+
45
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
+ # config.action_controller.asset_host = "http://assets.example.com"
47
+
48
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
+ # config.assets.precompile += %w( search.js )
50
+
51
+ # Disable delivery errors, bad email addresses will be ignored
52
+ # config.action_mailer.raise_delivery_errors = false
53
+
54
+ # Enable threaded mode
55
+ # config.threadsafe!
56
+
57
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
+ # the I18n.default_locale when a translation can not be found)
59
+ config.i18n.fallbacks = true
60
+
61
+ # Send deprecation notices to registered listeners
62
+ config.active_support.deprecation = :notify
63
+
64
+ # Log the query plan for queries taking more than this (works
65
+ # with SQLite, MySQL, and PostgreSQL)
66
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
67
+ end
@@ -0,0 +1,37 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Configure static asset server for tests with Cache-Control for performance
11
+ config.serve_static_assets = true
12
+ config.static_cache_control = "public, max-age=3600"
13
+
14
+ # Log error messages when you accidentally call methods on nil
15
+ config.whiny_nils = true
16
+
17
+ # Show full error reports and disable caching
18
+ config.consider_all_requests_local = true
19
+ config.action_controller.perform_caching = false
20
+
21
+ # Raise exceptions instead of rendering exception templates
22
+ config.action_dispatch.show_exceptions = false
23
+
24
+ # Disable request forgery protection in test environment
25
+ config.action_controller.allow_forgery_protection = false
26
+
27
+ # Tell Action Mailer not to deliver emails to the real world.
28
+ # The :test delivery method accumulates sent emails in the
29
+ # ActionMailer::Base.deliveries array.
30
+ config.action_mailer.delivery_method = :test
31
+
32
+ # Raise exception on mass assignment protection for Active Record models
33
+ config.active_record.mass_assignment_sanitizer = :strict
34
+
35
+ # Print deprecation notices to the stderr
36
+ config.active_support.deprecation = :stderr
37
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,15 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
11
+ #
12
+ # These inflection rules are supported but not enabled by default:
13
+ # ActiveSupport::Inflector.inflections do |inflect|
14
+ # inflect.acronym 'RESTful'
15
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = 'a4229e720d134158820df9fc1b34eb71a1911140b6c9df6c7cd09001cabf044a8281f95d3446a2845263d6cda9ec29a87bc77f7442d48231025bbb7ce9349bf4'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Dummy::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,3 @@
1
+ Rails.application.routes.draw do
2
+
3
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -0,0 +1,12 @@
1
+ # This migration comes from spud_core (originally 20111214161011)
2
+ class CreateSpudAdminPermissions < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_admin_permissions do |t|
5
+ t.integer :user_id
6
+ t.string :name
7
+ t.boolean :access
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,30 @@
1
+ # This migration comes from spud_core (originally 20111214161146)
2
+ class CreateSpudUsers < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_users do |t|
5
+
6
+ t.string :first_name
7
+ t.string :last_name
8
+ t.boolean :super_admin
9
+ t.string :login, :null => false # optional, you can use email instead, or both
10
+ t.string :email, :null => false # optional, you can use login instead, or both
11
+ t.string :crypted_password, :null => false # optional, see below
12
+ t.string :password_salt, :null => false # optional, but highly recommended
13
+ t.string :persistence_token, :null => false # required
14
+ t.string :single_access_token, :null => false # optional, see Authlogic::Session::Params
15
+ t.string :perishable_token, :null => false # optional, see Authlogic::Session::Perishability
16
+
17
+ # Magic columns, just like ActiveRecord's created_at and updated_at. These are automatically maintained by Authlogic if they are present.
18
+ t.integer :login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
19
+ t.integer :failed_login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
20
+ t.datetime :last_request_at # optional, see Authlogic::Session::MagicColumns
21
+ t.datetime :current_login_at # optional, see Authlogic::Session::MagicColumns
22
+ t.datetime :last_login_at # optional, see Authlogic::Session::MagicColumns
23
+ t.string :current_login_ip # optional, see Authlogic::Session::MagicColumns
24
+ t.string :last_login_ip # optional, see Authlogic::Session::MagicColumns
25
+ t.timestamps
26
+ end
27
+ add_index :spud_users,:login
28
+ add_index :spud_users,:email
29
+ end
30
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from spud_permalinks (originally 20120306195503)
2
+ class CreateSpudPermalinks < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_permalinks do |t|
5
+ t.string :url_name
6
+ t.string :attachment_type
7
+ t.integer :attachment_id
8
+ t.timestamps
9
+ end
10
+ add_index :spud_permalinks,[:attachment_type,:attachment_id]
11
+ end
12
+ end
@@ -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
@@ -0,0 +1,171 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20121119030136) do
15
+
16
+ create_table "spud_admin_permissions", :force => true do |t|
17
+ t.integer "user_id"
18
+ t.string "name"
19
+ t.boolean "access"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ t.string "scope"
23
+ end
24
+
25
+ create_table "spud_menu_items", :force => true do |t|
26
+ t.string "parent_type"
27
+ t.integer "parent_id"
28
+ t.integer "item_type"
29
+ t.integer "spud_page_id"
30
+ t.integer "menu_order", :default => 0
31
+ t.string "url"
32
+ t.datetime "created_at", :null => false
33
+ t.datetime "updated_at", :null => false
34
+ t.string "name"
35
+ t.integer "spud_menu_id"
36
+ t.string "classes"
37
+ end
38
+
39
+ add_index "spud_menu_items", ["menu_order"], :name => "index_spud_menu_items_on_menu_order"
40
+ add_index "spud_menu_items", ["parent_type", "parent_id"], :name => "index_spud_menu_items_on_parent_type_and_parent_id"
41
+ add_index "spud_menu_items", ["spud_menu_id"], :name => "index_spud_menu_items_on_spud_menu_id"
42
+
43
+ create_table "spud_menus", :force => true do |t|
44
+ t.string "name"
45
+ t.text "description"
46
+ t.datetime "created_at", :null => false
47
+ t.datetime "updated_at", :null => false
48
+ t.integer "site_id", :default => 0, :null => false
49
+ end
50
+
51
+ add_index "spud_menus", ["site_id"], :name => "index_spud_menus_on_site_id"
52
+
53
+ create_table "spud_page_liquid_tags", :force => true do |t|
54
+ t.integer "attachment_id"
55
+ t.string "tag_name"
56
+ t.string "value"
57
+ t.datetime "created_at", :null => false
58
+ t.datetime "updated_at", :null => false
59
+ t.string "attachment_type"
60
+ end
61
+
62
+ add_index "spud_page_liquid_tags", ["attachment_type", "attachment_id"], :name => "index_spud_page_liquid_tags_on_attachment_type_and_attachment_id"
63
+ add_index "spud_page_liquid_tags", ["tag_name", "value"], :name => "index_spud_page_liquid_tags_on_tag_name_and_value"
64
+
65
+ create_table "spud_page_partial_revisions", :force => true do |t|
66
+ t.string "name"
67
+ t.text "content"
68
+ t.string "format"
69
+ t.integer "spud_page_id"
70
+ t.datetime "created_at", :null => false
71
+ t.datetime "updated_at", :null => false
72
+ end
73
+
74
+ add_index "spud_page_partial_revisions", ["spud_page_id", "name"], :name => "revision_idx"
75
+
76
+ create_table "spud_page_partials", :force => true do |t|
77
+ t.integer "spud_page_id"
78
+ t.string "name"
79
+ t.text "content"
80
+ t.string "format"
81
+ t.datetime "created_at", :null => false
82
+ t.datetime "updated_at", :null => false
83
+ t.string "symbol_name"
84
+ t.text "content_processed"
85
+ end
86
+
87
+ add_index "spud_page_partials", ["spud_page_id"], :name => "index_spud_page_partials_on_spud_page_id"
88
+
89
+ create_table "spud_pages", :force => true do |t|
90
+ t.string "name"
91
+ t.string "url_name"
92
+ t.datetime "publish_at"
93
+ t.integer "created_by"
94
+ t.integer "updated_by"
95
+ t.string "format", :default => "html"
96
+ t.integer "spud_page_id"
97
+ t.text "meta_description"
98
+ t.string "meta_keywords"
99
+ t.integer "page_order"
100
+ t.datetime "created_at", :null => false
101
+ t.datetime "updated_at", :null => false
102
+ t.integer "visibility", :default => 0
103
+ t.boolean "published", :default => true
104
+ t.boolean "use_custom_url_name", :default => false
105
+ t.text "notes"
106
+ t.integer "site_id", :default => 0, :null => false
107
+ t.string "layout"
108
+ end
109
+
110
+ add_index "spud_pages", ["site_id"], :name => "index_spud_pages_on_site_id"
111
+
112
+ create_table "spud_permalinks", :force => true do |t|
113
+ t.string "url_name"
114
+ t.string "attachment_type"
115
+ t.integer "attachment_id"
116
+ t.datetime "created_at", :null => false
117
+ t.datetime "updated_at", :null => false
118
+ t.integer "site_id"
119
+ end
120
+
121
+ add_index "spud_permalinks", ["attachment_type", "attachment_id"], :name => "index_spud_permalinks_on_attachment_type_and_attachment_id"
122
+ add_index "spud_permalinks", ["site_id"], :name => "index_spud_permalinks_on_site_id"
123
+
124
+ create_table "spud_snippets", :force => true do |t|
125
+ t.string "name"
126
+ t.text "content"
127
+ t.string "format"
128
+ t.text "content_processed"
129
+ t.integer "site_id", :default => 0
130
+ t.datetime "created_at", :null => false
131
+ t.datetime "updated_at", :null => false
132
+ end
133
+
134
+ add_index "spud_snippets", ["name"], :name => "index_spud_snippets_on_name"
135
+ add_index "spud_snippets", ["site_id"], :name => "index_spud_snippets_on_site_id"
136
+
137
+ create_table "spud_user_settings", :force => true do |t|
138
+ t.integer "spud_user_id"
139
+ t.string "key"
140
+ t.string "value"
141
+ t.datetime "created_at", :null => false
142
+ t.datetime "updated_at", :null => false
143
+ end
144
+
145
+ create_table "spud_users", :force => true do |t|
146
+ t.string "first_name"
147
+ t.string "last_name"
148
+ t.boolean "super_admin"
149
+ t.string "login", :null => false
150
+ t.string "email", :null => false
151
+ t.string "crypted_password", :null => false
152
+ t.string "password_salt", :null => false
153
+ t.string "persistence_token", :null => false
154
+ t.string "single_access_token", :null => false
155
+ t.string "perishable_token", :null => false
156
+ t.integer "login_count", :default => 0, :null => false
157
+ t.integer "failed_login_count", :default => 0, :null => false
158
+ t.datetime "last_request_at"
159
+ t.datetime "current_login_at"
160
+ t.datetime "last_login_at"
161
+ t.string "current_login_ip"
162
+ t.string "last_login_ip"
163
+ t.datetime "created_at", :null => false
164
+ t.datetime "updated_at", :null => false
165
+ t.string "time_zone"
166
+ end
167
+
168
+ add_index "spud_users", ["email"], :name => "index_spud_users_on_email"
169
+ add_index "spud_users", ["login"], :name => "index_spud_users_on_login"
170
+
171
+ end