{"action":"created","issue":{"url":"https://api.github.com/repos/ncornag/microbase/issues/4","repository_url":"https://api.github.com/repos/ncornag/microbase","labels_url":"https://api.github.com/repos/ncornag/microbase/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/ncornag/microbase/issues/4/comments","events_url":"https://api.github.com/repos/ncornag/microbase/issues/4/events","html_url":"https://github.com/ncornag/microbase/pull/4","id":177297215,"number":4,"title":"operations as files","user":{"login":"anmaso","id":298079,"avatar_url":"https://avatars.githubusercontent.com/u/298079?v=3","gravatar_id":"","url":"https://api.github.com/users/anmaso","html_url":"https://github.com/anmaso","followers_url":"https://api.github.com/users/anmaso/followers","following_url":"https://api.github.com/users/anmaso/following{/other_user}","gists_url":"https://api.github.com/users/anmaso/gists{/gist_id}","starred_url":"https://api.github.com/users/anmaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anmaso/subscriptions","organizations_url":"https://api.github.com/users/anmaso/orgs","repos_url":"https://api.github.com/users/anmaso/repos","events_url":"https://api.github.com/users/anmaso/events{/privacy}","received_events_url":"https://api.github.com/users/anmaso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-15T21:41:44Z","updated_at":"2016-09-16T08:07:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ncornag/microbase/pulls/4","html_url":"https://github.com/ncornag/microbase/pull/4","diff_url":"https://github.com/ncornag/microbase/pull/4.diff","patch_url":"https://github.com/ncornag/microbase/pull/4.patch"},"body":"On this PR I suggest that each operation of a module is defined on its own file, kind of convention over configuration.\r\n\r\nBy default, the operation name will be the same as the file name\r\n\r\nalso operations are added using: `base.services.addOperations` instead of `addModule` passing as a parameter the folder where they are defined... in fact this could even be also by convention named 'operations' so it won't be needed...\r\n\r\nthe change in microbase/index.js is because the rootPath is needed in the module to properly extract the name of the module.\r\n\r\n- disadvantages of this approach: if you share code between operations you have to extract it to another file... but maybe is an advantage because it decouples even more the operations... who knows\r\n\r\nfeel free to accept it... in which case we should convert all operations an remove old way.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ncornag/microbase/issues/comments/247542636","html_url":"https://github.com/ncornag/microbase/pull/4#issuecomment-247542636","issue_url":"https://api.github.com/repos/ncornag/microbase/issues/4","id":247542636,"user":{"login":"ncornag","id":2655142,"avatar_url":"https://avatars.githubusercontent.com/u/2655142?v=3","gravatar_id":"","url":"https://api.github.com/users/ncornag","html_url":"https://github.com/ncornag","followers_url":"https://api.github.com/users/ncornag/followers","following_url":"https://api.github.com/users/ncornag/following{/other_user}","gists_url":"https://api.github.com/users/ncornag/gists{/gist_id}","starred_url":"https://api.github.com/users/ncornag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncornag/subscriptions","organizations_url":"https://api.github.com/users/ncornag/orgs","repos_url":"https://api.github.com/users/ncornag/repos","events_url":"https://api.github.com/users/ncornag/events{/privacy}","received_events_url":"https://api.github.com/users/ncornag/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T08:07:43Z","updated_at":"2016-09-16T08:07:43Z","body":"And, as you said:\r\n- The folder name could be optional, with 'operations' as default."}}
{"actor":{"display_login":"ncornag"}}