Module: GemDandy::ConfigFile
- Included in:
- Configuration, RubygemsProfile
- Defined in:
- lib/gem_dandy/config_file.rb
Instance Method Summary collapse
- #api_keys ⇒ Object
- #config_file_name ⇒ Object
- #find_api_key(identifier) ⇒ Object
- #gemdandy_rc_file ⇒ Object
Instance Method Details
#api_keys ⇒ Object
3 4 5 6 7 |
# File 'lib/gem_dandy/config_file.rb', line 3 def api_keys return File.exists?( gemdandy_rc_file ) ? YAML::load( File.open( gemdandy_rc_file ) ) : {} end |
#config_file_name ⇒ Object
17 18 19 |
# File 'lib/gem_dandy/config_file.rb', line 17 def config_file_name '.gemdandyrc' end |
#find_api_key(identifier) ⇒ Object
9 10 11 |
# File 'lib/gem_dandy/config_file.rb', line 9 def find_api_key( identifier ) api_keys[identifier] end |
#gemdandy_rc_file ⇒ Object
13 14 15 |
# File 'lib/gem_dandy/config_file.rb', line 13 def gemdandy_rc_file "#{File.( '~' )}/#{config_file_name}" end |