spud_cms 0.4.8 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +40 -0
- data/app/controllers/pages_controller.rb +5 -0
- data/app/controllers/spud/admin/pages_controller.rb +4 -4
- data/app/helpers/spud/cms/application_helper.rb +23 -3
- data/app/models/page_sweeper.rb +18 -1
- data/app/models/spud_page.rb +45 -4
- data/app/views/pages/show.html.erb +3 -1
- data/config/routes.rb +5 -1
- data/db/migrate/20120101192412_create_spud_pages.rb +19 -0
- data/db/migrate/20120101193138_create_spud_menus.rb +10 -0
- data/db/migrate/20120101193255_create_spud_menu_items.rb +17 -0
- data/db/migrate/20120101194124_create_spud_templates.rb +11 -0
- data/db/migrate/20120103034659_create_spud_page_partials.rb +13 -0
- data/db/migrate/20120104194032_add_visibility_to_spud_pages.rb +6 -0
- data/db/migrate/20120107181337_add_menu_name_to_spud_menu_items.rb +5 -0
- data/db/migrate/20120111134754_add_use_custom_url_name_to_spud_pages.rb +5 -0
- data/db/migrate/20120118141852_add_notes_to_spud_pages.rb +5 -0
- data/db/migrate/20120126232428_add_menu_id_to_spud_menu_items.rb +7 -0
- data/db/migrate/20120128163601_add_classes_to_spud_menu_items.rb +6 -0
- data/lib/spud_cms/engine.rb +11 -1
- data/lib/spud_cms/page_route.rb +3 -0
- data/lib/spud_cms/version.rb +5 -0
- data/lib/spud_cms.rb +2 -1
- data/lib/tasks/spud_cms_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/{config → test/dummy/config}/application.rb +18 -7
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +15 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/migrate/20120307002859_create_spud_admin_permissions.spud_core.rb +12 -0
- data/test/dummy/db/migrate/20120307002860_create_spud_users.spud_core.rb +30 -0
- data/test/dummy/db/migrate/20120307003559_create_spud_permalinks.spud_permalinks.rb +12 -0
- data/test/dummy/db/schema.rb +124 -0
- data/test/dummy/log/development.log +437 -0
- data/test/dummy/log/test.log +2280 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/spud_cms_test.rb +7 -0
- data/test/test_helper.rb +10 -0
- metadata +206 -18
- data/README.markdown +0 -71
@@ -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,124 @@
|
|
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 => 20120307003559) 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
|
+
end
|
23
|
+
|
24
|
+
create_table "spud_menu_items", :force => true do |t|
|
25
|
+
t.string "parent_type"
|
26
|
+
t.integer "parent_id"
|
27
|
+
t.integer "item_type"
|
28
|
+
t.integer "spud_page_id"
|
29
|
+
t.integer "menu_order", :default => 0
|
30
|
+
t.string "url"
|
31
|
+
t.datetime "created_at", :null => false
|
32
|
+
t.datetime "updated_at", :null => false
|
33
|
+
t.string "name"
|
34
|
+
t.integer "spud_menu_id"
|
35
|
+
t.string "classes"
|
36
|
+
end
|
37
|
+
|
38
|
+
add_index "spud_menu_items", ["menu_order"], :name => "index_spud_menu_items_on_menu_order"
|
39
|
+
add_index "spud_menu_items", ["parent_type", "parent_id"], :name => "index_spud_menu_items_on_parent_type_and_parent_id"
|
40
|
+
add_index "spud_menu_items", ["spud_menu_id"], :name => "index_spud_menu_items_on_spud_menu_id"
|
41
|
+
|
42
|
+
create_table "spud_menus", :force => true do |t|
|
43
|
+
t.string "name"
|
44
|
+
t.text "description"
|
45
|
+
t.datetime "created_at", :null => false
|
46
|
+
t.datetime "updated_at", :null => false
|
47
|
+
end
|
48
|
+
|
49
|
+
create_table "spud_page_partials", :force => true do |t|
|
50
|
+
t.integer "spud_page_id"
|
51
|
+
t.string "name"
|
52
|
+
t.text "content"
|
53
|
+
t.string "format"
|
54
|
+
t.datetime "created_at", :null => false
|
55
|
+
t.datetime "updated_at", :null => false
|
56
|
+
end
|
57
|
+
|
58
|
+
add_index "spud_page_partials", ["spud_page_id"], :name => "index_spud_page_partials_on_spud_page_id"
|
59
|
+
|
60
|
+
create_table "spud_pages", :force => true do |t|
|
61
|
+
t.string "name"
|
62
|
+
t.string "url_name"
|
63
|
+
t.datetime "publish_at"
|
64
|
+
t.integer "created_by"
|
65
|
+
t.integer "updated_by"
|
66
|
+
t.string "format", :default => "html"
|
67
|
+
t.integer "spud_page_id"
|
68
|
+
t.text "meta_description"
|
69
|
+
t.string "meta_keywords"
|
70
|
+
t.integer "page_order"
|
71
|
+
t.integer "template_id"
|
72
|
+
t.datetime "created_at", :null => false
|
73
|
+
t.datetime "updated_at", :null => false
|
74
|
+
t.integer "visibility", :default => 0
|
75
|
+
t.boolean "published", :default => true
|
76
|
+
t.boolean "use_custom_url_name", :default => false
|
77
|
+
t.text "notes"
|
78
|
+
end
|
79
|
+
|
80
|
+
create_table "spud_permalinks", :force => true do |t|
|
81
|
+
t.string "url_name"
|
82
|
+
t.string "attachment_type"
|
83
|
+
t.integer "attachment_id"
|
84
|
+
t.datetime "created_at", :null => false
|
85
|
+
t.datetime "updated_at", :null => false
|
86
|
+
end
|
87
|
+
|
88
|
+
add_index "spud_permalinks", ["attachment_type", "attachment_id"], :name => "index_spud_permalinks_on_attachment_type_and_attachment_id"
|
89
|
+
|
90
|
+
create_table "spud_templates", :force => true do |t|
|
91
|
+
t.string "name"
|
92
|
+
t.string "base_layout"
|
93
|
+
t.text "content"
|
94
|
+
t.text "page_parts"
|
95
|
+
t.datetime "created_at", :null => false
|
96
|
+
t.datetime "updated_at", :null => false
|
97
|
+
end
|
98
|
+
|
99
|
+
create_table "spud_users", :force => true do |t|
|
100
|
+
t.string "first_name"
|
101
|
+
t.string "last_name"
|
102
|
+
t.boolean "super_admin"
|
103
|
+
t.string "login", :null => false
|
104
|
+
t.string "email", :null => false
|
105
|
+
t.string "crypted_password", :null => false
|
106
|
+
t.string "password_salt", :null => false
|
107
|
+
t.string "persistence_token", :null => false
|
108
|
+
t.string "single_access_token", :null => false
|
109
|
+
t.string "perishable_token", :null => false
|
110
|
+
t.integer "login_count", :default => 0, :null => false
|
111
|
+
t.integer "failed_login_count", :default => 0, :null => false
|
112
|
+
t.datetime "last_request_at"
|
113
|
+
t.datetime "current_login_at"
|
114
|
+
t.datetime "last_login_at"
|
115
|
+
t.string "current_login_ip"
|
116
|
+
t.string "last_login_ip"
|
117
|
+
t.datetime "created_at", :null => false
|
118
|
+
t.datetime "updated_at", :null => false
|
119
|
+
end
|
120
|
+
|
121
|
+
add_index "spud_users", ["email"], :name => "index_spud_users_on_email"
|
122
|
+
add_index "spud_users", ["login"], :name => "index_spud_users_on_login"
|
123
|
+
|
124
|
+
end
|