{"id":19144911,"url":"https://github.com/samvera-labs/hyrax-orcid","last_synced_at":"2026-04-11T02:04:29.209Z","repository":{"id":44907115,"uuid":"379238869","full_name":"samvera-labs/hyrax-orcid","owner":"samvera-labs","description":"Hyrax-Orcid is a Hyrax/Hyku based integration for ORCID.","archived":false,"fork":false,"pushed_at":"2024-02-14T08:36:32.000Z","size":337,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-03-27T16:53:09.129Z","etag":null,"topics":["hyku","hyrax","orcid","orcid-api","ruby","ruby-gem","ruby-on-rails","samvera","samvera-community"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samvera-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-22T11:04:27.000Z","updated_at":"2022-03-17T16:10:27.000Z","dependencies_parsed_at":"2024-11-09T07:37:51.861Z","dependency_job_id":"be6ca309-7f47-41ba-b92e-b2c4206e0909","html_url":"https://github.com/samvera-labs/hyrax-orcid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samvera-labs/hyrax-orcid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samvera-labs%2Fhyrax-orcid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samvera-labs%2Fhyrax-orcid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samvera-labs%2Fhyrax-orcid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samvera-labs%2Fhyrax-orcid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samvera-labs","download_url":"https://codeload.github.com/samvera-labs/hyrax-orcid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samvera-labs%2Fhyrax-orcid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272280362,"owners_count":24906116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hyku","hyrax","orcid","orcid-api","ruby","ruby-gem","ruby-on-rails","samvera","samvera-community"],"created_at":"2024-11-09T07:36:59.365Z","updated_at":"2026-04-11T02:04:29.171Z","avatar_url":"https://github.com/samvera-labs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hyrax-orcid\n\nOrcid integration for Hyrax/Hyku\n\n## Install into your Hyrax/Hyku installation\n\nAdd the following to your Gemfile:\n\n```ruby\ngem 'hyrax-orcid', git: 'https://github.com/ubiquitypress/hyrax-orcid', branch: 'main'\n```\n\nThe installer will copy over any migrations and insert the assets into your applications asset pipeline. Just run the following:\n\n```bash\nbundle exec rails g hyrax:orcid:install\nbundle exec rails db:migrate\n```\n\n## Configuration\n\nAdd an initializer to your app with the following block:\n\n```ruby\nHyrax::Orcid.configure do |config|\n  # :sandbox or :production\n  config.environment = :sandbox\n\n  config.auth = {\n    client_id: \"YOUR-APP-ID\",\n    client_secret: \"your-secret-token\",\n    # The authorisation return URL you entered when creating the Orcid Application. Should be your repository URL and `/dashboard/orcid_identity/new`\n    redirect_url: \"http://your-repo.com/dashboard/orcid_identity/new\"\n  }\n\n  config.bolognese = {\n    # The work reader method, excluding the _reader suffix\n    reader_method: \"hyrax_json_work\",\n    # The writer class that provides the XML body which is sent to Orcid\n    xml_writer_class_name: \"Bolognese::Writers::Xml::WorkWriter\"\n  }\n\n  config.active_job_type = :perform_later\n  config.work_types = [\"YourWorkType\", \"GenericWork\"]\nend\n```\n\nYou can also set the following ENV varibles before your app starts:\n\n```bash\nORCID_ENVIRONMENT: sandbox\nORCID_CLIENT_ID: YOUR-APP-ID\nORCID_CLIENT_SECRET: your-secret-token\nORCID_AUTHORIZATION_REDIRECT: http://your-repo.com/dashboard/orcid_identity/new\n```\n\nYou can then access the values like so `reader_method = Hyrax::Orcid.configuration.bolognese[:reader_method]`\n\n## Integration into Hyku\n\nHyrax Orcid is designed to be used with Hyrax, but you can also use it with Hyku if you perform a few manual tasks.\n\nFirst, include the Helper methods into your application:\n\n```ruby\ninclude Hyrax::Orcid::HelperBehavior\n```\n\nAdd the assets to your application.{js, css}:\n\n```js\n//= require hyrax/orcid/application\n```\n\n```css\n*= require hyrax/orcid/application\n```\n\nWithin the Dashboard, go to `Settings/Features` and enable the Hyrax Orcid feature flipper.\n\n### Integration into HykuAddons\n\nHykuAddons is an opinionated addition to Hyku. Go to `Settings/Account Settings` and enter your Orcid application authorisation credentials into the correct fields under \"Hyrax orcid settings\".\n\n## Activating for a model\n\nAdd the following to your work models, `include Hyrax::Orcid::WorkBehavior`.\n\n## Testing\n\n```bash\ndocker-compose exec web bundle exec rspec\n\n```\n\n## Development\n\nWhen cloning, you will need to bring in the Hyrax submodule by: \n\n```bash\ncd spec/internal_test_hyrax; \ngit submodule init \u0026\u0026 git submodule update\n```\n\nThen you can build the application from the root folder (`cd ../../`): \n\n```bash\ndocker-compose up --build web\n```\n\n### First boot\n\nBy default and for the sake of simplicity, the migrations are checked each time the app starts. If you find this too slow, you can change the startup `command` in the docker-compose.yml file: \n\n```yaml\n  # Comment out this line\n  # command: bash -c \"rm -f spec/internal_test_hyrax/tmp/pids/server.pid \u0026\u0026 bundle exec rails db:create \u0026\u0026 bundle exec rails db:migrate \u0026\u0026 bundle exec rails server -b 0.0.0.0\"\n  \n  # Uncomment this line\n  command: bash -c \"rm -f spec/internal_test_hyrax/tmp/pids/server.pid \u0026\u0026 bundle install \u0026\u0026 bundle exec rails server -b 0.0.0.0\"\n```\n\n### Potential Issues\n\nThe app uses an sqlite database which is stored inside `spec/internal_test_hyrax/db`. If you wish to nuke your app and start again, delete this file,\nthen you will need to ensure that the db is created, migrations are run and seeds imported before the app will start, by using something like this to start the web container:\n\n```\ncommand: bash -c \"rm -f spec/internal_test_hyrax/tmp/pids/server.pid \u0026\u0026 bundle exec rails db:create \u0026\u0026 bundle exec rails db:migrate \u0026\u0026 bundle exec rails server -b 0.0.0.0\"\n```\n\nYou will need to create a new user before you can login. Admin users are found within the `spec/internal_test_hyrax/config/role_map.yml`. Login to the rails console and create a user:\n\n```ruby\nUser.create(email: 'archivist1@example.com', password: 'test1234')\n```\n\nIf you get to a situation where you cannot create works, your admin set might be missing:\n\n```ruby\nrails app:hyrax:default_collection_types:create;\nrails app:hyrax:default_admin_set:create\n```\n\nI've had issues with the tasks, so if it's still not working, login with the Admin user and create a new Admin Set Collection manually with the title \"admin_set/default\"\n\n## TODO\n\nThere are a number of outstanding items that should be addressed in the future:\n\n### Hyrax Orcid Gem\n\n+ JSON fields should be extracted into its own Gem allowing configuration via YML - this is on the HA developers list but time hasn't been found\n\n### Hyku/HykuAddons related items\n\nBecause this Gem was developed to eventually work with Hyku Addons, there are a number of items that are Hyku/HykuAddons related:\n\n+ Orcid Types are all 'other', there needs to be a map between Orcid Work Types and Hyrax Work Types, please see HyraxXmlBuilder for a list of types\n+ The Orcid Contributor types need to be mapped to Hyrax Work Contributor types\n\n## To Investigate\n\n+ What happens when a public work is published, then made restricted - I think it is likely it will fail to write the update because of the visibility check within the `PublishWorkActive`\n\n## License\n\nThe gem is available as open source under the terms of the [Apache License 2.0](https://opensource.org/licenses/Apache-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamvera-labs%2Fhyrax-orcid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamvera-labs%2Fhyrax-orcid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamvera-labs%2Fhyrax-orcid/lists"}