Deprecate Config::getSettings

Also, remove support for getting all settings for a scope selector

Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
Max Brunsfeld
2014-12-11 15:04:55 -08:00
committed by Nathan Sobo
parent 697ccedbd3
commit e7b0c3e519
2 changed files with 6 additions and 24 deletions

View File

@@ -604,18 +604,11 @@ class Config
schema = schema.properties[key]
schema
# Extended: Returns a new {Object} containing all of the global settings and
# Deprecated: Returns a new {Object} containing all of the global settings and
# defaults. Returns the scoped settings when a `scopeSelector` is specified.
#
# * `scopeSelector` (optional) {String}. eg. '.source.ruby'
getSettings: (scopeSelector) ->
settings = _.deepExtend(@settings, @defaultSettings)
if scopeSelector?
scopedSettings = @scopedSettingsStore.propertiesForSelector(scopeSelector)
settings = _.deepExtend(scopedSettings, settings)
settings
getSettings: ->
deprecate "Use ::get(keyPath) instead"
_.deepExtend(@settings, @defaultSettings)
# Extended: Get the {String} path to the config file being used.
getUserConfigPath: ->