134 Commits

Author SHA1 Message Date
Kevin Sawicki
30419027a8 Show notification on config save failures 2015-02-05 15:34:17 -08:00
Ben Ogle
7263ca8faa 🎨 Fix spec title 2015-01-29 17:54:41 -08:00
Ben Ogle
083bafdb33 Handle unschema’d items in objects.
This is required for packages that still use configDefaults
2015-01-29 17:54:41 -08:00
Ben Ogle
26b450fe49 🎨 Clean up spec naming 2015-01-29 17:54:41 -08:00
Ben Ogle
5d273d0ee6 Add a bit more coverage to the specs 2015-01-29 17:54:41 -08:00
Ben Ogle
b9b2b4bca2 Adhere to the schemas when loading the user’s config 2015-01-29 17:54:41 -08:00
Ben Ogle
79094ee889 Reset all user config values when the schema changes. 2015-01-29 17:54:40 -08:00
Kevin Sawicki
63335f6b60 Return Color object when in cloned objects
This adds a custom deepClone that clones any Color objects
correctly.
2015-01-22 10:48:07 -08:00
Max Brunsfeld
0a59d13d56 Fix Config::unset with no scope-selector
Closes #5095
2015-01-16 10:23:12 -08:00
Ben Ogle
1bc2248fc2 Fix config specs 2015-01-14 16:15:53 -08:00
Kevin Sawicki
640f8920fb Fix bounds checking of alpha 2015-01-12 17:34:43 -08:00
Kevin Sawicki
44939a12a0 Validate color properties when set 2015-01-12 17:34:43 -08:00
Kevin Sawicki
b8822b32db Only coerce strings and plain objects 2015-01-12 17:34:43 -08:00
Kevin Sawicki
8c39818670 Don't blow up when asking for schema at non-existent path 2015-01-12 17:34:43 -08:00
Kevin Sawicki
5a2c208804 Add specs with invalid objects 2015-01-12 17:34:43 -08:00
Kevin Sawicki
fc899f54cf Add specs for setting with an object 2015-01-12 17:34:42 -08:00
Kevin Sawicki
b923b57bcc Add specs for hsl and hsla colors 2015-01-12 17:34:42 -08:00
Kevin Sawicki
319ec244e1 Add spec for invalid values 2015-01-12 17:34:42 -08:00
Kevin Sawicki
1267a1e14e Add spec for default color value 2015-01-12 17:34:42 -08:00
Kevin Sawicki
0411f1584c Add color schema type 2015-01-12 17:34:42 -08:00
Nathan Sobo
304f63532e Replace ‘global’ config key with ‘*’ selector 2014-12-30 13:38:12 -06:00
Max Brunsfeld
6e7364c7c6 Merge pull request #4802 from atom/mb-reduce-config-saves
Don't write the config to disk so darn often
2014-12-30 10:41:01 -08:00
Max Brunsfeld
339f331776 Debounce saving and loading of config 2014-12-30 10:14:57 -08:00
Max Brunsfeld
5c730415b7 Use fake config file for entire Config spec 2014-12-30 00:03:34 -08:00
Max Brunsfeld
637b2b0aba Don't save config when setting w/ non-default source 2014-12-29 17:08:26 -08:00
Max Brunsfeld
c7771ffde9 Add Config::getAll, deprecate ::settingsForScopeDescriptor
Signed-off-by: Nathan Sobo <nathan@github.com>
2014-12-29 11:01:46 -08:00
Max Brunsfeld
d508d1eedf Handle a source but no selector in ::unset 2014-12-26 17:24:27 -08:00
Max Brunsfeld
2949ebfe86 Deprecate Config::addScopedProperties 2014-12-26 17:13:33 -08:00
Max Brunsfeld
dbaef8e593 Handle null key-path in Config::set 2014-12-26 14:58:17 -08:00
Max Brunsfeld
b4b492a321 💄 Organize config-spec
* Group tests by method rather than by scoped vs unscoped
* Group deprecated methods together
* Group internal methods together
* Make descriptions more consistent
2014-12-24 16:56:53 -08:00
Max Brunsfeld
883c48b490 Merge pull request #4753 from atom/mb-add-config-get-sources
Add Config::getSources
2014-12-23 20:35:42 -08:00
Max Brunsfeld
388428b074 Fix logic error when exception is thrown in config observer 2014-12-23 16:47:43 -08:00
Max Brunsfeld
60c5293b5e Add Config::getSources
The settings-view needs this so that it can display snippets
associated with packages
2014-12-23 11:15:32 -08:00
Max Brunsfeld
a1b4820c04 Revert "Revert "Merge pull request #4631""
This reverts commit dc2a453986.

Conflicts:
	spec/config-spec.coffee
	src/config.coffee
2014-12-23 09:26:40 -08:00
Max Brunsfeld
28ac51d140 Add Config::transact
Use this method to avoid emitting unecessary config events
when activating or deactivating multiple packages
2014-12-17 16:54:47 -08:00
Max Brunsfeld
b0731afd4c Don't pass keyPath to Config::onDidChange callback
The keyPath field was never used by core or any package, and
for scoped settings, its value was always equal to the keyPath
specified by the caller.
2014-12-17 12:03:46 -08:00
Max Brunsfeld
dc2a453986 Revert "Merge pull request #4631 from atom/mb-new-config-api"
This reverts commit 5147fb6a8b, reversing
changes made to 9bbbb58084.
2014-12-16 15:27:39 -08:00
Max Brunsfeld
965a6243e1 Remove toBe parens 2014-12-16 14:27:57 -08:00
Max Brunsfeld
b8f239cd39 Deprecate Config::isDefault and ::getDefault 2014-12-16 14:00:57 -08:00
Max Brunsfeld
9f851e55d1 Add Config::unset
Deprecate Config::restoreDefault
2014-12-16 14:00:57 -08:00
Max Brunsfeld
ab89776f01 Throw when Config::set is called w/ source and no scope 2014-12-16 14:00:57 -08:00
Max Brunsfeld
2cea51b50e Take 'scope' option in Config::onDidChange
Deprecate passing the scope as an optional first argument
2014-12-16 14:00:57 -08:00
Max Brunsfeld
4e4794f3fd Take 'scope' option in Config::observe
Deprecate using the scope as an optional first argument
2014-12-16 14:00:57 -08:00
Max Brunsfeld
8c8e866a97 Use a schema in all specs for Config::observeUserConfig
Before, values loaded from the config file were set in a
way that allowed any key to be set in the root object.
Now, these values are set in a way that's similar to how
::set works.
2014-12-16 14:00:56 -08:00
Max Brunsfeld
f859ad5fc5 Allow null keyPath with options argument in ::get 2014-12-16 14:00:56 -08:00
Nathan Sobo
d30cf35a16 Use ‘source’ option rather than internal state in Config spec 2014-12-16 14:00:56 -08:00
Nathan Sobo
c35fb90653 Don’t return schema defaults when sources are specified in Config::get 2014-12-16 14:00:56 -08:00
Nathan Sobo
73df017d83 Add a ‘sources’ and ‘excludeSources’ options to Config::get
If the option is supplied, we will only retrieve values from the
specified sources.
2014-12-16 14:00:56 -08:00
Nathan Sobo
c58606907a Make scope a trailing option to Config::get 2014-12-16 14:00:56 -08:00
Nathan Sobo
c489a4662b Make scopeSelector a trailing option to Config::set 2014-12-16 14:00:56 -08:00