From 1fd44213aa4485acdce54a1da1d7cd4aa0ac33b6 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Sat, 3 Jan 2015 19:20:54 +0100 Subject: Remove the tmp/sessions folder and its clear task Commit 1aea470 introduced this directory but this was at a time when the default way to store sessions was on the file system under the tmp directory. Let's remove references to it from the documentation as well. [Robin Dupret & yui-knk] --- railties/lib/rails/commands/server.rb | 2 +- railties/lib/rails/tasks/tmp.rake | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb index e39f0920af..3f14910edf 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -130,7 +130,7 @@ module Rails end def create_tmp_directories - %w(cache pids sessions sockets).each do |dir_to_make| + %w(cache pids sockets).each do |dir_to_make| FileUtils.mkdir_p(File.join(Rails.root, 'tmp', dir_to_make)) end end diff --git a/railties/lib/rails/tasks/tmp.rake b/railties/lib/rails/tasks/tmp.rake index 116988665f..b33ae9862b 100644 --- a/railties/lib/rails/tasks/tmp.rake +++ b/railties/lib/rails/tasks/tmp.rake @@ -1,9 +1,8 @@ namespace :tmp do - desc "Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear)" - task clear: [ "tmp:sessions:clear", "tmp:cache:clear", "tmp:sockets:clear"] + desc "Clear cache and socket files from tmp/ (narrow w/ tmp:cache:clear, tmp:sockets:clear)" + task clear: ["tmp:cache:clear", "tmp:sockets:clear"] - tmp_dirs = [ 'tmp/sessions', - 'tmp/cache', + tmp_dirs = [ 'tmp/cache', 'tmp/sockets', 'tmp/pids', 'tmp/cache/assets/development', @@ -15,13 +14,6 @@ namespace :tmp do desc "Creates tmp directories for sessions, cache, sockets, and pids" task create: tmp_dirs - namespace :sessions do - # desc "Clears all files in tmp/sessions" - task :clear do - FileUtils.rm(Dir['tmp/sessions/[^.]*']) - end - end - namespace :cache do # desc "Clears all files and directories in tmp/cache" task :clear do -- cgit v1.2.3