{"action":"created","comment":{"url":"https://api.github.com/repos/projecthydra/sufia/pulls/comments/25753304","id":25753304,"diff_hunk":"@@ -8,6 +8,12 @@\n     @file.apply_depositor_metadata(user.user_key)\n   end\n \n+  it 'is initialized with blanks' do","path":"spec/models/generic_file_spec.rb","position":4,"original_position":4,"commit_id":"9c1056dfed7298c34106f408b24d8264d0f4ffd7","original_commit_id":"9c1056dfed7298c34106f408b24d8264d0f4ffd7","user":{"login":"jcoyne","id":92044,"avatar_url":"https://avatars.githubusercontent.com/u/92044?v=3","gravatar_id":"","url":"https://api.github.com/users/jcoyne","html_url":"https://github.com/jcoyne","followers_url":"https://api.github.com/users/jcoyne/followers","following_url":"https://api.github.com/users/jcoyne/following{/other_user}","gists_url":"https://api.github.com/users/jcoyne/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoyne/subscriptions","organizations_url":"https://api.github.com/users/jcoyne/orgs","repos_url":"https://api.github.com/users/jcoyne/repos","events_url":"https://api.github.com/users/jcoyne/events{/privacy}","received_events_url":"https://api.github.com/users/jcoyne/received_events","type":"User","site_admin":false},"body":"Can we rephrase to:\r\n```ruby\r\ncontext \"when it is initialized\" do\r\n  it \"has empty arrays for all the properties\" do\r\n    subject.attributes.each do |k,v|\r\n      expect(Array(v)).to be_empty\r\n    end\r\n  end\r\nend\r\n```","created_at":"2015-03-04T05:38:58Z","updated_at":"2015-03-04T05:38:58Z","html_url":"https://github.com/projecthydra/sufia/pull/948#discussion_r25753304","pull_request_url":"https://api.github.com/repos/projecthydra/sufia/pulls/948","_links":{"self":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/comments/25753304"},"html":{"href":"https://github.com/projecthydra/sufia/pull/948#discussion_r25753304"},"pull_request":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/948"}}},"pull_request":{"url":"https://api.github.com/repos/projecthydra/sufia/pulls/948","id":30389328,"html_url":"https://github.com/projecthydra/sufia/pull/948","diff_url":"https://github.com/projecthydra/sufia/pull/948.diff","patch_url":"https://github.com/projecthydra/sufia/pull/948.patch","issue_url":"https://api.github.com/repos/projecthydra/sufia/issues/948","number":948,"state":"open","locked":false,"title":"Remove blank strings from files and collections","user":{"login":"phebal","id":3236815,"avatar_url":"https://avatars.githubusercontent.com/u/3236815?v=3","gravatar_id":"","url":"https://api.github.com/users/phebal","html_url":"https://github.com/phebal","followers_url":"https://api.github.com/users/phebal/followers","following_url":"https://api.github.com/users/phebal/following{/other_user}","gists_url":"https://api.github.com/users/phebal/gists{/gist_id}","starred_url":"https://api.github.com/users/phebal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phebal/subscriptions","organizations_url":"https://api.github.com/users/phebal/orgs","repos_url":"https://api.github.com/users/phebal/repos","events_url":"https://api.github.com/users/phebal/events{/privacy}","received_events_url":"https://api.github.com/users/phebal/received_events","type":"User","site_admin":false},"body":"Currently blank strings are saved in place of empty arrays for null values as described in  #941 \r\n\r\nProblems with `Collection` were only fixed in Sufia and not hydra-collections, because Sufia defines its own `collection_params` method and because `model_attributes` is available to remove the blank strings.\r\n\r\nI'm not sure that the fix for `GenericFile` blanks removal is correct. I don't fully understand what the implications of removing a part of the `xml_template` from `FitsDatastream` are, but many terms were already missing from it so I just removed the rest of them. I couldn't pass few of the tests before and after the change because of incompatibilities with ImageMagic and ffmpeg but the numbers remained constant.\r\n\r\nCloses #941","created_at":"2015-03-03T16:35:12Z","updated_at":"2015-03-04T05:38:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d26ce03922fce0b27afdff436ef9b02846bc2601","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/projecthydra/sufia/pulls/948/commits","review_comments_url":"https://api.github.com/repos/projecthydra/sufia/pulls/948/comments","review_comment_url":"https://api.github.com/repos/projecthydra/sufia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projecthydra/sufia/issues/948/comments","statuses_url":"https://api.github.com/repos/projecthydra/sufia/statuses/9c1056dfed7298c34106f408b24d8264d0f4ffd7","head":{"label":"phebal:fix/master/remove_blank_strings_collections","ref":"fix/master/remove_blank_strings_collections","sha":"9c1056dfed7298c34106f408b24d8264d0f4ffd7","user":{"login":"phebal","id":3236815,"avatar_url":"https://avatars.githubusercontent.com/u/3236815?v=3","gravatar_id":"","url":"https://api.github.com/users/phebal","html_url":"https://github.com/phebal","followers_url":"https://api.github.com/users/phebal/followers","following_url":"https://api.github.com/users/phebal/following{/other_user}","gists_url":"https://api.github.com/users/phebal/gists{/gist_id}","starred_url":"https://api.github.com/users/phebal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phebal/subscriptions","organizations_url":"https://api.github.com/users/phebal/orgs","repos_url":"https://api.github.com/users/phebal/repos","events_url":"https://api.github.com/users/phebal/events{/privacy}","received_events_url":"https://api.github.com/users/phebal/received_events","type":"User","site_admin":false},"repo":{"id":31389267,"name":"sufia","full_name":"phebal/sufia","owner":{"login":"phebal","id":3236815,"avatar_url":"https://avatars.githubusercontent.com/u/3236815?v=3","gravatar_id":"","url":"https://api.github.com/users/phebal","html_url":"https://github.com/phebal","followers_url":"https://api.github.com/users/phebal/followers","following_url":"https://api.github.com/users/phebal/following{/other_user}","gists_url":"https://api.github.com/users/phebal/gists{/gist_id}","starred_url":"https://api.github.com/users/phebal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phebal/subscriptions","organizations_url":"https://api.github.com/users/phebal/orgs","repos_url":"https://api.github.com/users/phebal/repos","events_url":"https://api.github.com/users/phebal/events{/privacy}","received_events_url":"https://api.github.com/users/phebal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phebal/sufia","description":"Sufia is a Rails engine for creating a self-deposit institutional repository. A web application for ingest, curation, search, and display of digital assets. Powered by Hydra technologies (Rails, Hydra-head, Blacklight, Solr, Fedora Commons, etc.)","fork":true,"url":"https://api.github.com/repos/phebal/sufia","forks_url":"https://api.github.com/repos/phebal/sufia/forks","keys_url":"https://api.github.com/repos/phebal/sufia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phebal/sufia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phebal/sufia/teams","hooks_url":"https://api.github.com/repos/phebal/sufia/hooks","issue_events_url":"https://api.github.com/repos/phebal/sufia/issues/events{/number}","events_url":"https://api.github.com/repos/phebal/sufia/events","assignees_url":"https://api.github.com/repos/phebal/sufia/assignees{/user}","branches_url":"https://api.github.com/repos/phebal/sufia/branches{/branch}","tags_url":"https://api.github.com/repos/phebal/sufia/tags","blobs_url":"https://api.github.com/repos/phebal/sufia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phebal/sufia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phebal/sufia/git/refs{/sha}","trees_url":"https://api.github.com/repos/phebal/sufia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phebal/sufia/statuses/{sha}","languages_url":"https://api.github.com/repos/phebal/sufia/languages","stargazers_url":"https://api.github.com/repos/phebal/sufia/stargazers","contributors_url":"https://api.github.com/repos/phebal/sufia/contributors","subscribers_url":"https://api.github.com/repos/phebal/sufia/subscribers","subscription_url":"https://api.github.com/repos/phebal/sufia/subscription","commits_url":"https://api.github.com/repos/phebal/sufia/commits{/sha}","git_commits_url":"https://api.github.com/repos/phebal/sufia/git/commits{/sha}","comments_url":"https://api.github.com/repos/phebal/sufia/comments{/number}","issue_comment_url":"https://api.github.com/repos/phebal/sufia/issues/comments{/number}","contents_url":"https://api.github.com/repos/phebal/sufia/contents/{+path}","compare_url":"https://api.github.com/repos/phebal/sufia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phebal/sufia/merges","archive_url":"https://api.github.com/repos/phebal/sufia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phebal/sufia/downloads","issues_url":"https://api.github.com/repos/phebal/sufia/issues{/number}","pulls_url":"https://api.github.com/repos/phebal/sufia/pulls{/number}","milestones_url":"https://api.github.com/repos/phebal/sufia/milestones{/number}","notifications_url":"https://api.github.com/repos/phebal/sufia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phebal/sufia/labels{/name}","releases_url":"https://api.github.com/repos/phebal/sufia/releases{/id}","created_at":"2015-02-26T21:17:21Z","updated_at":"2015-02-26T21:17:23Z","pushed_at":"2015-03-03T18:44:57Z","git_url":"git://github.com/phebal/sufia.git","ssh_url":"git@github.com:phebal/sufia.git","clone_url":"https://github.com/phebal/sufia.git","svn_url":"https://github.com/phebal/sufia","homepage":"","size":51755,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"projecthydra:master","ref":"master","sha":"70727a443f4f09eb134b4eeacca18888a31a5a4a","user":{"login":"projecthydra","id":109426,"avatar_url":"https://avatars.githubusercontent.com/u/109426?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra","html_url":"https://github.com/projecthydra","followers_url":"https://api.github.com/users/projecthydra/followers","following_url":"https://api.github.com/users/projecthydra/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra/subscriptions","organizations_url":"https://api.github.com/users/projecthydra/orgs","repos_url":"https://api.github.com/users/projecthydra/repos","events_url":"https://api.github.com/users/projecthydra/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra/received_events","type":"Organization","site_admin":false},"repo":{"id":7653178,"name":"sufia","full_name":"projecthydra/sufia","owner":{"login":"projecthydra","id":109426,"avatar_url":"https://avatars.githubusercontent.com/u/109426?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra","html_url":"https://github.com/projecthydra","followers_url":"https://api.github.com/users/projecthydra/followers","following_url":"https://api.github.com/users/projecthydra/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra/subscriptions","organizations_url":"https://api.github.com/users/projecthydra/orgs","repos_url":"https://api.github.com/users/projecthydra/repos","events_url":"https://api.github.com/users/projecthydra/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecthydra/sufia","description":"Sufia is a Rails engine for creating a self-deposit institutional repository. A web application for ingest, curation, search, and display of digital assets. Powered by Hydra technologies (Rails, Hydra-head, Blacklight, Solr, Fedora Commons, etc.)","fork":false,"url":"https://api.github.com/repos/projecthydra/sufia","forks_url":"https://api.github.com/repos/projecthydra/sufia/forks","keys_url":"https://api.github.com/repos/projecthydra/sufia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecthydra/sufia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecthydra/sufia/teams","hooks_url":"https://api.github.com/repos/projecthydra/sufia/hooks","issue_events_url":"https://api.github.com/repos/projecthydra/sufia/issues/events{/number}","events_url":"https://api.github.com/repos/projecthydra/sufia/events","assignees_url":"https://api.github.com/repos/projecthydra/sufia/assignees{/user}","branches_url":"https://api.github.com/repos/projecthydra/sufia/branches{/branch}","tags_url":"https://api.github.com/repos/projecthydra/sufia/tags","blobs_url":"https://api.github.com/repos/projecthydra/sufia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecthydra/sufia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecthydra/sufia/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecthydra/sufia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecthydra/sufia/statuses/{sha}","languages_url":"https://api.github.com/repos/projecthydra/sufia/languages","stargazers_url":"https://api.github.com/repos/projecthydra/sufia/stargazers","contributors_url":"https://api.github.com/repos/projecthydra/sufia/contributors","subscribers_url":"https://api.github.com/repos/projecthydra/sufia/subscribers","subscription_url":"https://api.github.com/repos/projecthydra/sufia/subscription","commits_url":"https://api.github.com/repos/projecthydra/sufia/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecthydra/sufia/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecthydra/sufia/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecthydra/sufia/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecthydra/sufia/contents/{+path}","compare_url":"https://api.github.com/repos/projecthydra/sufia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecthydra/sufia/merges","archive_url":"https://api.github.com/repos/projecthydra/sufia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecthydra/sufia/downloads","issues_url":"https://api.github.com/repos/projecthydra/sufia/issues{/number}","pulls_url":"https://api.github.com/repos/projecthydra/sufia/pulls{/number}","milestones_url":"https://api.github.com/repos/projecthydra/sufia/milestones{/number}","notifications_url":"https://api.github.com/repos/projecthydra/sufia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecthydra/sufia/labels{/name}","releases_url":"https://api.github.com/repos/projecthydra/sufia/releases{/id}","created_at":"2013-01-16T20:23:18Z","updated_at":"2015-03-02T20:14:30Z","pushed_at":"2015-03-02T20:14:30Z","git_url":"git://github.com/projecthydra/sufia.git","ssh_url":"git@github.com:projecthydra/sufia.git","clone_url":"https://github.com/projecthydra/sufia.git","svn_url":"https://github.com/projecthydra/sufia","homepage":"","size":59297,"stargazers_count":53,"watchers_count":53,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"open_issues_count":58,"forks":43,"open_issues":58,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/948"},"html":{"href":"https://github.com/projecthydra/sufia/pull/948"},"issue":{"href":"https://api.github.com/repos/projecthydra/sufia/issues/948"},"comments":{"href":"https://api.github.com/repos/projecthydra/sufia/issues/948/comments"},"review_comments":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/948/comments"},"review_comment":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/948/commits"},"statuses":{"href":"https://api.github.com/repos/projecthydra/sufia/statuses/9c1056dfed7298c34106f408b24d8264d0f4ffd7"}}}}