[config] remove public/lib/config
Change-Id: I04e226b97a87572b8986b5525f480113951f5ee4
diff --git a/README.md b/README.md
index 5af38dc..1c8eb5a 100644
--- a/README.md
+++ b/README.md
@@ -34,3 +34,4 @@
* topaz/examples/ui/sketchy_flutter: 07fd955f4
* topaz/examples/ui/text_flutter: 07fd955f4
* topaz/public/lib/agent: 79a60c5d377ed3a55a87d999292036243ff21446
+* topaz/public/lib/config: f489f45e6883df6e3be578342b4e739928adcf77
diff --git a/public/lib/config/dart/BUILD.gn b/public/lib/config/dart/BUILD.gn
deleted file mode 100644
index 117c651..0000000
--- a/public/lib/config/dart/BUILD.gn
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2016 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//build/dart/dart_library.gni")
-
-dart_library("config") {
- package_name = "config"
-
- sdk_category = "partner"
-
- sources = [
- "config.dart",
- ]
-}
diff --git a/public/lib/config/dart/analysis_options.yaml b/public/lib/config/dart/analysis_options.yaml
deleted file mode 100644
index 54917c0..0000000
--- a/public/lib/config/dart/analysis_options.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-# Copyright 2017 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-include: ../../../analysis_options.yaml
diff --git a/public/lib/config/dart/lib/config.dart b/public/lib/config/dart/lib/config.dart
deleted file mode 100644
index 5443361..0000000
--- a/public/lib/config/dart/lib/config.dart
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2016 The Fuchsia Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:convert';
-import 'dart:io';
-
-/// Abstract class providing a basic configuration to be implemented in both
-/// Flutter and CLI/tooling environements.
-class Config {
- final Map<String, dynamic> _data = <String, dynamic>{};
-
- /// Convienence method for creating a config object by loading a
- /// configuration file at [src].
- static Future<Config> read(String src) async {
- Config config = new Config();
- await config.load(src);
- return config;
- }
-
- /// Load configuration from the filesystem.
- Future<Null> load(String src) async {
- File file = new File(src);
-
- String data;
- dynamic decoded;
-
- try {
- data = await file.readAsString();
- } on Exception {
- data = '{}';
- }
-
- try {
- decoded = json.decode(data);
- } on Exception {
- String message = 'unable to decode JSON \n$data';
- throw new StateError(message);
- }
-
- for (String key in decoded.keys) {
- String value = decoded[key];
- put(key, value);
- }
- }
-
- /// Check is the configuration has a value for [key].
- bool has(String key) {
- return _data.containsKey(key);
- }
-
- /// Retrieve a config value.
- String get(String key) {
- return _data[key];
- }
-
- /// Add or update a config value.
- void put(String key, String value) {
- _data[key] = value;
- }
-
- /// Validates the config against [keys]. Will throw an infomrative
- /// [StateError] if any of the given keys are missing.
- void validate(List<String> keys) {
- bool isValid = true;
- List<String> message = <String>[
- 'Config is missing one or more required keys:',
- '',
- ];
-
- for (String key in keys) {
- if (!has(key) || get(key) == null) {
- isValid = false;
- message.add('* $key');
- }
- }
-
- message.add('');
-
- if (!isValid) {
- throw new StateError(message.join('\n'));
- }
- }
-
- /// Create a [Map] for use in JSON encoding.
- Map<String, dynamic> toJSON() {
- return _data;
- }
-}
diff --git a/public/lib/config/dart/pubspec.yaml b/public/lib/config/dart/pubspec.yaml
deleted file mode 100644
index 0ee26e8..0000000
--- a/public/lib/config/dart/pubspec.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-# Copyright 2016 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-name: config
-description: Config