{"action":"created","comment":{"url":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/comments/73635085","id":73635085,"diff_hunk":"@@ -288,6 +314,75 @@ - (BOOL)startWithTaskGroup:(dispatch_group_t)taskGroup error:(NSError *__autorel\n     return YES;\n }\n \n+/**\n+ Builds a TDReplicator object from a CDTPush/PullReplication configuration.\n+ */\n+- (TDReplicator *)buildTDReplicatorFromConfiguration:(CDTAbstractReplication *)configuration\n+                                               error:(NSError *__autoreleasing *)error\n+{\n+    // This validates the optional headers\n+    NSMutableDictionary *properties = [[NSMutableDictionary alloc] init];\n+    \n+    if ([CDTAbstractReplication validateOptionalHeaders:configuration.optionalHeaders error:error]) {","path":"CDTDatastore/CDTReplicator/CDTReplicator.m","position":null,"original_position":112,"commit_id":"06cf8b0ee2a666ed93cd513926265aa554bb428a","original_commit_id":"9bbbc4e3fc5d9b0edbc3e0e38dcc71211a777620","user":{"login":"emlaver","id":10552966,"avatar_url":"https://avatars.githubusercontent.com/u/10552966?v=3","gravatar_id":"","url":"https://api.github.com/users/emlaver","html_url":"https://github.com/emlaver","followers_url":"https://api.github.com/users/emlaver/followers","following_url":"https://api.github.com/users/emlaver/following{/other_user}","gists_url":"https://api.github.com/users/emlaver/gists{/gist_id}","starred_url":"https://api.github.com/users/emlaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emlaver/subscriptions","organizations_url":"https://api.github.com/users/emlaver/orgs","repos_url":"https://api.github.com/users/emlaver/repos","events_url":"https://api.github.com/users/emlaver/events{/privacy}","received_events_url":"https://api.github.com/users/emlaver/received_events","type":"User","site_admin":false},"body":"Fixed in 06cf8b0.","created_at":"2016-08-05T02:39:25Z","updated_at":"2016-08-05T02:39:25Z","html_url":"https://github.com/cloudant/CDTDatastore/pull/309#discussion_r73635085","pull_request_url":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/309","_links":{"self":{"href":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/comments/73635085"},"html":{"href":"https://github.com/cloudant/CDTDatastore/pull/309#discussion_r73635085"},"pull_request":{"href":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/309"}}},"pull_request":{"url":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/309","id":79749807,"html_url":"https://github.com/cloudant/CDTDatastore/pull/309","diff_url":"https://github.com/cloudant/CDTDatastore/pull/309.diff","patch_url":"https://github.com/cloudant/CDTDatastore/pull/309.patch","issue_url":"https://api.github.com/repos/cloudant/CDTDatastore/issues/309","number":309,"state":"open","locked":false,"title":"Simplify replicator creation","user":{"login":"emlaver","id":10552966,"avatar_url":"https://avatars.githubusercontent.com/u/10552966?v=3","gravatar_id":"","url":"https://api.github.com/users/emlaver","html_url":"https://github.com/emlaver","followers_url":"https://api.github.com/users/emlaver/followers","following_url":"https://api.github.com/users/emlaver/following{/other_user}","gists_url":"https://api.github.com/users/emlaver/gists{/gist_id}","starred_url":"https://api.github.com/users/emlaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emlaver/subscriptions","organizations_url":"https://api.github.com/users/emlaver/orgs","repos_url":"https://api.github.com/users/emlaver/repos","events_url":"https://api.github.com/users/emlaver/events{/privacy}","received_events_url":"https://api.github.com/users/emlaver/received_events","type":"User","site_admin":false},"body":"## What\r\nSimplify the replicator creation by removing the manager classes from the current creation:\r\nCDTReplicator -> TD_ReplicatorManager -> TDDatabaseManager -> TDReplicatorManager -> CDTReplicator\r\n\r\nAny existing code needed in ``TDDatabaseManager`` and ``TDReplicatorManager`` was moved into CDTReplicator. \r\n\r\n## How\r\nRemoved TDReplicatorManager from replicator creation\r\n- Replaced TDReplicatorManager imports and usages with TD_DatabaseManager\r\n- Renamed initWithTDReplicatorManager to initWithTDDatabaseManager\r\n- Handled replicatorWithConfiguration and createReplicatorWithProperties methods in CDTReplicator\r\n\r\nRemoved replication code from TD_DatabaseManager and TDReplicatorManager as it's no longer required after moving all TDReplicator create code to the CDTReplicator\r\n- Removed TDReplicatorManager classes since they are not maintained or used\r\n- Added remoteCheckpointDocID method from TDReplicator to CDTReplicator for testing\r\n- Replaced TDReplicator instances with CDTReplicator in ReplicationAcceptance test class\r\n\r\nConstructed TDReplicator entirely within CDTReplicator\r\n\r\nRemove TDReplicatorManager from replicator creation\r\n- Replaced TDReplicatorManager imports and usages with TD_DatabaseManager\r\n- Renamed initWithTDReplicatorManager to initWithTDDatabaseManager\r\n- Handled replicatorWithConfiguration and createReplicatorWithProperties methods in CDTReplicator\r\n\r\nRemoved options dictionary and replaced with heartbeat and reset variables\r\n- Made all replication config into TDReplicator properties\r\n\r\nRemoved ``dictionaryForReplicatorDocument`` method and any instances of it as it's not used and can be replaced by ``validateOptionalHeaders``\r\n\r\n## Testing\r\nNo new unit tests.\r\nRemoved unit tests ``testDictionaryForPullReplicationDocument`` and ``testDictionaryForPushReplicationDocument``.\r\nReplaced instances of ``dictionaryForReplicatorDocument`` in unit tests with ``validateOptionalHeaders``.\r\n\r\n## Issue\r\nfixes #291 ","created_at":"2016-08-02T14:54:34Z","updated_at":"2016-08-05T02:39:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cda734f686ad85c01768bab9730d8cb934c2b951","assignee":{"login":"rhyshort","id":1616727,"avatar_url":"https://avatars.githubusercontent.com/u/1616727?v=3","gravatar_id":"","url":"https://api.github.com/users/rhyshort","html_url":"https://github.com/rhyshort","followers_url":"https://api.github.com/users/rhyshort/followers","following_url":"https://api.github.com/users/rhyshort/following{/other_user}","gists_url":"https://api.github.com/users/rhyshort/gists{/gist_id}","starred_url":"https://api.github.com/users/rhyshort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhyshort/subscriptions","organizations_url":"https://api.github.com/users/rhyshort/orgs","repos_url":"https://api.github.com/users/rhyshort/repos","events_url":"https://api.github.com/users/rhyshort/events{/privacy}","received_events_url":"https://api.github.com/users/rhyshort/received_events","type":"User","site_admin":false},"assignees":[{"login":"rhyshort","id":1616727,"avatar_url":"https://avatars.githubusercontent.com/u/1616727?v=3","gravatar_id":"","url":"https://api.github.com/users/rhyshort","html_url":"https://github.com/rhyshort","followers_url":"https://api.github.com/users/rhyshort/followers","following_url":"https://api.github.com/users/rhyshort/following{/other_user}","gists_url":"https://api.github.com/users/rhyshort/gists{/gist_id}","starred_url":"https://api.github.com/users/rhyshort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhyshort/subscriptions","organizations_url":"https://api.github.com/users/rhyshort/orgs","repos_url":"https://api.github.com/users/rhyshort/repos","events_url":"https://api.github.com/users/rhyshort/events{/privacy}","received_events_url":"https://api.github.com/users/rhyshort/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/309/commits","review_comments_url":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/309/comments","review_comment_url":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudant/CDTDatastore/issues/309/comments","statuses_url":"https://api.github.com/repos/cloudant/CDTDatastore/statuses/06cf8b0ee2a666ed93cd513926265aa554bb428a","head":{"label":"cloudant:291-simplify-replicator-creation","ref":"291-simplify-replicator-creation","sha":"06cf8b0ee2a666ed93cd513926265aa554bb428a","user":{"login":"cloudant","id":44642,"avatar_url":"https://avatars.githubusercontent.com/u/44642?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudant","html_url":"https://github.com/cloudant","followers_url":"https://api.github.com/users/cloudant/followers","following_url":"https://api.github.com/users/cloudant/following{/other_user}","gists_url":"https://api.github.com/users/cloudant/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudant/subscriptions","organizations_url":"https://api.github.com/users/cloudant/orgs","repos_url":"https://api.github.com/users/cloudant/repos","events_url":"https://api.github.com/users/cloudant/events{/privacy}","received_events_url":"https://api.github.com/users/cloudant/received_events","type":"Organization","site_admin":false},"repo":{"id":15022868,"name":"CDTDatastore","full_name":"cloudant/CDTDatastore","owner":{"login":"cloudant","id":44642,"avatar_url":"https://avatars.githubusercontent.com/u/44642?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudant","html_url":"https://github.com/cloudant","followers_url":"https://api.github.com/users/cloudant/followers","following_url":"https://api.github.com/users/cloudant/following{/other_user}","gists_url":"https://api.github.com/users/cloudant/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudant/subscriptions","organizations_url":"https://api.github.com/users/cloudant/orgs","repos_url":"https://api.github.com/users/cloudant/repos","events_url":"https://api.github.com/users/cloudant/events{/privacy}","received_events_url":"https://api.github.com/users/cloudant/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudant/CDTDatastore","description":"Cloudant Sync iOS datastore library.","fork":false,"url":"https://api.github.com/repos/cloudant/CDTDatastore","forks_url":"https://api.github.com/repos/cloudant/CDTDatastore/forks","keys_url":"https://api.github.com/repos/cloudant/CDTDatastore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudant/CDTDatastore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudant/CDTDatastore/teams","hooks_url":"https://api.github.com/repos/cloudant/CDTDatastore/hooks","issue_events_url":"https://api.github.com/repos/cloudant/CDTDatastore/issues/events{/number}","events_url":"https://api.github.com/repos/cloudant/CDTDatastore/events","assignees_url":"https://api.github.com/repos/cloudant/CDTDatastore/assignees{/user}","branches_url":"https://api.github.com/repos/cloudant/CDTDatastore/branches{/branch}","tags_url":"https://api.github.com/repos/cloudant/CDTDatastore/tags","blobs_url":"https://api.github.com/repos/cloudant/CDTDatastore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudant/CDTDatastore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudant/CDTDatastore/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudant/CDTDatastore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudant/CDTDatastore/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudant/CDTDatastore/languages","stargazers_url":"https://api.github.com/repos/cloudant/CDTDatastore/stargazers","contributors_url":"https://api.github.com/repos/cloudant/CDTDatastore/contributors","subscribers_url":"https://api.github.com/repos/cloudant/CDTDatastore/subscribers","subscription_url":"https://api.github.com/repos/cloudant/CDTDatastore/subscription","commits_url":"https://api.github.com/repos/cloudant/CDTDatastore/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudant/CDTDatastore/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudant/CDTDatastore/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudant/CDTDatastore/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudant/CDTDatastore/contents/{+path}","compare_url":"https://api.github.com/repos/cloudant/CDTDatastore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudant/CDTDatastore/merges","archive_url":"https://api.github.com/repos/cloudant/CDTDatastore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudant/CDTDatastore/downloads","issues_url":"https://api.github.com/repos/cloudant/CDTDatastore/issues{/number}","pulls_url":"https://api.github.com/repos/cloudant/CDTDatastore/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudant/CDTDatastore/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudant/CDTDatastore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudant/CDTDatastore/labels{/name}","releases_url":"https://api.github.com/repos/cloudant/CDTDatastore/releases{/id}","deployments_url":"https://api.github.com/repos/cloudant/CDTDatastore/deployments","created_at":"2013-12-08T11:59:05Z","updated_at":"2016-08-04T12:51:01Z","pushed_at":"2016-08-05T02:24:19Z","git_url":"git://github.com/cloudant/CDTDatastore.git","ssh_url":"git@github.com:cloudant/CDTDatastore.git","clone_url":"https://github.com/cloudant/CDTDatastore.git","svn_url":"https://github.com/cloudant/CDTDatastore","homepage":null,"size":7407,"stargazers_count":117,"watchers_count":117,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":47,"forks":28,"open_issues":47,"watchers":117,"default_branch":"master"}},"base":{"label":"cloudant:master","ref":"master","sha":"eae81f90f6fd2769297ec5bfa2f7f0894e2e5a43","user":{"login":"cloudant","id":44642,"avatar_url":"https://avatars.githubusercontent.com/u/44642?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudant","html_url":"https://github.com/cloudant","followers_url":"https://api.github.com/users/cloudant/followers","following_url":"https://api.github.com/users/cloudant/following{/other_user}","gists_url":"https://api.github.com/users/cloudant/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudant/subscriptions","organizations_url":"https://api.github.com/users/cloudant/orgs","repos_url":"https://api.github.com/users/cloudant/repos","events_url":"https://api.github.com/users/cloudant/events{/privacy}","received_events_url":"https://api.github.com/users/cloudant/received_events","type":"Organization","site_admin":false},"repo":{"id":15022868,"name":"CDTDatastore","full_name":"cloudant/CDTDatastore","owner":{"login":"cloudant","id":44642,"avatar_url":"https://avatars.githubusercontent.com/u/44642?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudant","html_url":"https://github.com/cloudant","followers_url":"https://api.github.com/users/cloudant/followers","following_url":"https://api.github.com/users/cloudant/following{/other_user}","gists_url":"https://api.github.com/users/cloudant/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudant/subscriptions","organizations_url":"https://api.github.com/users/cloudant/orgs","repos_url":"https://api.github.com/users/cloudant/repos","events_url":"https://api.github.com/users/cloudant/events{/privacy}","received_events_url":"https://api.github.com/users/cloudant/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudant/CDTDatastore","description":"Cloudant Sync iOS datastore library.","fork":false,"url":"https://api.github.com/repos/cloudant/CDTDatastore","forks_url":"https://api.github.com/repos/cloudant/CDTDatastore/forks","keys_url":"https://api.github.com/repos/cloudant/CDTDatastore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudant/CDTDatastore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudant/CDTDatastore/teams","hooks_url":"https://api.github.com/repos/cloudant/CDTDatastore/hooks","issue_events_url":"https://api.github.com/repos/cloudant/CDTDatastore/issues/events{/number}","events_url":"https://api.github.com/repos/cloudant/CDTDatastore/events","assignees_url":"https://api.github.com/repos/cloudant/CDTDatastore/assignees{/user}","branches_url":"https://api.github.com/repos/cloudant/CDTDatastore/branches{/branch}","tags_url":"https://api.github.com/repos/cloudant/CDTDatastore/tags","blobs_url":"https://api.github.com/repos/cloudant/CDTDatastore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudant/CDTDatastore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudant/CDTDatastore/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudant/CDTDatastore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudant/CDTDatastore/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudant/CDTDatastore/languages","stargazers_url":"https://api.github.com/repos/cloudant/CDTDatastore/stargazers","contributors_url":"https://api.github.com/repos/cloudant/CDTDatastore/contributors","subscribers_url":"https://api.github.com/repos/cloudant/CDTDatastore/subscribers","subscription_url":"https://api.github.com/repos/cloudant/CDTDatastore/subscription","commits_url":"https://api.github.com/repos/cloudant/CDTDatastore/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudant/CDTDatastore/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudant/CDTDatastore/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudant/CDTDatastore/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudant/CDTDatastore/contents/{+path}","compare_url":"https://api.github.com/repos/cloudant/CDTDatastore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudant/CDTDatastore/merges","archive_url":"https://api.github.com/repos/cloudant/CDTDatastore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudant/CDTDatastore/downloads","issues_url":"https://api.github.com/repos/cloudant/CDTDatastore/issues{/number}","pulls_url":"https://api.github.com/repos/cloudant/CDTDatastore/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudant/CDTDatastore/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudant/CDTDatastore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudant/CDTDatastore/labels{/name}","releases_url":"https://api.github.com/repos/cloudant/CDTDatastore/releases{/id}","deployments_url":"https://api.github.com/repos/cloudant/CDTDatastore/deployments","created_at":"2013-12-08T11:59:05Z","updated_at":"2016-08-04T12:51:01Z","pushed_at":"2016-08-05T02:24:19Z","git_url":"git://github.com/cloudant/CDTDatastore.git","ssh_url":"git@github.com:cloudant/CDTDatastore.git","clone_url":"https://github.com/cloudant/CDTDatastore.git","svn_url":"https://github.com/cloudant/CDTDatastore","homepage":null,"size":7407,"stargazers_count":117,"watchers_count":117,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":47,"forks":28,"open_issues":47,"watchers":117,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/309"},"html":{"href":"https://github.com/cloudant/CDTDatastore/pull/309"},"issue":{"href":"https://api.github.com/repos/cloudant/CDTDatastore/issues/309"},"comments":{"href":"https://api.github.com/repos/cloudant/CDTDatastore/issues/309/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/309/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudant/CDTDatastore/pulls/309/commits"},"statuses":{"href":"https://api.github.com/repos/cloudant/CDTDatastore/statuses/06cf8b0ee2a666ed93cd513926265aa554bb428a"}}}}
{"actor":{"display_login":"emlaver"}}