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.4.1 lib/tasks/app_base_dir.rake
daddy-0.4.0 lib/tasks/app_base_dir.rake
daddy-0.3.38 lib/tasks/app_base_dir.rake
daddy-0.3.37 lib/tasks/app_base_dir.rake
daddy-0.3.36 lib/tasks/app_base_dir.rake
daddy-0.3.35 lib/tasks/app_base_dir.rake
daddy-0.3.34 lib/tasks/app_base_dir.rake
daddy-0.3.33 lib/tasks/app_base_dir.rake
daddy-0.3.32 lib/tasks/app_base_dir.rake
daddy-0.3.31 lib/tasks/app_base_dir.rake
daddy-0.3.30 lib/tasks/app_base_dir.rake
daddy-0.3.29 lib/tasks/app_base_dir.rake
daddy-0.3.28 lib/tasks/app_base_dir.rake
daddy-0.3.27 lib/tasks/app_base_dir.rake
daddy-0.3.26 lib/tasks/app_base_dir.rake
daddy-0.3.25 lib/tasks/app_base_dir.rake
daddy-0.3.24 lib/tasks/app_base_dir.rake
daddy-0.3.23 lib/tasks/app_base_dir.rake
daddy-0.3.22 lib/tasks/app_base_dir.rake
daddy-0.3.21 lib/tasks/app_base_dir.rake