{"action":"opened","issue":{"url":"https://api.github.com/repos/alexstyl/Memento-Namedays/issues/11","repository_url":"https://api.github.com/repos/alexstyl/Memento-Namedays","labels_url":"https://api.github.com/repos/alexstyl/Memento-Namedays/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/alexstyl/Memento-Namedays/issues/11/comments","events_url":"https://api.github.com/repos/alexstyl/Memento-Namedays/issues/11/events","html_url":"https://github.com/alexstyl/Memento-Namedays/issues/11","id":174916082,"number":11,"title":"Code duplication in NamedayDatabaseRefresher","user":{"login":"alexstyl","id":1665273,"avatar_url":"https://avatars.githubusercontent.com/u/1665273?v=3","gravatar_id":"","url":"https://api.github.com/users/alexstyl","html_url":"https://github.com/alexstyl","followers_url":"https://api.github.com/users/alexstyl/followers","following_url":"https://api.github.com/users/alexstyl/following{/other_user}","gists_url":"https://api.github.com/users/alexstyl/gists{/gist_id}","starred_url":"https://api.github.com/users/alexstyl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexstyl/subscriptions","organizations_url":"https://api.github.com/users/alexstyl/orgs","repos_url":"https://api.github.com/users/alexstyl/repos","events_url":"https://api.github.com/users/alexstyl/events{/privacy}","received_events_url":"https://api.github.com/users/alexstyl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/alexstyl/Memento-Namedays/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-03T20:37:02Z","updated_at":"2016-09-03T20:37:02Z","closed_at":null,"body":"Currently NamedayDatabaseRefresher contains two different methods to calculate the static and special namedays of the device's events respectively. The problem is that right now the `NamedayDatabaseRefresher` does more than one things (queries the contacts, goes through them to find their namedays), breaking the `Single Responsibility` principle. This makes it also hard to test.\r\n\r\nThe logic of the class needs to break down to smaller class so that we don't duplicate the logic between static and dynamic(special) namedays and make the class easy to test."}}
{"actor":{"display_login":"alexstyl"}}