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.
Files changed (65) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +40 -0
  4. data/app/controllers/pages_controller.rb +5 -0
  5. data/app/controllers/spud/admin/pages_controller.rb +4 -4
  6. data/app/helpers/spud/cms/application_helper.rb +23 -3
  7. data/app/models/page_sweeper.rb +18 -1
  8. data/app/models/spud_page.rb +45 -4
  9. data/app/views/pages/show.html.erb +3 -1
  10. data/config/routes.rb +5 -1
  11. data/db/migrate/20120101192412_create_spud_pages.rb +19 -0
  12. data/db/migrate/20120101193138_create_spud_menus.rb +10 -0
  13. data/db/migrate/20120101193255_create_spud_menu_items.rb +17 -0
  14. data/db/migrate/20120101194124_create_spud_templates.rb +11 -0
  15. data/db/migrate/20120103034659_create_spud_page_partials.rb +13 -0
  16. data/db/migrate/20120104194032_add_visibility_to_spud_pages.rb +6 -0
  17. data/db/migrate/20120107181337_add_menu_name_to_spud_menu_items.rb +5 -0
  18. data/db/migrate/20120111134754_add_use_custom_url_name_to_spud_pages.rb +5 -0
  19. data/db/migrate/20120118141852_add_notes_to_spud_pages.rb +5 -0
  20. data/db/migrate/20120126232428_add_menu_id_to_spud_menu_items.rb +7 -0
  21. data/db/migrate/20120128163601_add_classes_to_spud_menu_items.rb +6 -0
  22. data/lib/spud_cms/engine.rb +11 -1
  23. data/lib/spud_cms/page_route.rb +3 -0
  24. data/lib/spud_cms/version.rb +5 -0
  25. data/lib/spud_cms.rb +2 -1
  26. data/lib/tasks/spud_cms_tasks.rake +4 -0
  27. data/test/dummy/README.rdoc +261 -0
  28. data/test/dummy/Rakefile +7 -0
  29. data/test/dummy/app/assets/javascripts/application.js +15 -0
  30. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  31. data/test/dummy/app/controllers/application_controller.rb +3 -0
  32. data/test/dummy/app/helpers/application_helper.rb +2 -0
  33. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  34. data/{config → test/dummy/config}/application.rb +18 -7
  35. data/test/dummy/config/boot.rb +10 -0
  36. data/test/dummy/config/database.yml +15 -0
  37. data/test/dummy/config/environment.rb +5 -0
  38. data/test/dummy/config/environments/development.rb +37 -0
  39. data/test/dummy/config/environments/production.rb +67 -0
  40. data/test/dummy/config/environments/test.rb +37 -0
  41. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  42. data/test/dummy/config/initializers/inflections.rb +15 -0
  43. data/test/dummy/config/initializers/mime_types.rb +5 -0
  44. data/test/dummy/config/initializers/secret_token.rb +7 -0
  45. data/test/dummy/config/initializers/session_store.rb +8 -0
  46. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  47. data/test/dummy/config/locales/en.yml +5 -0
  48. data/test/dummy/config/routes.rb +3 -0
  49. data/test/dummy/config.ru +4 -0
  50. data/test/dummy/db/migrate/20120307002859_create_spud_admin_permissions.spud_core.rb +12 -0
  51. data/test/dummy/db/migrate/20120307002860_create_spud_users.spud_core.rb +30 -0
  52. data/test/dummy/db/migrate/20120307003559_create_spud_permalinks.spud_permalinks.rb +12 -0
  53. data/test/dummy/db/schema.rb +124 -0
  54. data/test/dummy/log/development.log +437 -0
  55. data/test/dummy/log/test.log +2280 -0
  56. data/test/dummy/public/404.html +26 -0
  57. data/test/dummy/public/422.html +26 -0
  58. data/test/dummy/public/500.html +25 -0
  59. data/test/dummy/public/favicon.ico +0 -0
  60. data/test/dummy/script/rails +6 -0
  61. data/test/integration/navigation_test.rb +10 -0
  62. data/test/spud_cms_test.rb +7 -0
  63. data/test/test_helper.rb +10 -0
  64. metadata +206 -18
  65. 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