lib/geordi/settings.rb in geordi-9.3.1 vs lib/geordi/settings.rb in geordi-9.4.0

- old
+ new

@@ -6,11 +6,11 @@ module Geordi class Settings GLOBAL_SETTINGS_FILE_NAME = Util.testing? ? './tmp/global_settings.yml'.freeze : File.join(ENV['HOME'], '.config/geordi/global.yml').freeze LOCAL_SETTINGS_FILE_NAME = Util.testing? ? './tmp/local_settings.yml'.freeze : './.geordi.yml'.freeze - ALLOWED_GLOBAL_SETTINGS = %w[ pivotal_tracker_api_key auto_update_chromedriver pivotal_tracker_project_ids ].freeze + ALLOWED_GLOBAL_SETTINGS = %w[ pivotal_tracker_api_key auto_update_chromedriver pivotal_tracker_project_ids git_initials].freeze ALLOWED_LOCAL_SETTINGS = %w[ pivotal_tracker_project_ids ].freeze SETTINGS_WARNED = 'GEORDI_INVALID_SETTINGS_WARNED' def initialize @@ -22,9 +22,18 @@ @global_settings['pivotal_tracker_api_key'] || gitpt_api_key_old || inquire_pt_api_key end def pivotal_tracker_api_key=(value) @global_settings['pivotal_tracker_api_key'] = value + save_global_settings + end + + def git_initials + @global_settings['git_initials'] + end + + def git_initials=(value) + @global_settings['git_initials'] = value save_global_settings end def auto_update_chromedriver @global_settings["auto_update_chromedriver"] || false