Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 22 lines (19 sloc) 0.629 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
require 'yaml'

module ExamplesHelper

  # Will load config from various locations, either in your Dropbox folder so it's synced or the _config.yml
  # file in this directory.
  def self.load_config
    # check for config
    # First check if running in abt worker
    if defined? $abt_config
      @config = $abt_config
      return @config
    end
    cf = File.expand_path(File.join("~", "Dropbox", "configs", "iron_worker_examples", "config.yml"))
    if File.exist?(cf)
      @config = YAML::load_file(cf)
      return @config
    end
    @config = YAML.load_file(File.join(File.dirname(__FILE__), '_config.yml'))
  end
end
Something went wrong with that request. Please try again.