{"action":"created","comment":{"url":"https://api.github.com/repos/leapmotion/autowiring/pulls/comments/58136587","id":58136587,"diff_hunk":"@@ -0,0 +1,101 @@\n+// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved.\n+#include \"stdafx.h\"\n+#include <autowiring/config_descriptor.h>\n+#include <autowiring/config.h>\n+#include <autowiring/ConfigRegistry.h>\n+#include <autowiring/observable.h>\n+\n+namespace aw = autowiring;\n+\n+class AutoConfig_FromTableTest :\n+  public testing::Test\n+{};\n+\n+namespace {\n+  class DataDownloader {\n+  public:\n+    std::string api_path;\n+    int timeout;\n+\n+    static aw::config_descriptor GetConfigDescriptor(void) {\n+      return{\n+        { \"api_path\", &DataDownloader::api_path },\n+        { \"timeout\", &DataDownloader::timeout }\n+      };\n+    }\n+  };\n+}\n+\n+// A simulated map of key-value pairs.  In a real use case, this might be populated from a\n+// configuration file or downloaded from a network source.\n+static std::unordered_map<std::string, std::string> sc_config = {\n+  { \"api_path\", \"http://example.com/v3/endpoint\" },\n+  { \"timeout\", \"299\" }\n+};\n+\n+TEST_F(AutoConfig_FromTableTest, SimpleConfigurationReadIn) {","path":"src/autowiring/test/AutoConfig_FromTableTest.cpp","position":36,"original_position":36,"commit_id":"23442e31bf3e806bb211f0b514bf6f58bd721b27","original_commit_id":"c843aa4b48d39f4dd2b74ce34be2da083ddc22b2","user":{"login":"codemercenary","id":2961036,"avatar_url":"https://avatars.githubusercontent.com/u/2961036?v=3","gravatar_id":"","url":"https://api.github.com/users/codemercenary","html_url":"https://github.com/codemercenary","followers_url":"https://api.github.com/users/codemercenary/followers","following_url":"https://api.github.com/users/codemercenary/following{/other_user}","gists_url":"https://api.github.com/users/codemercenary/gists{/gist_id}","starred_url":"https://api.github.com/users/codemercenary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemercenary/subscriptions","organizations_url":"https://api.github.com/users/codemercenary/orgs","repos_url":"https://api.github.com/users/codemercenary/repos","events_url":"https://api.github.com/users/codemercenary/events{/privacy}","received_events_url":"https://api.github.com/users/codemercenary/received_events","type":"User","site_admin":false},"body":"Glad you like it!","created_at":"2016-03-31T22:13:07Z","updated_at":"2016-03-31T22:13:07Z","html_url":"https://github.com/leapmotion/autowiring/pull/861#discussion_r58136587","pull_request_url":"https://api.github.com/repos/leapmotion/autowiring/pulls/861","_links":{"self":{"href":"https://api.github.com/repos/leapmotion/autowiring/pulls/comments/58136587"},"html":{"href":"https://github.com/leapmotion/autowiring/pull/861#discussion_r58136587"},"pull_request":{"href":"https://api.github.com/repos/leapmotion/autowiring/pulls/861"}}},"pull_request":{"url":"https://api.github.com/repos/leapmotion/autowiring/pulls/861","id":62540235,"html_url":"https://github.com/leapmotion/autowiring/pull/861","diff_url":"https://github.com/leapmotion/autowiring/pull/861.diff","patch_url":"https://github.com/leapmotion/autowiring/pull/861.patch","issue_url":"https://api.github.com/repos/leapmotion/autowiring/issues/861","number":861,"state":"open","locked":false,"title":"Add metadata concept to config","user":{"login":"codemercenary","id":2961036,"avatar_url":"https://avatars.githubusercontent.com/u/2961036?v=3","gravatar_id":"","url":"https://api.github.com/users/codemercenary","html_url":"https://github.com/codemercenary","followers_url":"https://api.github.com/users/codemercenary/followers","following_url":"https://api.github.com/users/codemercenary/following{/other_user}","gists_url":"https://api.github.com/users/codemercenary/gists{/gist_id}","starred_url":"https://api.github.com/users/codemercenary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemercenary/subscriptions","organizations_url":"https://api.github.com/users/codemercenary/orgs","repos_url":"https://api.github.com/users/codemercenary/repos","events_url":"https://api.github.com/users/codemercenary/events{/privacy}","received_events_url":"https://api.github.com/users/codemercenary/received_events","type":"User","site_admin":false},"body":"Need a metadata system for config to allow extended information to be added to config fields.\r\n\r\nMetadata is added as additional arguments after the last parameter.\r\n\r\n- [ ] Finish creating a configuration watcher example","created_at":"2016-03-11T13:04:21Z","updated_at":"2016-03-31T22:13:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ba4b7352896a051a890479562e84f9571c775ef","assignee":{"login":"veronicaz41","id":14994260,"avatar_url":"https://avatars.githubusercontent.com/u/14994260?v=3","gravatar_id":"","url":"https://api.github.com/users/veronicaz41","html_url":"https://github.com/veronicaz41","followers_url":"https://api.github.com/users/veronicaz41/followers","following_url":"https://api.github.com/users/veronicaz41/following{/other_user}","gists_url":"https://api.github.com/users/veronicaz41/gists{/gist_id}","starred_url":"https://api.github.com/users/veronicaz41/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veronicaz41/subscriptions","organizations_url":"https://api.github.com/users/veronicaz41/orgs","repos_url":"https://api.github.com/users/veronicaz41/repos","events_url":"https://api.github.com/users/veronicaz41/events{/privacy}","received_events_url":"https://api.github.com/users/veronicaz41/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/leapmotion/autowiring/milestones/7","html_url":"https://github.com/leapmotion/autowiring/milestones/v1.0.0","labels_url":"https://api.github.com/repos/leapmotion/autowiring/milestones/7/labels","id":1605401,"number":7,"title":"v1.0.0","description":"Stable Autowiring release","creator":{"login":"codemercenary","id":2961036,"avatar_url":"https://avatars.githubusercontent.com/u/2961036?v=3","gravatar_id":"","url":"https://api.github.com/users/codemercenary","html_url":"https://github.com/codemercenary","followers_url":"https://api.github.com/users/codemercenary/followers","following_url":"https://api.github.com/users/codemercenary/following{/other_user}","gists_url":"https://api.github.com/users/codemercenary/gists{/gist_id}","starred_url":"https://api.github.com/users/codemercenary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemercenary/subscriptions","organizations_url":"https://api.github.com/users/codemercenary/orgs","repos_url":"https://api.github.com/users/codemercenary/repos","events_url":"https://api.github.com/users/codemercenary/events{/privacy}","received_events_url":"https://api.github.com/users/codemercenary/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":18,"state":"open","created_at":"2016-02-25T14:56:06Z","updated_at":"2016-03-31T22:09:13Z","due_on":"2016-03-16T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/leapmotion/autowiring/pulls/861/commits","review_comments_url":"https://api.github.com/repos/leapmotion/autowiring/pulls/861/comments","review_comment_url":"https://api.github.com/repos/leapmotion/autowiring/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leapmotion/autowiring/issues/861/comments","statuses_url":"https://api.github.com/repos/leapmotion/autowiring/statuses/23442e31bf3e806bb211f0b514bf6f58bd721b27","head":{"label":"leapmotion:config/metadata","ref":"config/metadata","sha":"23442e31bf3e806bb211f0b514bf6f58bd721b27","user":{"login":"leapmotion","id":2242710,"avatar_url":"https://avatars.githubusercontent.com/u/2242710?v=3","gravatar_id":"","url":"https://api.github.com/users/leapmotion","html_url":"https://github.com/leapmotion","followers_url":"https://api.github.com/users/leapmotion/followers","following_url":"https://api.github.com/users/leapmotion/following{/other_user}","gists_url":"https://api.github.com/users/leapmotion/gists{/gist_id}","starred_url":"https://api.github.com/users/leapmotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leapmotion/subscriptions","organizations_url":"https://api.github.com/users/leapmotion/orgs","repos_url":"https://api.github.com/users/leapmotion/repos","events_url":"https://api.github.com/users/leapmotion/events{/privacy}","received_events_url":"https://api.github.com/users/leapmotion/received_events","type":"Organization","site_admin":false},"repo":{"id":22234733,"name":"autowiring","full_name":"leapmotion/autowiring","owner":{"login":"leapmotion","id":2242710,"avatar_url":"https://avatars.githubusercontent.com/u/2242710?v=3","gravatar_id":"","url":"https://api.github.com/users/leapmotion","html_url":"https://github.com/leapmotion","followers_url":"https://api.github.com/users/leapmotion/followers","following_url":"https://api.github.com/users/leapmotion/following{/other_user}","gists_url":"https://api.github.com/users/leapmotion/gists{/gist_id}","starred_url":"https://api.github.com/users/leapmotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leapmotion/subscriptions","organizations_url":"https://api.github.com/users/leapmotion/orgs","repos_url":"https://api.github.com/users/leapmotion/repos","events_url":"https://api.github.com/users/leapmotion/events{/privacy}","received_events_url":"https://api.github.com/users/leapmotion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/leapmotion/autowiring","description":"A C++ Inversion of Control Framework","fork":false,"url":"https://api.github.com/repos/leapmotion/autowiring","forks_url":"https://api.github.com/repos/leapmotion/autowiring/forks","keys_url":"https://api.github.com/repos/leapmotion/autowiring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leapmotion/autowiring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leapmotion/autowiring/teams","hooks_url":"https://api.github.com/repos/leapmotion/autowiring/hooks","issue_events_url":"https://api.github.com/repos/leapmotion/autowiring/issues/events{/number}","events_url":"https://api.github.com/repos/leapmotion/autowiring/events","assignees_url":"https://api.github.com/repos/leapmotion/autowiring/assignees{/user}","branches_url":"https://api.github.com/repos/leapmotion/autowiring/branches{/branch}","tags_url":"https://api.github.com/repos/leapmotion/autowiring/tags","blobs_url":"https://api.github.com/repos/leapmotion/autowiring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leapmotion/autowiring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leapmotion/autowiring/git/refs{/sha}","trees_url":"https://api.github.com/repos/leapmotion/autowiring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leapmotion/autowiring/statuses/{sha}","languages_url":"https://api.github.com/repos/leapmotion/autowiring/languages","stargazers_url":"https://api.github.com/repos/leapmotion/autowiring/stargazers","contributors_url":"https://api.github.com/repos/leapmotion/autowiring/contributors","subscribers_url":"https://api.github.com/repos/leapmotion/autowiring/subscribers","subscription_url":"https://api.github.com/repos/leapmotion/autowiring/subscription","commits_url":"https://api.github.com/repos/leapmotion/autowiring/commits{/sha}","git_commits_url":"https://api.github.com/repos/leapmotion/autowiring/git/commits{/sha}","comments_url":"https://api.github.com/repos/leapmotion/autowiring/comments{/number}","issue_comment_url":"https://api.github.com/repos/leapmotion/autowiring/issues/comments{/number}","contents_url":"https://api.github.com/repos/leapmotion/autowiring/contents/{+path}","compare_url":"https://api.github.com/repos/leapmotion/autowiring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leapmotion/autowiring/merges","archive_url":"https://api.github.com/repos/leapmotion/autowiring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leapmotion/autowiring/downloads","issues_url":"https://api.github.com/repos/leapmotion/autowiring/issues{/number}","pulls_url":"https://api.github.com/repos/leapmotion/autowiring/pulls{/number}","milestones_url":"https://api.github.com/repos/leapmotion/autowiring/milestones{/number}","notifications_url":"https://api.github.com/repos/leapmotion/autowiring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leapmotion/autowiring/labels{/name}","releases_url":"https://api.github.com/repos/leapmotion/autowiring/releases{/id}","deployments_url":"https://api.github.com/repos/leapmotion/autowiring/deployments","created_at":"2014-07-24T22:39:49Z","updated_at":"2016-02-29T15:13:29Z","pushed_at":"2016-03-31T22:12:51Z","git_url":"git://github.com/leapmotion/autowiring.git","ssh_url":"git@github.com:leapmotion/autowiring.git","clone_url":"https://github.com/leapmotion/autowiring.git","svn_url":"https://github.com/leapmotion/autowiring","homepage":"http://autowiring.io/","size":33730,"stargazers_count":97,"watchers_count":97,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":97,"default_branch":"develop"}},"base":{"label":"leapmotion:develop","ref":"develop","sha":"86a51ac80c70946a9c28b39b5eb7d022ada405ac","user":{"login":"leapmotion","id":2242710,"avatar_url":"https://avatars.githubusercontent.com/u/2242710?v=3","gravatar_id":"","url":"https://api.github.com/users/leapmotion","html_url":"https://github.com/leapmotion","followers_url":"https://api.github.com/users/leapmotion/followers","following_url":"https://api.github.com/users/leapmotion/following{/other_user}","gists_url":"https://api.github.com/users/leapmotion/gists{/gist_id}","starred_url":"https://api.github.com/users/leapmotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leapmotion/subscriptions","organizations_url":"https://api.github.com/users/leapmotion/orgs","repos_url":"https://api.github.com/users/leapmotion/repos","events_url":"https://api.github.com/users/leapmotion/events{/privacy}","received_events_url":"https://api.github.com/users/leapmotion/received_events","type":"Organization","site_admin":false},"repo":{"id":22234733,"name":"autowiring","full_name":"leapmotion/autowiring","owner":{"login":"leapmotion","id":2242710,"avatar_url":"https://avatars.githubusercontent.com/u/2242710?v=3","gravatar_id":"","url":"https://api.github.com/users/leapmotion","html_url":"https://github.com/leapmotion","followers_url":"https://api.github.com/users/leapmotion/followers","following_url":"https://api.github.com/users/leapmotion/following{/other_user}","gists_url":"https://api.github.com/users/leapmotion/gists{/gist_id}","starred_url":"https://api.github.com/users/leapmotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leapmotion/subscriptions","organizations_url":"https://api.github.com/users/leapmotion/orgs","repos_url":"https://api.github.com/users/leapmotion/repos","events_url":"https://api.github.com/users/leapmotion/events{/privacy}","received_events_url":"https://api.github.com/users/leapmotion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/leapmotion/autowiring","description":"A C++ Inversion of Control Framework","fork":false,"url":"https://api.github.com/repos/leapmotion/autowiring","forks_url":"https://api.github.com/repos/leapmotion/autowiring/forks","keys_url":"https://api.github.com/repos/leapmotion/autowiring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leapmotion/autowiring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leapmotion/autowiring/teams","hooks_url":"https://api.github.com/repos/leapmotion/autowiring/hooks","issue_events_url":"https://api.github.com/repos/leapmotion/autowiring/issues/events{/number}","events_url":"https://api.github.com/repos/leapmotion/autowiring/events","assignees_url":"https://api.github.com/repos/leapmotion/autowiring/assignees{/user}","branches_url":"https://api.github.com/repos/leapmotion/autowiring/branches{/branch}","tags_url":"https://api.github.com/repos/leapmotion/autowiring/tags","blobs_url":"https://api.github.com/repos/leapmotion/autowiring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leapmotion/autowiring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leapmotion/autowiring/git/refs{/sha}","trees_url":"https://api.github.com/repos/leapmotion/autowiring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leapmotion/autowiring/statuses/{sha}","languages_url":"https://api.github.com/repos/leapmotion/autowiring/languages","stargazers_url":"https://api.github.com/repos/leapmotion/autowiring/stargazers","contributors_url":"https://api.github.com/repos/leapmotion/autowiring/contributors","subscribers_url":"https://api.github.com/repos/leapmotion/autowiring/subscribers","subscription_url":"https://api.github.com/repos/leapmotion/autowiring/subscription","commits_url":"https://api.github.com/repos/leapmotion/autowiring/commits{/sha}","git_commits_url":"https://api.github.com/repos/leapmotion/autowiring/git/commits{/sha}","comments_url":"https://api.github.com/repos/leapmotion/autowiring/comments{/number}","issue_comment_url":"https://api.github.com/repos/leapmotion/autowiring/issues/comments{/number}","contents_url":"https://api.github.com/repos/leapmotion/autowiring/contents/{+path}","compare_url":"https://api.github.com/repos/leapmotion/autowiring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leapmotion/autowiring/merges","archive_url":"https://api.github.com/repos/leapmotion/autowiring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leapmotion/autowiring/downloads","issues_url":"https://api.github.com/repos/leapmotion/autowiring/issues{/number}","pulls_url":"https://api.github.com/repos/leapmotion/autowiring/pulls{/number}","milestones_url":"https://api.github.com/repos/leapmotion/autowiring/milestones{/number}","notifications_url":"https://api.github.com/repos/leapmotion/autowiring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leapmotion/autowiring/labels{/name}","releases_url":"https://api.github.com/repos/leapmotion/autowiring/releases{/id}","deployments_url":"https://api.github.com/repos/leapmotion/autowiring/deployments","created_at":"2014-07-24T22:39:49Z","updated_at":"2016-02-29T15:13:29Z","pushed_at":"2016-03-31T22:12:51Z","git_url":"git://github.com/leapmotion/autowiring.git","ssh_url":"git@github.com:leapmotion/autowiring.git","clone_url":"https://github.com/leapmotion/autowiring.git","svn_url":"https://github.com/leapmotion/autowiring","homepage":"http://autowiring.io/","size":33730,"stargazers_count":97,"watchers_count":97,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":97,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/leapmotion/autowiring/pulls/861"},"html":{"href":"https://github.com/leapmotion/autowiring/pull/861"},"issue":{"href":"https://api.github.com/repos/leapmotion/autowiring/issues/861"},"comments":{"href":"https://api.github.com/repos/leapmotion/autowiring/issues/861/comments"},"review_comments":{"href":"https://api.github.com/repos/leapmotion/autowiring/pulls/861/comments"},"review_comment":{"href":"https://api.github.com/repos/leapmotion/autowiring/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leapmotion/autowiring/pulls/861/commits"},"statuses":{"href":"https://api.github.com/repos/leapmotion/autowiring/statuses/23442e31bf3e806bb211f0b514bf6f58bd721b27"}}}}