Method: Atom.load_config
- Defined in:
- lib/atom/helpers.rb
.load_config ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/atom/helpers.rb', line 2 def self.load_config const_set(:PATH, Dir.pwd) const_set(:CONFIG, YAML.load_file("#{PATH}/config/atom.yml")) const_set(:PRE_PLUGINS, CONFIG['plugins']['pre']) const_set(:POST_PLUGINS, CONFIG['plugins']['post']) const_set(:PLUGINS, PRE_PLUGINS | POST_PLUGINS) unless CONFIG[:author] begin CONFIG[:author] = `git config --get user.name`.chomp rescue CONFIG[:author] = 'unknown' end end end |