[donrails commit] r380 - in trunk: . app/controllers test/integration

1 view
Skip to first unread message

codesite...@google.com

unread,
May 18, 2008, 6:21:42 PM5/18/08
to donr...@googlegroups.com
Author: yasuhiro
Date: Sun May 18 15:21:14 2008
New Revision: 380

Modified:
trunk/ChangeLog
trunk/app/controllers/application.rb
trunk/test/integration/cache_test.rb

Log:
008-05-19 ARAKI Yasuhiro <a...@debian.org>

* app/controllers/application.rb (ApplicationController::don_delete_cach
e_all): Add to delete feed.xml. (Apply to change routes.rb.)
* test/integration/cache_test.rb
(CacheTest::test_delete_cache): Add new
method.

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Sun May 18 15:21:14 2008
@@ -1,3 +1,10 @@
+2008-05-19 ARAKI Yasuhiro <a...@debian.org>
+
+ * app/controllers/application.rb
(ApplicationController::don_delete_cache_all): Add to delete feed.xml.
(Apply to change routes.rb.)
+ * test/integration/cache_test.rb (CacheTest::test_delete_cache): Add
new method.
+
+ * app/views/notes/default/*.rhtml: Fix to use flash[:notice]. I'm
sorry, I lacked to change them at May.16.
+
2008-05-17 ARAKI Yasuhiro <a...@debian.org>

* app/controllers/notes_controller.rb (NotesController::noteslist):
Back to use for wrong URI redirect from ?ct=Time.now to ?notice.

Modified: trunk/app/controllers/application.rb
==============================================================================
--- trunk/app/controllers/application.rb (original)
+++ trunk/app/controllers/application.rb Sun May 18 15:21:14 2008
@@ -138,8 +138,21 @@

def don_delete_cache_all
logger.info 'Expireing: all page'
+
begin
ppfile = RAILS_ROOT + '/public/index.html'
+ File.delete ppfile
+ logger.info "Expired page: #{ppfile}"
+ rescue
+ end
+ begin
+ ppfile = RAILS_ROOT + '/public/feed.xml'
+ File.delete ppfile
+ logger.info "Expired page: #{ppfile}"
+ rescue
+ end
+ begin
+ ppfile = RAILS_ROOT + '/public/archives.html'
File.delete ppfile
logger.info "Expired page: #{ppfile}"
rescue

Modified: trunk/test/integration/cache_test.rb
==============================================================================
--- trunk/test/integration/cache_test.rb (original)
+++ trunk/test/integration/cache_test.rb Sun May 18 15:21:14 2008
@@ -144,4 +144,28 @@
assert_equal '/archives/id/1', path
end

+ def test_delete_cache
+ assert_cache_pages('/archives/show_category_noteslist/misc')
+ assert_cache_pages('/archives/category_articles/1/page/1')
+ assert_cache_pages('/feed.xml')
+
+ reset!
+ get '/admin/article/manage_article'
+ assert_equal 302, status
+ follow_redirect!
+ assert_equal '/admin/login/login_index', path
+
+ post '/admin/login/authenticate',
+ :nz => {"n" => 'testuser', "p" => 'testpass'},
+ :session_id_validation => Digest::MD5.hexdigest(request.session.session_id)
+ follow_redirect!
+ assert_equal '/admin/article/manage_article', path
+
+ post '/admin/system/delete_cache',
+ :session_id_validation => Digest::MD5.hexdigest(request.session.session_id)
+ follow_redirect!
+ assert_equal '/admin/system/manage_cache', path
+
+ end
+
end

Reply all
Reply to author
Forward
0 new messages