class Paraduct::Configuration

Public Instance Methods

after_script() click to toggle source

@return [String, Array<String>]

# File lib/paraduct/configuration.rb, line 19
def after_script
  config_data[:after_script]
end
base_job_dir() click to toggle source
# File lib/paraduct/configuration.rb, line 41
def base_job_dir
  if work_dir.blank?
    root_dir
  else
    root_dir.join(work_dir)
  end
end
config_file() click to toggle source

@return [Pathname]

# File lib/paraduct/configuration.rb, line 54
def config_file
  root_dir.join(".paraduct.yml")
end
enable_rsync?() click to toggle source
# File lib/paraduct/configuration.rb, line 49
def enable_rsync?
  !work_dir.blank?
end
exclude() click to toggle source
# File lib/paraduct/configuration.rb, line 32
def exclude
  config_data[:exclude] || []
end
max_threads() click to toggle source

@return [Integer]

# File lib/paraduct/configuration.rb, line 24
def max_threads
  config_data[:max_threads] || 4
end
root_dir() click to toggle source

@return [Pathname]

# File lib/paraduct/configuration.rb, line 59
def root_dir
  Pathname.pwd
end
rsync_option() click to toggle source
# File lib/paraduct/configuration.rb, line 28
def rsync_option
  config_data[:rsync_option] || {}
end
script() click to toggle source

@return [String, Array<String>]

# File lib/paraduct/configuration.rb, line 14
def script
  config_data[:script]
end
variables() click to toggle source

@return [Pathname]

# File lib/paraduct/configuration.rb, line 9
def variables
  config_data[:variables]
end
work_dir() click to toggle source

@return [Pathname]

# File lib/paraduct/configuration.rb, line 37
def work_dir
  config_data[:work_dir]
end

Private Instance Methods

config_data() click to toggle source
# File lib/paraduct/configuration.rb, line 65
def config_data
  @config_data ||= YAML.load_file(config_file).with_indifferent_access
end