[DRE-commits] [SCM] ruby-railties-3.2.git branch, master-experimental, updated. debian/3.2.6-3-25-g8adfcc5

Ondřej Surý ondrej at sury.org
Thu Mar 21 14:19:06 UTC 2013


The following commit has been merged in the master-experimental branch:
commit 216437d1b390215cb2e95fb48ef86c7257a46750
Author: Ondřej Surý <ondrej at sury.org>
Date:   Thu Mar 21 14:02:33 2013 +0100

    Fix rake tmp tasks to use the config.paths['tmp'] variable

diff --git a/debian/patches/fix-rake-tmp-tasks.patch b/debian/patches/fix-rake-tmp-tasks.patch
new file mode 100644
index 0000000..e1b107c
--- /dev/null
+++ b/debian/patches/fix-rake-tmp-tasks.patch
@@ -0,0 +1,46 @@
+--- a/lib/rails/tasks/tmp.rake
++++ b/lib/rails/tasks/tmp.rake
+@@ -4,34 +4,38 @@ namespace :tmp do
+ 
+   desc "Creates tmp directories for sessions, cache, sockets, and pids"
+   task :create do
+-    FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets tmp/pids tmp/cache/assets ))
++    FileUtils.mkdir_p(File.join(Rails.configuration.paths["tmp"],"sessions"))
++    FileUtils.mkdir_p(File.join(Rails.configuration.paths["tmp"],"cache"))
++    FileUtils.mkdir_p(File.join(Rails.configuration.paths["tmp"],"sockets"))
++    FileUtils.mkdir_p(File.join(Rails.configuration.paths["tmp"],"pids"))
++    FileUtils.mkdir_p(File.join(Rails.configuration.paths["tmp"],"cache/assets"))
+   end
+ 
+   namespace :sessions do
+     # desc "Clears all files in tmp/sessions"
+     task :clear do
+-      FileUtils.rm(Dir['tmp/sessions/[^.]*'])
++      FileUtils.rm(Dir[File.join(Rails.configuration.paths["tmp"],'sessions/[^.]*')])
+     end
+   end
+ 
+   namespace :cache do
+     # desc "Clears all files and directories in tmp/cache"
+     task :clear do
+-      FileUtils.rm_rf(Dir['tmp/cache/[^.]*'])
++      FileUtils.rm_rf(Dir[File.join(Rails.configuration.paths["tmp"],'cache/[^.]*')])
+     end
+   end
+ 
+   namespace :sockets do
+     # desc "Clears all files in tmp/sockets"
+     task :clear do
+-      FileUtils.rm(Dir['tmp/sockets/[^.]*'])
++      FileUtils.rm(Dir[File.join(Rails.configuration.paths["tmp"],'sockets/[^.]*')])
+     end
+   end
+ 
+   namespace :pids do
+     # desc "Clears all files in tmp/pids"
+     task :clear do
+-      FileUtils.rm(Dir['tmp/pids/[^.]*'])
++      FileUtils.rm(Dir[File.join(Rails.configuration.paths["tmp"],'pids/[^.]*')])
+     end
+   end
+ end
diff --git a/debian/patches/series b/debian/patches/series
index 27c0276..1b52c26 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 syntaxhighlighter-source.patch
 remove-rubygems.patch
 be-carefull-with-that-bundler.patch
+fix-rake-tmp-tasks.patch

-- 
ruby-railties-3.2.git



More information about the Pkg-ruby-extras-commits mailing list