Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding one off script for generating OsfArchive
Related to DLTP-784
- Loading branch information
Jeremy Friesen
committed
Jan 9, 2017
1 parent
7a5384d
commit a0c3d7e
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
attributes = { | ||
osf_project_identifier: 'abcde', | ||
source: 'https://osf.io/abcde', | ||
title: 'Example OSF Project', | ||
description: "Many Bothan's died to bring you this project", | ||
visibility: Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC | ||
} | ||
|
||
previous_project = OsfArchive.create!(attributes.merge(date_archived: '2016-01-02')) | ||
registration = OsfArchive.create!(attributes.merge(date_archived: '2016-02-02', source: 'https://osf.io/12345')) | ||
project = OsfArchive.create!(attributes.merge(date_archived: '2016-03-02', previousVersion: previous_project)) | ||
|
||
puts "Previous Project URL: http://localhost:3000/show/#{previous_project.noid}" | ||
puts "Registration URL: http://localhost:3000/show/#{registration.noid}" | ||
puts "Project URL: http://localhost:3000/show/#{project.noid}" | ||
`open http://localhost:3000/show/#{project.noid}` |