Sha256: e5d0dc63f68cecdfafc59091eb98a2705dde5bd10ec982ca658ddcc0c568a234

Contents?: true

Size: 881 Bytes

Versions: 31

Compression:

Stored size: 881 Bytes

Contents

namespace :tmp do
  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/cache',
               'tmp/sockets',
               'tmp/pids',
               'tmp/cache/assets' ]

  tmp_dirs.each { |d| directory d }

  desc "Creates tmp directories for cache, sockets, and pids"
  task create: tmp_dirs

  namespace :cache do
    # desc "Clears all files and directories in tmp/cache"
    task :clear do
      rm_rf Dir['tmp/cache/[^.]*'], verbose: false
    end
  end

  namespace :sockets do
    # desc "Clears all files in tmp/sockets"
    task :clear do
      rm Dir['tmp/sockets/[^.]*'], verbose: false
    end
  end

  namespace :pids do
    # desc "Clears all files in tmp/pids"
    task :clear do
      rm Dir['tmp/pids/[^.]*'], verbose: false
    end
  end
end

Version data entries

31 entries across 31 versions & 4 rubygems

Version Path
railties-5.0.7.2 lib/rails/tasks/tmp.rake
railties-5.0.7.1 lib/rails/tasks/tmp.rake
railties-5.0.7 lib/rails/tasks/tmp.rake
railties-5.0.6 lib/rails/tasks/tmp.rake
railties-5.0.6.rc1 lib/rails/tasks/tmp.rake
railties-5.0.5 lib/rails/tasks/tmp.rake
railties-5.0.5.rc2 lib/rails/tasks/tmp.rake
railties-5.0.5.rc1 lib/rails/tasks/tmp.rake
railties-5.0.4 lib/rails/tasks/tmp.rake
railties-5.0.4.rc1 lib/rails/tasks/tmp.rake
railties-5.0.3 lib/rails/tasks/tmp.rake
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/railties-5.0.2/lib/rails/tasks/tmp.rake
railties-5.0.2 lib/rails/tasks/tmp.rake
railties-5.0.2.rc1 lib/rails/tasks/tmp.rake
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/tasks/tmp.rake
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/tasks/tmp.rake
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/tasks/tmp.rake
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/tasks/tmp.rake
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/tasks/tmp.rake
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/tasks/tmp.rake