typo 5.4.4 → 5.5

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.
Files changed (292) hide show
  1. data/CHANGELOG +59 -28
  2. data/MAINTAINERS +9 -17
  3. data/README +28 -20
  4. data/UPGRADE +6 -2
  5. data/app/controllers/accounts_controller.rb +1 -1
  6. data/app/controllers/admin/content_controller.rb +1 -1
  7. data/app/controllers/admin/feedback_controller.rb +3 -3
  8. data/app/controllers/admin/pages_controller.rb +2 -0
  9. data/app/controllers/application_controller.rb +6 -1
  10. data/app/controllers/articles_controller.rb +13 -1
  11. data/app/helpers/application_helper.rb +5 -2
  12. data/app/helpers/authors_helper.rb +14 -3
  13. data/app/models/article.rb +6 -4
  14. data/app/models/blog.rb +0 -4
  15. data/app/models/blog_sweeper.rb +1 -1
  16. data/app/models/content.rb +10 -5
  17. data/app/models/page_cache.rb +6 -7
  18. data/app/models/user.rb +1 -0
  19. data/app/views/admin/content/_form.html.erb +13 -11
  20. data/app/views/admin/content/_images.html.erb +1 -1
  21. data/app/views/admin/content/_simple_editor.html.erb +1 -0
  22. data/app/views/admin/content/_visual_editor.html.erb +1 -0
  23. data/app/views/admin/dashboard/_overview.html.erb +7 -7
  24. data/app/views/admin/pages/_form.html.erb +1 -0
  25. data/app/views/admin/pages/_images.html.erb +18 -0
  26. data/app/views/admin/pages/_simple_editor.html.erb +1 -2
  27. data/app/views/admin/pages/_visual_editor.html.erb +2 -1
  28. data/app/views/admin/pages/index.html.erb +1 -1
  29. data/app/views/admin/settings/feedback.html.erb +2 -1
  30. data/app/views/admin/tags/edit.html.erb +1 -1
  31. data/app/views/articles/_article.html.erb +17 -13
  32. data/app/views/articles/_article_content.html.erb +1 -0
  33. data/app/views/articles/_comment_box.html.erb +1 -1
  34. data/app/views/articles/_password_form.html.erb +10 -0
  35. data/app/views/articles/groupings.html.erb +1 -1
  36. data/app/views/articles/index.html.erb +1 -2
  37. data/app/views/articles/read.html.erb +1 -4
  38. data/app/views/articles/search.html.erb +1 -1
  39. data/app/views/layouts/administration.html.erb +1 -1
  40. data/app/views/shared/_search.html.erb +1 -1
  41. data/config/ckeditor.yml +14 -0
  42. data/config/environment.rb +13 -25
  43. data/config/environments/test.rb +1 -3
  44. data/config/filemanager.yml +16 -0
  45. data/config/initializers/access_rules.rb +5 -0
  46. data/config/routes.rb +5 -1
  47. data/db/migrate/004_add_sidebars.rb +3 -9
  48. data/db/migrate/089_drop_cache_information_table.rb +31 -0
  49. data/db/migrate/090_remove_keywords_from_posts.rb +9 -0
  50. data/db/migrate/091_adds_password_protection_to_posts.rb +9 -0
  51. data/doc/CACHE.SETUP.README +36 -0
  52. data/lang/de_DE.rb +6 -1
  53. data/lang/pl_PL.rb +221 -89
  54. data/lib/filemanager.rb +53 -0
  55. data/lib/filemanager/controller.rb +217 -0
  56. data/lib/i18n_interpolation_deprecation.rb +26 -0
  57. data/lib/rails_patch/active_support.rb +4 -0
  58. data/lib/tasks/release.rake +4 -131
  59. data/lib/typo_version.rb +1 -1
  60. data/public/.htaccess +6 -5
  61. data/public/filemanager/images/avi.gif +0 -0
  62. data/public/filemanager/images/box.gif +0 -0
  63. data/public/filemanager/images/bullet.gif +0 -0
  64. data/public/filemanager/images/close.gif +0 -0
  65. data/public/filemanager/images/closelabel.gif +0 -0
  66. data/public/filemanager/images/doc.gif +0 -0
  67. data/public/filemanager/images/donate-button.gif +0 -0
  68. data/public/filemanager/images/download-icon.gif +0 -0
  69. data/public/filemanager/images/folder.gif +0 -0
  70. data/public/filemanager/images/gif.gif +0 -0
  71. data/public/filemanager/images/htm.gif +0 -0
  72. data/public/filemanager/images/html.gif +0 -0
  73. data/public/filemanager/images/image-1.jpg +0 -0
  74. data/public/filemanager/images/image.gif +0 -0
  75. data/public/filemanager/images/jpg.gif +0 -0
  76. data/public/filemanager/images/loading.gif +0 -0
  77. data/public/filemanager/images/mov.gif +0 -0
  78. data/public/filemanager/images/nextlabel.gif +0 -0
  79. data/public/filemanager/images/pdf.gif +0 -0
  80. data/public/filemanager/images/png.gif +0 -0
  81. data/public/filemanager/images/ppt.gif +0 -0
  82. data/public/filemanager/images/prevlabel.gif +0 -0
  83. data/public/filemanager/images/rar.gif +0 -0
  84. data/public/filemanager/images/rm.gif +0 -0
  85. data/public/filemanager/images/rmvb.gif +0 -0
  86. data/public/filemanager/images/separator.gif +0 -0
  87. data/public/filemanager/images/spacer.gif +0 -0
  88. data/public/filemanager/images/swf.gif +0 -0
  89. data/public/filemanager/images/thumb-1.jpg +0 -0
  90. data/public/filemanager/images/tool_copy.gif +0 -0
  91. data/public/filemanager/images/tool_cut.gif +0 -0
  92. data/public/filemanager/images/tool_del.gif +0 -0
  93. data/public/filemanager/images/tool_folder.gif +0 -0
  94. data/public/filemanager/images/tool_imagemanager.gif +0 -0
  95. data/public/filemanager/images/tool_new.gif +0 -0
  96. data/public/filemanager/images/tool_paste.gif +0 -0
  97. data/public/filemanager/images/tool_props.gif +0 -0
  98. data/public/filemanager/images/tool_refresh.gif +0 -0
  99. data/public/filemanager/images/tool_unzip.gif +0 -0
  100. data/public/filemanager/images/tool_upload.gif +0 -0
  101. data/public/filemanager/images/tool_zip.gif +0 -0
  102. data/public/filemanager/images/txt.gif +0 -0
  103. data/public/filemanager/images/unknown.gif +0 -0
  104. data/public/filemanager/images/wmv.gif +0 -0
  105. data/public/filemanager/images/xls.gif +0 -0
  106. data/public/filemanager/images/zip.gif +0 -0
  107. data/public/filemanager/javascripts/filemanager.js +6 -0
  108. data/public/filemanager/javascripts/lang/en.js +31 -0
  109. data/public/filemanager/javascripts/lang/zh_CN.js +31 -0
  110. data/public/filemanager/javascripts/lightbox.js +497 -0
  111. data/public/filemanager/javascripts/translate.js +42 -0
  112. data/public/filemanager/resources/resources.txt +1 -0
  113. data/public/filemanager/stylesheets/filelist.css +147 -0
  114. data/public/filemanager/stylesheets/general.css +135 -0
  115. data/public/filemanager/stylesheets/lightbox.css +27 -0
  116. data/public/javascripts/prototype_ext.js +117 -0
  117. data/public/stylesheets/administration.css +19 -2
  118. data/themes/dirtylicious/views/articles/_article.html.erb +16 -12
  119. data/themes/dirtylicious/views/articles/_article_content.html.erb +1 -0
  120. data/themes/dirtylicious/views/articles/_password_form.html.erb +10 -0
  121. data/themes/scribbish/views/articles/_article.html.erb +18 -14
  122. data/themes/scribbish/views/articles/_article_content.html.erb +1 -0
  123. data/themes/scribbish/views/articles/_password_form.html.erb +10 -0
  124. data/themes/standard_issue/views/articles/_article.html.erb +16 -12
  125. data/themes/standard_issue/views/articles/_article_content.html.erb +1 -0
  126. data/themes/standard_issue/views/articles/_password_form.html.erb +10 -0
  127. data/themes/true-blue-3/helpers/theme_helper.rb +2 -2
  128. data/themes/true-blue-3/images/submit_form.jpg +0 -0
  129. data/themes/true-blue-3/stylesheets/style.css +27 -3
  130. data/themes/true-blue-3/views/articles/_article.html.erb +13 -8
  131. data/themes/true-blue-3/views/articles/_article_content.html.erb +1 -0
  132. data/themes/true-blue-3/views/articles/_comment_form.html.erb +1 -1
  133. data/themes/true-blue-3/views/articles/_password_form.html.erb +10 -0
  134. data/themes/true-blue-3/views/categories/_article.html.erb +5 -0
  135. data/themes/true-blue-3/views/tags/_article.html.erb +4 -0
  136. data/themes/typographic/views/articles/_article.html.erb +16 -12
  137. data/themes/typographic/views/articles/_article_content.html.erb +1 -0
  138. data/themes/typographic/views/articles/_password_form.html.erb +10 -0
  139. data/vendor/plugins/easy-ckeditor/app/controllers/ckeditor_controller.rb +2 -1
  140. data/vendor/plugins/easy-ckeditor/lib/ckeditor.rb +1 -20
  141. data/vendor/plugins/easy-ckeditor/{tasks → lib/tasks}/ckeditor_tasks.rake +0 -0
  142. data/vendor/plugins/filemanager/app/controllers/fm/filemanager_controller.rb +22 -0
  143. data/vendor/plugins/filemanager/app/views/fm/filemanager/index.html.erb +512 -0
  144. data/vendor/plugins/filemanager/app/views/fm/filemanager/view.html.erb +67 -0
  145. data/vendor/plugins/filemanager/filemanager.yml +16 -0
  146. data/vendor/plugins/static_sidebar/lib/static_sidebar.rb +4 -2
  147. data/vendor/plugins/typo_converter/{tasks → lib/tasks}/typo_converters_tasks.rake +0 -0
  148. data/vendor/plugins/typo_login_system/lib/access_control.rb +24 -1
  149. data/vendor/plugins/typo_textfilter_code/{tasks → lib/tasks}/typo_textfilter_code_tasks.rake +0 -0
  150. data/vendor/plugins/typo_textfilter_code/lib/typo_textfilter_code.rb +4 -3
  151. data/vendor/plugins/typo_textfilter_flickr/{tasks → lib/tasks}/typo_textfilter_flickr_tasks.rake +0 -0
  152. data/vendor/plugins/typo_textfilter_htmlfilter/{tasks → lib/tasks}/typo_textfilter_htmlfilter_tasks.rake +0 -0
  153. data/vendor/plugins/typo_textfilter_lightbox/{tasks → lib/tasks}/typo_textfilter_lightbox_tasks.rake +0 -0
  154. data/vendor/plugins/typo_textfilter_markdown/{tasks → lib/tasks}/typo_textfilter_markdown_tasks.rake +0 -0
  155. data/vendor/plugins/typo_textfilter_none/{tasks → lib/tasks}/typo_textfilter_none_tasks.rake +0 -0
  156. data/vendor/plugins/typo_textfilter_smartypants/{tasks → lib/tasks}/typo_textfilter_smartypants_tasks.rake +0 -0
  157. data/vendor/plugins/typo_textfilter_textile/{tasks → lib/tasks}/typo_textfilter_textile_tasks.rake +0 -0
  158. data/vendor/plugins/typo_textfilter_textile_and_markdown/{tasks → lib/tasks}/typo_textfilter_textile_and_markdown_tasks.rake +0 -0
  159. data/vendor/plugins/xml_sidebar/views/content.rhtml +1 -1
  160. metadata +190 -195
  161. data/app/controllers/admin/cache_controller.rb +0 -9
  162. data/app/models/cache_information.rb +0 -19
  163. data/db/schema.rb +0 -242
  164. data/doc/test_themes.rb +0 -50
  165. data/public/javascripts/ckeditor/config.js +0 -27
  166. data/spec/controllers/accounts_controller_spec.rb +0 -414
  167. data/spec/controllers/admin/cache_controller_spec.rb +0 -18
  168. data/spec/controllers/admin/categories_controller_spec.rb +0 -73
  169. data/spec/controllers/admin/content_controller_spec.rb +0 -443
  170. data/spec/controllers/admin/dashboard_controller_spec.rb +0 -13
  171. data/spec/controllers/admin/feedback_controller_spec.rb +0 -308
  172. data/spec/controllers/admin/pages_controller_spec.rb +0 -80
  173. data/spec/controllers/admin/profiles_controller_spec.rb +0 -22
  174. data/spec/controllers/admin/resources_controller_spec.rb +0 -53
  175. data/spec/controllers/admin/settings_controller_spec.rb +0 -80
  176. data/spec/controllers/admin/tags_controller_spec.rb +0 -64
  177. data/spec/controllers/admin/textfilters_controller_spec.rb +0 -20
  178. data/spec/controllers/admin/themes_controller_spec.rb +0 -30
  179. data/spec/controllers/admin/users_controller_spec.rb +0 -109
  180. data/spec/controllers/application_controller_spec.rb +0 -18
  181. data/spec/controllers/articles_controller_spec.rb +0 -440
  182. data/spec/controllers/authors_controller_spec.rb +0 -42
  183. data/spec/controllers/backend_controller_spec.rb +0 -337
  184. data/spec/controllers/categories_controller_spec.rb +0 -117
  185. data/spec/controllers/comments_controller_spec.rb +0 -137
  186. data/spec/controllers/routes/articles_routing_spec.rb +0 -31
  187. data/spec/controllers/routes/xml_routing_spec.rb +0 -71
  188. data/spec/controllers/setup_controller_spec.rb +0 -24
  189. data/spec/controllers/tags_controller_spec.rb +0 -147
  190. data/spec/controllers/textfilter_controller_spec.rb +0 -192
  191. data/spec/controllers/theme_controller_spec.rb +0 -39
  192. data/spec/controllers/xml_controller_spec.rb +0 -185
  193. data/spec/factories.rb +0 -69
  194. data/spec/helpers/application_helper_spec.rb +0 -25
  195. data/spec/helpers/content_helper_spec.rb +0 -28
  196. data/spec/lib/text_filter_plugin_spec.rb +0 -15
  197. data/spec/models/amazon_sidebar_spec.rb +0 -40
  198. data/spec/models/article_closing_spec.rb +0 -42
  199. data/spec/models/article_spec.rb +0 -515
  200. data/spec/models/blog_spec.rb +0 -116
  201. data/spec/models/cache_information_spec.rb +0 -42
  202. data/spec/models/cache_support_spec.rb +0 -51
  203. data/spec/models/category_spec.rb +0 -44
  204. data/spec/models/comment_spec.rb +0 -240
  205. data/spec/models/configuration_spec.rb +0 -91
  206. data/spec/models/content_state/feedback_states_spec.rb +0 -64
  207. data/spec/models/notification_spec.rb +0 -8
  208. data/spec/models/page_cache_spec.rb +0 -30
  209. data/spec/models/page_spec.rb +0 -91
  210. data/spec/models/ping_pinger_spec.rb +0 -33
  211. data/spec/models/ping_spec.rb +0 -154
  212. data/spec/models/redirect_spec.rb +0 -17
  213. data/spec/models/resource_spec.rb +0 -39
  214. data/spec/models/route_cache_spec.rb +0 -11
  215. data/spec/models/sidebar_spec.rb +0 -7
  216. data/spec/models/static_sidebar_spec.rb +0 -17
  217. data/spec/models/tag_spec.rb +0 -65
  218. data/spec/models/text_filter_spec.rb +0 -34
  219. data/spec/models/theme_spec.rb +0 -45
  220. data/spec/models/trackback_spec.rb +0 -60
  221. data/spec/models/trigger_spec.rb +0 -40
  222. data/spec/models/user_spec.rb +0 -198
  223. data/spec/rcov.opts +0 -2
  224. data/spec/spec.opts +0 -4
  225. data/spec/spec_helper.rb +0 -133
  226. data/spec/views/articles/index_spec.rb +0 -63
  227. data/spec/views/articles/read_spec.rb +0 -67
  228. data/spec/views/comments/html_sanitization_spec.rb +0 -119
  229. data/test/fixtures/blogs.yml +0 -27
  230. data/test/fixtures/categories.yml +0 -29
  231. data/test/fixtures/categorizations.yml +0 -31
  232. data/test/fixtures/contents.yml +0 -231
  233. data/test/fixtures/feedback.yml +0 -180
  234. data/test/fixtures/notification_mailer/article +0 -3
  235. data/test/fixtures/notification_mailer/comment +0 -3
  236. data/test/fixtures/notification_mailer/trackback +0 -3
  237. data/test/fixtures/notifications.yml +0 -0
  238. data/test/fixtures/page_caches.yml +0 -7
  239. data/test/fixtures/profiles.yml +0 -27
  240. data/test/fixtures/redirects.yml +0 -10
  241. data/test/fixtures/resources.yml +0 -21
  242. data/test/fixtures/sidebars.yml +0 -10
  243. data/test/fixtures/tags.yml +0 -10
  244. data/test/fixtures/text_filters.yml +0 -37
  245. data/test/fixtures/triggers.yml +0 -1
  246. data/test/fixtures/users.yml +0 -101
  247. data/test/mocks/test/dns_mock.rb +0 -13
  248. data/test/mocks/test/flickr_mock.rb +0 -30
  249. data/test/mocks/test/http_mock.rb +0 -39
  250. data/test/mocks/test/theme_mock.rb +0 -5
  251. data/test/mocks/test/xmlrpc_mock.rb +0 -28
  252. data/test/mocks/themes/123-numbers-in-path/about.markdown +0 -0
  253. data/test/mocks/themes/CamelCaseDirectory/about.markdown +0 -0
  254. data/test/mocks/themes/i-have-special-chars/about.markdown +0 -0
  255. data/test/mocks/themes/typographic/about.markdown +0 -7
  256. data/test/mocks/themes/typographic/images/Thumbs.db +0 -0
  257. data/test/mocks/themes/typographic/images/accept.png +0 -0
  258. data/test/mocks/themes/typographic/images/accept50.png +0 -0
  259. data/test/mocks/themes/typographic/images/bg_body.jpg +0 -0
  260. data/test/mocks/themes/typographic/images/bg_white.png +0 -0
  261. data/test/mocks/themes/typographic/images/bg_wrapper.jpg +0 -0
  262. data/test/mocks/themes/typographic/images/bullet_bottom.png +0 -0
  263. data/test/mocks/themes/typographic/images/bullet_right.png +0 -0
  264. data/test/mocks/themes/typographic/images/email_open.png +0 -0
  265. data/test/mocks/themes/typographic/images/email_open50.png +0 -0
  266. data/test/mocks/themes/typographic/images/meta.png +0 -0
  267. data/test/mocks/themes/typographic/images/page_edit.png +0 -0
  268. data/test/mocks/themes/typographic/images/page_edit50.png +0 -0
  269. data/test/mocks/themes/typographic/images/tag.png +0 -0
  270. data/test/mocks/themes/typographic/images/user.png +0 -0
  271. data/test/mocks/themes/typographic/images/user50.png +0 -0
  272. data/test/mocks/themes/typographic/images/world_link.png +0 -0
  273. data/test/mocks/themes/typographic/images/world_link50.png +0 -0
  274. data/test/mocks/themes/typographic/layouts/default.html.erb +0 -42
  275. data/test/mocks/themes/typographic/preview.png +0 -0
  276. data/test/mocks/themes/typographic/stylesheets/colors.css +0 -51
  277. data/test/mocks/themes/typographic/stylesheets/layout.css +0 -346
  278. data/test/mocks/themes/typographic/stylesheets/reset.css +0 -5
  279. data/test/mocks/themes/typographic/stylesheets/style.css +0 -36
  280. data/test/mocks/themes/typographic/views/articles/_article.html.erb +0 -41
  281. data/test/mocks/themes/typographic/views/articles/_comment.html.erb +0 -14
  282. data/test/mocks/themes/typographic/views/articles/_comment_form.html.erb +0 -48
  283. data/test/mocks/themes/typographic/views/articles/_comment_list.html.erb +0 -7
  284. data/test/mocks/themes/typographic/views/articles/_trackback.html.erb +0 -9
  285. data/test/mocks/themes/typographic/views/articles/comment_preview.html.erb +0 -10
  286. data/test/mocks/themes/typographic/views/articles/index.html.erb +0 -5
  287. data/test/mocks/themes/typographic/views/articles/read.html.erb +0 -42
  288. data/test/mocks/themes/typographic/views/shared/_search.html.erb +0 -17
  289. data/test/mocks/themes/typographic/views/theme/static_view_test.html.erb +0 -1
  290. data/test/test_helper.rb +0 -13
  291. data/themes/true-blue-3/images/frederic-de-villamil.jpg +0 -0
  292. data/themes/true-blue-3/images/textarea_bg.jpg +0 -0
