Sha256: f83d2168285f0245d64b23809cad8adbeec5d9374c6c94f1c23275d9fcd7bf06

Contents?: true

Size: 351 Bytes

Versions: 2

Compression:

Stored size: 351 Bytes

Contents

require 'erb'
require 'yaml'

def self.rails_root
  ENV['RAILS_ROOT'] || Rails.root
end

def self.rails_env
  ENV['RAILS_ENV'] || 'development'
end

def self.app_name
  YAML.load_file("#{rails_root}/config/database.yml")[Rails.env]['database']
end

def self.template_dir
  File.join(File.dirname(File.dirname(File.dirname(__FILE__))), 'templates')
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
daddy-0.3.4 lib/tasks/task_helper.rb
daddy-0.3.3 lib/tasks/task_helper.rb