{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/specialist-publisher/issues/550","labels_url":"https://api.github.com/repos/alphagov/specialist-publisher/issues/550/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/specialist-publisher/issues/550/comments","events_url":"https://api.github.com/repos/alphagov/specialist-publisher/issues/550/events","html_url":"https://github.com/alphagov/specialist-publisher/pull/550","id":103740062,"number":550,"title":"Refactor finder publishing","user":{"login":"edds","id":35035,"avatar_url":"https://avatars.githubusercontent.com/u/35035?v=3","gravatar_id":"","url":"https://api.github.com/users/edds","html_url":"https://github.com/edds","followers_url":"https://api.github.com/users/edds/followers","following_url":"https://api.github.com/users/edds/following{/other_user}","gists_url":"https://api.github.com/users/edds/gists{/gist_id}","starred_url":"https://api.github.com/users/edds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edds/subscriptions","organizations_url":"https://api.github.com/users/edds/orgs","repos_url":"https://api.github.com/users/edds/repos","events_url":"https://api.github.com/users/edds/events{/privacy}","received_events_url":"https://api.github.com/users/edds/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-28T15:29:54Z","updated_at":"2015-08-28T15:53:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/alphagov/specialist-publisher/pulls/550","html_url":"https://github.com/alphagov/specialist-publisher/pull/550","diff_url":"https://github.com/alphagov/specialist-publisher/pull/550.diff","patch_url":"https://github.com/alphagov/specialist-publisher/pull/550.patch"},"body":"To create the finder content items we were previously running a glob\r\nover two different folders and then zip'ing the resultant file arrays\r\ntogether. This assumed that both sets of files would be read of disk in\r\nthe same order.\r\n\r\nThis changes that so that instead we now read both folders but then only\r\nselect the files that exist in both folders. We then load each of those\r\nfiles by name so that we can be sure that the files are matched together\r\ncorrectly.\r\n\r\nTo do this I have refactored the arguments to the publishing publisher\r\nto take a single object which is an array of finders. Each finder\r\ncontains both the schema and the metadata to then create the finder\r\nfrom. Internally I have modified many of the methods to pass the whole\r\nfinder object around rather than passing just the metadata or schema as\r\nthey are individually needed.\r\n\r\nhttps://trello.com/c/yFKkfBLp/98-specialist-publisher-finder-publishing-can-silently-mix-finder-facets-between-finders"},"comment":{"url":"https://api.github.com/repos/alphagov/specialist-publisher/issues/comments/135812988","html_url":"https://github.com/alphagov/specialist-publisher/pull/550#issuecomment-135812988","issue_url":"https://api.github.com/repos/alphagov/specialist-publisher/issues/550","id":135812988,"user":{"login":"mikejustdoit","id":348052,"avatar_url":"https://avatars.githubusercontent.com/u/348052?v=3","gravatar_id":"","url":"https://api.github.com/users/mikejustdoit","html_url":"https://github.com/mikejustdoit","followers_url":"https://api.github.com/users/mikejustdoit/followers","following_url":"https://api.github.com/users/mikejustdoit/following{/other_user}","gists_url":"https://api.github.com/users/mikejustdoit/gists{/gist_id}","starred_url":"https://api.github.com/users/mikejustdoit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikejustdoit/subscriptions","organizations_url":"https://api.github.com/users/mikejustdoit/orgs","repos_url":"https://api.github.com/users/mikejustdoit/repos","events_url":"https://api.github.com/users/mikejustdoit/events{/privacy}","received_events_url":"https://api.github.com/users/mikejustdoit/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T15:53:16Z","updated_at":"2015-08-28T15:53:16Z","body":"Nice one @edds, matching the files definitely feels like progress.\r\n\r\nIt'd be nice to have the rake task complain about non-matching files..?\r\n\r\nIn fact, I was wondering if we could have the globbing/file-matching moved to its own object? Then we could also use it to perform checks for non-matching files in rake's default task and on the CI build"}}