{"action":"created","comment":{"url":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/comments/50315427","id":50315427,"diff_hunk":"@@ -20,18 +20,23 @@ app.controller 'DropboxCtrl', ($scope, dropboxDataSourceHome, productProperties,\n     $scope.synchronization.clear()\n     $scope.loadFileNames()\n \n-  $scope.onParserChange = -> $scope.parserChange = true\n+  $scope.onParserChange = ->\n+    parser = $scope.synchronization.parserBuilder\n+    parser.clearOptions()\n+    action = if $scope.isCreating then \"create\" else \"edit\"\n+    state = \"#{action}.#{parser}\"","path":"client/app/main/dropbox/dropbox.controller.coffee","position":null,"original_position":15,"commit_id":"9b27a0f7dc4d5ffc95a8973009341837fd95a55f","original_commit_id":"7aca0e3ec509566a8ce9be7b0ebff52a1c37ee7f","user":{"login":"rodri042","id":1631752,"avatar_url":"https://avatars.githubusercontent.com/u/1631752?v=3","gravatar_id":"","url":"https://api.github.com/users/rodri042","html_url":"https://github.com/rodri042","followers_url":"https://api.github.com/users/rodri042/followers","following_url":"https://api.github.com/users/rodri042/following{/other_user}","gists_url":"https://api.github.com/users/rodri042/gists{/gist_id}","starred_url":"https://api.github.com/users/rodri042/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodri042/subscriptions","organizations_url":"https://api.github.com/users/rodri042/orgs","repos_url":"https://api.github.com/users/rodri042/repos","events_url":"https://api.github.com/users/rodri042/events{/privacy}","received_events_url":"https://api.github.com/users/rodri042/received_events","type":"User","site_admin":false},"body":"Lo hice el refactor pero miralo @canofm :blush: \r\n","created_at":"2016-01-20T20:40:06Z","updated_at":"2016-01-20T20:40:06Z","html_url":"https://github.com/Parsimotion/producteca-syncer/pull/8#discussion_r50315427","pull_request_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/comments/50315427"},"html":{"href":"https://github.com/Parsimotion/producteca-syncer/pull/8#discussion_r50315427"},"pull_request":{"href":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/8","id":54832955,"html_url":"https://github.com/Parsimotion/producteca-syncer/pull/8","diff_url":"https://github.com/Parsimotion/producteca-syncer/pull/8.diff","patch_url":"https://github.com/Parsimotion/producteca-syncer/pull/8.patch","issue_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/issues/8","number":8,"state":"open","locked":false,"title":"Json parser + Refactor de states","user":{"login":"rodri042","id":1631752,"avatar_url":"https://avatars.githubusercontent.com/u/1631752?v=3","gravatar_id":"","url":"https://api.github.com/users/rodri042","html_url":"https://github.com/rodri042","followers_url":"https://api.github.com/users/rodri042/followers","following_url":"https://api.github.com/users/rodri042/following{/other_user}","gists_url":"https://api.github.com/users/rodri042/gists{/gist_id}","starred_url":"https://api.github.com/users/rodri042/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodri042/subscriptions","organizations_url":"https://api.github.com/users/rodri042/orgs","repos_url":"https://api.github.com/users/rodri042/repos","events_url":"https://api.github.com/users/rodri042/events{/privacy}","received_events_url":"https://api.github.com/users/rodri042/received_events","type":"User","site_admin":false},"body":"[Finishes #106697634](https://www.pivotaltracker.com/story/show/106697634)\r\n\r\nEl chabón escribe una **parsingFunction** que puede ser algo como:\r\n```js\r\nfunction(obj, send) {\r\n  setTimeout(function() {\r\n    send({\r\n      name: obj.nombre,\r\n      code: obj.codigoDeBarras,\r\n      stocks: [\r\n        { warehouse: obj.depositos[0], quantity: obj.stockEnTodosLados }\r\n      ]\r\n    });\r\n  }, 0);\r\n}\r\n```\r\n\r\n(El *setTimeout* lo puse solo para probar que se banque parseos \"asincrónicos\", no es necesario)\r\nEl código corre en un scope, así que no puede usar cualquier paquete de npm o variable global. En el archivo *parsingFunction.globals.coffee* nosotros escribiríamos las bibliotecas que le dejaríamos usar al usuario (por ahora solo puse `request` y `setTimeout`).\r\n\r\n## Las correcciones del https://github.com/Parsimotion/producteca-syncer/pull/9 se hicieron en esta branch. Se sumó un refactor a los states.","created_at":"2015-12-30T21:59:32Z","updated_at":"2016-01-20T20:40:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"261ae7b7495f310e0b65f5f490fc9ff273a65359","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/8/commits","review_comments_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/8/comments","review_comment_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/issues/8/comments","statuses_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/statuses/9b27a0f7dc4d5ffc95a8973009341837fd95a55f","head":{"label":"Parsimotion:json-parser","ref":"json-parser","sha":"9b27a0f7dc4d5ffc95a8973009341837fd95a55f","user":{"login":"Parsimotion","id":8582957,"avatar_url":"https://avatars.githubusercontent.com/u/8582957?v=3","gravatar_id":"","url":"https://api.github.com/users/Parsimotion","html_url":"https://github.com/Parsimotion","followers_url":"https://api.github.com/users/Parsimotion/followers","following_url":"https://api.github.com/users/Parsimotion/following{/other_user}","gists_url":"https://api.github.com/users/Parsimotion/gists{/gist_id}","starred_url":"https://api.github.com/users/Parsimotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parsimotion/subscriptions","organizations_url":"https://api.github.com/users/Parsimotion/orgs","repos_url":"https://api.github.com/users/Parsimotion/repos","events_url":"https://api.github.com/users/Parsimotion/events{/privacy}","received_events_url":"https://api.github.com/users/Parsimotion/received_events","type":"Organization","site_admin":false},"repo":{"id":46137398,"name":"producteca-syncer","full_name":"Parsimotion/producteca-syncer","owner":{"login":"Parsimotion","id":8582957,"avatar_url":"https://avatars.githubusercontent.com/u/8582957?v=3","gravatar_id":"","url":"https://api.github.com/users/Parsimotion","html_url":"https://github.com/Parsimotion","followers_url":"https://api.github.com/users/Parsimotion/followers","following_url":"https://api.github.com/users/Parsimotion/following{/other_user}","gists_url":"https://api.github.com/users/Parsimotion/gists{/gist_id}","starred_url":"https://api.github.com/users/Parsimotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parsimotion/subscriptions","organizations_url":"https://api.github.com/users/Parsimotion/orgs","repos_url":"https://api.github.com/users/Parsimotion/repos","events_url":"https://api.github.com/users/Parsimotion/events{/privacy}","received_events_url":"https://api.github.com/users/Parsimotion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Parsimotion/producteca-syncer","description":"Product Syncer between Producteca and other services","fork":false,"url":"https://api.github.com/repos/Parsimotion/producteca-syncer","forks_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/forks","keys_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/teams","hooks_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/hooks","issue_events_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/issues/events{/number}","events_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/events","assignees_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/assignees{/user}","branches_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/branches{/branch}","tags_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/tags","blobs_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/statuses/{sha}","languages_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/languages","stargazers_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/stargazers","contributors_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/contributors","subscribers_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/subscribers","subscription_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/subscription","commits_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/contents/{+path}","compare_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/merges","archive_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/downloads","issues_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/issues{/number}","pulls_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls{/number}","milestones_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/milestones{/number}","notifications_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/labels{/name}","releases_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/releases{/id}","created_at":"2015-11-13T17:38:10Z","updated_at":"2016-01-19T17:58:57Z","pushed_at":"2016-01-20T20:23:40Z","git_url":"git://github.com/Parsimotion/producteca-syncer.git","ssh_url":"git@github.com:Parsimotion/producteca-syncer.git","clone_url":"https://github.com/Parsimotion/producteca-syncer.git","svn_url":"https://github.com/Parsimotion/producteca-syncer","homepage":null,"size":471,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"development"}},"base":{"label":"Parsimotion:development","ref":"development","sha":"55792019fb4f4e8faa0d3645bea202e92a2dbcc4","user":{"login":"Parsimotion","id":8582957,"avatar_url":"https://avatars.githubusercontent.com/u/8582957?v=3","gravatar_id":"","url":"https://api.github.com/users/Parsimotion","html_url":"https://github.com/Parsimotion","followers_url":"https://api.github.com/users/Parsimotion/followers","following_url":"https://api.github.com/users/Parsimotion/following{/other_user}","gists_url":"https://api.github.com/users/Parsimotion/gists{/gist_id}","starred_url":"https://api.github.com/users/Parsimotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parsimotion/subscriptions","organizations_url":"https://api.github.com/users/Parsimotion/orgs","repos_url":"https://api.github.com/users/Parsimotion/repos","events_url":"https://api.github.com/users/Parsimotion/events{/privacy}","received_events_url":"https://api.github.com/users/Parsimotion/received_events","type":"Organization","site_admin":false},"repo":{"id":46137398,"name":"producteca-syncer","full_name":"Parsimotion/producteca-syncer","owner":{"login":"Parsimotion","id":8582957,"avatar_url":"https://avatars.githubusercontent.com/u/8582957?v=3","gravatar_id":"","url":"https://api.github.com/users/Parsimotion","html_url":"https://github.com/Parsimotion","followers_url":"https://api.github.com/users/Parsimotion/followers","following_url":"https://api.github.com/users/Parsimotion/following{/other_user}","gists_url":"https://api.github.com/users/Parsimotion/gists{/gist_id}","starred_url":"https://api.github.com/users/Parsimotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parsimotion/subscriptions","organizations_url":"https://api.github.com/users/Parsimotion/orgs","repos_url":"https://api.github.com/users/Parsimotion/repos","events_url":"https://api.github.com/users/Parsimotion/events{/privacy}","received_events_url":"https://api.github.com/users/Parsimotion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Parsimotion/producteca-syncer","description":"Product Syncer between Producteca and other services","fork":false,"url":"https://api.github.com/repos/Parsimotion/producteca-syncer","forks_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/forks","keys_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/teams","hooks_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/hooks","issue_events_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/issues/events{/number}","events_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/events","assignees_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/assignees{/user}","branches_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/branches{/branch}","tags_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/tags","blobs_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/statuses/{sha}","languages_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/languages","stargazers_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/stargazers","contributors_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/contributors","subscribers_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/subscribers","subscription_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/subscription","commits_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/contents/{+path}","compare_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/merges","archive_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/downloads","issues_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/issues{/number}","pulls_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls{/number}","milestones_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/milestones{/number}","notifications_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/labels{/name}","releases_url":"https://api.github.com/repos/Parsimotion/producteca-syncer/releases{/id}","created_at":"2015-11-13T17:38:10Z","updated_at":"2016-01-19T17:58:57Z","pushed_at":"2016-01-20T20:23:40Z","git_url":"git://github.com/Parsimotion/producteca-syncer.git","ssh_url":"git@github.com:Parsimotion/producteca-syncer.git","clone_url":"https://github.com/Parsimotion/producteca-syncer.git","svn_url":"https://github.com/Parsimotion/producteca-syncer","homepage":null,"size":471,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/8"},"html":{"href":"https://github.com/Parsimotion/producteca-syncer/pull/8"},"issue":{"href":"https://api.github.com/repos/Parsimotion/producteca-syncer/issues/8"},"comments":{"href":"https://api.github.com/repos/Parsimotion/producteca-syncer/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Parsimotion/producteca-syncer/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/Parsimotion/producteca-syncer/statuses/9b27a0f7dc4d5ffc95a8973009341837fd95a55f"}}}}