@@ -1,9 +0,0 @@
1
- class Admin::CacheController < Admin::BaseController
2
-
3
- def sweep_html
4
- sweep_cache
5
- flash[:notice] = _('HTML was cleared')
6
- redirect_to :controller => '/admin/settings'
7
- end
8
-
9
- end
@@ -1,19 +0,0 @@
1
- class CacheInformation < ActiveRecord::Base
2
- validates_presence_of :path
3
- validates_uniqueness_of :path
4
-
5
- before_destroy :delete_path_in_page_cache_directory
6
-
7
- def delete_path_in_page_cache_directory
8
- if File.exist? path_in_page_cache_directory
9
- FileUtils.rm(path_in_page_cache_directory)
10
- else
11
- Rails.logger.warn("path : #{path} no more exist")
12
- end
13
- end
14
-
15
- def path_in_page_cache_directory
16
- File.join(ActionController::Base.page_cache_directory, path)
17
- end
18
-
19
- end
@@ -1,242 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead of editing this file,
2
- # please use the migrations feature of Active Record to incrementally modify your database, and
3
- # then regenerate this schema definition.
4
- #
5
- # Note that this schema.rb definition is the authoritative source for your database schema. If you need
6
- # to create the application database on another system, you should be using db:schema:load, not running
7
- # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
8
- # you'll amass, the slower it'll run and the greater likelihood for issues).
9
- #
10
- # It's strongly recommended to check this file into your version control system.
11
-
12
- ActiveRecord::Schema.define(:version => 88) do
13
-
14
- create_table "articles_tags", :id => false, :force => true do |t|
15
- t.integer "article_id"
16
- t.integer "tag_id"
17
- end
18
-
19
- create_table "blogs", :force => true do |t|
20
- t.text "settings"
21
- t.string "base_url"
22
- end
23
-
24
- create_table "cache_informations", :force => true do |t|
25
- t.string "path"
26
- t.datetime "created_at"
27
- t.datetime "updated_at"
28
- end
29
-
30
- add_index "cache_informations", ["path"], :name => "index_cache_informations_on_path"
31
-
32
- create_table "categories", :force => true do |t|
33
- t.string "name"
34
- t.integer "position", :default => 0, :null => false
35
- t.string "permalink"
36
- t.text "keywords"
37
- t.text "description"
38
- t.integer "parent_id"
39
- end
40
-
41
- add_index "categories", ["permalink"], :name => "categories_permalink_index"
42
-
43
- create_table "categorizations", :force => true do |t|
44
- t.integer "article_id"
45
- t.integer "category_id"
46
- t.boolean "is_primary"
47
- end
48
-
49
- create_table "contents", :force => true do |t|
50
- t.string "type"
51
- t.string "title"
52
- t.string "author"
53
- t.text "body"
54
- t.text "extended"
55
- t.text "excerpt"
56
- t.string "keywords"
57
- t.datetime "created_at"
58
- t.datetime "updated_at"
59
- t.integer "user_id"
60
- t.string "permalink"
61
- t.string "guid"
62
- t.integer "text_filter_id"
63
- t.text "whiteboard"
64
- t.string "name"
65
- t.boolean "published", :default => false
66
- t.boolean "allow_pings"
67
- t.boolean "allow_comments"
68
- t.datetime "published_at"
69
- t.string "state"
70
- t.integer "parent_id"
71
- end
72
-
73
- add_index "contents", ["published"], :name => "contents_published_index"
74
- add_index "contents", ["text_filter_id"], :name => "contents_text_filter_id_index"
75
-
76
- create_table "feedback", :force => true do |t|
77
- t.string "type"
78
- t.string "title"
79
- t.string "author"
80
- t.text "body"
81
- t.text "excerpt"
82
- t.datetime "created_at"
83
- t.datetime "updated_at"
84
- t.integer "user_id"
85
- t.string "guid"
86
- t.integer "text_filter_id"
87
- t.text "whiteboard"
88
- t.integer "article_id"
89
- t.string "email"
90
- t.string "url"
91
- t.string "ip", :limit => 40
92
- t.string "blog_name"
93
- t.boolean "published", :default => false
94
- t.datetime "published_at"
95
- t.string "state"
96
- t.boolean "status_confirmed"
97
- end
98
-
99
- add_index "feedback", ["article_id"], :name => "feedback_article_id_index"
100
- add_index "feedback", ["text_filter_id"], :name => "feedback_text_filter_id_index"
101
-
102
- create_table "notifications", :force => true do |t|
103
- t.integer "content_id"
104
- t.integer "user_id"
105
- t.datetime "created_at"
106
- t.datetime "updated_at"
107
- end
108
-
109
- create_table "page_caches", :force => true do |t|
110
- t.string "name", :null => false
111
- end
112
-
113
- add_index "page_caches", ["name"], :name => "name"
114
-
115
- create_table "pings", :force => true do |t|
116
- t.integer "article_id"
117
- t.string "url"
118
- t.datetime "created_at"
119
- end
120
-
121
- add_index "pings", ["article_id"], :name => "article_id"
122
-
123
- create_table "profiles", :force => true do |t|
124
- t.string "label"
125
- t.string "nicename"
126
- t.text "modules"
127
- end
128
-
129
- create_table "profiles_rights", :force => true do |t|
130
- t.integer "profile_id"
131
- t.integer "right_id"
132
- end
133
-
134
- create_table "redirects", :force => true do |t|
135
- t.string "from_path"
136
- t.string "to_path"
137
- end
138
-
139
- create_table "resources", :force => true do |t|
140
- t.integer "size"
141
- t.string "filename"
142
- t.string "mime"
143
- t.datetime "created_at"
144
- t.datetime "updated_at"
145
- t.integer "article_id"
146
- t.boolean "itunes_metadata"
147
- t.string "itunes_author"
148
- t.string "itunes_subtitle"
149
- t.integer "itunes_duration"
150
- t.text "itunes_summary"
151
- t.string "itunes_keywords"
152
- t.string "itunes_category"
153
- t.boolean "itunes_explicit"
154
- end
155
-
156
- create_table "rights", :force => true do |t|
157
- t.string "name"
158
- t.string "description"
159
- end
160
-
161
- create_table "sidebars", :force => true do |t|
162
- t.integer "active_position"
163
- t.text "config"
164
- t.integer "staged_position"
165
- t.datetime "updated_at"
166
- t.string "type"
167
- end
168
-
169
- create_table "sitealizer", :force => true do |t|
170
- t.string "path"
171
- t.string "ip"
172
- t.string "referer"
173
- t.string "language"
174
- t.string "user_agent"
175
- t.datetime "created_at"
176
- t.date "created_on"
177
- end
178
-
179
- create_table "tags", :force => true do |t|
180
- t.string "name"
181
- t.datetime "created_at"
182
- t.datetime "updated_at"
183
- t.string "display_name"
184
- end
185
-
186
- create_table "text_filters", :force => true do |t|
187
- t.string "name"
188
- t.string "description"
189
- t.string "markup"
190
- t.text "filters"
191
- t.text "params"
192
- end
193
-
194
- create_table "text_link_ads_rss", :force => true do |t|
195
- t.string "html", :limit => 1024
196
- t.integer "post_id"
197
- end
198
-
199
- create_table "triggers", :force => true do |t|
200
- t.integer "pending_item_id"
201
- t.string "pending_item_type"
202
- t.datetime "due_at"
203
- t.string "trigger_method"
204
- end
205
-
206
- create_table "users", :force => true do |t|
207
- t.string "login", :limit => 80
208
- t.string "password", :limit => 40
209
- t.string "name", :limit => 80
210
- t.string "email", :limit => 80
211
- t.boolean "notify_via_email"
212
- t.boolean "notify_on_new_articles"
213
- t.boolean "notify_on_comments"
214
- t.boolean "notify_watch_my_articles"
215
- t.string "jabber"
216
- t.integer "profile_id"
217
- t.string "remember_token"
218
- t.datetime "remember_token_expires_at"
219
- t.string "text_filter_id", :default => "1"
220
- t.string "editor", :default => "simple"
221
- t.string "state", :default => "active"
222
- t.string "firstname"
223
- t.string "lastname"
224
- t.string "nickname"
225
- t.string "url"
226
- t.string "msn"
227
- t.string "aim"
228
- t.string "yahoo"
229
- t.string "twitter"
230
- t.text "description"
231
- t.boolean "show_url"
232
- t.boolean "show_msn"
233
- t.boolean "show_aim"
234
- t.boolean "show_yahoo"
235
- t.boolean "show_twitter"
236
- t.boolean "show_jabber"
237
- t.datetime "last_connection"
238
- end
239
-
240
- add_index "users", ["login"], :name => "login", :unique => true
241
-
242
- end
@@ -1,50 +0,0 @@
1
- require 'rubygems'
2
- require 'watir'
3
- require "test/unit"
4
- require 'watir/ie'
5
-
6
- @browser = Watir::IE.new
7
- @browser.speed = :slow
8
-
9
- TYPO_TEST="http://localhost:3000"
10
- LOGIN="admin"
11
- PASSWORD="admin"
12
- TEXT="My Shiny Weblog!"
13
-
14
- @browser.goto("#{TYPO_TEST}/admin")
15
- Watir::Waiter.wait_until{ @browser.button(:id, 'submit').exists? }
16
-
17
- @browser.text_field(:id, 'user_login').set(LOGIN)
18
- @browser.text_field(:id, 'user_password').set(PASSWORD)
19
- @browser.button(:id, 'submit').click
20
-
21
- Watir::Waiter.wait_until{ @browser.div(:id, 'footer').exists? }
22
-
23
- @browser.goto("#{TYPO_TEST}/admin/themes")
24
- Watir::Waiter.wait_until{ @browser.div(:id, 'footer').exists? }
25
-
26
- links = []
27
- @browser.divs(:class, /theme/).each do |div|
28
- links << div.link(:index, 1).href
29
- end
30
-
31
- links.each do |link|
32
- @browser.goto(link)
33
- Watir::Waiter.wait_until{ @browser.div(:id, 'footer').exists? }
34
-
35
- @browser.goto(TYPO_TEST)
36
- Watir::Waiter.wait_until{ @browser.text.downcase.include?("my shiny weblog") }
37
-
38
- @browser.goto("#{TYPO_TEST}/2009/12/13/hello-world")
39
- Watir::Waiter.wait_until{ @browser.text.downcase.include?("my shiny weblog") }
40
-
41
- @browser.goto("#{TYPO_TEST}/pages/about")
42
- Watir::Waiter.wait_until{ @browser.text.downcase.include?("my shiny weblog") }
43
-
44
- @browser.goto("#{TYPO_TEST}/tag/default")
45
- Watir::Waiter.wait_until{ @browser.text.downcase.include?("my shiny weblog") }
46
-
47
- @browser.goto("#{TYPO_TEST}/category/default")
48
- Watir::Waiter.wait_until{ @browser.text.downcase.include?("my shiny weblog") }
49
-
50
- end
@@ -1,27 +0,0 @@
1
- /*
2
- Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.html or http://ckeditor.com/license
4
- */
5
-
6
- CKEDITOR.editorConfig = function( config )
7
- {
8
- config.PreserveSessionOnFileBrowser = true;
9
- // Define changes to default configuration here. For example:
10
- //config.language = '';
11
- config.uiColor = '#E0ECFF';
12
- config.toolbar = 'Basic';
13
- config.entities_greek = false;
14
- config.entities_latin = false;
15
- config.entities_processNumerical = false;
16
- config.toolbar_Basic =
17
- [
18
- ['Format', '-', 'Bold', 'Italic'],
19
- ['NumberedList','BulletedList'],
20
- ['Outdent', 'Indent'],
21
- ['Image', 'Flash', '-', 'Link'],
22
- ['Maximize'],
23
- ['Table'],
24
- ['PageBreak'],
25
- ['Source']
26
- ];
27
- }
@@ -1,414 +0,0 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
2
-
3
- describe AccountsController do
4
- before(:each) do
5
- User.salt = 'change-me'
6
- end
7
-
8
- describe "A successful login with 'Remember me' checked" do
9
- def make_request
10
- post 'login', {:user => {:login => 'bob', :password => 'test'},
11
- :remember_me => '1'}
12
- end
13
-
14
- it 'should not cause password to change' do
15
- User.authenticate('bob', 'test').should == users(:bob)
16
- make_request
17
- request.session[:user_id].should == users(:bob).id
18
- User.authenticate('bob', 'test').should == users(:bob)
19
- end
20
- end
21
- end
22
-
23
- describe 'A successfully authenticated login' do
24
- controller_name :accounts
25
-
26
- before(:each) do
27
- User.stub!(:salt).and_return('change-me')
28
- end
29
-
30
- def make_request
31
- post 'login', {:user => {:login => 'bob', :password => 'test'}}
32
- end
33
-
34
- it 'session gets a user' do
35
- make_request
36
- request.session[:user_id].should == users(:bob).id
37
- end
38
-
39
- it 'sets typo_user_profile cookie' do
40
- make_request
41
- cookies[:typo_user_profile].should == 'admin'
42
- end
43
-
44
- it 'redirects to /bogus/location' do
45
- request.session[:return_to] = '/bogus/location'
46
- make_request
47
- response.should redirect_to('/bogus/location')
48
- end
49
-
50
- it 'redirects to /admin if no return' do
51
- make_request
52
- response.should redirect_to(:controller => 'admin')
53
- end
54
-
55
- it 'redirects to /admin if no return and your are logged' do
56
- session[:user_id] = session[:user] = users(:bob).id
57
- make_request
58
- response.should redirect_to(:controller => 'admin')
59
- end
60
-
61
- it "should redirect to signup if no users" do
62
- User.stub!(:count).and_return(0)
63
- make_request
64
- response.should redirect_to('/accounts/signup')
65
- end
66
- end
67
-
68
- describe 'User is inactive' do
69
- controller_name :accounts
70
-
71
- before(:each) do
72
- User.stub!(:authenticate).and_return(nil)
73
- User.stub!(:count).and_return(1)
74
- end
75
-
76
- def make_request
77
- post 'login', {:user => {:login => 'inactive', :password => 'longtest'}}
78
- end
79
-
80
- it 'no user id goes in the session' do
81
- make_request
82
- response.session[:user_id].should be_nil
83
- end
84
-
85
- it 'login should == "inactive"' do
86
- make_request
87
- assigns[:login].should == 'inactive'
88
- end
89
-
90
- it 'typo_user_profile cookie should be blank' do
91
- make_request
92
- cookies[:typo_user_profile].should be_blank
93
- end
94
-
95
- it 'should render login action' do
96
- make_request
97
- response.should render_template(:login)
98
- end
99
-
100
- end
101
-
102
- describe 'Login with nil user and password' do
103
- controller_name :accounts
104
-
105
- before(:each) do
106
- User.stub!(:count).and_return(1)
107
- end
108
-
109
- def make_request
110
- post 'login', {:user => {:login => nil, :password => nil}}
111
- end
112
-
113
- it 'should render login action' do
114
- make_request
115
- response.should render_template(:login)
116
- end
117
- end
118
-
119
- describe 'Login gets the wrong password' do
120
- controller_name :accounts
121
-
122
- before(:each) do
123
- User.stub!(:authenticate).and_return(nil)
124
- User.stub!(:count).and_return(1)
125
- end
126
-
127
- def make_request
128
- post 'login', {:user => {:login => 'bob', :password => 'test'}}
129
- end
130
-
131
- it 'no user in goes in the session' do
132
- make_request
133
- response.session[:user_id].should be_nil
134
- end
135
-
136
- it 'login should == "bob"' do
137
- make_request
138
- assigns[:login].should == 'bob'
139
- end
140
-
141
- it 'typo_user_profile cookie should be blank' do
142
- make_request
143
- cookies[:typo_user_profile].should be_blank
144
- end
145
-
146
- it 'should render login action' do
147
- make_request
148
- response.should render_template(:login)
149
- end
150
- end
151
-
152
- describe 'GET /login' do
153
- controller_name :accounts
154
-
155
- before(:each) do
156
- User.stub!(:count).and_return(1)
157
- end
158
-
159
- it 'should render action :login' do
160
- get 'login'
161
- response.should render_template(:login)
162
- assigns[:login].should be_nil
163
- end
164
- end
165
-
166
- describe 'GET /login with 0 existing users' do
167
- controller_name :accounts
168
-
169
- before(:each) do
170
- User.stub!(:count).and_return(0)
171
- end
172
-
173
- it 'should render action :signup' do
174
- get 'login'
175
- response.should redirect_to(:action => 'signup')
176
- assigns[:login].should be_nil
177
- end
178
-
179
- it 'should render :signup' do
180
- get 'recover_password'
181
-
182
- response.should redirect_to(:action => 'signup')
183
- end
184
- end
185
-
186
- describe 'GET signup and >0 existing user' do
187
- controller_name :accounts
188
-
189
- before(:each) do
190
- User.stub!(:count).and_return(1)
191
- end
192
-
193
- it 'should redirect to login' do
194
- get 'signup'
195
- response.should redirect_to(:action => 'login')
196
- end
197
- end
198
-
199
- describe 'POST signup and >0 existing user' do
200
- controller_name :accounts
201
-
202
- before(:each) do
203
- User.stub!(:count).and_return(1)
204
- end
205
-
206
- it 'should redirect to login' do
207
- post 'signup', params
208
- response.should redirect_to(:action => 'login')
209
- end
210
-
211
- def params
212
- {'user' => {'login' => 'newbob'}}
213
- end
214
- end
215
-
216
- describe 'GET signup with 0 existing users' do
217
- controller_name :accounts
218
-
219
- before(:each) do
220
- User.stub!(:count).and_return(0)
221
- @user = mock("user")
222
- @user.stub!(:reload).and_return(@user)
223
- User.stub!(:new).and_return(@user)
224
- end
225
-
226
- it 'sets @user' do
227
- get 'signup'
228
- assigns[:user].should == @user
229
- end
230
-
231
- it 'renders action signup' do
232
- get 'signup'
233
- response.should render_template(:signup)
234
- end
235
- end
236
-
237
- describe 'GET signup with 0 existing users and unconfigured blog' do
238
- controller_name :accounts
239
-
240
- before(:each) do
241
- Blog.delete_all
242
- @blog = Blog.new.save
243
- User.delete_all
244
- end
245
-
246
- it 'redirects to setup' do
247
- get 'signup'
248
- response.should redirect_to(:controller => 'setup', :action => 'index')
249
- end
250
- end
251
-
252
- describe 'POST signup with 0 existing users and unconfigured blog' do
253
- controller_name :accounts
254
-
255
- before(:each) do
256
- Blog.delete_all
257
- @blog = Blog.new.save
258
- User.delete_all
259
- end
260
-
261
- it 'redirects to setup' do
262
- post 'signup', params
263
- response.should redirect_to(:controller => 'setup', :action => 'index')
264
- end
265
-
266
- def params
267
- {'user' => {'login' => 'newbob', 'password' => 'newpassword',
268
- 'password_confirmation' => 'newpassword'}}
269
- end
270
- end
271
-
272
- describe 'GET login with 0 existing users and unconfigured blog' do
273
- controller_name :accounts
274
-
275
- before(:each) do
276
- Blog.delete_all
277
- @blog = Blog.new.save
278
- User.delete_all
279
- end
280
-
281
- it 'redirects to setup' do
282
- get 'login'
283
- response.should redirect_to(:controller => 'setup', :action => 'index')
284
- end
285
- end
286
-
287
- describe 'POST login with 0 existing users and unconfigured blog' do
288
- controller_name :accounts
289
-
290
- before(:each) do
291
- Blog.delete_all
292
- @blog = Blog.new.save
293
- User.delete_all
294
- end
295
-
296
- it 'redirects to setup' do
297
- post 'login', params
298
- response.should redirect_to(:controller => 'setup', :action => 'index')
299
- end
300
-
301
- def params
302
- {'user' => {'login' => 'newbob', 'password' => 'newpassword'}}
303
- end
304
- end
305
-
306
- describe 'POST signup with 0 existing users' do
307
- controller_name :accounts
308
-
309
- before(:each) do
310
- User.stub!(:count).and_return(0)
311
- @user = mock_model(User)
312
- @user.stub!(:login).and_return('newbob')
313
- @user.stub!(:password=).and_return(true)
314
- @user.stub!(:password).and_return('foo')
315
- @user.stub!(:name=).and_return(true)
316
- User.stub!(:new).and_return(@user)
317
- User.stub!(:authenticate).and_return(@user)
318
- @user.stub!(:save).and_return(@user)
319
- end
320
-
321
- it 'creates and saves a user' do
322
- User.should_receive(:new).and_return(@user)
323
- @user.should_receive(:save).and_return(@user)
324
- post 'signup', params
325
- assigns[:user].should == @user
326
- end
327
-
328
- it 'redirects to /account/confirm' do
329
- post 'signup', params
330
- response.should redirect_to(:action => 'confirm')
331
- end
332
-
333
- it 'session gets a user' do
334
- post 'signup', params
335
- request.session[:user_id].should == @user.id
336
- end
337
-
338
- def params
339
- {'user' => {'login' => 'newbob', 'password' => 'newpassword',
340
- 'password_confirmation' => 'newpassword'}}
341
- end
342
- end
343
-
344
- describe 'User is logged in' do
345
- controller_name :accounts
346
-
347
- before(:each) do
348
- @user = mock_model(User)
349
-
350
- # The AccountsController class uses session[:user_id], and the
351
- # Typo LoginSystem uses session[:user]. So we need to set both of
352
- # these up correctly. I'm not sure why the duplication exists.
353
- session[:user_id] = @user.id
354
- @controller.send(:current_user=, @user)
355
-
356
- User.should_receive(:find) \
357
- .with(:first, :conditions => { :id => @user.id }) \
358
- .any_number_of_times \
359
- .and_return(@user)
360
-
361
- cookies[:typo_user_profile] = 'admin'
362
- end
363
-
364
- it 'trying to log in once again redirects to admin/dashboard/index' do
365
- get 'login'
366
- response.should redirect_to(:controller => 'admin')
367
- end
368
-
369
- it 'logging out deletes the session[:user_id]' do
370
- @user.should_receive(:forget_me)
371
- get 'logout'
372
- session[:user_id].should be_blank
373
- end
374
-
375
- it 'redirects to the login action' do
376
- @user.should_receive(:forget_me)
377
- get 'logout'
378
- response.should redirect_to(:action => 'login')
379
- end
380
-
381
- it 'logging out deletes cookies containing credentials' do
382
- @user.should_receive(:forget_me)
383
- get 'logout'
384
- cookies[:auth_token].should == nil
385
- cookies[:typo_user_profile].should == nil
386
- end
387
- end
388
-
389
- describe 'User has lost his password and send a good email' do
390
- controller_name :accounts
391
-
392
- before(:each) do
393
- @user = mock_model(User, :new_record? => false, :reload => @user)
394
- @user.stub!(:profile).and_return(Profile.find_by_label('admin'))
395
- User.stub!(:find_by_login).with('tobi').and_return(@user)
396
- User.stub!(:count).and_return(1)
397
- end
398
-
399
- it 'should render recover_password' do
400
- get 'recover_password'
401
-
402
- response.should render_template('recover_password')
403
- end
404
-
405
- it 'should render login' do
406
- make_request
407
-
408
- response.should redirect_to(:action => 'login')
409
- end
410
-
411
- def make_request
412
- post 'recover_password', {:user => {:login => 'tobi'}}
413
- end
414
- end