├── .nvmrc
├── app
├── .gitkeep
├── adapters
│ ├── log.js
│ ├── file.js
│ ├── node.js
│ ├── user.js
│ ├── citation.js
│ ├── comment.js
│ ├── license.js
│ ├── preprint.js
│ ├── taxonomy.js
│ ├── collection.js
│ ├── moderator.js
│ ├── node-link.js
│ ├── user-email.js
│ ├── contributor.js
│ ├── file-contents.js
│ ├── file-provider.js
│ ├── file-version.js
│ ├── institution.js
│ ├── osf-adapter.js
│ ├── registration.js
│ ├── review-action.js
│ ├── subscription.js
│ ├── chronos-journal.js
│ ├── citation-style.js
│ ├── comment-report.js
│ ├── chronos-submission.js
│ ├── draft-registration.js
│ ├── preprint-provider.js
│ ├── preprint-request.js
│ ├── preprint-request-action.js
│ └── registration-metaschema.js
├── models
│ ├── file.js
│ ├── log.js
│ ├── node.js
│ ├── user.js
│ ├── wiki.js
│ ├── comment.js
│ ├── license.js
│ ├── citation.js
│ ├── collection.js
│ ├── moderator.js
│ ├── node-link.js
│ ├── osf-model.js
│ ├── preprint.js
│ ├── taxonomy.js
│ ├── user-email.js
│ ├── contributor.js
│ ├── file-version.js
│ ├── institution.js
│ ├── registration.js
│ ├── subscription.js
│ ├── chronos-journal.js
│ ├── citation-style.js
│ ├── comment-report.js
│ ├── file-provider.js
│ ├── review-action.js
│ ├── preprint-provider.js
│ ├── preprint-request.js
│ ├── chronos-submission.js
│ ├── draft-registration.js
│ ├── preprint-request-action.js
│ └── registration-metaschema.js
├── utils
│ ├── auth.js
│ ├── path-join.js
│ ├── fix-special-char.js
│ ├── load-relationship.js
│ ├── transition-target-url.js
│ └── extract-doi-from-string.js
├── services
│ ├── theme.js
│ ├── current-user.js
│ ├── file-manager.js
│ └── preprint-word.js
├── locales
│ └── en
│ │ ├── config.js
│ │ └── translations.js
├── mixins
│ ├── commentable.js
│ ├── host-app-name.js
│ ├── osf-token-login-route.js
│ └── osf-token-login-controller.js
├── serializers
│ ├── file.js
│ ├── node.js
│ ├── user.js
│ ├── wiki.js
│ ├── comment.js
│ ├── license.js
│ ├── citation.js
│ ├── collection.js
│ ├── moderator.js
│ ├── node-link.js
│ ├── preprint.js
│ ├── taxonomy.js
│ ├── user-email.js
│ ├── contributor.js
│ ├── file-version.js
│ ├── institution.js
│ ├── linked-node.js
│ ├── registration.js
│ ├── subscription.js
│ ├── chronos-journal.js
│ ├── citation-style.js
│ ├── comment-report.js
│ ├── file-contents.js
│ ├── file-provider.js
│ ├── osf-serializer.js
│ ├── review-action.js
│ ├── preprint-provider.js
│ ├── preprint-request.js
│ ├── chronos-submission.js
│ ├── draft-registration.js
│ ├── preprint-request-action.js
│ └── registration-metaschema.js
├── transforms
│ ├── embed.js
│ ├── links.js
│ └── fixstring.js
├── helpers
│ ├── elem-id.js
│ ├── if-filter.js
│ ├── extract-doi.js
│ ├── filter-replace.js
│ ├── number-format.js
│ ├── get-display-name.js
│ ├── share-detail-url.js
│ ├── fix-special-char.js
│ ├── sort-option-display.js
│ ├── custom-taxonomy-filter.js
│ ├── get-ancestor-descriptor.js
│ └── build-secondary-nav-links.js
├── authorizers
│ ├── osf-cookie.js
│ └── osf-token.js
├── human-file-size
│ └── util.js
├── authenticators
│ ├── osf-token.js
│ └── osf-cookie.js
├── components
│ ├── sign-up
│ │ └── component.js
│ ├── cookie-banner
│ │ └── component.js
│ ├── file-editor
│ │ └── component.js
│ ├── file-widget
│ │ └── component.js
│ ├── osf-navbar
│ │ └── component.js
│ ├── tags-widget
│ │ └── component.js
│ ├── author-link
│ │ └── component.js
│ ├── comment-form
│ │ └── component.js
│ ├── comment-pane
│ │ └── component.js
│ ├── discover-page
│ │ └── component.js
│ ├── file-browser
│ │ └── component.js
│ ├── file-chooser
│ │ └── component.js
│ ├── file-renderer
│ │ └── component.js
│ ├── file-version
│ │ └── component.js
│ ├── lazy-options
│ │ └── component.js
│ ├── license-list
│ │ └── component.js
│ ├── new-osf-navbar
│ │ └── component.js
│ ├── osf-paginator
│ │ └── component.js
│ ├── page-controls
│ │ └── component.js
│ ├── query-syntax
│ │ └── component.js
│ ├── comment-detail
│ │ └── component.js
│ ├── dropzone-widget
│ │ └── component.js
│ ├── eosf-project-nav
│ │ └── component.js
│ ├── faceted-search
│ │ └── component.js
│ ├── license-picker
│ │ └── component.js
│ ├── maintenance-banner
│ │ └── component.js
│ ├── old-file-browser
│ │ └── component.js
│ ├── project-selector
│ │ └── component.js
│ ├── scheduled-banner
│ │ └── component.js
│ ├── search-dropdown
│ │ └── component.js
│ ├── search-result
│ │ └── component.js
│ ├── citation-widget
│ │ └── component.js
│ ├── file-browser-icon
│ │ └── component.js
│ ├── file-browser-item
│ │ └── component.js
│ ├── file-browser-tree
│ │ └── component.js
│ ├── osf-footer
│ │ └── component.js
│ ├── pagination-control
│ │ └── component.js
│ ├── search-help-modal
│ │ └── component.js
│ ├── validated-input
│ │ └── component.js
│ ├── navbar-auth-dropdown
│ │ └── component.js
│ ├── oauth-popup
│ │ └── component.js
│ ├── old-file-browser-item
│ │ └── component.js
│ ├── osf-copyright
│ │ └── component.js
│ ├── search-facet-locked
│ │ └── component.js
│ ├── sharing-icons-popover
│ │ └── component.js
│ ├── total-share-results
│ │ └── component.js
│ ├── lazy-options-load-more
│ │ └── component.js
│ ├── new-navbar-auth-dropdown
│ │ └── component.js
│ ├── osf-mode-footer
│ │ └── component.js
│ └── sharing-icons
│ │ └── component.js
└── instance-initializers
│ └── ember-osf.js
├── addon
├── .gitkeep
├── components
│ ├── tags-widget
│ │ └── template.hbs
│ ├── validated-input
│ │ └── style.scss
│ ├── dropzone-widget
│ │ └── template.hbs
│ ├── file-browser-icon
│ │ └── template.hbs
│ ├── file-version
│ │ └── style.scss
│ ├── query-syntax
│ │ ├── style.scss
│ │ └── component.js
│ ├── scheduled-banner
│ │ └── style.scss
│ ├── navbar-auth-dropdown
│ │ └── style.scss
│ ├── lazy-options-load-more
│ │ ├── template.hbs
│ │ └── component.js
│ ├── citation-widget
│ │ └── style.scss
│ ├── old-file-browser-item
│ │ └── template.hbs
│ ├── new-osf-navbar
│ │ └── style.scss
│ ├── author-link
│ │ └── template.hbs
│ ├── osf-mode-footer
│ │ ├── template.hbs
│ │ ├── style.scss
│ │ └── component.js
│ ├── oauth-popup
│ │ └── template.hbs
│ ├── file-browser-item
│ │ └── style.scss
│ ├── search-facet-locked
│ │ ├── template.hbs
│ │ └── component.js
│ ├── sign-up
│ │ └── component.js
│ ├── total-share-results
│ │ └── template.hbs
│ ├── file-widget
│ │ └── style.scss
│ ├── comment-form
│ │ └── template.hbs
│ ├── osf-footer
│ │ └── style.scss
│ ├── file-renderer
│ │ └── template.hbs
│ ├── osf-copyright
│ │ ├── component.js
│ │ └── template.hbs
│ ├── file-editor
│ │ └── style.scss
│ ├── comment-pane
│ │ └── template.hbs
│ ├── pagination-control
│ │ └── template.hbs
│ ├── cookie-banner
│ │ ├── component.js
│ │ └── template.hbs
│ ├── osf-navbar
│ │ └── style.scss
│ ├── lazy-options
│ │ └── component.js
│ ├── file-chooser
│ │ └── template.hbs
│ ├── search-help-modal
│ │ └── component.js
│ ├── osf-paginator
│ │ └── template.hbs
│ └── sharing-icons-popover
│ │ └── template.hbs
├── adapters
│ ├── log.js
│ ├── node-link.js
│ ├── citation.js
│ ├── comment.js
│ ├── license.js
│ ├── taxonomy.js
│ ├── citation-style.js
│ ├── comment-report.js
│ ├── draft-registration.js
│ ├── file-contents.js
│ ├── file-version.js
│ ├── institution.js
│ ├── registration.js
│ ├── subscription.js
│ ├── user-email.js
│ ├── preprint-provider.js
│ ├── review-action.js
│ ├── preprint-request-action.js
│ ├── registration-metaschema.js
│ ├── chronos-journal.js
│ ├── file-provider.js
│ ├── collection.js
│ ├── file.js
│ ├── user.js
│ └── preprint-request.js
├── assets
│ └── img
│ │ ├── favicon.ico
│ │ ├── cos-white2.png
│ │ ├── bg-donate-1.jpg
│ │ ├── bg-donate-2.jpg
│ │ ├── bg-donate-3.jpg
│ │ ├── bg-donate-4.jpg
│ │ ├── bg-donate-5.jpg
│ │ ├── share-logo-icon.png
│ │ ├── giving_tuesday_week01.png
│ │ ├── giving_tuesday_week02.png
│ │ ├── giving_tuesday_week01_mobile.png
│ │ └── giving_tuesday_week02_mobile.png
├── serializers
│ ├── license.js
│ ├── user.js
│ ├── wiki.js
│ ├── citation.js
│ ├── collection.js
│ ├── file-version.js
│ ├── moderator.js
│ ├── registration.js
│ ├── subscription.js
│ ├── taxonomy.js
│ ├── user-email.js
│ ├── chronos-journal.js
│ ├── citation-style.js
│ ├── comment-report.js
│ ├── file-contents.js
│ ├── preprint-provider.js
│ ├── draft-registration.js
│ ├── registration-metaschema.js
│ ├── file-provider.js
│ ├── node.js
│ ├── preprint-request.js
│ ├── review-action.js
│ ├── preprint-request-action.js
│ ├── chronos-submission.js
│ ├── institution.js
│ ├── node-link.js
│ ├── preprint.js
│ ├── linked-node.js
│ └── comment.js
├── public
│ └── assets
│ │ └── images
│ │ ├── favicon.ico
│ │ └── cos-white2.png
├── models
│ ├── moderator.js
│ ├── license.js
│ ├── user-email.js
│ ├── citation.js
│ ├── subscription.js
│ ├── chronos-journal.js
│ ├── preprint-request-action.js
│ ├── comment-report.js
│ ├── wiki.js
│ ├── review-action.js
│ ├── chronos-submission.js
│ ├── preprint-request.js
│ ├── registration-metaschema.js
│ └── node-link.js
├── helpers
│ ├── extract-doi.js
│ ├── custom-taxonomy-filter.js
│ ├── number-format.js
│ ├── fix-special-char.js
│ ├── get-display-name.js
│ └── elem-id.js
├── transforms
│ ├── embed.js
│ └── links.js
├── instance-initializers
│ └── ember-osf.js
├── utils
│ ├── extract-doi-from-string.js
│ ├── outside-click.js
│ ├── transition-target-url.js
│ └── path-join.js
├── authorizers
│ ├── osf-cookie.js
│ └── osf-token.js
├── const
│ └── providerRegex.js
├── locales
│ └── en
│ │ └── config.js
└── mixins
│ └── osf-token-login-controller.js
├── vendor
└── .gitkeep
├── tests
├── unit
│ ├── .gitkeep
│ ├── adapters
│ │ ├── node-test.js
│ │ ├── log-test.js
│ │ ├── citation-test.js
│ │ ├── license-test.js
│ │ ├── preprint-test.js
│ │ ├── taxonomy-test.js
│ │ ├── collection-test.js
│ │ ├── node-link-test.js
│ │ ├── review-action-test.js
│ │ ├── draft-registration-test.js
│ │ ├── preprint-provider-test.js
│ │ └── registration-metaschema-test.js
│ ├── utils
│ │ ├── load-relationship-test.js
│ │ ├── path-join-test.js
│ │ ├── auth-test.js
│ │ └── fix-special-char-test.js
│ ├── models
│ │ ├── citation-style-test.js
│ │ ├── citation-test.js
│ │ ├── license-test.js
│ │ ├── taxonomy-test.js
│ │ ├── wiki-test.js
│ │ ├── file-version-test.js
│ │ ├── comment-report-test.js
│ │ ├── contributor-test.js
│ │ ├── node-link-test.js
│ │ ├── file-provider-test.js
│ │ ├── comment-test.js
│ │ ├── collections-test.js
│ │ ├── file-test.js
│ │ ├── registration-metaschema-test.js
│ │ ├── preprint-provider-test.js
│ │ ├── institution-test.js
│ │ ├── draft-registration-test.js
│ │ ├── node-test.js
│ │ └── registration-test.js
│ ├── helpers
│ │ ├── bibliographic-helper-test.js
│ │ ├── extract-doi-test.js
│ │ ├── draft-text-input-test.js
│ │ ├── sort-option-display-test.js
│ │ ├── elem-id-test.js
│ │ ├── filter-replace-test.js
│ │ ├── if-filter-test.js
│ │ ├── fix-special-char-test.js
│ │ ├── get-display-name-test.js
│ │ └── number-format-test.js
│ ├── transforms
│ │ ├── embed-test.js
│ │ └── links-test.js
│ ├── services
│ │ └── preprint-word-test.js
│ ├── mixins
│ │ ├── file-item-test.js
│ │ ├── commentable-test.js
│ │ ├── contributor-mixin-test.js
│ │ ├── node-actions-test.js
│ │ ├── taggable-mixin-test.js
│ │ ├── paginated-route-test.js
│ │ ├── file-cache-bypass-test.js
│ │ ├── osf-token-login-route-test.js
│ │ ├── generic-data-adapter-test.js
│ │ ├── paginated-controller-test.js
│ │ ├── registration-actions-test.js
│ │ ├── osf-agnostic-auth-route-test.js
│ │ ├── cas-authenticated-route-test.js
│ │ ├── osf-login-controller-test.js
│ │ ├── osf-cookie-login-controller-test.js
│ │ ├── host-app-name-test.js
│ │ └── osf-agnostic-auth-controller-test.js
│ └── serializers
│ │ ├── license-test.js
│ │ ├── wiki-test.js
│ │ ├── citation-test.js
│ │ ├── taxonomy-test.js
│ │ ├── review-action-test.js
│ │ ├── node-link-test.js
│ │ ├── collection-test.js
│ │ ├── registration-metaschema-test.js
│ │ ├── file-provider-test.js
│ │ ├── draft-registration-test.js
│ │ └── preprint-provider-test.js
├── integration
│ ├── .gitkeep
│ └── components
│ │ ├── license-list
│ │ └── component-test.js
│ │ ├── cookie-banner
│ │ └── component-test.js
│ │ ├── new-osf-navbar
│ │ └── component-test.js
│ │ ├── maintenance-banner
│ │ └── component-test.js
│ │ ├── query-syntax
│ │ └── component-test.js
│ │ ├── citation-widget
│ │ └── component-test.js
│ │ ├── search-facet-locked
│ │ └── component-test.js
│ │ ├── osf-copyright
│ │ └── component-test.js
│ │ ├── navbar-auth-dropdown
│ │ └── component-test.js
│ │ ├── tags-widget
│ │ └── component-test.js
│ │ ├── osf-mode-footer
│ │ └── component-test.js
│ │ ├── osf-navbar
│ │ └── component-test.js
│ │ └── sign-up
│ │ └── component-test.js
├── dummy
│ ├── app
│ │ ├── helpers
│ │ │ ├── .gitkeep
│ │ │ ├── check-data-type.js
│ │ │ ├── selected-helper.js
│ │ │ └── bibliographic-helper.js
│ │ ├── models
│ │ │ └── .gitkeep
│ │ ├── routes
│ │ │ ├── .gitkeep
│ │ │ ├── signup.js
│ │ │ ├── embedding-records.js
│ │ │ ├── institutions.js
│ │ │ ├── login.js
│ │ │ ├── cookielogin.js
│ │ │ ├── index.js
│ │ │ ├── share-discover-page.js
│ │ │ ├── registrations
│ │ │ │ └── detail.js
│ │ │ ├── nodes
│ │ │ │ ├── detail
│ │ │ │ │ ├── children.js
│ │ │ │ │ ├── files
│ │ │ │ │ │ ├── provider
│ │ │ │ │ │ │ └── file
│ │ │ │ │ │ │ │ └── revisions.js
│ │ │ │ │ │ ├── provider.js
│ │ │ │ │ │ └── index.js
│ │ │ │ │ ├── registrations.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── files.js
│ │ │ │ │ └── draft-registrations
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ └── detail.js
│ │ │ │ └── detail.js
│ │ │ ├── users
│ │ │ │ ├── detail.js
│ │ │ │ └── list.js
│ │ │ ├── application.js
│ │ │ ├── collections.js
│ │ │ ├── allnodes.js
│ │ │ ├── usernodes.js
│ │ │ ├── registrations.js
│ │ │ └── prereg.js
│ │ ├── components
│ │ │ ├── .gitkeep
│ │ │ ├── file-tree
│ │ │ │ └── component.js
│ │ │ ├── log-detail
│ │ │ │ ├── component.js
│ │ │ │ └── style.css
│ │ │ └── wiki-detail
│ │ │ │ └── template.hbs
│ │ ├── controllers
│ │ │ ├── .gitkeep
│ │ │ ├── nodes
│ │ │ │ └── detail
│ │ │ │ │ ├── wikis.js
│ │ │ │ │ ├── files
│ │ │ │ │ ├── provider
│ │ │ │ │ │ └── index.js
│ │ │ │ │ └── index.js
│ │ │ │ │ └── draft-registrations
│ │ │ │ │ └── index.js
│ │ │ ├── login.js
│ │ │ ├── users
│ │ │ │ └── list.js
│ │ │ ├── cookielogin.js
│ │ │ ├── application.js
│ │ │ ├── collections
│ │ │ │ └── index.js
│ │ │ └── index.js
│ │ ├── templates
│ │ │ ├── components
│ │ │ │ └── .gitkeep
│ │ │ ├── nodes.hbs
│ │ │ ├── users.hbs
│ │ │ ├── collections.hbs
│ │ │ ├── registrations.hbs
│ │ │ ├── institutions.hbs
│ │ │ ├── nodes
│ │ │ │ ├── detail
│ │ │ │ │ ├── files
│ │ │ │ │ │ ├── provider.hbs
│ │ │ │ │ │ ├── index.hbs
│ │ │ │ │ │ └── provider
│ │ │ │ │ │ │ └── file
│ │ │ │ │ │ │ ├── index.hbs
│ │ │ │ │ │ │ └── revisions.hbs
│ │ │ │ │ ├── files.hbs
│ │ │ │ │ ├── wikis.hbs
│ │ │ │ │ └── children.hbs
│ │ │ │ └── detail.hbs
│ │ │ ├── cookielogin.hbs
│ │ │ ├── signup.hbs
│ │ │ ├── allnodes.hbs
│ │ │ ├── usernodes.hbs
│ │ │ ├── login.hbs
│ │ │ ├── application.hbs
│ │ │ └── index.hbs
│ │ ├── resolver.js
│ │ ├── styles
│ │ │ └── app.scss
│ │ ├── app.js
│ │ └── locales
│ │ │ └── en-us
│ │ │ └── config.js
│ └── public
│ │ ├── robots.txt
│ │ └── crossdomain.xml
├── .eslintrc.js
├── helpers
│ ├── destroy-app.js
│ ├── resolver.js
│ ├── start-app.js
│ └── module-for-acceptance.js
├── test-helper.js
└── fixtures
│ └── specialChars.js
├── .yarnrc
├── .eslintignore
├── .watchmanconfig
├── .dockerignore
├── docs
├── assets
│ ├── favicon.ico
│ ├── css
│ │ ├── logo.png
│ │ └── external-small.png
│ ├── img
│ │ └── spinner.gif
│ ├── index.html
│ ├── js
│ │ └── yui-prettify.js
│ └── vendor
│ │ └── prettify
│ │ └── prettify-min.css
├── files
│ └── index.html
├── classes
│ └── index.html
├── elements
│ └── index.html
└── modules
│ └── index.html
├── test-support
└── factories
│ ├── node-link.js
│ ├── citation.js
│ ├── license.js
│ ├── moderator.js
│ ├── metaschema.js
│ ├── comment-report.js
│ ├── file-version.js
│ ├── taxonomy.js
│ ├── file-provider.js
│ ├── draft-registration.js
│ ├── citation-style.js
│ ├── wiki.js
│ ├── contributor.js
│ ├── collection.js
│ └── institution.js
├── .template-lintrc.js
├── config
├── coverage.js
└── environment.js
├── .ember-cli
├── .eslintrc.js
├── .npmignore
├── .gitignore
├── Dockerfile
├── testem.js
└── .editorconfig
/.nvmrc:
--------------------------------------------------------------------------------
1 | 8
2 |
--------------------------------------------------------------------------------
/app/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/addon/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/vendor/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/unit/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/integration/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.yarnrc:
--------------------------------------------------------------------------------
1 | --ignore-engines true
2 |
--------------------------------------------------------------------------------
/tests/dummy/app/helpers/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/dummy/app/models/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/dummy/app/components/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/addon/components/tags-widget/template.hbs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/addon/components/validated-input/style.scss:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/components/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | coverage
2 | dist
3 | docs
4 | tmp
5 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/nodes.hbs:
--------------------------------------------------------------------------------
1 | {{outlet}}
2 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/users.hbs:
--------------------------------------------------------------------------------
1 | {{outlet}}
2 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/collections.hbs:
--------------------------------------------------------------------------------
1 | {{outlet}}
2 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/registrations.hbs:
--------------------------------------------------------------------------------
1 | {{outlet}}
2 |
--------------------------------------------------------------------------------
/addon/components/dropzone-widget/template.hbs:
--------------------------------------------------------------------------------
1 | {{yield}}
2 |
--------------------------------------------------------------------------------
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {
2 | "ignore_dirs": ["tmp", "dist"]
3 | }
4 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/institutions.hbs:
--------------------------------------------------------------------------------
1 | {{focusing-outlet}}
2 |
--------------------------------------------------------------------------------
/app/adapters/log.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/log';
2 |
--------------------------------------------------------------------------------
/app/models/file.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/file';
2 |
--------------------------------------------------------------------------------
/app/models/log.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/log';
2 |
--------------------------------------------------------------------------------
/app/models/node.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/node';
2 |
--------------------------------------------------------------------------------
/app/models/user.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/user';
2 |
--------------------------------------------------------------------------------
/app/models/wiki.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/wiki';
2 |
--------------------------------------------------------------------------------
/app/utils/auth.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/utils/auth';
2 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/nodes/detail/files/provider.hbs:
--------------------------------------------------------------------------------
1 | {{outlet}}
2 |
--------------------------------------------------------------------------------
/app/adapters/file.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/file';
2 |
--------------------------------------------------------------------------------
/app/adapters/node.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/node';
2 |
--------------------------------------------------------------------------------
/app/adapters/user.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/user';
2 |
--------------------------------------------------------------------------------
/app/models/comment.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/comment';
2 |
--------------------------------------------------------------------------------
/app/models/license.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/license';
2 |
--------------------------------------------------------------------------------
/app/services/theme.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/services/theme';
2 |
--------------------------------------------------------------------------------
/app/adapters/citation.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/citation';
2 |
--------------------------------------------------------------------------------
/app/adapters/comment.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/comment';
2 |
--------------------------------------------------------------------------------
/app/adapters/license.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/license';
2 |
--------------------------------------------------------------------------------
/app/adapters/preprint.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/preprint';
2 |
--------------------------------------------------------------------------------
/app/adapters/taxonomy.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/taxonomy';
2 |
--------------------------------------------------------------------------------
/app/locales/en/config.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/locales/en/config';
2 |
--------------------------------------------------------------------------------
/app/mixins/commentable.js:
--------------------------------------------------------------------------------
1 | export {default} from 'ember-osf/mixins/commentable';
2 |
--------------------------------------------------------------------------------
/app/models/citation.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/citation';
2 |
--------------------------------------------------------------------------------
/app/models/collection.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/collection';
2 |
--------------------------------------------------------------------------------
/app/models/moderator.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/moderator';
2 |
--------------------------------------------------------------------------------
/app/models/node-link.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/node-link';
2 |
--------------------------------------------------------------------------------
/app/models/osf-model.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/osf-model';
2 |
--------------------------------------------------------------------------------
/app/models/preprint.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/preprint';
2 |
--------------------------------------------------------------------------------
/app/models/taxonomy.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/taxonomy';
2 |
--------------------------------------------------------------------------------
/app/models/user-email.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/user-email';
2 |
--------------------------------------------------------------------------------
/app/serializers/file.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/file';
2 |
--------------------------------------------------------------------------------
/app/serializers/node.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/node';
2 |
--------------------------------------------------------------------------------
/app/serializers/user.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/user';
2 |
--------------------------------------------------------------------------------
/app/serializers/wiki.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/wiki';
2 |
--------------------------------------------------------------------------------
/app/transforms/embed.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/transforms/embed';
2 |
--------------------------------------------------------------------------------
/app/transforms/links.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/transforms/links';
2 |
--------------------------------------------------------------------------------
/app/utils/path-join.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/utils/path-join';
2 |
--------------------------------------------------------------------------------
/addon/components/file-browser-icon/template.hbs:
--------------------------------------------------------------------------------
1 | {{fa-icon iconName fixedWidth=true}}
2 |
--------------------------------------------------------------------------------
/app/adapters/collection.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/collection';
2 |
--------------------------------------------------------------------------------
/app/adapters/moderator.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/moderator';
2 |
--------------------------------------------------------------------------------
/app/adapters/node-link.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/node-link';
2 |
--------------------------------------------------------------------------------
/app/adapters/user-email.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/user-email';
2 |
--------------------------------------------------------------------------------
/app/helpers/elem-id.js:
--------------------------------------------------------------------------------
1 | export { default, elemId } from 'ember-osf/helpers/elem-id';
2 |
--------------------------------------------------------------------------------
/app/mixins/host-app-name.js:
--------------------------------------------------------------------------------
1 | export {default} from 'ember-osf/mixins/host-app-name';
2 |
--------------------------------------------------------------------------------
/app/models/contributor.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/contributor';
2 |
--------------------------------------------------------------------------------
/app/models/file-version.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/file-version';
2 |
--------------------------------------------------------------------------------
/app/models/institution.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/institution';
2 |
--------------------------------------------------------------------------------
/app/models/registration.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/registration';
2 |
--------------------------------------------------------------------------------
/app/models/subscription.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/subscription';
2 |
--------------------------------------------------------------------------------
/app/serializers/comment.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/comment';
2 |
--------------------------------------------------------------------------------
/app/serializers/license.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/license';
2 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | .git
2 | **/bower_components
3 | **/dist
4 | **/node_modules
5 | **/tmp
6 |
--------------------------------------------------------------------------------
/addon/components/file-version/style.scss:
--------------------------------------------------------------------------------
1 | .btn.versionButton {
2 | padding: 0px;
3 | }
4 |
--------------------------------------------------------------------------------
/app/adapters/contributor.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/contributor';
2 |
--------------------------------------------------------------------------------
/app/adapters/file-contents.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/file-contents';
2 |
--------------------------------------------------------------------------------
/app/adapters/file-provider.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/file-provider';
2 |
--------------------------------------------------------------------------------
/app/adapters/file-version.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/file-version';
2 |
--------------------------------------------------------------------------------
/app/adapters/institution.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/institution';
2 |
--------------------------------------------------------------------------------
/app/adapters/osf-adapter.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/osf-adapter';
2 |
--------------------------------------------------------------------------------
/app/adapters/registration.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/registration';
2 |
--------------------------------------------------------------------------------
/app/adapters/review-action.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/review-action';
2 |
--------------------------------------------------------------------------------
/app/adapters/subscription.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/subscription';
2 |
--------------------------------------------------------------------------------
/app/authorizers/osf-cookie.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/authorizers/osf-cookie';
2 |
--------------------------------------------------------------------------------
/app/authorizers/osf-token.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/authorizers/osf-token';
2 |
--------------------------------------------------------------------------------
/app/helpers/if-filter.js:
--------------------------------------------------------------------------------
1 | export { default, ifFilter } from 'ember-osf/helpers/if-filter';
2 |
--------------------------------------------------------------------------------
/app/human-file-size/util.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/human-file-size/util';
2 |
--------------------------------------------------------------------------------
/app/models/chronos-journal.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/chronos-journal';
2 |
--------------------------------------------------------------------------------
/app/models/citation-style.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/citation-style';
2 |
--------------------------------------------------------------------------------
/app/models/comment-report.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/comment-report';
2 |
--------------------------------------------------------------------------------
/app/models/file-provider.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/file-provider';
2 |
--------------------------------------------------------------------------------
/app/models/review-action.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/review-action';
2 |
--------------------------------------------------------------------------------
/app/serializers/citation.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/citation';
2 |
--------------------------------------------------------------------------------
/app/serializers/collection.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/collection';
2 |
--------------------------------------------------------------------------------
/app/serializers/moderator.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/moderator';
2 |
--------------------------------------------------------------------------------
/app/serializers/node-link.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/node-link';
2 |
--------------------------------------------------------------------------------
/app/serializers/preprint.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/preprint';
2 |
--------------------------------------------------------------------------------
/app/serializers/taxonomy.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/taxonomy';
2 |
--------------------------------------------------------------------------------
/app/serializers/user-email.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/user-email';
2 |
--------------------------------------------------------------------------------
/app/services/current-user.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/services/current-user';
2 |
--------------------------------------------------------------------------------
/app/services/file-manager.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/services/file-manager';
2 |
--------------------------------------------------------------------------------
/app/services/preprint-word.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/services/preprint-word';
2 |
--------------------------------------------------------------------------------
/app/transforms/fixstring.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/transforms/fixstring';
2 |
--------------------------------------------------------------------------------
/app/utils/fix-special-char.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/utils/fix-special-char';
2 |
--------------------------------------------------------------------------------
/tests/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | embertest: true
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/tests/dummy/public/robots.txt:
--------------------------------------------------------------------------------
1 | # http://www.robotstxt.org
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/addon/components/query-syntax/style.scss:
--------------------------------------------------------------------------------
1 | .query-syntax-help {
2 | margin-top: -24px;
3 | }
4 |
--------------------------------------------------------------------------------
/app/adapters/chronos-journal.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/chronos-journal';
2 |
--------------------------------------------------------------------------------
/app/adapters/citation-style.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/citation-style';
2 |
--------------------------------------------------------------------------------
/app/adapters/comment-report.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/comment-report';
2 |
--------------------------------------------------------------------------------
/app/authenticators/osf-token.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/authenticators/osf-token';
2 |
--------------------------------------------------------------------------------
/app/locales/en/translations.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/locales/en/translations';
2 |
--------------------------------------------------------------------------------
/app/models/preprint-provider.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/preprint-provider';
2 |
--------------------------------------------------------------------------------
/app/models/preprint-request.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/preprint-request';
2 |
--------------------------------------------------------------------------------
/app/serializers/contributor.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/contributor';
2 |
--------------------------------------------------------------------------------
/app/serializers/file-version.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/file-version';
2 |
--------------------------------------------------------------------------------
/app/serializers/institution.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/institution';
2 |
--------------------------------------------------------------------------------
/app/serializers/linked-node.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/linked-node';
2 |
--------------------------------------------------------------------------------
/app/serializers/registration.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/registration';
2 |
--------------------------------------------------------------------------------
/app/serializers/subscription.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/subscription';
2 |
--------------------------------------------------------------------------------
/app/utils/load-relationship.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/utils/load-relationship';
2 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/nodes/detail.hbs:
--------------------------------------------------------------------------------
1 | {{title model.title separator=" "}}
2 | {{outlet}}
3 |
--------------------------------------------------------------------------------
/app/adapters/chronos-submission.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/chronos-submission';
2 |
--------------------------------------------------------------------------------
/app/adapters/draft-registration.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/draft-registration';
2 |
--------------------------------------------------------------------------------
/app/adapters/preprint-provider.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/preprint-provider';
2 |
--------------------------------------------------------------------------------
/app/adapters/preprint-request.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/preprint-request';
2 |
--------------------------------------------------------------------------------
/app/authenticators/osf-cookie.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/authenticators/osf-cookie';
2 |
--------------------------------------------------------------------------------
/app/helpers/extract-doi.js:
--------------------------------------------------------------------------------
1 | export { default, extractDoi } from 'ember-osf/helpers/extract-doi';
2 |
--------------------------------------------------------------------------------
/app/mixins/osf-token-login-route.js:
--------------------------------------------------------------------------------
1 | export {default} from 'ember-osf/mixins/osf-token-login-route';
2 |
--------------------------------------------------------------------------------
/app/models/chronos-submission.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/chronos-submission';
2 |
--------------------------------------------------------------------------------
/app/models/draft-registration.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/draft-registration';
2 |
--------------------------------------------------------------------------------
/app/serializers/chronos-journal.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/chronos-journal';
2 |
--------------------------------------------------------------------------------
/app/serializers/citation-style.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/citation-style';
2 |
--------------------------------------------------------------------------------
/app/serializers/comment-report.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/comment-report';
2 |
--------------------------------------------------------------------------------
/app/serializers/file-contents.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/file-contents';
2 |
--------------------------------------------------------------------------------
/app/serializers/file-provider.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/file-provider';
2 |
--------------------------------------------------------------------------------
/app/serializers/osf-serializer.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/osf-serializer';
2 |
--------------------------------------------------------------------------------
/app/serializers/review-action.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/review-action';
2 |
--------------------------------------------------------------------------------
/app/utils/transition-target-url.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/utils/transition-target-url';
2 |
--------------------------------------------------------------------------------
/app/components/sign-up/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/sign-up/component';
2 |
--------------------------------------------------------------------------------
/app/helpers/filter-replace.js:
--------------------------------------------------------------------------------
1 | export { default, filterReplace } from 'ember-osf/helpers/filter-replace';
2 |
--------------------------------------------------------------------------------
/app/helpers/number-format.js:
--------------------------------------------------------------------------------
1 | export { default, numberFormat } from 'ember-osf/helpers/number-format';
2 |
--------------------------------------------------------------------------------
/app/serializers/preprint-provider.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/preprint-provider';
2 |
--------------------------------------------------------------------------------
/app/serializers/preprint-request.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/preprint-request';
2 |
--------------------------------------------------------------------------------
/app/utils/extract-doi-from-string.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/utils/extract-doi-from-string';
2 |
--------------------------------------------------------------------------------
/tests/dummy/app/resolver.js:
--------------------------------------------------------------------------------
1 | import Resolver from 'ember-resolver';
2 |
3 | export default Resolver;
4 |
--------------------------------------------------------------------------------
/addon/adapters/log.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({});
4 |
--------------------------------------------------------------------------------
/app/adapters/preprint-request-action.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/preprint-request-action';
2 |
--------------------------------------------------------------------------------
/app/adapters/registration-metaschema.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/adapters/registration-metaschema';
2 |
--------------------------------------------------------------------------------
/app/components/cookie-banner/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/cookie-banner/component';
--------------------------------------------------------------------------------
/app/components/file-editor/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/file-editor/component';
2 |
--------------------------------------------------------------------------------
/app/components/file-widget/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/file-widget/component';
2 |
--------------------------------------------------------------------------------
/app/components/osf-navbar/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/osf-navbar/component';
2 |
--------------------------------------------------------------------------------
/app/components/tags-widget/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/tags-widget/component';
2 |
--------------------------------------------------------------------------------
/app/helpers/get-display-name.js:
--------------------------------------------------------------------------------
1 | export { default, getDisplayName } from 'ember-osf/helpers/get-display-name';
2 |
--------------------------------------------------------------------------------
/app/helpers/share-detail-url.js:
--------------------------------------------------------------------------------
1 | export { default, shareDetailURL } from 'ember-osf/helpers/share-detail-url';
2 |
--------------------------------------------------------------------------------
/app/mixins/osf-token-login-controller.js:
--------------------------------------------------------------------------------
1 | export {default} from 'ember-osf/mixins/osf-token-login-controller';
2 |
--------------------------------------------------------------------------------
/app/models/preprint-request-action.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/preprint-request-action';
2 |
--------------------------------------------------------------------------------
/app/models/registration-metaschema.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/models/registration-metaschema';
2 |
--------------------------------------------------------------------------------
/app/serializers/chronos-submission.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/chronos-submission';
2 |
--------------------------------------------------------------------------------
/app/serializers/draft-registration.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/draft-registration';
2 |
--------------------------------------------------------------------------------
/docs/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/docs/assets/favicon.ico
--------------------------------------------------------------------------------
/addon/adapters/node-link.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({});
4 |
--------------------------------------------------------------------------------
/addon/components/scheduled-banner/style.scss:
--------------------------------------------------------------------------------
1 | .banner-img {
2 | max-height: 300px;
3 | margin: auto;
4 | }
5 |
--------------------------------------------------------------------------------
/app/components/author-link/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/author-link/component';
2 |
3 |
--------------------------------------------------------------------------------
/app/components/comment-form/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/comment-form/component';
2 |
--------------------------------------------------------------------------------
/app/components/comment-pane/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/comment-pane/component';
2 |
--------------------------------------------------------------------------------
/app/components/discover-page/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/discover-page/component';
2 |
--------------------------------------------------------------------------------
/app/components/file-browser/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/file-browser/component';
2 |
--------------------------------------------------------------------------------
/app/components/file-chooser/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/file-chooser/component';
2 |
--------------------------------------------------------------------------------
/app/components/file-renderer/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/file-renderer/component';
2 |
--------------------------------------------------------------------------------
/app/components/file-version/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/file-version/component';
2 |
--------------------------------------------------------------------------------
/app/components/lazy-options/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/lazy-options/component';
2 |
--------------------------------------------------------------------------------
/app/components/license-list/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/license-list/component';
2 |
--------------------------------------------------------------------------------
/app/components/new-osf-navbar/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/new-osf-navbar/component';
--------------------------------------------------------------------------------
/app/components/osf-paginator/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/osf-paginator/component';
2 |
--------------------------------------------------------------------------------
/app/components/page-controls/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/page-controls/component';
2 |
--------------------------------------------------------------------------------
/app/components/query-syntax/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/query-syntax/component';
2 |
--------------------------------------------------------------------------------
/docs/assets/css/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/docs/assets/css/logo.png
--------------------------------------------------------------------------------
/tests/dummy/app/routes/signup.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/adapters/citation.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/adapters/comment.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/adapters/license.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/adapters/taxonomy.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/assets/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/favicon.ico
--------------------------------------------------------------------------------
/addon/components/navbar-auth-dropdown/style.scss:
--------------------------------------------------------------------------------
1 | .btn-link:hover,
2 | .btn-link:focus {
3 | color: inherit;
4 | }
5 |
--------------------------------------------------------------------------------
/app/components/comment-detail/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/comment-detail/component';
2 |
--------------------------------------------------------------------------------
/app/components/dropzone-widget/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/dropzone-widget/component';
2 |
--------------------------------------------------------------------------------
/app/components/eosf-project-nav/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/eosf-project-nav/component';
2 |
--------------------------------------------------------------------------------
/app/components/faceted-search/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/faceted-search/component';
2 |
--------------------------------------------------------------------------------
/app/components/license-picker/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/license-picker/component';
2 |
--------------------------------------------------------------------------------
/app/components/maintenance-banner/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/maintenance-banner/component';
--------------------------------------------------------------------------------
/app/components/old-file-browser/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/old-file-browser/component';
2 |
--------------------------------------------------------------------------------
/app/components/project-selector/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/project-selector/component';
2 |
--------------------------------------------------------------------------------
/app/components/scheduled-banner/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/scheduled-banner/component';
2 |
--------------------------------------------------------------------------------
/app/components/search-dropdown/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/search-dropdown/component';
2 |
--------------------------------------------------------------------------------
/app/components/search-result/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/search-result/component';
2 |
3 |
--------------------------------------------------------------------------------
/app/helpers/fix-special-char.js:
--------------------------------------------------------------------------------
1 | export { default, fixSpecialCharHelper } from 'ember-osf/helpers/fix-special-char';
2 |
--------------------------------------------------------------------------------
/app/helpers/sort-option-display.js:
--------------------------------------------------------------------------------
1 | export { default, sortOptionDisplay } from 'ember-osf/helpers/sort-option-display';
2 |
--------------------------------------------------------------------------------
/app/instance-initializers/ember-osf.js:
--------------------------------------------------------------------------------
1 | export { default, initialize } from 'ember-osf/instance-initializers/ember-osf';
2 |
--------------------------------------------------------------------------------
/app/serializers/preprint-request-action.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/preprint-request-action';
2 |
--------------------------------------------------------------------------------
/app/serializers/registration-metaschema.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/serializers/registration-metaschema';
2 |
--------------------------------------------------------------------------------
/docs/assets/img/spinner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/docs/assets/img/spinner.gif
--------------------------------------------------------------------------------
/addon/adapters/citation-style.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/adapters/comment-report.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/adapters/draft-registration.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({});
4 |
--------------------------------------------------------------------------------
/addon/adapters/file-contents.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/adapters/file-version.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/adapters/institution.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/adapters/registration.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/adapters/subscription.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/adapters/user-email.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/assets/img/cos-white2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/cos-white2.png
--------------------------------------------------------------------------------
/app/components/citation-widget/component.js:
--------------------------------------------------------------------------------
1 |
2 | export { default } from 'ember-osf/components/citation-widget/component';
3 |
--------------------------------------------------------------------------------
/app/components/file-browser-icon/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/file-browser-icon/component';
2 |
--------------------------------------------------------------------------------
/app/components/file-browser-item/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/file-browser-item/component';
2 |
--------------------------------------------------------------------------------
/app/components/file-browser-tree/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/file-browser-tree/component';
2 |
--------------------------------------------------------------------------------
/app/components/osf-footer/component.js:
--------------------------------------------------------------------------------
1 | export {
2 | default
3 | }
4 | from 'ember-osf/components/osf-footer/component';
5 |
--------------------------------------------------------------------------------
/app/components/pagination-control/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/pagination-control/component';
2 |
--------------------------------------------------------------------------------
/app/components/search-help-modal/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/search-help-modal/component';
2 |
--------------------------------------------------------------------------------
/app/components/validated-input/component.js:
--------------------------------------------------------------------------------
1 |
2 | export { default } from 'ember-osf/components/validated-input/component';
3 |
--------------------------------------------------------------------------------
/addon/adapters/preprint-provider.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/assets/img/bg-donate-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/bg-donate-1.jpg
--------------------------------------------------------------------------------
/addon/assets/img/bg-donate-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/bg-donate-2.jpg
--------------------------------------------------------------------------------
/addon/assets/img/bg-donate-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/bg-donate-3.jpg
--------------------------------------------------------------------------------
/addon/assets/img/bg-donate-4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/bg-donate-4.jpg
--------------------------------------------------------------------------------
/addon/assets/img/bg-donate-5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/bg-donate-5.jpg
--------------------------------------------------------------------------------
/addon/components/lazy-options-load-more/template.hbs:
--------------------------------------------------------------------------------
1 |
Load more
2 |
--------------------------------------------------------------------------------
/addon/serializers/license.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/user.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/wiki.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/app/components/navbar-auth-dropdown/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/navbar-auth-dropdown/component';
2 |
--------------------------------------------------------------------------------
/app/components/oauth-popup/component.js:
--------------------------------------------------------------------------------
1 | export {
2 | default
3 | }
4 | from 'ember-osf/components/oauth-popup/component';
5 |
--------------------------------------------------------------------------------
/app/components/old-file-browser-item/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/old-file-browser-item/component';
2 |
--------------------------------------------------------------------------------
/app/components/osf-copyright/component.js:
--------------------------------------------------------------------------------
1 | export {
2 | default
3 | }
4 | from 'ember-osf/components/osf-copyright/component';
5 |
--------------------------------------------------------------------------------
/app/components/search-facet-locked/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/search-facet-locked/component';
2 |
--------------------------------------------------------------------------------
/app/components/sharing-icons-popover/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/sharing-icons-popover/component';
2 |
--------------------------------------------------------------------------------
/app/components/total-share-results/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/total-share-results/component';
2 |
--------------------------------------------------------------------------------
/app/helpers/custom-taxonomy-filter.js:
--------------------------------------------------------------------------------
1 | export { default, customTaxonomyFilter } from 'ember-osf/helpers/custom-taxonomy-filter';
2 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/embedding-records.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 |
5 | });
6 |
--------------------------------------------------------------------------------
/addon/assets/img/share-logo-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/share-logo-icon.png
--------------------------------------------------------------------------------
/addon/components/citation-widget/style.scss:
--------------------------------------------------------------------------------
1 | .formatted-citation {
2 | white-space: pre-wrap;
3 | word-break: break-word;
4 | }
5 |
--------------------------------------------------------------------------------
/addon/serializers/citation.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/collection.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/file-version.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/moderator.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/registration.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/subscription.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/taxonomy.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/user-email.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/app/components/lazy-options-load-more/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/lazy-options-load-more/component';
2 |
--------------------------------------------------------------------------------
/app/components/new-navbar-auth-dropdown/component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-osf/components/new-navbar-auth-dropdown/component';
--------------------------------------------------------------------------------
/app/components/osf-mode-footer/component.js:
--------------------------------------------------------------------------------
1 | export {
2 | default
3 | }
4 | from 'ember-osf/components/osf-mode-footer/component';
5 |
--------------------------------------------------------------------------------
/app/helpers/get-ancestor-descriptor.js:
--------------------------------------------------------------------------------
1 | export { default, getAncestorDescriptor } from 'ember-osf/helpers/get-ancestor-descriptor';
2 |
--------------------------------------------------------------------------------
/docs/assets/css/external-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/docs/assets/css/external-small.png
--------------------------------------------------------------------------------
/addon/public/assets/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/public/assets/images/favicon.ico
--------------------------------------------------------------------------------
/addon/serializers/chronos-journal.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/citation-style.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/comment-report.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/file-contents.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/serializers/preprint-provider.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/app/helpers/build-secondary-nav-links.js:
--------------------------------------------------------------------------------
1 | export { default, buildSecondaryNavLinks } from 'ember-osf/helpers/build-secondary-nav-links';
2 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/nodes/detail/wikis.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Controller.extend({
4 |
5 | });
6 |
--------------------------------------------------------------------------------
/addon/public/assets/images/cos-white2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/public/assets/images/cos-white2.png
--------------------------------------------------------------------------------
/addon/serializers/draft-registration.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/addon/assets/img/giving_tuesday_week01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/giving_tuesday_week01.png
--------------------------------------------------------------------------------
/addon/assets/img/giving_tuesday_week02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/giving_tuesday_week02.png
--------------------------------------------------------------------------------
/addon/serializers/registration-metaschema.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/nodes/detail/files/index.hbs:
--------------------------------------------------------------------------------
1 | {{file-browser user=user
2 | openFile=(action 'fileDetail')
3 | openNode=(action 'nodeDetail')
4 | }}
5 |
--------------------------------------------------------------------------------
/addon/assets/img/giving_tuesday_week01_mobile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/giving_tuesday_week01_mobile.png
--------------------------------------------------------------------------------
/addon/assets/img/giving_tuesday_week02_mobile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CenterForOpenScience/ember-osf/HEAD/addon/assets/img/giving_tuesday_week02_mobile.png
--------------------------------------------------------------------------------
/tests/helpers/destroy-app.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default function destroyApp(application) {
4 | Ember.run(application, 'destroy');
5 | }
6 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/nodes/detail/files/provider/file/index.hbs:
--------------------------------------------------------------------------------
1 | {{#file-renderer download=model.links.download
2 | width="800" height="1000"}}
3 | {{/file-renderer}}
4 |
--------------------------------------------------------------------------------
/addon/components/old-file-browser-item/template.hbs:
--------------------------------------------------------------------------------
1 | {{! TODO: configurable columns }}
2 | {{file-browser-icon item=item}}
3 | {{item.itemName}}
4 |
--------------------------------------------------------------------------------
/addon/components/new-osf-navbar/style.scss:
--------------------------------------------------------------------------------
1 | @import 'bootstrap/variables';
2 |
3 |
4 | @media (min-width: $screen-md-min) {
5 | .navbar-right-md {
6 | float: right;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/cookielogin.hbs:
--------------------------------------------------------------------------------
1 | {{t 'cookieLogin.login'}}
2 |
3 | {{#link-to "nodes"}}{{t 'cookieLogin.toNodesPage'}}{{/link-to}}
4 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/nodes/detail/files.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{link-to 'Back to node' 'nodes.detail' node class='btn btn-primary'}}
3 |
4 | {{title "Files"}}
5 |
6 | {{outlet}}
7 |
--------------------------------------------------------------------------------
/addon/components/author-link/template.hbs:
--------------------------------------------------------------------------------
1 | {{~#if profileLink~}}
2 |
3 | {{~contributorName~}}
4 |
5 | {{~else~}}
6 | {{~contributorName~}}
7 | {{~/if}}
8 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/institutions.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | model() {
5 | return this.store.findAll('institution');
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/addon/adapters/review-action.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | pathForType: function(){
5 | return 'actions/reviews/';
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/login.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import OsfTokenLoginRouteMixin from 'ember-osf/mixins/osf-token-login-route';
3 |
4 | export default Ember.Route.extend(OsfTokenLoginRouteMixin);
5 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/signup.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{sign-up}}
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/addon/components/osf-mode-footer/template.hbs:
--------------------------------------------------------------------------------
1 | {{#if isDevMode}}
2 | {{t 'eosf.osfModeFooter.warning'}} {{t 'eosf.osfModeFooter.runningInDevelopmentMode'}}
3 | {{/if}}
4 |
--------------------------------------------------------------------------------
/addon/components/oauth-popup/template.hbs:
--------------------------------------------------------------------------------
1 | {{#if hasBlock }}
2 | {{yield this}}
3 | {{else}}
4 | {{t 'eosf.components.oauthPopup.login'}}
5 | {{/if}}
6 |
--------------------------------------------------------------------------------
/addon/serializers/file-provider.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | modelNameFromPayloadKey() {
5 | return 'file-provider';
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/test-support/factories/node-link.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 |
3 | FactoryGuy.define('node-link', {
4 | default: {
5 | targetNode: FactoryGuy.belongsTo('node')
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/tests/dummy/app/components/file-tree/component.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import layout from './template';
3 |
4 | export default Ember.Component.extend({
5 | layout,
6 | i18n: Ember.service.inject(),
7 | });
8 |
--------------------------------------------------------------------------------
/addon/adapters/preprint-request-action.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | pathForType: function(){
5 | return 'actions/requests/preprints/';
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/addon/adapters/registration-metaschema.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | pathForType: function() {
5 | return 'metaschemas/registrations/';
6 | },
7 | });
8 |
--------------------------------------------------------------------------------
/addon/components/osf-mode-footer/style.scss:
--------------------------------------------------------------------------------
1 | #devmode {
2 | position:fixed;
3 | bottom:0;
4 | left:0;
5 | border-top-right-radius:8px;
6 | background-color:#e50000;
7 | color:white;
8 | padding:.5em;
9 | }
--------------------------------------------------------------------------------
/tests/dummy/app/components/log-detail/component.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import layout from './template';
3 |
4 | export default Ember.Component.extend({
5 | layout,
6 | i18n: Ember.service.inject(),
7 | });
8 |
--------------------------------------------------------------------------------
/tests/dummy/app/helpers/check-data-type.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export function checkDataType(resource) {
4 | return Ember.typeOf(resource[0]);
5 | }
6 |
7 | export default Ember.Helper.helper(checkDataType);
8 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/cookielogin.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import OsfCookieLoginRouteMixin from 'ember-osf/mixins/osf-cookie-login-route';
3 |
4 | export default Ember.Route.extend(OsfCookieLoginRouteMixin, {
5 | });
6 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/index.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
3 |
4 | export default Ember.Route.extend(AuthenticatedRouteMixin, {});
5 |
--------------------------------------------------------------------------------
/tests/test-helper.js:
--------------------------------------------------------------------------------
1 | import resolver from './helpers/resolver';
2 | import { start } from 'ember-cli-qunit';
3 |
4 | import {
5 | setResolver
6 | } from 'ember-qunit';
7 |
8 | setResolver(resolver);
9 | start();
10 |
--------------------------------------------------------------------------------
/addon/adapters/chronos-journal.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | namespace: '_/chronos',
5 | pathForType: function () {
6 | return 'journals';
7 | }
8 | });
9 |
--------------------------------------------------------------------------------
/.template-lintrc.js:
--------------------------------------------------------------------------------
1 | /* eslint-env node */
2 | 'use strict';
3 |
4 | module.exports = {
5 | extends: 'recommended',
6 |
7 | rules: {
8 | 'block-indentation': 4,
9 | 'bare-strings': true
10 | }
11 | };
12 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/login.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | import OsfTokenLoginControllerMixin from 'ember-osf/mixins/osf-token-login-controller';
4 |
5 | export default Ember.Controller.extend(OsfTokenLoginControllerMixin);
6 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/share-discover-page.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | queryParams: {
5 | queryString: {
6 | replace: true
7 | }
8 | }
9 | });
10 |
--------------------------------------------------------------------------------
/addon/serializers/node.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | // Serialize license relationship
5 | relationshipTypes: {
6 | license: 'licenses',
7 | },
8 | });
9 |
--------------------------------------------------------------------------------
/config/coverage.js:
--------------------------------------------------------------------------------
1 | /* eslint-env node */
2 | 'use strict';
3 |
4 | //See https://github.com/kategengler/ember-cli-code-coverage/issues/41
5 | module.exports = {
6 | excludes: [
7 | 'tests/dummy/**/*',
8 | ]
9 | };
10 |
--------------------------------------------------------------------------------
/test-support/factories/citation.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('citation', {
5 | default: {
6 | citation: () => faker.lorem.words(10)
7 | }
8 | });
9 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/users/list.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | import PaginatedControllerMixin from 'ember-osf/mixins/paginated-controller';
4 |
5 | export default Ember.Controller.extend(PaginatedControllerMixin, {
6 | });
7 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/registrations/detail.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | model(params) {
5 | return this.store.findRecord('registration', params.registration_id);
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/addon/components/query-syntax/component.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import layout from './template';
3 |
4 | // Adapted from Ember-SHARE
5 | export default Ember.Component.extend({
6 | layout,
7 | i18n: Ember.inject.service()
8 | });
9 |
--------------------------------------------------------------------------------
/config/environment.js:
--------------------------------------------------------------------------------
1 | /* eslint-env node */
2 | 'use strict';
3 |
4 | module.exports = function(/* environment, appConfig */) {
5 | return {
6 | moment: {
7 | includeTimezone: 'all'
8 | }
9 | };
10 | };
11 |
--------------------------------------------------------------------------------
/tests/dummy/app/components/log-detail/style.css:
--------------------------------------------------------------------------------
1 | table.logs, table.logs th, table.logs td {
2 | border: 1px solid black;
3 | border-collapse: collapse;
4 | border-spacing: 10px 5px;
5 | text-align: center;
6 | padding: 5px 10px;
7 | }
8 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/cookielogin.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | import OsfCookieLoginController from 'ember-osf/mixins/osf-cookie-login-controller';
4 |
5 | export default Ember.Controller.extend(OsfCookieLoginController, {
6 | });
7 |
--------------------------------------------------------------------------------
/addon/serializers/preprint-request.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | // Serialize `target` relationship
5 | relationshipTypes: {
6 | target: 'preprints',
7 | },
8 | });
9 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/nodes/detail/children.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | model() {
5 | let node = this.modelFor('nodes.detail');
6 | return node.get('children');
7 | },
8 | });
9 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/nodes/detail/wikis.hbs:
--------------------------------------------------------------------------------
1 | {{link-to 'Back to node' 'nodes.detail' model}}
2 | {{model.title}} {{t 'nodes.detail.wiki.wikis'}}
3 | {{#each model.wikis as |wiki|}}
4 |
5 | {{wiki-detail wiki=wiki}}
6 | {{/each}}
7 |
--------------------------------------------------------------------------------
/tests/unit/adapters/node-test.js:
--------------------------------------------------------------------------------
1 | import {
2 | moduleFor
3 | } from 'ember-qunit';
4 |
5 | moduleFor('adapter:node', 'Unit | Adapter | node', {
6 | // Specify the other units that are required for this test.
7 | needs: ['model:node']
8 | });
9 |
--------------------------------------------------------------------------------
/addon/models/moderator.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 | import OsfModel from './osf-model';
3 |
4 | export default OsfModel.extend({
5 | permissionGroup: DS.attr('string'),
6 | fullName: DS.attr('string'),
7 | email: DS.attr('string'),
8 | });
9 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/nodes/detail/files/provider/index.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Controller.extend({
4 | actions: {
5 | reloadFiles() {
6 | // TODO?
7 | }
8 | }
9 | });
10 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/nodes/detail/children.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{t 'nodes.detail.children.components'}}
3 |
8 |
--------------------------------------------------------------------------------
/addon/models/license.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 |
3 | import OsfModel from './osf-model';
4 |
5 | export default OsfModel.extend({
6 | name: DS.attr('fixstring'),
7 | text: DS.attr('fixstring'),
8 | requiredFields: DS.attr()
9 | });
10 |
--------------------------------------------------------------------------------
/addon/components/file-browser-item/style.scss:
--------------------------------------------------------------------------------
1 | .popover {
2 | min-width: 276px;
3 | .share-link {
4 | height: 33px;
5 | }
6 | }
7 | .file-browser-header.link-column {
8 | .popover-toggler {
9 | margin-top: 2px;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/addon/components/search-facet-locked/template.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{#each options.locked_items as |lockedItem|}}
3 | {{lockedItem}}
4 | {{/each}}
5 |
6 |
--------------------------------------------------------------------------------
/addon/models/user-email.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 | import OsfModel from './osf-model'
3 |
4 | export default OsfModel.extend({
5 | confirmed: DS.attr('boolean'),
6 | emailAddress: DS.attr('fixstring'),
7 | primary: DS.attr('boolean'),
8 | });
9 |
10 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/allnodes.hbs:
--------------------------------------------------------------------------------
1 | {{t 'allNodes.theseAreTheNodes'}}
2 |
3 | {{#each model as |node|}}
4 | {{link-to node.title 'nodes.detail' node}}
5 | {{/each}}
6 |
7 | {{t 'allNodes.loadMore'}}
8 |
--------------------------------------------------------------------------------
/addon/adapters/file-provider.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 | import FileCacheBypassMixin from 'ember-osf/mixins/file-cache-bypass';
3 |
4 | export default OsfAdapter.extend(FileCacheBypassMixin, {
5 | pathForType() {
6 | return 'files';
7 | }
8 | });
9 |
--------------------------------------------------------------------------------
/addon/helpers/extract-doi.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import extractDoiFromString from '../utils/extract-doi-from-string';
3 |
4 | export function extractDoi(params) {
5 | return extractDoiFromString(params[0]);
6 | }
7 |
8 | export default Ember.Helper.helper(extractDoi);
9 |
--------------------------------------------------------------------------------
/app/components/sharing-icons/component.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-unused-vars */
2 | // This helps ember-browserify find npm modules in ember-cli addons
3 | import trunc from 'npm:unicode-byte-truncate'
4 |
5 | export { default } from 'ember-osf/components/sharing-icons/component';
6 |
--------------------------------------------------------------------------------
/docs/files/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Redirector
5 |
6 |
7 |
8 | Click here to redirect
9 |
10 |
11 |
--------------------------------------------------------------------------------
/docs/assets/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Redirector
5 |
6 |
7 |
8 | Click here to redirect
9 |
10 |
11 |
--------------------------------------------------------------------------------
/docs/classes/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Redirector
5 |
6 |
7 |
8 | Click here to redirect
9 |
10 |
11 |
--------------------------------------------------------------------------------
/docs/elements/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Redirector
5 |
6 |
7 |
8 | Click here to redirect
9 |
10 |
11 |
--------------------------------------------------------------------------------
/docs/modules/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Redirector
5 |
6 |
7 |
8 | Click here to redirect
9 |
10 |
11 |
--------------------------------------------------------------------------------
/addon/transforms/embed.js:
--------------------------------------------------------------------------------
1 | import Transform from 'ember-data/transform';
2 |
3 | export default Transform.extend({
4 | deserialize(serialized) {
5 | return serialized;
6 | },
7 |
8 | serialize(deserialized) {
9 | return deserialized;
10 | }
11 | });
12 |
--------------------------------------------------------------------------------
/test-support/factories/license.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('license', {
5 | default: {
6 | name: () => faker.lorem.words(1),
7 | text: () => faker.lorem.words(15)
8 | }
9 | });
10 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/nodes/detail/files/provider/file/revisions.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | model() {
5 | let file = this.modelFor('nodes.detail.files.provider.file');
6 | return file.get('versions');
7 | },
8 | });
9 |
--------------------------------------------------------------------------------
/tests/dummy/app/helpers/selected-helper.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export function selectedHelper(params) {
4 | if (params[0] === params[1]) {
5 | return 'selected';
6 | }
7 | return null;
8 | }
9 |
10 | export default Ember.Helper.helper(selectedHelper);
11 |
--------------------------------------------------------------------------------
/test-support/factories/moderator.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('moderator', {
5 | default: {
6 | fullName: () => faker.name.findName(),
7 | permissionGroup: () => 'admin',
8 | },
9 | });
10 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/nodes/detail/registrations.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | model() {
5 | let node = this.modelFor('nodes.detail');
6 | let registrations = node.get('registrations');
7 | return registrations;
8 | },
9 | });
10 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/usernodes.hbs:
--------------------------------------------------------------------------------
1 | {{t 'userNodes.user'}}: {{model.fullName}}
2 | {{t 'userNodes.nodes'}}:
3 |
4 | {{#each allRelated as |node|}}
5 | {{node}}, {{node.title}}
6 | {{/each}}
7 |
8 |
9 | {{t 'userNodes.loadMore'}}
10 |
--------------------------------------------------------------------------------
/.ember-cli:
--------------------------------------------------------------------------------
1 | {
2 | /**
3 | Ember CLI sends analytics information by default. The data is completely
4 | anonymous, but there are times when you might want to disable this behavior.
5 |
6 | Setting `disableAnalytics` to true will prevent any data from being sent.
7 | */
8 | "disableAnalytics": false
9 | }
10 |
--------------------------------------------------------------------------------
/addon/helpers/custom-taxonomy-filter.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 |
4 | export function customTaxonomyFilter(params/*, hash*/) {
5 | let words = params[0].split('|');
6 | return words.length > 1 ? words[words.length - 1] : params[0];
7 | }
8 |
9 | export default Ember.Helper.helper(customTaxonomyFilter);
10 |
--------------------------------------------------------------------------------
/test-support/factories/metaschema.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('metaschema', {
5 | default: {
6 | name: () => faker.lorem.words(1),
7 | schemaVersion: () => faker.random.number(),
8 | schema: {}
9 | }
10 | });
11 |
--------------------------------------------------------------------------------
/tests/helpers/resolver.js:
--------------------------------------------------------------------------------
1 | import Resolver from '../../resolver';
2 | import config from '../../config/environment';
3 |
4 | const resolver = Resolver.create();
5 |
6 | resolver.namespace = {
7 | modulePrefix: config.modulePrefix,
8 | podModulePrefix: config.podModulePrefix
9 | };
10 |
11 | export default resolver;
12 |
--------------------------------------------------------------------------------
/addon/components/sign-up/component.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import layout from './template';
3 |
4 | /**
5 | * @module ember-osf
6 | * @submodule components
7 | */
8 |
9 | /**
10 | * Display a simple signup form
11 | * @class sign-up
12 | */
13 | export default Ember.Component.extend({
14 | layout
15 | });
16 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/users/detail.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
3 |
4 | export default Ember.Route.extend(AuthenticatedRouteMixin, {
5 | model(params) {
6 | return this.store.findRecord('user', params.user_id);
7 | }
8 | });
9 |
--------------------------------------------------------------------------------
/tests/dummy/app/styles/app.scss:
--------------------------------------------------------------------------------
1 | @import 'ember-power-select';
2 | @import 'bootstrap';
3 |
4 | #main {
5 | min-height: 500px;
6 | }
7 |
8 |
9 | body {
10 | padding-top: 50px;
11 | position: relative;
12 | -webkit-font-smoothing: antialiased;
13 | font-family: 'Open Sans', 'Helvetica Neue', sans-serif;
14 | }
15 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/login.hbs:
--------------------------------------------------------------------------------
1 | {{t 'login.pageTitle'}}
2 | {{t 'login.loginMessage'}}
3 |
4 | {{t 'login.signUp'}}
5 | {{link-to 'Sign Up' 'signup' class="btn btn-default"}}
6 |
7 | {{t 'login.getFancy'}}
8 | {{oauth-popup authUrl=authUrl}}
9 |
--------------------------------------------------------------------------------
/tests/unit/utils/load-relationship-test.js:
--------------------------------------------------------------------------------
1 | // import loadAll from 'dummy/utils/load-relationship';
2 | import {
3 | module,
4 | test
5 | } from 'qunit';
6 |
7 | module('Unit | Utility | load relationship');
8 |
9 | // Replace this with your real tests.
10 | test('it works', function(assert) {
11 | assert.ok(true);
12 | });
13 |
--------------------------------------------------------------------------------
/addon/components/total-share-results/template.hbs:
--------------------------------------------------------------------------------
1 | {{#if (and shareTotalText shareTotal)}}
2 |
3 | {{t shareTotalText count=(number-format shareTotal)}}
4 | {{t "eosf.components.discoverPage.asOf"}} {{moment-format currentDate "MMMM DD, YYYY"}}
5 |
6 | {{/if}}
--------------------------------------------------------------------------------
/test-support/factories/comment-report.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('comment-report', {
5 | default: {
6 | category: () => faker.random.arrayElement(['hate', 'spam', 'violence']),
7 | text: FactoryGuy.belongsTo('comment')
8 | },
9 | });
10 |
--------------------------------------------------------------------------------
/test-support/factories/file-version.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('file-version', {
5 | default: {
6 | size: () => faker.random.number(),
7 | contentType: 'text/plain', // faker.system may not come with older versions of lib
8 | }
9 | });
10 |
--------------------------------------------------------------------------------
/tests/dummy/app/helpers/bibliographic-helper.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export function bibliographicHelper(params) {
4 | // checks if bibliographic is true or false
5 | if (params[0]) {
6 | return 'checked';
7 | }
8 | return null;
9 | }
10 |
11 | export default Ember.Helper.helper(bibliographicHelper);
12 |
--------------------------------------------------------------------------------
/addon/components/lazy-options-load-more/component.js:
--------------------------------------------------------------------------------
1 | import Component from '@ember/component';
2 | import InViewportMixin from 'ember-in-viewport';
3 | import layout from './template';
4 |
5 | export default Component.extend(InViewportMixin, {
6 | layout,
7 | didEnterViewport() {
8 | this.get('loadMore')();
9 | },
10 | });
11 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parserOptions: {
4 | ecmaVersion: 6,
5 | sourceType: 'module'
6 | },
7 | extends: 'eslint:recommended',
8 | env: {
9 | browser: true,
10 | es6: true
11 | },
12 | globals: {
13 | MathJax: true
14 | },
15 | rules: {}
16 | };
17 |
--------------------------------------------------------------------------------
/addon/models/citation.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 |
3 | import OsfModel from './osf-model';
4 |
5 | /**
6 | * @module ember-osf
7 | * @submodule models
8 | */
9 |
10 | /**
11 | * Model for OSF APIv2 citation styles
12 | *
13 | * @class Citation
14 | */
15 | export default OsfModel.extend({
16 | citation: DS.attr('string')
17 | });
18 |
--------------------------------------------------------------------------------
/tests/dummy/app/components/wiki-detail/template.hbs:
--------------------------------------------------------------------------------
1 | {{wiki.name}}, {{wiki.contentType}}
2 |
3 | {{if showContent 'Hide content' 'Show content'}}
4 | {{#if showContent}}
5 | {{wikiContent}}
6 | {{/if}}
7 |
--------------------------------------------------------------------------------
/addon/transforms/links.js:
--------------------------------------------------------------------------------
1 | /*
2 | An empty stub. For now just leave links as a vanilla JS Object
3 | */
4 | import Transform from 'ember-data/transform';
5 |
6 | export default Transform.extend({
7 | deserialize(serialized) {
8 | return serialized;
9 | },
10 | serialize(deserialized) {
11 | return deserialized;
12 | }
13 | });
14 |
--------------------------------------------------------------------------------
/tests/integration/components/license-list/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 |
3 | moduleForComponent('license-list', 'Integration | Component | license list', {
4 | integration: true
5 | });
6 |
7 | test('it renders', function(assert) {
8 | //Remove as adapter logic is breaking it
9 | assert.ok(true);
10 | });
11 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | /bower_components
2 | /config/coverage.js
3 | /config/ember-try.js
4 | /config/*.yml
5 | /coverage
6 | /dist
7 | /docs
8 | /.github
9 | /.idea
10 | /tests
11 | /tmp
12 | **/.gitkeep
13 | .bowerrc
14 | .editorconfig
15 | .ember-cli
16 | .gitignore
17 | .jshintrc
18 | .npmrc
19 | .nvmrc
20 | .watchmanconfig
21 | bower.json
22 | ember-cli-build.js
23 | testem.js
24 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/nodes/detail/index.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | model() {
5 | return this.modelFor('nodes.detail');
6 | },
7 |
8 | setupController(controller) {
9 | controller.set('user', this.modelFor('application'));
10 | return this._super(...arguments);
11 | }
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/utils/path-join-test.js:
--------------------------------------------------------------------------------
1 | import pathJoin from 'ember-osf/utils/path-join';
2 | import { module, test } from 'qunit';
3 |
4 | module('Unit | Utility | path join');
5 |
6 | test('it works', function(assert) {
7 | let result = pathJoin('/this/', 'has', 'all/', '/combos', '/of-slashes');
8 | assert.equal(result, '/this/has/all/combos/of-slashes');
9 | });
10 |
--------------------------------------------------------------------------------
/tests/unit/models/citation-style-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('citation-style', 'Unit | Model | citation style', {
4 | // Specify the other units that are required for this test.
5 | needs: []
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | assert.ok(!!model);
11 | });
12 |
--------------------------------------------------------------------------------
/addon/serializers/review-action.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | // Because `trigger` is a private method on DS.Model
5 | attrs: {
6 | actionTrigger: 'trigger',
7 | },
8 | // Serialize `target` relationship
9 | relationshipTypes: {
10 | target: 'preprints',
11 | },
12 | });
13 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/application.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | store: Ember.inject.service(),
5 | session: Ember.inject.service(),
6 | model() {
7 | if (this.get('session.isAuthenticated')) {
8 | return this.get('store').findRecord('user', 'me');
9 | }
10 | return null;
11 | }
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/helpers/bibliographic-helper-test.js:
--------------------------------------------------------------------------------
1 | import { bibliographicHelper } from 'dummy/helpers/bibliographic-helper';
2 | import { module, test } from 'qunit';
3 |
4 | module('Unit | Helper | bibliographic helper');
5 |
6 | // Replace this with your real tests.
7 | test('it works', function(assert) {
8 | let result = bibliographicHelper([42]);
9 | assert.ok(result);
10 | });
11 |
--------------------------------------------------------------------------------
/addon/components/file-widget/style.scss:
--------------------------------------------------------------------------------
1 | .eosf-file-widget-box {
2 | border: 2px solid dark-grey;
3 | border-radius: 5px;
4 | background-color: #EEE;
5 | padding: 20px;
6 |
7 | .dropzone-box {
8 | margin: 5px;
9 | }
10 | .login-button, .select-project-button {
11 | width: 100%;
12 | height: 150px;
13 | margin: 5px;
14 | text-align: center;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/addon/models/subscription.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 |
3 | import OsfModel from './osf-model';
4 |
5 | /**
6 | * @module ember-osf
7 | * @submodule models
8 | */
9 |
10 | /**
11 | * Model for OSF APIv2 subscriptions.
12 | * @class Subscription
13 | */
14 | export default OsfModel.extend({
15 | eventName: DS.attr('string'),
16 | frequency: DS.attr('string'),
17 | });
18 |
--------------------------------------------------------------------------------
/tests/unit/models/citation-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('citation', 'Unit | Model | citation', {
4 | // Specify the other units that are required for this test.
5 | needs: []
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/license-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('license', 'Unit | Model | license', {
4 | // Specify the other units that are required for this test.
5 | needs: []
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/taxonomy-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('taxonomy', 'Unit | Model | taxonomy', {
4 | // Specify the other units that are required for this test.
5 | needs: []
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/wiki-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('wiki', 'Unit | Model | wiki', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:node']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/addon/models/chronos-journal.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 |
3 | import OsfModel from './osf-model';
4 |
5 | /**
6 | * @module ember-osf
7 | * @submodule models
8 | */
9 |
10 | /**
11 | * Model for OSF APIv2 citation styles
12 | *
13 | * @class ChronosJournals
14 | */
15 | export default OsfModel.extend({
16 | name: DS.attr('string'),
17 | title: DS.attr('string'),
18 | });
19 |
--------------------------------------------------------------------------------
/addon/serializers/preprint-request-action.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | // Because `trigger` is a private method on DS.Model
5 | attrs: {
6 | actionTrigger: 'trigger',
7 | },
8 | // Serialize `target` relationship
9 | relationshipTypes: {
10 | target: 'preprint-requests',
11 | },
12 | });
13 |
--------------------------------------------------------------------------------
/addon/components/comment-form/template.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{textarea class="form-control" maxlength="500" placeholder=(t 'eosf.components.commenting.commentForm.addComment') value=_commentText}}
3 |
4 | {{t 'eosf.components.commenting.commentForm.addComment'}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/addon/components/osf-footer/style.scss:
--------------------------------------------------------------------------------
1 | .footer {
2 | margin-top: 0;
3 | text-shadow: 0 1px 0 #fff;
4 | border-top: 1px solid #e5e5e5;
5 | border-bottom: 1px solid #e5e5e5;
6 | width: 100%;
7 | color: #555;
8 |
9 | a {
10 | color: #255884;
11 | }
12 | }
13 |
14 | .footer ul, .footer li {
15 | padding: 0;
16 | margin: 0;
17 | list-style-type: none;
18 | }
19 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/collections.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
3 |
4 | export default Ember.Route.extend(AuthenticatedRouteMixin, {
5 | store: Ember.inject.service(),
6 | session: Ember.inject.service(),
7 | model() {
8 | return this.get('store').findAll('collection');
9 | }
10 | });
11 |
--------------------------------------------------------------------------------
/tests/unit/adapters/log-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:log', 'Unit | Adapter | log', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/file-version-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('file-version', 'Unit | Model | file version', {
4 | // Specify the other units that are required for this test.
5 | needs: []
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/application.hbs:
--------------------------------------------------------------------------------
1 | {{!osf-navbar loginAction=(action 'login')}}
2 | {{new-osf-navbar loginAction=(action 'login')}}
3 | {{title "OSF"}}
4 |
5 |
6 |
7 | {{outlet}}
8 |
9 |
10 |
11 | {{osf-footer}}
12 | {{osf-copyright}}
13 | {{osf-mode-footer}}
14 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/allnodes.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | // import AuthenticatedRouteMixin from 'ember-simple-auth/mi1xins/authenticated-route-mixin';
4 |
5 | // import FetchAllRouteMixin from 'ember-osf/mixins/fetch-all-route';
6 |
7 | export default Ember.Route.extend({
8 | model() {
9 | return this.infinityModel('node', {
10 | perPage: 20
11 | });
12 | }
13 | });
14 |
--------------------------------------------------------------------------------
/tests/unit/adapters/citation-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:citation', 'Unit | Adapter | citation', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/adapters/license-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:license', 'Unit | Adapter | license', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/adapters/preprint-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:preprint', 'Unit | Adapter | preprint', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/adapters/taxonomy-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:taxonomy', 'Unit | Adapter | taxonomy', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/transforms/embed-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('transform:embed', 'Unit | Transform | embed', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let transform = this.subject();
11 | assert.ok(transform);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/transforms/links-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('transform:links', 'Unit | Transform | links', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let transform = this.subject();
11 | assert.ok(transform);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/nodes/detail/files/provider.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
3 |
4 | export default Ember.Route.extend(AuthenticatedRouteMixin, {
5 | model(params) {
6 | let fileProviders = this.modelFor('nodes.detail.files');
7 | return fileProviders.findBy('provider', params.provider);
8 | },
9 | });
10 |
--------------------------------------------------------------------------------
/tests/unit/adapters/collection-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:collection', 'Unit | Adapter | collection', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/adapters/node-link-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:node-link', 'Unit | Adapter | node link', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/helpers/extract-doi-test.js:
--------------------------------------------------------------------------------
1 |
2 | import { extractDoi } from 'dummy/helpers/extract-doi';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Helper | extract doi');
6 |
7 | test('DOI successfully extracted', function(assert) {
8 | assert.equal(
9 | extractDoi(['http://dx.doi.org/10.1000/182']),
10 | '10.1000/182',
11 | 'Expected DOI to be extracted'
12 | );
13 | });
14 |
--------------------------------------------------------------------------------
/tests/unit/models/comment-report-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('comment-report', 'Unit | Model | comment report', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:comment']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/contributor-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('contributor', 'Unit | Model | contributor', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:user', 'model:node']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/node-link-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('node-link', 'Unit | Model | node link', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:node', 'model:node-link']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 |
7 | # dependencies
8 | /node_modules
9 | /bower_components
10 |
11 | # misc
12 | /.sass-cache
13 | /connect.lock
14 | /coverage/*
15 | /libpeerconnection.log
16 | .npmrc
17 | npm-debug.log
18 | testem.log
19 | .idea
20 |
21 | # Never commit configuration or private settings
22 | config/*.yml
23 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM quay.io/centerforopenscience/ember-base
2 |
3 | COPY ./package.json ./yarn.lock ./.yarnrc ./
4 | RUN yarn --frozen-lockfile --ignore-engines
5 |
6 | COPY ./ ./
7 |
8 | ARG GIT_COMMIT=
9 | ENV GIT_COMMIT ${GIT_COMMIT}
10 |
11 | ARG APP_ENV=production
12 | ENV APP_ENV ${APP_ENV}
13 | ARG BACKEND=local
14 | ENV BACKEND ${BACKEND}
15 | RUN ./node_modules/.bin/ember build --env ${APP_ENV}
16 |
17 | CMD ["yarn", "test"]
18 |
--------------------------------------------------------------------------------
/tests/unit/adapters/review-action-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:review-action', 'Unit | Adapter | review-action', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/file-provider-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('file-provider', 'Unit | Model | file provider', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:file', 'model:node']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/services/preprint-word-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('service:preprint-word', 'Unit | Service | preprint word', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['service:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let service = this.subject();
11 | assert.ok(service);
12 | });
13 |
--------------------------------------------------------------------------------
/addon/serializers/chronos-submission.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | // Serialize `journal` relationship
5 | relationshipTypes: {
6 | journal: 'chronos-journals',
7 | },
8 |
9 | serialize() {
10 | const serialized = this._super(...arguments);
11 | serialized.data.attributes = {};
12 | return serialized;
13 | }
14 | });
15 |
--------------------------------------------------------------------------------
/tests/unit/mixins/file-item-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import FileItemMixin from 'ember-osf/mixins/file-item';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | file item');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let FileItemObject = Ember.Object.extend(FileItemMixin);
10 | let subject = FileItemObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/comment-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('comment', 'Unit | Model | comment', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:node', 'model:comment-report', 'model:user']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/addon/components/file-renderer/template.hbs:
--------------------------------------------------------------------------------
1 | {{#if links}}
2 |
14 | {{/if}}
15 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/nodes/detail/files/index.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
3 |
4 | export default Ember.Route.extend(AuthenticatedRouteMixin, {
5 | setupController(controller, model) {
6 | this._super(controller, model);
7 | let node = this.modelFor('nodes.detail');
8 | controller.set('node', node);
9 | },
10 | });
11 |
--------------------------------------------------------------------------------
/tests/unit/adapters/draft-registration-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:draft-registration', 'Unit | Adapter | draft registration', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/adapters/preprint-provider-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:preprint-provider', 'Unit | Adapter | preprint provider', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/collections-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('collection', 'Unit | Model | collection', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:collection', 'model:node', 'model:registration']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/file-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('file', 'Unit | Model | file', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:file-version', 'model:comment', 'model:node', 'model:user']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/addon/components/osf-copyright/component.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import layout from './template';
3 |
4 | /**
5 | * @module ember-osf
6 | * @submodule components
7 | */
8 |
9 | /**
10 | * Display copyright information as a footer
11 | * @class osf-copyright
12 | */
13 | export default Ember.Component.extend({
14 | layout,
15 | i18n: Ember.inject.service(),
16 | currentYear: (new Date()).getUTCFullYear().toString()
17 | });
18 |
--------------------------------------------------------------------------------
/test-support/factories/taxonomy.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('taxonomy', {
5 | default: {
6 | text: () => faker.lorem.words(2),
7 | child_count: () => faker.random.number(),
8 | parents: null
9 | },
10 | traits: {
11 | hasParents: {
12 | parents: () => [String(faker.random.number())]
13 | }
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/tests/unit/mixins/commentable-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import CommentableMixin from 'ember-osf/mixins/commentable';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | commentable');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let CommentableObject = Ember.Object.extend(CommentableMixin);
10 | let subject = CommentableObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/mixins/contributor-mixin-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import ContributorMixinMixin from 'ember-osf/mixins/contributor-mixin';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | contributor mixin');
6 |
7 | test('it works', function(assert) {
8 | const ContributorMixinObject = Ember.Object.extend(ContributorMixinMixin);
9 | const subject = ContributorMixinObject.create();
10 | assert.ok(subject);
11 | });
12 |
--------------------------------------------------------------------------------
/tests/unit/mixins/node-actions-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import NodeActionsMixin from 'ember-osf/mixins/node-actions';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | node actions');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let NodeActionsObject = Ember.Object.extend(NodeActionsMixin);
10 | let subject = NodeActionsObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/adapters/registration-metaschema-test.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:registration-metaschema', 'Unit | Adapter | registration-metaschema', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/registration-metaschema-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('registration-metaschema', 'Unit | Model | registration-metaschema', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:registration-metaschema']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/test-support/factories/file-provider.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 |
3 | FactoryGuy.define('file-provider', {
4 | default: {
5 | name: 'osfstorage',
6 | kind: 'folder',
7 | path: '/',
8 | provider: 'osfstorage',
9 | node: FactoryGuy.belongsTo('node')
10 | },
11 | traits: {
12 | hasFiles: {
13 | files: () => FactoryGuy.hasMany('file', 3)
14 | }
15 | }
16 | });
17 |
--------------------------------------------------------------------------------
/tests/unit/helpers/draft-text-input-test.js:
--------------------------------------------------------------------------------
1 | import { draftTextInput } from 'dummy/helpers/draft-text-input';
2 | import { module, test } from 'qunit';
3 |
4 | module('Unit | Helper | draft text input');
5 |
6 | test('looks up question in metadata', function(assert) {
7 | let question = {qid: 'looked'};
8 | let metadata = {looked: {'value': 'Yes'}};
9 |
10 | let result = draftTextInput([metadata, question]);
11 | assert.equal(result, 'Yes');
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/helpers/sort-option-display-test.js:
--------------------------------------------------------------------------------
1 |
2 | import { sortOptionDisplay } from 'dummy/helpers/sort-option-display';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Helper | sort option display');
6 |
7 | test('returns corresponding display text', function(assert) {
8 | let sortOptions = [{sortBy: 'date', display: 'DATE'}];
9 | let result = sortOptionDisplay([sortOptions, 'date']);
10 | assert.equal(result, 'DATE');
11 | });
12 |
13 |
--------------------------------------------------------------------------------
/tests/unit/models/preprint-provider-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('preprint-provider', 'Unit | Model | preprint provider', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:preprint', 'model:taxonomy', 'model:license']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/addon/adapters/collection.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | buildURL(_, __, ___, requestType) {
5 | // Embed linked_nodes
6 | var base = this._super(...arguments);
7 | if (['createRecord', 'updateRecord', 'deleteRecord'].indexOf(requestType) === -1) {
8 | return `${base}?embed=linked_nodes`;
9 | } else {
10 | return base;
11 | }
12 | }
13 | });
14 |
--------------------------------------------------------------------------------
/addon/components/file-editor/style.scss:
--------------------------------------------------------------------------------
1 | .file-editor {
2 | .panel-heading {
3 | text-align: left;
4 | padding: 7px 10px;
5 | background-color: #EFEFEF;
6 | justify-content: flex-start;
7 | color: #333;
8 | border-color: #ddd;
9 | .panel-title {
10 | font-weight: 400;
11 | float: none;
12 | }
13 | }
14 | .text-editor-container {
15 | padding-top: 10px;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/tests/unit/helpers/elem-id-test.js:
--------------------------------------------------------------------------------
1 | import { elemId } from 'dummy/helpers/elem-id';
2 | import { module, test } from 'qunit';
3 | import Ember from 'ember';
4 |
5 | module('Unit | Helper | elem id');
6 |
7 | test('ID name is prefixed with guid for that component', function(assert) {
8 | let testObj = {};
9 | let testObjId = Ember.guidFor(testObj);
10 |
11 | let result = elemId([testObj, 'someid']);
12 | assert.equal(result, `${testObjId}-someid`);
13 | });
14 |
--------------------------------------------------------------------------------
/tests/unit/mixins/taggable-mixin-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import TaggableMixinMixin from 'ember-osf/mixins/taggable-mixin';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | taggable mixin');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let TaggableMixinObject = Ember.Object.extend(TaggableMixinMixin);
10 | let subject = TaggableMixinObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/mixins/paginated-route-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import PaginatedRouteMixin from 'ember-osf/mixins/paginated-route';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | paginated route');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let PaginatedRouteObject = Ember.Object.extend(PaginatedRouteMixin);
10 | let subject = PaginatedRouteObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/institution-test.js:
--------------------------------------------------------------------------------
1 | import {
2 | moduleForModel,
3 | test
4 | } from 'ember-qunit';
5 |
6 | moduleForModel('institution', 'Unit | Model | institution', {
7 | // Specify the other units that are required for this test.
8 | needs: ['model:user', 'model:node', 'model:registration']
9 | });
10 |
11 | test('it exists', function(assert) {
12 | let model = this.subject();
13 | // let store = this.store();
14 | assert.ok(!!model);
15 | });
16 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/usernodes.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
4 |
5 | import FetchAllRouteMixin from 'ember-osf/mixins/fetch-all-route';
6 |
7 | export default Ember.Route.extend(AuthenticatedRouteMixin, FetchAllRouteMixin, {
8 |
9 | relationshipToFetch: 'nodes',
10 |
11 | model() {
12 | // users/me
13 | return this.modelFor('application');
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/tests/unit/mixins/file-cache-bypass-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import FileCacheBypassMixin from 'ember-osf/mixins/file-cache-bypass';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | file cache bypass');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let FileCacheBypassObject = Ember.Object.extend(FileCacheBypassMixin);
10 | let subject = FileCacheBypassObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/addon/instance-initializers/ember-osf.js:
--------------------------------------------------------------------------------
1 | /*
2 | Automatically expose translations for addon in a way that can be merged in with app
3 | https://github.com/jamesarosen/ember-i18n/issues/255
4 | */
5 | import en from 'ember-osf/locales/en/translations';
6 |
7 | export function initialize(appInstance) {
8 | const i18n = appInstance.lookup('service:i18n');
9 | i18n.addTranslations('en', en);
10 | }
11 |
12 | export default {
13 | name: 'ember-osf',
14 | initialize
15 | };
16 |
--------------------------------------------------------------------------------
/tests/unit/utils/auth-test.js:
--------------------------------------------------------------------------------
1 | import authUtils from 'dummy/utils/auth';
2 |
3 | import {
4 | module,
5 | test
6 | } from 'qunit';
7 |
8 | module('Unit | Utility | auth');
9 |
10 | test('getAuthUrl works', function(assert) {
11 | let result = authUtils.getAuthUrl();
12 | assert.ok(result);
13 | });
14 |
15 | test('getTokenFromHash works', function(assert) {
16 | let result = authUtils.getTokenFromHash('#access_token=foo');
17 | assert.equal(result, 'foo');
18 | });
19 |
--------------------------------------------------------------------------------
/addon/models/preprint-request-action.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 | import OsfModel from './osf-model';
3 |
4 | export default OsfModel.extend({
5 | actionTrigger: DS.attr('string'),
6 | comment: DS.attr('fixstring'),
7 | auto: DS.attr('boolean'),
8 | dateModified: DS.attr('date'),
9 |
10 | // Relationships
11 | target: DS.belongsTo('preprint-request', { inverse: 'actions', async: true }),
12 | creator: DS.belongsTo('user', { inverse: null, async: true }),
13 | });
14 |
--------------------------------------------------------------------------------
/addon/components/comment-pane/template.hbs:
--------------------------------------------------------------------------------
1 | {{t 'eosf.components.commenting.commentPane.comments'}}
2 | {{#each comments as |comment|}}
3 | {{comment-detail
4 | comment=comment
5 | editComment=attrs.editComment
6 | deleteComment=attrs.deleteComment
7 | restoreComment=attrs.restoreComment
8 | reportComment=attrs.reportComment}}
9 | {{else}}
10 | {{t 'eosf.components.commenting.commentPane.none'}}
11 | {{/each}}
12 |
13 | {{comment-form addComment=attrs.addComment}}
14 |
--------------------------------------------------------------------------------
/tests/unit/mixins/osf-token-login-route-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import OsfTokenLoginRouteMixin from '../../../mixins/osf-token-login-route';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | osf token login route');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let OsfLoginRouteObject = Ember.Object.extend(OsfTokenLoginRouteMixin);
10 | let subject = OsfLoginRouteObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/addon/components/osf-mode-footer/component.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import layout from './template';
3 |
4 | import config from 'ember-get-config';
5 |
6 | /**
7 | * @module ember-osf
8 | * @submodule components
9 | */
10 |
11 | /**
12 | * If development mode, display a red banner in the footer
13 | * @class osf-mode-footer
14 | */
15 | export default Ember.Component.extend({
16 | layout,
17 | i18n: Ember.inject.service(),
18 | isDevMode: config.OSF.backend !== 'prod'
19 | });
20 |
--------------------------------------------------------------------------------
/tests/dummy/app/app.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import Resolver from './resolver';
3 | import loadInitializers from 'ember-load-initializers';
4 | import config from './config/environment';
5 |
6 | let App;
7 |
8 | Ember.MODEL_FACTORY_INJECTIONS = true;
9 |
10 | App = Ember.Application.extend({
11 | modulePrefix: config.modulePrefix,
12 | podModulePrefix: config.podModulePrefix,
13 | Resolver
14 | });
15 |
16 | loadInitializers(App, config.modulePrefix);
17 |
18 | export default App;
19 |
--------------------------------------------------------------------------------
/tests/unit/mixins/generic-data-adapter-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import GenericDataAdapterMixin from 'ember-osf/mixins/generic-data-adapter';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | generic data adapter');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let GenericDataAdapterObject = Ember.Object.extend(GenericDataAdapterMixin);
10 | let subject = GenericDataAdapterObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/models/draft-registration-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('draft-registration', 'Unit | Model | draft registration', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:draft-registration', 'model:user', 'model:node', 'model:registration-metaschema']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/serializers/license-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('license', 'Unit | Serializer | license', {
4 | // Specify the other units that are required for this test.
5 | needs: ['serializer:license']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it serializes records', function(assert) {
10 | let record = this.subject();
11 |
12 | let serializedRecord = record.serialize();
13 |
14 | assert.ok(serializedRecord);
15 | });
16 |
--------------------------------------------------------------------------------
/tests/unit/serializers/wiki-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('wiki', 'Unit | Serializer | wiki', {
4 | // Specify the other units that are required for this test.
5 | needs: ['serializer:wiki', 'model:node']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it serializes records', function(assert) {
10 | let record = this.subject();
11 |
12 | let serializedRecord = record.serialize();
13 |
14 | assert.ok(serializedRecord);
15 | });
16 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/users/list.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
3 |
4 | import PaginatedRouteMixin from 'ember-osf/mixins/paginated-route';
5 |
6 | export default Ember.Route.extend(AuthenticatedRouteMixin, PaginatedRouteMixin, {
7 | store: Ember.inject.service(),
8 | session: Ember.inject.service(),
9 | model(routeParams) {
10 | return this.queryForPage('user', routeParams);
11 | }
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/mixins/paginated-controller-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import PaginatedControllerMixin from 'ember-osf/mixins/paginated-controller';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | paginated controller');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let PaginatedControllerObject = Ember.Object.extend(PaginatedControllerMixin);
10 | let subject = PaginatedControllerObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/mixins/registration-actions-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import RegistrationActionsMixin from 'ember-osf/mixins/registration-actions';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | registration actions');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let RegistrationActionsObject = Ember.Object.extend(RegistrationActionsMixin);
10 | let subject = RegistrationActionsObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/serializers/citation-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('citation', 'Unit | Serializer | citation', {
4 | // Specify the other units that are required for this test.
5 | needs: ['serializer:citation']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it serializes records', function(assert) {
10 | let record = this.subject();
11 |
12 | let serializedRecord = record.serialize();
13 |
14 | assert.ok(serializedRecord);
15 | });
16 |
--------------------------------------------------------------------------------
/tests/unit/serializers/taxonomy-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('taxonomy', 'Unit | Serializer | taxonomy', {
4 | // Specify the other units that are required for this test.
5 | needs: ['serializer:taxonomy']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it serializes records', function(assert) {
10 | let record = this.subject();
11 |
12 | let serializedRecord = record.serialize();
13 |
14 | assert.ok(serializedRecord);
15 | });
16 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/nodes/detail/draft-registrations/index.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import RegistrationActionsMixin from 'ember-osf/mixins/registration-actions';
3 |
4 | export default Ember.Controller.extend(RegistrationActionsMixin, {
5 | actions: {
6 | /**
7 | * Toggles whether draft form is displayed.
8 | *
9 | * @method draftForm
10 | */
11 | draftForm() {
12 | this.toggleProperty('formDisplayed');
13 | }
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/tests/unit/mixins/osf-agnostic-auth-route-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import OsfAgnosticAuthRouteMixin from 'ember-osf/mixins/osf-agnostic-auth-route';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | osf agnostic auth route');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let OsfAgnosticAuthRouteObject = Ember.Object.extend(OsfAgnosticAuthRouteMixin);
10 | let subject = OsfAgnosticAuthRouteObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/addon/adapters/file.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 | import FileCacheBypassMixin from 'ember-osf/mixins/file-cache-bypass';
3 |
4 | export default OsfAdapter.extend(FileCacheBypassMixin, {
5 | buildURL(modelName, id, snapshot, requestType) {
6 | let url = this._super(...arguments);
7 | if (requestType === 'deleteRecord') {
8 | // Water Bulter API does not like trailing slashes.
9 | return url.replace(/\/$/, '');
10 | }
11 | return url;
12 | },
13 | });
14 |
--------------------------------------------------------------------------------
/addon/utils/extract-doi-from-string.js:
--------------------------------------------------------------------------------
1 | export default function extractDoiFromString(doi) {
2 | // Attempts to Extracts a DOI from a string.
3 | // For example, given "https://dx.doi.org/10.12345/hello" returns "10.12345/hello"
4 | // If no DOI is found, the original string is returned.
5 | const doiRegex = /\b(10\.\d{4,}(?:\.\d+)*\/\S+(?:(?!["&\'<>])\S))\b/;
6 | if (doi) {
7 | const doiOnly = doiRegex.exec(doi);
8 | return doiOnly !== null ? doiOnly[0] : doi;
9 | }
10 | return doi;
11 | }
12 |
--------------------------------------------------------------------------------
/tests/unit/mixins/cas-authenticated-route-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import CasAuthenticatedRouteMixin from 'ember-osf/mixins/cas-authenticated-route';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | cas authenticated route');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let CasAuthenticatedRouteObject = Ember.Object.extend(CasAuthenticatedRouteMixin);
10 | let subject = CasAuthenticatedRouteObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/mixins/osf-login-controller-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import OsfTokenLoginControllerMixin from '../../../mixins/osf-token-login-controller';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | osf token login controller');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let OsfLoginControllerObject = Ember.Object.extend(OsfTokenLoginControllerMixin);
10 | let subject = OsfLoginControllerObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/serializers/review-action-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('review-action', 'Unit | Serializer | review-action', {
4 | // Specify the other units that are required for this test.
5 | needs: ['serializer:review-action']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it serializes records', function(assert) {
10 | let record = this.subject();
11 |
12 | let serializedRecord = record.serialize();
13 |
14 | assert.ok(serializedRecord);
15 | });
16 |
--------------------------------------------------------------------------------
/addon/helpers/number-format.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | /**
4 | * @module ember-osf
5 | * @submodule helpers
6 | */
7 |
8 | /**
9 | * numberFormat helper.
10 | *
11 | * @class filterReplace
12 | * @param {Integer} number
13 | * @return {String} Returns string with language sensitive representation of the number
14 | */
15 | export function numberFormat(params/*, hash*/) {
16 | const [number] = params;
17 |
18 | return number.toLocaleString();
19 | }
20 |
21 | export default Ember.Helper.helper(numberFormat);
22 |
--------------------------------------------------------------------------------
/tests/integration/components/cookie-banner/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 |
4 | moduleForComponent('discover-page', 'Integration | Component | discover page', {
5 | integration: true
6 | });
7 |
8 | test('it renders', function(assert) {
9 | let noop = () => {};
10 | this.set('noop', noop);
11 |
12 | this.render(
13 | hbs`{{cookie-banner
14 | addCookie=(action noop)}}`);
15 |
16 | assert.ok(this.$());
17 | });
18 |
--------------------------------------------------------------------------------
/tests/unit/serializers/node-link-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('node-link', 'Unit | Serializer | node link', {
4 | // Specify the other units that are required for this test.
5 | needs: ['serializer:node-link', 'serializer:node', 'model:node']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it serializes records', function(assert) {
10 | let record = this.subject();
11 |
12 | let serializedRecord = record.serialize();
13 |
14 | assert.ok(serializedRecord);
15 | });
16 |
--------------------------------------------------------------------------------
/tests/unit/mixins/osf-cookie-login-controller-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import OsfCookieLoginControllerMixin from 'ember-osf/mixins/osf-cookie-login-controller';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | osf cookie login controller');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let OsfCookieLoginControllerObject = Ember.Object.extend(OsfCookieLoginControllerMixin);
10 | let subject = OsfCookieLoginControllerObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/unit/serializers/collection-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('collection', 'Unit | Serializer | collection', {
4 | // Specify the other units that are required for this test.
5 | needs: ['serializer:collection', 'model:node', 'model:registration']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it serializes records', function(assert) {
10 | let record = this.subject();
11 |
12 | let serializedRecord = record.serialize();
13 |
14 | assert.ok(serializedRecord);
15 | });
16 |
--------------------------------------------------------------------------------
/tests/unit/mixins/host-app-name-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import hostAppName from 'dummy/mixins/host-app-name';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | host app name');
6 |
7 | test('host-app-name mixin holds the hosting application name', function(assert) {
8 | let objectA = Ember.Component.extend(hostAppName);
9 | let componentA = objectA.create({ renderer: {} });
10 | assert.equal(hostAppName.detect(componentA), true);
11 | assert.equal(componentA.get('hostAppName'), 'Dummy App');
12 | });
13 |
--------------------------------------------------------------------------------
/addon/models/comment-report.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 |
3 | import OsfModel from './osf-model';
4 |
5 | /**
6 | * @module ember-osf
7 | * @submodule models
8 | */
9 |
10 | /**
11 | * Model for OSF APIv2 comment reports. Primarily accessed via relationship fields.
12 | * For field and usage information, see:
13 | * * https://api.osf.io/v2/docs/#!/v2/Comment_Reports_List_GET
14 | *
15 | * @class CommentReport
16 | */
17 | export default OsfModel.extend({
18 | category: DS.attr('fixstring'),
19 | text: DS.belongsTo('comment')
20 | });
21 |
--------------------------------------------------------------------------------
/addon/models/wiki.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 | import OsfModel from './osf-model';
3 |
4 | export default OsfModel.extend({
5 | kind: DS.attr('string'),
6 | name: DS.attr('string'),
7 | dateModified: DS.attr('date'),
8 |
9 | extra: DS.attr(),
10 | contentType: DS.attr('string'),
11 | path: DS.attr('string'),
12 | currentUserCanComment: DS.attr('boolean'),
13 | materializedPath: DS.attr('string'),
14 | size: DS.attr('number'),
15 |
16 | node: DS.belongsTo('node', {
17 | inverse: 'wikis'
18 | })
19 | });
20 |
--------------------------------------------------------------------------------
/test-support/factories/draft-registration.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('draft-registration', {
5 | default: {
6 | registrationSupplement: () => faker.lorem.words(1),
7 | datetimeInitiated: () => faker.date.past(1),
8 | datetimeUpdated: () => faker.date.recent(),
9 | branchedFrom: FactoryGuy.belongsTo('node'),
10 | initiator: FactoryGuy.belongsTo('user'),
11 | registrationSchema: FactoryGuy.belongsTo('metaschema')
12 | }
13 | });
14 |
--------------------------------------------------------------------------------
/tests/integration/components/new-osf-navbar/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 |
4 | moduleForComponent('new-osf-navbar', 'Integration | Component | new osf navbar', {
5 | integration: true
6 | });
7 |
8 |
9 | test('it renders', function(assert) {
10 | this.set('loginAction', ()=>{});
11 | this.render(hbs`{{new-osf-navbar loginAction=loginAction}}`);
12 |
13 | assert.ok(this.$('primary-nav').context.innerText.replace(/\s+/g, " ").includes('OSF'));
14 | });
15 |
--------------------------------------------------------------------------------
/tests/unit/helpers/filter-replace-test.js:
--------------------------------------------------------------------------------
1 |
2 | import { filterReplace } from 'dummy/helpers/filter-replace';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Helper | filter replace');
6 |
7 | test('replace long provider name', function(assert) {
8 | let result = filterReplace(['Open Science Framework']);
9 | assert.equal(result, 'OSF');
10 | });
11 |
12 | test('return original filter if not in filters dictionary', function(assert) {
13 | let result = filterReplace(['Engineering']);
14 | assert.equal(result, 'Engineering');
15 | });
16 |
--------------------------------------------------------------------------------
/tests/unit/mixins/osf-agnostic-auth-controller-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import OsfAgnosticAuthControllerMixin from 'ember-osf/mixins/osf-agnostic-auth-controller';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Mixin | osf agnostic auth controller');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let OsfAgnosticAuthControllerObject = Ember.Object.extend(OsfAgnosticAuthControllerMixin);
10 | let subject = OsfAgnosticAuthControllerObject.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/addon/adapters/user.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 |
3 | export default OsfAdapter.extend({
4 | urlForQuery(query, modelName) {
5 | // if query contains `q` for search, use the elasticsearch `/search/users/` endpoint
6 | if(query.hasOwnProperty('q')) {
7 | const originalPathForTypeRegEx = new RegExp(`${this.pathForType(modelName)}$`);
8 | return this._super(query, modelName).replace(originalPathForTypeRegEx, 'search/users');
9 | }
10 | return this._super(query, modelName);
11 | }
12 | });
13 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/nodes/detail/files.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
3 |
4 | export default Ember.Route.extend(AuthenticatedRouteMixin, {
5 | model() {
6 | let node = this.modelFor('nodes.detail');
7 | return node.get('files');
8 | },
9 |
10 | setupController(controller, model) {
11 | this._super(controller, model);
12 | let node = this.modelFor('nodes.detail');
13 | controller.set('node', node);
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/addon/components/pagination-control/template.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{t 'eosf.components.paginationControl.previous'}}
3 | {{t 'eosf.components.paginationControl.next'}}
4 |
5 |
6 |
7 | {{t 'eosf.components.paginationControl.page'}} {{t 'eosf.components.paginationControl.of'}} {{pageCount}}
8 |
9 |
--------------------------------------------------------------------------------
/tests/unit/serializers/registration-metaschema-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('registration-metaschema', 'Unit | Serializer | registration-metaschema', {
4 | // Specify the other units that are required for this test.
5 | needs: ['serializer:registration-metaschema']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it serializes records', function(assert) {
10 | let record = this.subject();
11 |
12 | let serializedRecord = record.serialize();
13 |
14 | assert.ok(serializedRecord);
15 | });
16 |
--------------------------------------------------------------------------------
/docs/assets/js/yui-prettify.js:
--------------------------------------------------------------------------------
1 | YUI().use('node', function(Y) {
2 | var code = Y.all('.prettyprint.linenums');
3 | if (code.size()) {
4 | code.each(function(c) {
5 | var lis = c.all('ol li'),
6 | l = 1;
7 | lis.each(function(n) {
8 | n.prepend(' ');
9 | l++;
10 | });
11 | });
12 | var h = location.hash;
13 | location.hash = '';
14 | h = h.replace('LINE_', 'LINENUM_');
15 | location.hash = h;
16 | }
17 | });
18 |
--------------------------------------------------------------------------------
/addon/serializers/institution.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | import {
4 | pluralize
5 | } from 'ember-inflector';
6 |
7 | export default OsfSerializer.extend({
8 | serializeIntoHash(hash, typeClass, snapshot, options) {
9 | if (options.forRelationship) {
10 | hash.data = [{
11 | id: snapshot.record.get('id'),
12 | type: pluralize(typeClass.modelName)
13 | }];
14 | return hash;
15 | }
16 | return this._super(hash, typeClass, snapshot, options);
17 | }
18 | });
19 |
--------------------------------------------------------------------------------
/tests/integration/components/maintenance-banner/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 |
4 | moduleForComponent('maintenance-banner', 'Integration | Component | maintenance banner', {
5 | integration: true
6 | });
7 |
8 | test('it renders', function(assert) {
9 |
10 | // Set any properties with this.set('myProperty', 'value');
11 | // Handle any actions with this.on('myAction', function(val) { ... });
12 |
13 | this.render(hbs`{{maintenance-banner}}`);
14 |
15 | assert.ok(this.$());
16 | });
17 |
--------------------------------------------------------------------------------
/addon/authorizers/osf-cookie.js:
--------------------------------------------------------------------------------
1 | import Base from 'ember-simple-auth/authorizers/base';
2 | /**
3 | * @module ember-osf
4 | * @submodule authorizers
5 | */
6 |
7 | /**
8 | * Ember-simple-auth compatible authorizer based on session cookie.
9 | *
10 | * Intended to be used with the authenticator of the same name.
11 | *
12 | * @class OsfCookieAuthorizer
13 | * @extends ember-simple-auth/BaseAuthorizer
14 | */
15 | export default Base.extend({
16 | authorize(/*data, block*/) {
17 | // Cookies will be sent automatically with requests; no specific actions needed
18 | }
19 | });
20 |
--------------------------------------------------------------------------------
/tests/integration/components/query-syntax/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 |
4 | moduleForComponent('query-syntax', 'Integration | Component | query syntax', {
5 | integration: true
6 | });
7 |
8 | test('it renders', function(assert) {
9 |
10 | // Set any properties with this.set('myProperty', 'value');
11 | // Handle any actions with this.on('myAction', function(val) { ... });
12 |
13 | this.render(hbs`{{query-syntax}}`);
14 |
15 | assert.ok(this.$().text().trim().includes('giraffe'));
16 | });
17 |
--------------------------------------------------------------------------------
/tests/unit/helpers/if-filter-test.js:
--------------------------------------------------------------------------------
1 | import { ifFilter } from 'dummy/helpers/if-filter';
2 | import { module, test } from 'qunit';
3 |
4 | module('Unit | Helper | if filter');
5 |
6 | test('provider matches filter', function(assert) {
7 | let element = 'OSF';
8 | let filter = ['OSF'];
9 | let result = ifFilter([element, filter]);
10 | assert.equal(result, true);
11 | });
12 |
13 | test('provider does not match filter', function(assert) {
14 | let element = 'Cogprints';
15 | let filter = ['OSF'];
16 | let result = ifFilter([element, filter]);
17 | assert.equal(result, false);
18 | });
19 |
--------------------------------------------------------------------------------
/tests/unit/models/node-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('node', 'Unit | Model | node', {
4 | // Specify the other units that are required for this test.
5 | needs: ['model:user', 'model:citation', 'model:draft-registration', 'model:contributor', 'model:comment', 'model:preprint', 'model:institution', 'model:registration', 'model:file-provider', 'model:log', 'model:node-link', 'model:wiki']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/addon/components/cookie-banner/component.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import layout from './template';
3 |
4 | /**
5 | * @module ember-osf
6 | * @submodule components
7 | */
8 |
9 | /**
10 | * Adds a cookie banner to the page
11 | *
12 | * Sample usage:
13 | * ```handlebars
14 | * {{cookie-banner
15 | * addCookie=(action 'addCookie')
16 | * }}
17 | * ```
18 | *
19 | * @class dropzone-widget
20 | */
21 | export default Ember.Component.extend({
22 | layout,
23 |
24 | actions: {
25 | addCookie() {
26 | this.addCookie();
27 | }
28 | }
29 | });
30 |
--------------------------------------------------------------------------------
/tests/helpers/start-app.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import Application from '../../app';
3 | import config from '../../config/environment';
4 |
5 | export default function startApp(attrs) {
6 | let application;
7 |
8 | let attributes = Ember.assign({}, config.APP);
9 | attributes = Ember.assign(attributes, attrs); // use defaults, but you can override;
10 |
11 | Ember.run(() => {
12 | application = Application.create(attributes);
13 | application.setupForTesting();
14 | application.injectTestHelpers();
15 | });
16 |
17 | return application;
18 | }
19 |
--------------------------------------------------------------------------------
/tests/unit/helpers/fix-special-char-test.js:
--------------------------------------------------------------------------------
1 | import { fixSpecialCharHelper } from 'dummy/helpers/fix-special-char';
2 | import { module, test } from 'qunit';
3 |
4 | import { fixStringTestCases } from '../../fixtures/specialChars';
5 |
6 | module('Unit | Helper | fix special char helper');
7 |
8 |
9 | test('#fixSpecialCharHelper uses fixSpecialChar', function(assert) {
10 | assert.expect(fixStringTestCases.length);
11 |
12 | for (let [input, output] of fixStringTestCases) {
13 | let res = fixSpecialCharHelper([input]);
14 | assert.strictEqual(res, output);
15 | }
16 | });
17 |
--------------------------------------------------------------------------------
/addon/authorizers/osf-token.js:
--------------------------------------------------------------------------------
1 | import Base from 'ember-simple-auth/authorizers/base';
2 |
3 | /**
4 | * @module ember-osf
5 | * @submodule authorizers
6 | */
7 |
8 | /**
9 | * Ember-simple-auth compatible authorizer based on OAuth2 bearer tokens.
10 | *
11 | * Intended to be used with the authenticator of the same name.
12 | *
13 | * @class OsfTokenAuthorizer
14 | * @extends ember-simple-auth/BaseAuthorizer
15 | */
16 | export default Base.extend({
17 | authorize(sessionData, setHeader) {
18 | setHeader('Authorization', `Bearer ${sessionData.attributes.accessToken}`);
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/test-support/factories/citation-style.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('citation-style', {
5 | default: {
6 | title: () => faker.lorem.word(),
7 | shortTitle: () => faker.lorem.words(3),
8 | summary: () => faker.lorem.words(10),
9 | created: () => faker.date.past(1),
10 | modified: () => faker.date.recent(1),
11 | dateParsed: () => faker.date.recent(1),
12 | hasBibliography: () => faker.random.boolean(),
13 | nodeCitation: () => faker.lorem.words(10)
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/tests/fixtures/specialChars.js:
--------------------------------------------------------------------------------
1 | // Test cases shared by the family of "special character" fixer functions.
2 | const fixStringTestCases = [
3 | ['a regular string', 'a regular string'],
4 | ['multiple & sequences all become &', 'multiple & sequences all become &'],
5 | ['also the brackets < and > are changed', 'also the brackets < and > are changed'],
6 | ['', ''],
7 | ['for now, intentionally limit which characters are fixed & < >', 'for now, intentionally limit which characters are fixed & < >'],
8 | [null, null]
9 | ];
10 |
11 | export { fixStringTestCases };
12 |
--------------------------------------------------------------------------------
/tests/unit/serializers/file-provider-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('file-provider', 'Unit | Serializer | file provider', {
4 | // Specify the other units that are required for this test.
5 | needs: ['serializer:file-provider', 'model:file', 'model:node',
6 | 'transform:links', 'transform:embed']
7 | });
8 |
9 | // Replace this with your real tests.
10 | test('it serializes records', function(assert) {
11 | let record = this.subject();
12 |
13 | let serializedRecord = record.serialize();
14 |
15 | assert.ok(serializedRecord);
16 | });
17 |
--------------------------------------------------------------------------------
/addon/serializers/node-link.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | serialize: function(snapshot, options) {
5 | var serialized = this._super(snapshot, options);
6 | // APIv2 expects node link information to be nested under relationships.
7 | serialized.data.relationships = {
8 | nodes: {
9 | data: {
10 | id: snapshot.record.target,
11 | type: 'nodes'
12 | }
13 | }
14 | };
15 | return serialized;
16 | },
17 | });
18 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/registrations.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
3 |
4 | export default Ember.Route.extend(AuthenticatedRouteMixin, {
5 | store: Ember.inject.service(),
6 | session: Ember.inject.service(),
7 | model() {
8 | let user = this.modelFor('application');
9 | if (user) {
10 | return user.get('registrations');
11 | } else {
12 | return this.get('store').findRecord('user', 'me').then(user => user.get('registrations'));
13 | }
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/tests/integration/components/citation-widget/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 |
4 | moduleForComponent('citation-widget', 'Integration | Component | citation widget', {
5 | integration: true
6 | });
7 |
8 | test('it renders', function(assert) {
9 | // Set any properties with this.set('myProperty', 'value');
10 | // Handle any actions with this.on('myAction', function(val) { ... });
11 |
12 | this.render(hbs`{{citation-widget}}`);
13 |
14 | assert.equal(this.$('div.citation-widget div').text(), '');
15 |
16 | });
17 |
--------------------------------------------------------------------------------
/tests/unit/utils/fix-special-char-test.js:
--------------------------------------------------------------------------------
1 | import fixSpecialChar from 'dummy/utils/fix-special-char';
2 | import { module, test } from 'qunit';
3 |
4 | import { fixStringTestCases } from '../../fixtures/specialChars';
5 |
6 | module('Unit | Utility | fix special char');
7 |
8 |
9 | test('#fixSpecialChar converts values sent from the server into something display friendly', function(assert) {
10 | assert.expect(fixStringTestCases.length);
11 |
12 | for (let [input, output] of fixStringTestCases) {
13 | let res = fixSpecialChar(input);
14 | assert.strictEqual(res, output);
15 | }
16 | });
17 |
--------------------------------------------------------------------------------
/addon/components/search-facet-locked/component.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import layout from './template';
3 |
4 | /**
5 | * Locked facet. Filters that cannot be changed in client application.
6 | *
7 | * ```handlebars
8 | * {{search-facet-locked
9 | * key=facet.key
10 | * options=facet
11 | * aggregations=aggregations
12 | * state=(get facetStates facet.key)
13 | * filter=(get facetFilters facet.key)
14 | * onChange=(action 'facetChanged')
15 | * }}
16 | * ```
17 | * @class search-facet-locked
18 | */
19 | export default Ember.Component.extend({
20 | layout
21 | });
22 |
--------------------------------------------------------------------------------
/addon/utils/outside-click.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | /**
4 | * Dismisses popovers on outside click
5 | * @class outside-click
6 | */
7 |
8 | /**
9 | *
10 | * @method outsideClick
11 | * @param {Function} clickFunction
12 | */
13 | export default function outsideClick(clickFunction) {
14 | Ember.$('body').on('click', (e) => {
15 | if (Ember.$(e.target).parents('.popover.in').length === 0 &&
16 | Ember.$(e.target).attr('class') &&
17 | Ember.$(e.target).attr('class').indexOf('popover-toggler') === -1) {
18 | clickFunction();
19 | }
20 | });
21 | }
22 |
--------------------------------------------------------------------------------
/addon/utils/transition-target-url.js:
--------------------------------------------------------------------------------
1 | // This is a port from `@centerforopenscience/ember-osf-web/app/utils/transition-target-url.ts`
2 | // Get the URL (path and query string) that the given transition will resolve to,
3 | // using the given router.
4 | export default function transitionTargetURL(transition) {
5 | const params = Object.values(transition.params).filter(
6 | param => Object.values(param).length
7 | );
8 | var url = transition.router.generate(
9 | transition.targetName,
10 | ...params,
11 | { queryParams: transition.queryParams }
12 | );
13 | return url;
14 | }
15 |
--------------------------------------------------------------------------------
/test-support/factories/wiki.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('wiki', {
5 | defaults: {
6 | kind: 'file',
7 | name: () => faker.lorem.words(2),
8 | dateModified: () => faker.date.recent(),
9 | contentType: 'text/markdown',
10 | path: () => '/' + faker.lorem.words(1),
11 | currentUserCanComment: () => faker.random.boolean(),
12 | materializedPath: () => '/' + faker.lorem.words(1),
13 | size: () => faker.random.number(),
14 | node: FactoryGuy.belongsTo('node')
15 | }
16 | });
17 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/application.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | import OsfTokenLoginControllerMixin from 'ember-osf/mixins/osf-token-login-controller';
4 |
5 | import {
6 | getAuthUrl
7 | } from 'ember-osf/utils/auth';
8 |
9 | export default Ember.Controller.extend(OsfTokenLoginControllerMixin, {
10 | toast: Ember.inject.service(),
11 | authUrl: getAuthUrl(),
12 | actions: {
13 | loginSuccess() {
14 | this.transitionToRoute('index');
15 | },
16 | loginFail(/* err */) {
17 | this.get('toast').error('Login failed');
18 | }
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/nodes/detail/draft-registrations/index.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | model() {
5 | let node = this.modelFor('nodes.detail');
6 | let drafts = node.get('draftRegistrations');
7 | return drafts;
8 | },
9 | setupController(controller, model) {
10 | this._super(controller, model);
11 | this.store.findAll('metaschema').then(function(metaschemas) {
12 | controller.set('metaschemas', metaschemas);
13 | });
14 | controller.set('node', this.modelFor('nodes.detail'));
15 | }
16 |
17 | });
18 |
--------------------------------------------------------------------------------
/tests/helpers/module-for-acceptance.js:
--------------------------------------------------------------------------------
1 | import { module } from 'qunit';
2 | import startApp from '../helpers/start-app';
3 | import destroyApp from '../helpers/destroy-app';
4 |
5 | export default function(name, options = {}) {
6 | module(name, {
7 | beforeEach() {
8 | this.application = startApp();
9 |
10 | if (options.beforeEach) {
11 | options.beforeEach.apply(this, arguments);
12 | }
13 | },
14 |
15 | afterEach() {
16 | if (options.afterEach) {
17 | options.afterEach.apply(this, arguments);
18 | }
19 |
20 | destroyApp(this.application);
21 | }
22 | });
23 | }
24 |
--------------------------------------------------------------------------------
/tests/unit/serializers/draft-registration-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('draft-registration', 'Unit | Serializer | draft registration', {
4 | // Specify the other units that are required for this test.
5 | needs: ['serializer:draft-registration', 'model:node', 'model:user', 'model:draft-registration', 'model:registration-metaschema']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it serializes records', function(assert) {
10 | let record = this.subject();
11 |
12 | let serializedRecord = record.serialize();
13 |
14 | assert.ok(serializedRecord);
15 | });
16 |
--------------------------------------------------------------------------------
/addon/const/providerRegex.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * @module ember-osf
4 | * @submodule const
5 | */
6 |
7 | /**
8 | * @class providerRegex
9 | */
10 |
11 | /**
12 | * A mapping of provider names to their url regex
13 | * @property providerUrlRegex
14 | * @type {Object}
15 | */
16 |
17 | const providerUrlRegex = {
18 | //'bioRxiv': '', doesnt currently have urls
19 | Cogprints: /cogprints/,
20 | OSF: /https?:\/\/((?!api).)*osf.io/, // Doesn't match api.osf urls
21 | PeerJ: /peerj/,
22 | arXiv: /arxivj/,
23 | 'ClinicalTrials.gov': /http:\/\/clinicaltrials.gov/,
24 | };
25 |
26 | export default providerUrlRegex;
27 |
--------------------------------------------------------------------------------
/addon/helpers/fix-special-char.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import fixSpecialChar from '../utils/fix-special-char';
3 |
4 | /**
5 | Apply the `fix-special-char` utility function to clean up malformed text sent from the server.
6 |
7 | Usage example:
8 | ```handlebars
9 | This is text we want to fix: {{fix-special-char 'Now & then'}}
10 | ```
11 |
12 | @class fix-special-char-helper
13 | @uses fix-special-char
14 | */
15 | export function fixSpecialCharHelper(params/*, hash*/) {
16 | return params ? fixSpecialChar(params[0]) : params;
17 | }
18 |
19 | export default Ember.Helper.helper(fixSpecialCharHelper);
20 |
--------------------------------------------------------------------------------
/addon/serializers/preprint.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | // Serialize these relationships
5 | relationshipTypes: {
6 | primaryFile: 'files',
7 | node: 'nodes',
8 | provider: 'providers',
9 | license: 'licenses',
10 | },
11 |
12 | serialize(snapshot) {
13 | const res = this._super(...arguments);
14 | if (res.data.attributes && 'subjects' in snapshot.record.changedAttributes())
15 | res.data.attributes.subjects = (snapshot.record.get('subjects') || []);
16 | return res;
17 | },
18 | });
19 |
--------------------------------------------------------------------------------
/tests/integration/components/search-facet-locked/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 |
4 | moduleForComponent('search-facet-locked', 'Integration | Component | search facet locked', {
5 | integration: true
6 | });
7 |
8 | test('search-facet-locked displays locked item', function(assert) {
9 | this.set('options', {
10 | locked_items: ['PubMed Central']
11 | });
12 | this.render(hbs`{{search-facet-locked
13 | options=options
14 | }}`);
15 |
16 | assert.equal(this.$().text().trim(), 'PubMed Central');
17 | });
18 |
19 |
--------------------------------------------------------------------------------
/tests/unit/serializers/preprint-provider-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('preprint-provider', 'Unit | Serializer | preprint provider', {
4 | needs: [
5 | 'serializer:preprint-provider',
6 | 'model:taxonomy',
7 | 'model:preprint',
8 | 'model:license',
9 | 'model:citation-style'
10 | ]
11 | });
12 |
13 | // Replace this with your real tests.
14 | test('it serializes records', function(assert) {
15 | let record = this.subject();
16 |
17 | let serializedRecord = record.serialize();
18 |
19 | assert.ok(serializedRecord);
20 | });
21 |
--------------------------------------------------------------------------------
/addon/components/cookie-banner/template.hbs:
--------------------------------------------------------------------------------
1 |
2 | This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our
Privacy Policy and information on
cookie use .
3 |
4 |
5 | Accept
6 |
7 |
8 |
--------------------------------------------------------------------------------
/addon/components/osf-navbar/style.scss:
--------------------------------------------------------------------------------
1 | a.navbar-service::before {
2 | content: "/";
3 | padding-right: 8px;
4 | color: #ccc;
5 | }
6 |
7 | #navbarScope a.nav-user-dropdown {
8 | padding-top: 12px;
9 | padding-bottom: 11px;
10 | }
11 |
12 | #navbarScope .btn-top-signup {
13 | padding: 2px 20px;
14 | margin-top: 5px;
15 | line-height: 1.7;
16 | background-color: #5cb85c;
17 | border-color: #4cae4c;
18 | }
19 |
20 | #navbarScope .btn-top-login {
21 | padding: 2px 30px;
22 | margin-top: 5px;
23 | line-height: 1.7;
24 | }
25 |
26 | .navbar-donate-button a {
27 | color: #9cd59c !important;
28 | }
29 |
--------------------------------------------------------------------------------
/addon/models/review-action.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 | import OsfModel from './osf-model';
3 |
4 | export default OsfModel.extend({
5 | actionTrigger: DS.attr('string'),
6 | comment: DS.attr('string'),
7 | fromState: DS.attr('string'),
8 | toState: DS.attr('string'),
9 | dateCreated: DS.attr('date'),
10 | dateModified: DS.attr('date'),
11 |
12 | // Relationships
13 | provider: DS.belongsTo('preprint-provider', { inverse: null, async: true }),
14 | target: DS.belongsTo('preprint', { inverse: 'reviewActions', async: true }),
15 | creator: DS.belongsTo('user', { inverse: null, async: true }),
16 | });
17 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/collections/index.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Controller.extend({
4 | actions: {
5 | /**
6 | * Create a collection
7 | *
8 | * @method createCollection
9 | * @param {String} title Title for collection
10 | * @return {Promise} Returns a promise that resolves to the new collection.
11 | */
12 | createCollection: function(title) {
13 | var collection = this.store.createRecord('collection', {
14 | title: title
15 | });
16 | collection.save();
17 | }
18 | }
19 | });
20 |
--------------------------------------------------------------------------------
/tests/integration/components/osf-copyright/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 | import sinon from 'sinon';
4 |
5 | moduleForComponent('osf-copyright', 'Integration | Component | osf copyright', {
6 | integration: true
7 | });
8 |
9 | test('it renders', function(assert) {
10 |
11 | const year = sinon.useFakeTimers(new Date(1648,1,1).getTime());
12 | this.render(hbs`{{osf-copyright}}`);
13 | const currentYear= this.$('div.container span.copyright').text().trim().split('-');
14 | assert.equal(currentYear[1], '1648');
15 | year.restore();
16 | });
17 |
--------------------------------------------------------------------------------
/tests/unit/models/registration-test.js:
--------------------------------------------------------------------------------
1 | import {
2 | moduleForModel,
3 | test
4 | } from 'ember-qunit';
5 |
6 | moduleForModel('registration', 'Unit | Model | registration', {
7 | // Specify the other units that are required for this test.
8 | needs: ['model:citation', 'model:institution', 'model:draft-registration', 'model:node', 'model:preprint', 'model:user', 'model:contributor', 'model:comment', 'model:file-provider', 'model:log', 'model:node-link', 'model:wiki']
9 | });
10 |
11 | test('it exists', function(assert) {
12 | let model = this.subject();
13 | // let store = this.store();
14 | assert.ok(!!model);
15 | });
16 |
--------------------------------------------------------------------------------
/addon/locales/en/config.js:
--------------------------------------------------------------------------------
1 | // Ember-I18n includes configuration for common locales. Most users
2 | // can safely delete this file. Use it if you need to override behavior
3 | // for a locale or define behavior for a locale that Ember-I18n
4 | // doesn't know about.
5 | export default {
6 | // rtl: [true|FALSE],
7 | //
8 | // pluralForm: function(count) {
9 | // if (count === 0) { return 'zero'; }
10 | // if (count === 1) { return 'one'; }
11 | // if (count === 2) { return 'two'; }
12 | // if (count < 5) { return 'few'; }
13 | // if (count >= 5) { return 'many'; }
14 | // return 'other';
15 | // }
16 | };
17 |
--------------------------------------------------------------------------------
/addon/models/chronos-submission.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 |
3 | import OsfModel from './osf-model';
4 |
5 | /**
6 | * @module ember-osf
7 | * @submodule models
8 | */
9 |
10 | /**
11 | * Model for OSF APIv2 citation styles
12 | *
13 | * @class ChronosSubmissions
14 | */
15 | export default OsfModel.extend({
16 | // attributes
17 | submissionUrl: DS.attr('string'),
18 | status: DS.attr('string'),
19 |
20 | //relationships
21 | submitter: DS.belongsTo('user', { inverse: null }),
22 | journal: DS.belongsTo('chronos-journal', { inverse: null }),
23 | preprint: DS.belongsTo('preprint', { inverse: null }),
24 | });
25 |
--------------------------------------------------------------------------------
/addon/models/preprint-request.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 | import OsfModel from './osf-model';
3 |
4 | export default OsfModel.extend({
5 | comment: DS.attr('string'),
6 | dateLastTransitioned: DS.attr('date'),
7 | created: DS.attr('date'),
8 | machineState: DS.attr('string'),
9 | modified: DS.attr('date'),
10 | requestType: DS.attr('string'),
11 |
12 | //Relationships
13 | target: DS.belongsTo('preprint', { inverse: 'requests', async: true }),
14 | creator: DS.belongsTo('user', { inverse: null, async: true }),
15 | actions: DS.hasMany('preprint-request-action', { inverse: 'target', async:true })
16 | });
17 |
--------------------------------------------------------------------------------
/addon/adapters/preprint-request.js:
--------------------------------------------------------------------------------
1 | import OsfAdapter from './osf-adapter';
2 | import config from 'ember-get-config';
3 |
4 | export default OsfAdapter.extend({
5 | urlForQuery: function (query) {
6 | const url = `${this.host}/${config.OSF.apiNamespace}/providers/preprints/${query.providerId}/withdraw_requests/`;
7 | delete query.providerId;
8 | return url;
9 | },
10 | urlForCreateRecord: function (modelname, snapshot) {
11 | const preprintId = snapshot.belongsTo('target').id;
12 | const url = `${this.host}/${config.OSF.apiNamespace}/preprints/${preprintId}/requests/`;
13 | return url;
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/addon/components/lazy-options/component.js:
--------------------------------------------------------------------------------
1 | //component/lazy-options.js
2 | import Ember from 'ember';
3 | import layout from './template';
4 | import PSOptionsComponent from 'ember-power-select/components/power-select/options';
5 | const {
6 | assert,
7 | get,
8 | } = Ember;
9 | const OptionsComponent = PSOptionsComponent.extend({
10 | layout,
11 | canLoadMore: false,
12 | init() {
13 | this._super(...arguments);
14 | assert(': You must provide a closure action name `loadMore`', get(this, 'loadMore') && typeof get(this, 'loadMore') === 'function');
15 | },
16 | });
17 | export default OptionsComponent;
18 |
--------------------------------------------------------------------------------
/tests/dummy/app/locales/en-us/config.js:
--------------------------------------------------------------------------------
1 | // Ember-I18n includes configuration for common locales. Most users
2 | // can safely delete this file. Use it if you need to override behavior
3 | // for a locale or define behavior for a locale that Ember-I18n
4 | // doesn't know about.
5 | export default {
6 | // rtl: [true|FALSE],
7 | //
8 | // pluralForm: function(count) {
9 | // if (count === 0) { return 'zero'; }
10 | // if (count === 1) { return 'one'; }
11 | // if (count === 2) { return 'two'; }
12 | // if (count < 5) { return 'few'; }
13 | // if (count >= 5) { return 'many'; }
14 | // return 'other';
15 | // }
16 | };
17 |
--------------------------------------------------------------------------------
/tests/dummy/public/crossdomain.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/nodes/detail/files/provider/file/revisions.hbs:
--------------------------------------------------------------------------------
1 | {{t 'nodes.detail.files.provider.file.revisions.revisionTitle'}}
2 |
3 |
4 |
5 | {{t 'nodes.detail.files.provider.file.revisions.version'}}
6 | {{t 'nodes.detail.files.provider.file.revisions.size'}}
7 | {{t 'nodes.detail.files.provider.file.revisions.download'}}
8 |
9 |
10 |
11 | {{#each model as |version|}}
12 | {{file-version version=version download='download'}}
13 | {{/each}}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/addon/helpers/get-display-name.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | /**
4 | * @module ember-osf
5 | * @submodule helpers
6 | */
7 |
8 | /**
9 | * Return the username to display in the navbar. Shortens long usernames.
10 | *
11 | * @class getDisplayName
12 | * @param {String} username
13 | * @return {String} Username if less than 40 characters, otherwise, returns truncated username
14 | */
15 | export function getDisplayName(params/*, hash*/) {
16 | let name = params[0] || '';
17 | if (name.length > 40) {
18 | return `${name.slice(0,20)}...${name.slice(-15)}`
19 | }
20 | return name;
21 | }
22 |
23 | export default Ember.Helper.helper(getDisplayName);
24 |
--------------------------------------------------------------------------------
/test-support/factories/contributor.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('contributor', {
5 | default: {
6 | bibliographic: () => faker.random.boolean(),
7 | permission: () => faker.random.arrayElement(['read', 'write', 'admin']),
8 | // nodeID: // TODO: Field not defined in serializer. Find out meaning and add to factory.
9 | users: FactoryGuy.belongsTo('user'),
10 | index: () => faker.random.number(),
11 | fullName: () => faker.lorem.words(2),
12 | email: () => faker.internet.email(),
13 | node: FactoryGuy.belongsTo('node')
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/addon/models/registration-metaschema.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 |
3 | import OsfModel from './osf-model';
4 |
5 | /**
6 | * @module ember-osf
7 | * @submodule models
8 | */
9 |
10 | /**
11 | * Model for OSF APIv2 metaschemas.
12 | * This model describes metaschemas and can be directly queried.
13 | * For information on how to retrieve metaschemas see:
14 | * * https://api.osf.io/v2/docs/#!/v2/Meta_Schemas_List_GET
15 | * * https://api.osf.io/v2/docs/#!/v2/Meta_Schema_Detail_GET
16 | * @class Metaschema
17 | */
18 |
19 | export default OsfModel.extend({
20 | name: DS.attr('fixstring'),
21 | schemaVersion: DS.attr('number'),
22 | schema: DS.attr()
23 | });
24 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/nodes/detail/draft-registrations/detail.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import config from 'ember-get-config';
3 |
4 | export default Ember.Route.extend({
5 | model(params) {
6 | let node = this.modelFor('nodes.detail');
7 | this.store.adapterFor('draft-registration').set('namespace', config.OSF.apiNamespace + '/nodes/' + node.id);
8 | var draft = this.store.findRecord('draft-registration', params.draft_registration_id);
9 | return draft;
10 | },
11 | setupController(controller, model) {
12 | this._super(controller, model);
13 | controller.set('node', this.modelFor('nodes.detail'));
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/tests/unit/helpers/get-display-name-test.js:
--------------------------------------------------------------------------------
1 |
2 | import { getDisplayName } from 'dummy/helpers/get-display-name';
3 | import { module, test } from 'qunit';
4 |
5 | module('Unit | Helper | get display name');
6 |
7 | test('username greater than 40 chars', function(assert) {
8 | const name = Array(50).join("a");
9 | const result = getDisplayName([name]);
10 | assert.strictEqual(result, 'aaaaaaaaaaaaaaaaaaaa...aaaaaaaaaaaaaaa');
11 | });
12 |
13 | test('username less than 40 chars', function(assert) {
14 | const name = Array(39).join("a");
15 | const result = getDisplayName([name]);
16 | assert.strictEqual(result, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
17 | });
18 |
--------------------------------------------------------------------------------
/tests/integration/components/navbar-auth-dropdown/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 |
4 | moduleForComponent('navbar-auth-dropdown', 'Integration | Component | navbar auth dropdown', {
5 | integration: true
6 | });
7 |
8 | test('it renders', function (assert) {
9 | // Set any properties with this.set('myProperty', 'value');
10 | // Handle any actions with this.on('myAction', function(val) { ... });
11 |
12 | this.set('loginAction', ()=>{});
13 | this.render(hbs`{{navbar-auth-dropdown loginAction=loginAction}}`);
14 |
15 | assert.notEqual(this.$().text().trim(), '');
16 | });
17 |
--------------------------------------------------------------------------------
/addon/utils/path-join.js:
--------------------------------------------------------------------------------
1 | //TODO remove this from ember-preprints
2 | export default function pathJoin() {
3 | let last = (str) => str.slice(str.length - 1) === '/';
4 | let first = (str) => str.slice(0, 1) === '/';
5 | let p = arguments[0];
6 |
7 | for (var i = 1; i < arguments.length; i++) {
8 | let cur = arguments[i];
9 | if (last(p)) {
10 | if (first(cur)) {
11 | p = p + cur.slice(1);
12 | } else {
13 | p = p + cur;
14 | }
15 | } else if (first(cur)) {
16 | p = p + cur;
17 | } else {
18 | p = p + '/' + cur;
19 | }
20 | }
21 | return p;
22 | }
23 |
--------------------------------------------------------------------------------
/docs/assets/vendor/prettify/prettify-min.css:
--------------------------------------------------------------------------------
1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
--------------------------------------------------------------------------------
/test-support/factories/collection.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('collection', {
5 | default: {
6 | title: () => faker.lorem.words(3),
7 | dateCreated: () => faker.date.past(1),
8 | dateModified: () => faker.date.recent(1),
9 | bookmarks: false
10 | },
11 | traits: {
12 | hasNodes: {
13 | linkedNodes: FactoryGuy.hasMany('node', 3)
14 | },
15 | hasRegistrations: {
16 | linkedRegistrations: FactoryGuy.hasMany('registration', 3)
17 | },
18 | isBookmark: {
19 | bookmarks: true
20 | }
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/nodes/detail.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | model(params) {
5 | // Include will be swapped with "embed". // GET /nodes/{node_id}/?embed=children
6 | return this.store.findRecord('node', params.node_id, { include: 'children' });
7 | },
8 | setupController(controller, model) {
9 | controller.set('editedTitle', model.get('title'));
10 | controller.set('editedCategory', model.get('category'));
11 | controller.set('editedDescription', model.get('description'));
12 | controller.set('editedIsPublic', model.get('public'));
13 | this._super(...arguments);
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/tests/integration/components/tags-widget/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 |
4 | moduleForComponent('tags-widget', 'Integration | Component | tags widget', {
5 | integration: true
6 | });
7 |
8 | test('it renders a tag', function(assert) {
9 | // Set any properties with this.set('myProperty', 'value');
10 | // Handle any actions with this.on('myAction', function(val) { ... });
11 | this.set('tags', ['hello']);
12 |
13 | this.render(hbs`{{tags-widget tags=tags}}`);
14 |
15 | assert.ok(this.$('input[type="text"]').tagExist('hello'),
16 | 'Tag was not correctly rendered');
17 | });
18 |
--------------------------------------------------------------------------------
/tests/unit/helpers/number-format-test.js:
--------------------------------------------------------------------------------
1 | import { numberFormat } from 'dummy/helpers/number-format';
2 | import { module, skip } from 'qunit';
3 |
4 | module('Unit | Helper | number format');
5 |
6 | // Run tests in browser but not PhantomJS - see https://github.com/ariya/phantomjs/issues/12581
7 | if (!/PhantomJS/.test(window.navigator.userAgent)) {
8 | skip('transforms 4 digit number', function (assert) {
9 | let result = numberFormat([3500]);
10 | assert.equal(result, '3,500');
11 | });
12 |
13 | skip('transforms 10 digit number', function (assert) {
14 | let result = numberFormat([1234567890]);
15 | assert.equal(result, '1,234,567,890');
16 | });
17 | }
18 |
--------------------------------------------------------------------------------
/addon/components/file-chooser/template.hbs:
--------------------------------------------------------------------------------
1 | {{#if hasBlock}}
2 | {{yield this}}
3 | {{else}}
4 |
5 | {{input type='file' multiple=multiple
6 | change=(action 'onFileInputChange')}}
7 |
8 |
9 | {{t 'eosf.components.fileChooser.dragAndDropMessage'}}
10 |
11 | {{#if errorMessage}}
12 | {{t 'eosf.components.fileChooser.error'}} {{errorMessage}}
13 | {{/if}}
14 | {{#if files}}
15 | {{t 'eosf.components.fileChooser.chosenFiles'}}
16 |
17 | {{#each files as |file|}}
18 | {{file.name}}
19 | {{/each}}
20 |
21 | {{/if}}
22 | {{/if}}
23 |
--------------------------------------------------------------------------------
/addon/helpers/elem-id.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | /**
4 | * @module ember-osf
5 | * @submodule helpers
6 | */
7 |
8 | /**
9 | * Generate a unique HTML element ID for this element. Given "someid" for component instance 123, returns "ember123-someid"
10 | *
11 | * Useful to ensure unique IDs, eg for when component is reused in page.
12 | * @class elem-id
13 | * @param {Ember.Object} obj The instance with ID to use
14 | * @param {Ember.suffix} suffix The base attribute to name
15 | */
16 | export function elemId([obj, suffix]) {
17 | Ember.assert('Must pass a valid object', obj);
18 | return `${Ember.guidFor(obj)}-${suffix}`;
19 | }
20 |
21 | export default Ember.Helper.helper(elemId);
22 |
--------------------------------------------------------------------------------
/addon/components/search-help-modal/component.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import layout from './template';
3 |
4 | /**
5 | * Modal that provides examples and explanation of Lucene Search syntax
6 | *
7 | * ```handlebars
8 | * {{search-help-modal
9 | * isOpen=isOpen
10 | * }}
11 | * ```
12 | * @class search-help-modal
13 | */
14 | export default Ember.Component.extend({
15 | layout,
16 | isOpen: false,
17 | init() {
18 | this._super(...arguments);
19 | this.set('currentPath', `${window.location.origin}${window.location.pathname}`);
20 | },
21 | actions: {
22 | toggleHelpModal() {
23 | this.toggleProperty('isOpen');
24 | },
25 | }
26 | });
27 |
--------------------------------------------------------------------------------
/testem.js:
--------------------------------------------------------------------------------
1 | /* eslint-env node */
2 |
3 | const DotReporter = require('testem/lib/reporters/dot_reporter');
4 |
5 | module.exports = {
6 | framework: 'qunit',
7 | test_page: 'tests/index.html?hidepassed',
8 | timeout: 540,
9 | disable_watching: true,
10 | reporter: new DotReporter(),
11 | launch_in_ci: [
12 | 'Chrome',
13 | 'Firefox',
14 | ],
15 | launch_in_dev: [
16 | 'Chrome',
17 | 'Firefox',
18 | ],
19 | browser_args: {
20 | Chrome: [
21 | '--headless',
22 | '--no-sandbox',
23 | '--remote-debugging-port=9222',
24 | ],
25 | Firefox: [
26 | '-headless',
27 | ],
28 | },
29 | }
30 |
--------------------------------------------------------------------------------
/addon/mixins/osf-token-login-controller.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | import { getAuthUrl } from 'ember-osf/utils/auth';
4 |
5 | /**
6 | * @module ember-osf
7 | * @submodule mixins
8 | */
9 |
10 | /**
11 | * Controller mixin to add support for OAuth2 token based authentication
12 | *
13 | * Intended to be used in tandem with OsfTokenLoginRouteMixin
14 | *
15 | * @class OsfTokenLoginControllerMixin
16 | * @extends Ember.Mixin
17 | */
18 | export default Ember.Mixin.create({
19 | session: Ember.inject.service(),
20 | actions: {
21 | login() {
22 | window.location = getAuthUrl(window.location);
23 | },
24 | loginSuccess() {},
25 | loginFail() {}
26 | }
27 | });
28 |
--------------------------------------------------------------------------------
/tests/integration/components/osf-mode-footer/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 |
4 | moduleForComponent('osf-mode-footer', 'Integration | Component | osf mode footer', {
5 | integration: true
6 | });
7 |
8 | test('it renders', function(assert) {
9 | // Set any properties with this.set('myProperty', 'value');
10 | // Handle any actions with this.on('myAction', function(val) { ... });
11 |
12 | this.render(hbs`{{osf-mode-footer}}`);
13 |
14 | // Template block usage:
15 | this.render(hbs`
16 | {{#osf-mode-footer}}
17 | template block text
18 | {{/osf-mode-footer}}
19 | `);
20 |
21 | assert.ok(true);
22 | });
23 |
--------------------------------------------------------------------------------
/addon/components/osf-paginator/template.hbs:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/addon/serializers/linked-node.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | // TODO Dawn - a linked-node serializer is actually using the node model - Ember doesn't like this.
4 | // Need to figure out a better place to create the request.
5 | export default OsfSerializer.extend({
6 | serializeIntoHash(hash, typeClass, snapshot, options) {
7 | if (options.forRelationship) {
8 | hash.data = [{
9 | id: snapshot.record.get('id'),
10 | type: typeClass.modelName === 'registration' ? 'linked_registrations' : 'linked_nodes'
11 | }];
12 | return hash;
13 | }
14 | return this._super(hash, typeClass, snapshot, options);
15 | }
16 | });
17 |
--------------------------------------------------------------------------------
/test-support/factories/institution.js:
--------------------------------------------------------------------------------
1 | import FactoryGuy from 'ember-data-factory-guy';
2 | import faker from 'faker';
3 |
4 | FactoryGuy.define('institution', {
5 | default: {
6 | name: () => faker.lorem.words(3),
7 | description: () => faker.lorem.sentences(3),
8 | logoPath: '/img.jpg',
9 | authUrl: () => faker.internet.url()
10 | },
11 | traits: {
12 | // TODO: Add children relations, if that field turns out to be needed after all (henrique)
13 | hasNodes: {
14 | nodes: () => FactoryGuy.hasMany('node', 3)
15 | },
16 | hasRegistrations: {
17 | registrations: () => FactoryGuy.hasMany('registration', 3)
18 | }
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/nodes/detail/files/index.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Controller.extend({
4 | currentUser: Ember.inject.service('current-user'),
5 | init() {
6 | this.get('currentUser').load().then(user => this.set('user', user));
7 | },
8 | actions: {
9 | fileDetail(file) {
10 | this.transitionToRoute('nodes.detail.files.provider.file',
11 | this.get('node'),
12 | file.get('provider'),
13 | file);
14 | },
15 |
16 | nodeDetail(node) {
17 | this.transitionToRoute('nodes.detail', node);
18 | }
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/tests/dummy/app/templates/index.hbs:
--------------------------------------------------------------------------------
1 | {{title "Home"}}
2 | {{link-to 'My Nodes' 'nodes' class="btn btn-default"}}
3 | {{link-to 'All Nodes' 'allnodes' class='btn btn-default'}}
4 | {{link-to 'My Registrations' 'registrations' class="btn btn-warning"}}
5 | {{link-to 'All Institutions' 'institutions' class="btn btn-danger"}}
6 | {{link-to 'Users' 'users' class="btn btn-default"}}
7 | {{link-to 'My Profile' 'profile' class="btn btn-default"}}
8 | {{link-to 'Collections' 'collections' class="btn btn-default"}}
9 | {{link-to 'Embedded Records Examples' 'embedding-records' class="btn btn-default"}}
10 |
11 |
12 |
13 |
14 | {{file-widget preUpload=(action 'preUpload') buildUrl=(action 'buildUrl') listeners=dropzoneOptions options=dropzoneOptions}}
15 |
--------------------------------------------------------------------------------
/tests/dummy/app/routes/prereg.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
3 |
4 | export default Ember.Route.extend(AuthenticatedRouteMixin, {
5 | fileManager: Ember.inject.service(),
6 | actions: {
7 | preregister(name, files) {
8 | let fileNames = files.mapBy('name').join(', ');
9 |
10 | // TODO: This page is just a file-chooser demo at this point
11 | window.alert(`Files: ${fileNames}`);
12 |
13 | // store.createRecord('node', { title: name, ... })
14 | // for (let file of files) {
15 | // this.get('fileManager').uploadFile(...)
16 | // }
17 | }
18 | }
19 | });
20 |
--------------------------------------------------------------------------------
/addon/components/sharing-icons-popover/template.hbs:
--------------------------------------------------------------------------------
1 | {{#if hyperlink}}
2 |
3 |
4 |
5 |
6 |
14 |
15 | {{/if}}
16 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/index.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import OsfTokenLoginControllerMixin from 'ember-osf/mixins/osf-token-login-controller';
3 |
4 | export default Ember.Controller.extend(OsfTokenLoginControllerMixin, {
5 | _url: null,
6 | dropzoneOptions: {
7 | method: 'PUT'
8 | },
9 | actions: {
10 | buildUrl() {
11 | return this.get('_url');
12 | },
13 | preUpload(comp, drop, file) {
14 | this.set('openModal', true);
15 | this.set('latestFileName', file.name);
16 | var promise = new Ember.RSVP.Promise(resolve => {
17 | this.set('resolve', resolve);
18 | });
19 | return promise;
20 | }
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 |
8 | [*]
9 | end_of_line = lf
10 | charset = utf-8
11 | trim_trailing_whitespace = true
12 | insert_final_newline = true
13 | indent_style = space
14 | indent_size = 4
15 |
16 | [*.js]
17 | indent_style = space
18 | indent_size = 4
19 |
20 | [*.hbs]
21 | insert_final_newline = false
22 | indent_style = space
23 | indent_size = 4
24 |
25 | [*.css]
26 | indent_style = space
27 | indent_size = 4
28 |
29 | [*.html]
30 | indent_style = space
31 | indent_size = 4
32 |
33 | [*.{diff,md}]
34 | trim_trailing_whitespace = false
35 |
36 | [{package.json}]
37 | indent_style = space
38 | indent_size = 2
39 |
--------------------------------------------------------------------------------
/tests/integration/components/osf-navbar/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 |
4 | moduleForComponent('osf-navbar', 'Integration | Component | osf navbar', {
5 | integration: true
6 | });
7 |
8 | test('it renders', function(assert) {
9 | // Set any properties with this.set('myProperty', 'value');
10 | // Handle any actions with this.on('myAction', function(val) { ... });
11 |
12 | this.set('loginAction', ()=>{});
13 | this.render(hbs`{{osf-navbar loginAction=loginAction}}`);
14 |
15 | assert.notEqual(this.$().text().trim(), '');
16 | // TODO: Implement tests that check a variety of different conditionals used by navbar to control what is displayed
17 | });
18 |
--------------------------------------------------------------------------------
/addon/serializers/comment.js:
--------------------------------------------------------------------------------
1 | import OsfSerializer from './osf-serializer';
2 |
3 | export default OsfSerializer.extend({
4 | serialize(snapshot) {
5 | // Add relationships field to identify comment target
6 | const serialized = this._super(...arguments);
7 |
8 | const targetID = snapshot.record.get('targetID');
9 | const targetType = snapshot.record.get('targetType');
10 |
11 | if (targetID && targetType) {
12 | serialized.data.relationships = {
13 | target: {
14 | data: {
15 | id: targetID,
16 | type: targetType
17 | }
18 | }
19 | };
20 | }
21 | return serialized;
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/addon/models/node-link.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 |
3 | import OsfModel from './osf-model';
4 |
5 | /**
6 | * @module ember-osf
7 | * @submodule models
8 | */
9 |
10 | /**
11 | * Model for OSF APIv2 node links. This model may refer to one of several API endpoints. It may be queried directly,
12 | * or accessed via relationship fields.
13 | * For field and usage information, see:
14 | * * https://api.osf.io/v2/docs/#!/v2/Node_Links_List_GET
15 | * * https://api.osf.io/v2/docs/#!/v2/Node_Links_Detail_GET
16 | * * https://api.osf.io/v2/docs/#!/v2/Registration_Node_Links_List_GET
17 | * * https://api.osf.io/v2/docs/#!/v2/Registration_Node_Links_Detail_GET
18 | * @class NodeLink
19 | */
20 | export default OsfModel.extend({
21 | targetNode: DS.belongsTo('node')
22 | });
23 |
--------------------------------------------------------------------------------
/addon/components/osf-copyright/template.hbs:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/tests/integration/components/sign-up/component-test.js:
--------------------------------------------------------------------------------
1 | import { moduleForComponent, test } from 'ember-qunit';
2 | import hbs from 'htmlbars-inline-precompile';
3 |
4 | moduleForComponent('sign-up', 'Integration | Component | sign up', {
5 | integration: true
6 | });
7 |
8 | test('it renders', function(assert) {
9 | // Set any properties with this.set('myProperty', 'value');
10 | // Handle any actions with this.on('myAction', function(val) { ... });
11 |
12 | this.render(hbs`{{sign-up}}`);
13 |
14 | assert.ok(this.$('input[id$=signup-input-name]').length);
15 | assert.ok(this.$('input[id$=signup-input-email]').length);
16 | assert.ok(this.$('input[id$=signup-input-confirm-email]').length);
17 | assert.ok(this.$('input[id$=signup-input-password]').length);
18 | });
19 |
--------------------------------------------------------------------------------