module DockerizeRails::PATHS

Public Class Methods

config_directory() click to toggle source
# File lib/dockerize_rails/paths.rb, line 19
def self.config_directory
  File.join(current, Constants::CONFIG_DIRECTORY_NAME)
end
current() click to toggle source
# File lib/dockerize_rails/paths.rb, line 7
def self.current
  Dir.pwd
end
data_directory(db_dir_name) click to toggle source
# File lib/dockerize_rails/paths.rb, line 35
def self.data_directory(db_dir_name)
  File.join(config_directory, db_dir_name, Constants::DATA_DIRECTORY_NAME)
end
gem_root() click to toggle source
# File lib/dockerize_rails/paths.rb, line 3
def self.gem_root
  File.expand_path '../..', File.dirname(__FILE__)
end
mysql_directory() click to toggle source
# File lib/dockerize_rails/paths.rb, line 27
def self.mysql_directory
  File.join(config_directory, Constants::MYSQL_DIRECTORY_NAME)
end
postgresql_directory() click to toggle source
# File lib/dockerize_rails/paths.rb, line 31
def self.postgresql_directory
  File.join(config_directory, Constants::PG_DIRECTORY_NAME)
end
rails_directory() click to toggle source
# File lib/dockerize_rails/paths.rb, line 23
def self.rails_directory
  File.join(config_directory, Constants::RAILS_DIRECTORY_NAME)
end
rails_root?() click to toggle source
# File lib/dockerize_rails/paths.rb, line 11
def self.rails_root?
  File.exist? File.join(current, 'bin', 'rails')
end
relative(base, target) click to toggle source
# File lib/dockerize_rails/paths.rb, line 43
def self.relative(base, target)
  Pathname.new(target).relative_path_from(Pathname.new(base)).to_s
end
relative_from_current(target) click to toggle source
# File lib/dockerize_rails/paths.rb, line 47
def self.relative_from_current(target)
  relative(current, target)
end
resources(name = '') click to toggle source
# File lib/dockerize_rails/paths.rb, line 15
def self.resources(name = '')
  File.join(gem_root, 'resources', name)
end
sql_directory(db_dir_name) click to toggle source
# File lib/dockerize_rails/paths.rb, line 39
def self.sql_directory(db_dir_name)
  File.join(config_directory, db_dir_name, Constants::SQL_DIRECTORY_NAME)
end