Sha256: 7dc4ac44f09109d293268e10ff60482138e9f9df5d9b4d9fa26d07177827d27e

Contents?: true

Size: 471 Bytes

Versions: 45

Compression:

Stored size: 471 Bytes

Contents

require_relative 'task_helper'

namespace :dad do

  task :app_base_dir do
    case Rails.env
    when 'production', 'development'
      app_base_dir = File.join('/var/lib', Daddy.config.application, Rails.env)
      run "sudo mkdir -p #{app_base_dir}",
          "sudo chown #{ENV['USER']}:#{ENV['USER']} #{app_base_dir}"
    when 'test'
      app_base_dir = File.join('/tmp', Daddy.config.application, Rails.env)
      run "mkdir -p #{app_base_dir}"
    end
  end

end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
daddy-0.3.20 lib/tasks/app_base_dir.rake
daddy-0.3.19 lib/tasks/app_base_dir.rake
daddy-0.3.18 lib/tasks/app_base_dir.rake
daddy-0.3.17 lib/tasks/app_base_dir.rake
daddy-0.3.16 lib/tasks/app_base_dir.rake