diff --git a/spec/config-spec.coffee b/spec/config-spec.coffee index 39a88a9d2..bb45f712b 100644 --- a/spec/config-spec.coffee +++ b/spec/config-spec.coffee @@ -252,23 +252,12 @@ describe "Config", -> atom.config.setDefaults("foo", bar: baz: 10) atom.config.set("foo.ok", 12) + jasmine.snapshotDeprecations() expect(atom.config.getSettings().foo).toEqual ok: 12 bar: baz: 10 - - describe "when scoped settings are used", -> - it "returns all the scoped settings including all the defaults", -> - atom.config.setDefaults("foo", bar: baz: 10) - atom.config.set("foo.ok", 12) - atom.config.addScopedSettings("default", ".source.coffee", foo: bar: baz: 42) - atom.config.addScopedSettings("default", ".source.coffee", foo: bar: omg: 'omg') - - expect(atom.config.getSettings(".source.coffee").foo).toEqual - ok: 12 - bar: - baz: 42 - omg: 'omg' + jasmine.restoreDeprecationsSnapshot() describe ".pushAtKeyPath(keyPath, value)", -> it "pushes the given value to the array at the key path and updates observers", -> diff --git a/src/config.coffee b/src/config.coffee index fb4e717d6..6c75ee76b 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -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: ->