Support a scopeSelector in getSettings()

This commit is contained in:
Ben Ogle
2014-10-15 16:26:03 -07:00
parent 757abfe3db
commit a42b3ff171
2 changed files with 32 additions and 2 deletions

View File

@@ -588,8 +588,14 @@ class Config
# Extended: Returns a new {Object} containing all of the global settings and
# defaults. This does not include scoped settings.
getSettings: ->
_.deepExtend(@settings, @defaultSettings)
getSettings: (scopeSelector) ->
settings = _.deepExtend(@settings, @defaultSettings)
if scopeSelector?
scopedSettings = @scopedSettingsStore.propertiesForSelector(scopeSelector)
settings = _.deepExtend(scopedSettings, settings)
settings
# Extended: Get the {String} path to the config file being used.
getUserConfigPath: ->