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.5.11 lib/tasks/app_base_dir.rake
daddy-0.5.10 lib/tasks/app_base_dir.rake
daddy-0.5.9 lib/tasks/app_base_dir.rake
daddy-0.5.8 lib/tasks/app_base_dir.rake
daddy-0.5.6 lib/tasks/app_base_dir.rake
daddy-0.5.5 lib/tasks/app_base_dir.rake
daddy-0.5.4 lib/tasks/app_base_dir.rake
daddy-0.5.3 lib/tasks/app_base_dir.rake
daddy-0.5.2 lib/tasks/app_base_dir.rake
daddy-0.5.1 lib/tasks/app_base_dir.rake
daddy-0.5.0 lib/tasks/app_base_dir.rake
daddy-0.4.10 lib/tasks/app_base_dir.rake
daddy-0.4.9 lib/tasks/app_base_dir.rake
daddy-0.4.8 lib/tasks/app_base_dir.rake
daddy-0.4.7 lib/tasks/app_base_dir.rake
daddy-0.4.6 lib/tasks/app_base_dir.rake
daddy-0.4.5 lib/tasks/app_base_dir.rake
daddy-0.4.4 lib/tasks/app_base_dir.rake
daddy-0.4.3 lib/tasks/app_base_dir.rake
daddy-0.4.2 lib/tasks/app_base_dir.rake