{"action":"created","comment":{"url":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/comments/65382602","id":65382602,"diff_hunk":"@@ -0,0 +1,22 @@\n+# frozen_string_literal: true\n+\n+# This class is used to consolidate Collection metadata in a way that\n+# can be easily exported to JSON.\n+module Export\n+  class CollectionMetadataExport\n+    attr_accessor :id, :title, :depositor, :description, :creator, :members\n+\n+    def initialize(coll)\n+      @id = coll.id\n+      @title = coll.title\n+      @description = coll.description\n+      @creator = coll.creator.map { |c| c }\n+      @members = coll.members.map(&:id)\n+    end\n+\n+    def to_json(pretty = false)","path":"lib/export/collection_metadata_export.rb","position":17,"original_position":17,"commit_id":"faf44f9f21f44a21cdf8ccc8986015a1800edb96","original_commit_id":"faf44f9f21f44a21cdf8ccc8986015a1800edb96","user":{"login":"cam156","id":1599081,"avatar_url":"https://avatars.githubusercontent.com/u/1599081?v=3","gravatar_id":"","url":"https://api.github.com/users/cam156","html_url":"https://github.com/cam156","followers_url":"https://api.github.com/users/cam156/followers","following_url":"https://api.github.com/users/cam156/following{/other_user}","gists_url":"https://api.github.com/users/cam156/gists{/gist_id}","starred_url":"https://api.github.com/users/cam156/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cam156/subscriptions","organizations_url":"https://api.github.com/users/cam156/orgs","repos_url":"https://api.github.com/users/cam156/repos","events_url":"https://api.github.com/users/cam156/events{/privacy}","received_events_url":"https://api.github.com/users/cam156/received_events","type":"User","site_admin":false},"body":"Overrode so that it is easier to debug.  This is not needed for running.","created_at":"2016-06-01T15:23:03Z","updated_at":"2016-06-01T15:23:03Z","html_url":"https://github.com/psu-stewardship/scholarsphere/pull/272#discussion_r65382602","pull_request_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/272","_links":{"self":{"href":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/comments/65382602"},"html":{"href":"https://github.com/psu-stewardship/scholarsphere/pull/272#discussion_r65382602"},"pull_request":{"href":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/272"}}},"pull_request":{"url":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/272","id":65158822,"html_url":"https://github.com/psu-stewardship/scholarsphere/pull/272","diff_url":"https://github.com/psu-stewardship/scholarsphere/pull/272.diff","patch_url":"https://github.com/psu-stewardship/scholarsphere/pull/272.patch","issue_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/issues/272","number":272,"state":"open","locked":false,"title":"Export s6","user":{"login":"hectorcorrea","id":568286,"avatar_url":"https://avatars.githubusercontent.com/u/568286?v=3","gravatar_id":"","url":"https://api.github.com/users/hectorcorrea","html_url":"https://github.com/hectorcorrea","followers_url":"https://api.github.com/users/hectorcorrea/followers","following_url":"https://api.github.com/users/hectorcorrea/following{/other_user}","gists_url":"https://api.github.com/users/hectorcorrea/gists{/gist_id}","starred_url":"https://api.github.com/users/hectorcorrea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hectorcorrea/subscriptions","organizations_url":"https://api.github.com/users/hectorcorrea/orgs","repos_url":"https://api.github.com/users/hectorcorrea/repos","events_url":"https://api.github.com/users/hectorcorrea/events{/privacy}","received_events_url":"https://api.github.com/users/hectorcorrea/received_events","type":"User","site_admin":false},"body":"** DO NOT MERGE **\r\n\r\nThis is a first pass at exporting ScholarSphere's GenericFiles and Collections stored under a Sufia 6 implementation to a set of JSON files that can be used to import the data into a Sufia 7 implementation. \r\n\r\nTo export Generic Files the idea is to run two rake tasks. One to export the IDs of all the files to export and another to actually export them to JSON files (one per Generic File). I suspect we could combine these tasks but for a final release. \r\n\r\n```\r\nrake gf_ids > gf_ids.txt\r\nrake export_gf[gf_ids.txt]\r\n```\r\n\r\nSimilar rake tasks can be used to export Collections.\r\n\r\nYou can see a sample of the JSON files generated when exporting a file and a collection here: https://gist.github.com/hectorcorrea/619c13fa540341be14cb01c762d9f2cc\r\n\r\nThe JSON file generated for Generic Files only includes the metadata (including metadata for versions and permissions) but not the actual binary. The idea is to fetch the binary (for the current and previous versions) directly from Fedora 4 at the time the data is imported to a Sufia 7 application.","created_at":"2016-04-04T14:56:32Z","updated_at":"2016-06-01T15:23:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"275f63964979bcd796099430e2d084d1ae053891","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/272/commits","review_comments_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/272/comments","review_comment_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/comments{/number}","comments_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/issues/272/comments","statuses_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/statuses/faf44f9f21f44a21cdf8ccc8986015a1800edb96","head":{"label":"psu-stewardship:export_s6","ref":"export_s6","sha":"faf44f9f21f44a21cdf8ccc8986015a1800edb96","user":{"login":"psu-stewardship","id":653493,"avatar_url":"https://avatars.githubusercontent.com/u/653493?v=3","gravatar_id":"","url":"https://api.github.com/users/psu-stewardship","html_url":"https://github.com/psu-stewardship","followers_url":"https://api.github.com/users/psu-stewardship/followers","following_url":"https://api.github.com/users/psu-stewardship/following{/other_user}","gists_url":"https://api.github.com/users/psu-stewardship/gists{/gist_id}","starred_url":"https://api.github.com/users/psu-stewardship/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psu-stewardship/subscriptions","organizations_url":"https://api.github.com/users/psu-stewardship/orgs","repos_url":"https://api.github.com/users/psu-stewardship/repos","events_url":"https://api.github.com/users/psu-stewardship/events{/privacy}","received_events_url":"https://api.github.com/users/psu-stewardship/received_events","type":"Organization","site_admin":false},"repo":{"id":2481963,"name":"scholarsphere","full_name":"psu-stewardship/scholarsphere","owner":{"login":"psu-stewardship","id":653493,"avatar_url":"https://avatars.githubusercontent.com/u/653493?v=3","gravatar_id":"","url":"https://api.github.com/users/psu-stewardship","html_url":"https://github.com/psu-stewardship","followers_url":"https://api.github.com/users/psu-stewardship/followers","following_url":"https://api.github.com/users/psu-stewardship/following{/other_user}","gists_url":"https://api.github.com/users/psu-stewardship/gists{/gist_id}","starred_url":"https://api.github.com/users/psu-stewardship/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psu-stewardship/subscriptions","organizations_url":"https://api.github.com/users/psu-stewardship/orgs","repos_url":"https://api.github.com/users/psu-stewardship/repos","events_url":"https://api.github.com/users/psu-stewardship/events{/privacy}","received_events_url":"https://api.github.com/users/psu-stewardship/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/psu-stewardship/scholarsphere","description":"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/psu-stewardship/scholarsphere","forks_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/forks","keys_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/teams","hooks_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/hooks","issue_events_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/issues/events{/number}","events_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/events","assignees_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/assignees{/user}","branches_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/branches{/branch}","tags_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/tags","blobs_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/languages","stargazers_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/stargazers","contributors_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/contributors","subscribers_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/subscribers","subscription_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/subscription","commits_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/contents/{+path}","compare_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/merges","archive_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/downloads","issues_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/issues{/number}","pulls_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/labels{/name}","releases_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/releases{/id}","deployments_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/deployments","created_at":"2011-09-29T13:12:23Z","updated_at":"2016-05-20T16:17:30Z","pushed_at":"2016-05-31T16:43:13Z","git_url":"git://github.com/psu-stewardship/scholarsphere.git","ssh_url":"git@github.com:psu-stewardship/scholarsphere.git","clone_url":"https://github.com/psu-stewardship/scholarsphere.git","svn_url":"https://github.com/psu-stewardship/scholarsphere","homepage":"","size":98442,"stargazers_count":58,"watchers_count":58,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":66,"forks":17,"open_issues":66,"watchers":58,"default_branch":"develop"}},"base":{"label":"psu-stewardship:develop","ref":"develop","sha":"c3948912a8d5608fd7141b1854e3d68094769a9c","user":{"login":"psu-stewardship","id":653493,"avatar_url":"https://avatars.githubusercontent.com/u/653493?v=3","gravatar_id":"","url":"https://api.github.com/users/psu-stewardship","html_url":"https://github.com/psu-stewardship","followers_url":"https://api.github.com/users/psu-stewardship/followers","following_url":"https://api.github.com/users/psu-stewardship/following{/other_user}","gists_url":"https://api.github.com/users/psu-stewardship/gists{/gist_id}","starred_url":"https://api.github.com/users/psu-stewardship/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psu-stewardship/subscriptions","organizations_url":"https://api.github.com/users/psu-stewardship/orgs","repos_url":"https://api.github.com/users/psu-stewardship/repos","events_url":"https://api.github.com/users/psu-stewardship/events{/privacy}","received_events_url":"https://api.github.com/users/psu-stewardship/received_events","type":"Organization","site_admin":false},"repo":{"id":2481963,"name":"scholarsphere","full_name":"psu-stewardship/scholarsphere","owner":{"login":"psu-stewardship","id":653493,"avatar_url":"https://avatars.githubusercontent.com/u/653493?v=3","gravatar_id":"","url":"https://api.github.com/users/psu-stewardship","html_url":"https://github.com/psu-stewardship","followers_url":"https://api.github.com/users/psu-stewardship/followers","following_url":"https://api.github.com/users/psu-stewardship/following{/other_user}","gists_url":"https://api.github.com/users/psu-stewardship/gists{/gist_id}","starred_url":"https://api.github.com/users/psu-stewardship/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psu-stewardship/subscriptions","organizations_url":"https://api.github.com/users/psu-stewardship/orgs","repos_url":"https://api.github.com/users/psu-stewardship/repos","events_url":"https://api.github.com/users/psu-stewardship/events{/privacy}","received_events_url":"https://api.github.com/users/psu-stewardship/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/psu-stewardship/scholarsphere","description":"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/psu-stewardship/scholarsphere","forks_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/forks","keys_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/teams","hooks_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/hooks","issue_events_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/issues/events{/number}","events_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/events","assignees_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/assignees{/user}","branches_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/branches{/branch}","tags_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/tags","blobs_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/languages","stargazers_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/stargazers","contributors_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/contributors","subscribers_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/subscribers","subscription_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/subscription","commits_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/contents/{+path}","compare_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/merges","archive_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/downloads","issues_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/issues{/number}","pulls_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/labels{/name}","releases_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/releases{/id}","deployments_url":"https://api.github.com/repos/psu-stewardship/scholarsphere/deployments","created_at":"2011-09-29T13:12:23Z","updated_at":"2016-05-20T16:17:30Z","pushed_at":"2016-05-31T16:43:13Z","git_url":"git://github.com/psu-stewardship/scholarsphere.git","ssh_url":"git@github.com:psu-stewardship/scholarsphere.git","clone_url":"https://github.com/psu-stewardship/scholarsphere.git","svn_url":"https://github.com/psu-stewardship/scholarsphere","homepage":"","size":98442,"stargazers_count":58,"watchers_count":58,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":66,"forks":17,"open_issues":66,"watchers":58,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/272"},"html":{"href":"https://github.com/psu-stewardship/scholarsphere/pull/272"},"issue":{"href":"https://api.github.com/repos/psu-stewardship/scholarsphere/issues/272"},"comments":{"href":"https://api.github.com/repos/psu-stewardship/scholarsphere/issues/272/comments"},"review_comments":{"href":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/272/comments"},"review_comment":{"href":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/psu-stewardship/scholarsphere/pulls/272/commits"},"statuses":{"href":"https://api.github.com/repos/psu-stewardship/scholarsphere/statuses/faf44f9f21f44a21cdf8ccc8986015a1800edb96"}}}}
{"actor":{"display_login":"cam156"}}