diff --git a/.gitignore b/.gitignore index 342b0185f6..4fac787581 100644 --- a/.gitignore +++ b/.gitignore @@ -19,8 +19,8 @@ public/uploads/ uploads/ reports/ test-reports/ -stash/script/counter-uploader/reports/*.json -stash/script/counter-uploader/tmp/*.json +script/stash/counter-uploader/reports/*.json +script/stash/counter-uploader/tmp/*.json # notifier state which is shared/linked and not comitted config/notifier_state.json diff --git a/Gemfile b/Gemfile index c4f3f64375..619f566213 100644 --- a/Gemfile +++ b/Gemfile @@ -13,13 +13,6 @@ gem 'react-rails', '~> 2.6.2' gem 'sprockets', '~> 3.0' # going to 4 breaks lots of things unless doing manual upgrade of files gem 'webpacker', '6.0.0.rc.6' -# ############################################################ -# Local engines - -path 'stash' do - gem 'stash-wrapper' -end - # ############################################################ # Deployment diff --git a/Gemfile.lock b/Gemfile.lock index f6689ffbd4..f024783d24 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -14,13 +14,6 @@ GIT jquery-ui-rails (7.0.0) railties (>= 3.2.16) -PATH - remote: stash - specs: - stash-wrapper (0.1.16) - typesafe_enum (~> 0.1.9) - xml-mapping_extensions (~> 0.4.9) - GEM remote: https://rubygems.org/ specs: @@ -886,7 +879,6 @@ DEPENDENCIES spring spring-commands-rspec sprockets (~> 3.0) - stash-wrapper! stripe (~> 5.50.0) sync (~> 0.5.0) tins (~> 1.31.0) diff --git a/documentation/counter_stats.md b/documentation/counter_stats.md index 4598900cb0..5104cb3845 100644 --- a/documentation/counter_stats.md +++ b/documentation/counter_stats.md @@ -36,7 +36,7 @@ lots of workarounds in place. ## The Counter Uploader tool -We reworked the [counter-uploader](../stash/script/counter-uploader/readme.md) so that it can independently +We reworked the [counter-uploader](../script/stash/counter-uploader/readme.md) so that it can independently upload counter files outside of the Python tool. (At least for the time being) the idea is that we'll process the counter files, populate numbers into our daatabase manually and then once a month we can upload any missing reports to DataCite. The tool should be diff --git a/lib/stash/repo/stash_wrapper_builder.rb b/lib/stash/repo/stash_wrapper_builder.rb index faeec784f6..f315d0d67a 100644 --- a/lib/stash/repo/stash_wrapper_builder.rb +++ b/lib/stash/repo/stash_wrapper_builder.rb @@ -1,5 +1,3 @@ -require 'stash/wrapper' - module Stash module Repo class StashWrapperBuilder < ValidatingXMLBuilder diff --git a/stash/stash-wrapper/lib/stash/wrapper/descriptive_node.rb b/lib/stash/wrapper/descriptive_node.rb similarity index 100% rename from stash/stash-wrapper/lib/stash/wrapper/descriptive_node.rb rename to lib/stash/wrapper/descriptive_node.rb diff --git a/stash/stash-wrapper/lib/stash/wrapper/embargo.rb b/lib/stash/wrapper/embargo.rb similarity index 98% rename from stash/stash-wrapper/lib/stash/wrapper/embargo.rb rename to lib/stash/wrapper/embargo.rb index b04a9b5d86..a89d60d448 100644 --- a/stash/stash-wrapper/lib/stash/wrapper/embargo.rb +++ b/lib/stash/wrapper/embargo.rb @@ -1,5 +1,4 @@ require 'xml/mapping_extensions' -require 'stash/wrapper/embargo_type' module Stash module Wrapper diff --git a/stash/stash-wrapper/lib/stash/wrapper/embargo_type.rb b/lib/stash/wrapper/embargo_type.rb similarity index 100% rename from stash/stash-wrapper/lib/stash/wrapper/embargo_type.rb rename to lib/stash/wrapper/embargo_type.rb diff --git a/stash/stash-wrapper/lib/stash/wrapper/identifier.rb b/lib/stash/wrapper/identifier.rb similarity index 95% rename from stash/stash-wrapper/lib/stash/wrapper/identifier.rb rename to lib/stash/wrapper/identifier.rb index 536bccb382..5c009aad00 100644 --- a/stash/stash-wrapper/lib/stash/wrapper/identifier.rb +++ b/lib/stash/wrapper/identifier.rb @@ -1,5 +1,4 @@ require 'xml/mapping_extensions' -require 'stash/wrapper/identifier_type' module Stash module Wrapper diff --git a/stash/stash-wrapper/lib/stash/wrapper/identifier_type.rb b/lib/stash/wrapper/identifier_type.rb similarity index 100% rename from stash/stash-wrapper/lib/stash/wrapper/identifier_type.rb rename to lib/stash/wrapper/identifier_type.rb diff --git a/stash/stash-wrapper/lib/stash/wrapper/inventory.rb b/lib/stash/wrapper/inventory.rb similarity index 96% rename from stash/stash-wrapper/lib/stash/wrapper/inventory.rb rename to lib/stash/wrapper/inventory.rb index 79c261eec4..126e9fb24a 100644 --- a/stash/stash-wrapper/lib/stash/wrapper/inventory.rb +++ b/lib/stash/wrapper/inventory.rb @@ -1,5 +1,4 @@ require 'xml/mapping' -require 'stash/wrapper/stash_file' module Stash module Wrapper diff --git a/stash/stash-wrapper/lib/stash/wrapper/license.rb b/lib/stash/wrapper/license.rb similarity index 100% rename from stash/stash-wrapper/lib/stash/wrapper/license.rb rename to lib/stash/wrapper/license.rb diff --git a/stash/stash-wrapper/lib/stash/wrapper/size.rb b/lib/stash/wrapper/size.rb similarity index 95% rename from stash/stash-wrapper/lib/stash/wrapper/size.rb rename to lib/stash/wrapper/size.rb index 59ca16b864..4de0c16be5 100644 --- a/stash/stash-wrapper/lib/stash/wrapper/size.rb +++ b/lib/stash/wrapper/size.rb @@ -1,5 +1,4 @@ require 'xml/mapping' -require 'stash/wrapper/size_unit' module Stash module Wrapper diff --git a/stash/stash-wrapper/lib/stash/wrapper/size_unit.rb b/lib/stash/wrapper/size_unit.rb similarity index 100% rename from stash/stash-wrapper/lib/stash/wrapper/size_unit.rb rename to lib/stash/wrapper/size_unit.rb diff --git a/stash/stash-wrapper/lib/stash/wrapper/stash_administrative.rb b/lib/stash/wrapper/stash_administrative.rb similarity index 93% rename from stash/stash-wrapper/lib/stash/wrapper/stash_administrative.rb rename to lib/stash/wrapper/stash_administrative.rb index fcd7df4db6..5729d63a29 100644 --- a/stash/stash-wrapper/lib/stash/wrapper/stash_administrative.rb +++ b/lib/stash/wrapper/stash_administrative.rb @@ -1,8 +1,4 @@ require 'xml/mapping' -require 'stash/wrapper/version' -require 'stash/wrapper/license' -require 'stash/wrapper/embargo' -require 'stash/wrapper/inventory' module Stash module Wrapper diff --git a/stash/stash-wrapper/lib/stash/wrapper/stash_file.rb b/lib/stash/wrapper/stash_file.rb similarity index 100% rename from stash/stash-wrapper/lib/stash/wrapper/stash_file.rb rename to lib/stash/wrapper/stash_file.rb diff --git a/stash/stash-wrapper/lib/stash/wrapper/stash_wrapper.rb b/lib/stash/wrapper/stash_wrapper.rb similarity index 96% rename from stash/stash-wrapper/lib/stash/wrapper/stash_wrapper.rb rename to lib/stash/wrapper/stash_wrapper.rb index 55335719f3..b81a807f1f 100644 --- a/stash/stash-wrapper/lib/stash/wrapper/stash_wrapper.rb +++ b/lib/stash/wrapper/stash_wrapper.rb @@ -1,9 +1,5 @@ require 'xml/mapping' -require 'stash/wrapper/descriptive_node' -require 'stash/wrapper/identifier' -require 'stash/wrapper/stash_administrative' - module Stash module Wrapper # Mapping for the root `` element diff --git a/stash/stash-wrapper/lib/stash/wrapper/version.rb b/lib/stash/wrapper/version.rb similarity index 100% rename from stash/stash-wrapper/lib/stash/wrapper/version.rb rename to lib/stash/wrapper/version.rb diff --git a/lib/tasks/counter.rake b/lib/tasks/counter.rake index 046ea7058e..b07069f9c3 100644 --- a/lib/tasks/counter.rake +++ b/lib/tasks/counter.rake @@ -111,9 +111,9 @@ namespace :counter do # RAILS_ENV=production REPORT_DIR="/my/report/dir" FORCE_SUBMISSION="2021-11" bundle exec rails counter:datacite_pusher $stdout.sync = true - require_relative '../../stash/script/counter-uploader/submitted_reports' - require_relative '../../stash/script/counter-uploader/uploader' - require_relative '../../stash/script/counter-uploader/utility_methods' + require_relative '../../script/stash/counter-uploader/submitted_reports' + require_relative '../../script/stash/counter-uploader/uploader' + require_relative '../../script/stash/counter-uploader/utility_methods' if ENV['REPORT_DIR'].blank? puts 'You must set an environment variable for REPORT_DIR to upload to DataCite.' diff --git a/stash/script/README.md b/script/stash/README.md similarity index 100% rename from stash/script/README.md rename to script/stash/README.md diff --git a/stash/script/counter-uploader/readme.md b/script/stash/counter-uploader/readme.md similarity index 100% rename from stash/script/counter-uploader/readme.md rename to script/stash/counter-uploader/readme.md diff --git a/stash/script/counter-uploader/submitted_reports.rb b/script/stash/counter-uploader/submitted_reports.rb similarity index 100% rename from stash/script/counter-uploader/submitted_reports.rb rename to script/stash/counter-uploader/submitted_reports.rb diff --git a/stash/script/counter-uploader/reports/.keep b/script/stash/counter-uploader/tmp/.keep similarity index 100% rename from stash/script/counter-uploader/reports/.keep rename to script/stash/counter-uploader/tmp/.keep diff --git a/stash/script/counter-uploader/uploader.rb b/script/stash/counter-uploader/uploader.rb similarity index 100% rename from stash/script/counter-uploader/uploader.rb rename to script/stash/counter-uploader/uploader.rb diff --git a/stash/script/counter-uploader/utility_methods.rb b/script/stash/counter-uploader/utility_methods.rb similarity index 100% rename from stash/script/counter-uploader/utility_methods.rb rename to script/stash/counter-uploader/utility_methods.rb diff --git a/stash/script/log-analysis/README.md b/script/stash/log-analysis/README.md similarity index 100% rename from stash/script/log-analysis/README.md rename to script/stash/log-analysis/README.md diff --git a/stash/script/log-analysis/get_timings.rb b/script/stash/log-analysis/get_timings.rb similarity index 100% rename from stash/script/log-analysis/get_timings.rb rename to script/stash/log-analysis/get_timings.rb diff --git a/stash/script/mdc-to-log/.ruby-version b/script/stash/mdc-to-log/.ruby-version similarity index 100% rename from stash/script/mdc-to-log/.ruby-version rename to script/stash/mdc-to-log/.ruby-version diff --git a/stash/script/mdc-to-log/Gemfile b/script/stash/mdc-to-log/Gemfile similarity index 100% rename from stash/script/mdc-to-log/Gemfile rename to script/stash/mdc-to-log/Gemfile diff --git a/stash/script/mdc-to-log/Gemfile.lock b/script/stash/mdc-to-log/Gemfile.lock similarity index 100% rename from stash/script/mdc-to-log/Gemfile.lock rename to script/stash/mdc-to-log/Gemfile.lock diff --git a/stash/script/mdc-to-log/README.md b/script/stash/mdc-to-log/README.md similarity index 100% rename from stash/script/mdc-to-log/README.md rename to script/stash/mdc-to-log/README.md diff --git a/stash/script/mdc-to-log/main.rb b/script/stash/mdc-to-log/main.rb similarity index 100% rename from stash/script/mdc-to-log/main.rb rename to script/stash/mdc-to-log/main.rb diff --git a/stash/script/mdc-to-log/test.sh b/script/stash/mdc-to-log/test.sh similarity index 100% rename from stash/script/mdc-to-log/test.sh rename to script/stash/mdc-to-log/test.sh diff --git a/spec/lib/stash_datacite/indexing_resource_spec.rb b/spec/lib/stash_datacite/indexing_resource_spec.rb index 764799be35..c49cb4320d 100644 --- a/spec/lib/stash_datacite/indexing_resource_spec.rb +++ b/spec/lib/stash_datacite/indexing_resource_spec.rb @@ -1,5 +1,3 @@ -require_relative '../../../stash/spec_helpers/factory_helper' - module Datacite module Mapping diff --git a/spec/models/stash_engine/curation_activity_spec.rb b/spec/models/stash_engine/curation_activity_spec.rb index a934122605..343b61f0c4 100644 --- a/spec/models/stash_engine/curation_activity_spec.rb +++ b/spec/models/stash_engine/curation_activity_spec.rb @@ -16,7 +16,6 @@ # index_stash_engine_curation_activities_on_resource_id_and_id (resource_id,id) # require 'ostruct' -require_relative '../../../stash/spec_helpers/factory_helper' require 'byebug' module StashEngine diff --git a/spec/script/counter_uploader_spec.rb b/spec/script/counter_uploader_spec.rb index 58a2c6dd93..475df54502 100644 --- a/spec/script/counter_uploader_spec.rb +++ b/spec/script/counter_uploader_spec.rb @@ -1,6 +1,6 @@ -require_relative '../../stash/script/counter-uploader/submitted_reports' -require_relative '../../stash/script/counter-uploader/uploader' -require_relative '../../stash/script/counter-uploader/utility_methods' +require_relative '../../script/stash/counter-uploader/submitted_reports' +require_relative '../../script/stash/counter-uploader/uploader' +require_relative '../../script/stash/counter-uploader/utility_methods' require 'webmock/rspec' require 'byebug' require 'digest' diff --git a/spec/support/resource_builder.rb b/spec/support/resource_builder.rb index 40a6653e5a..8ccbbbdc67 100644 --- a/spec/support/resource_builder.rb +++ b/spec/support/resource_builder.rb @@ -1,5 +1,4 @@ require 'datacite/mapping' -require 'stash/wrapper' require 'time' # rubocop:disable Naming/AccessorMethodName diff --git a/spec/tasks/dash_updater_spec.rb b/spec/tasks/dash_updater_spec.rb index fb42d54b2d..cbd3982e95 100644 --- a/spec/tasks/dash_updater_spec.rb +++ b/spec/tasks/dash_updater_spec.rb @@ -1,6 +1,5 @@ require 'ostruct' require_relative '../../lib/tasks/dash_updater' -require_relative '../../stash/spec_helpers/factory_helper' require 'byebug' describe 'datacite_target:update_dash', type: :task do diff --git a/stash/.gitignore b/stash/.gitignore deleted file mode 100644 index a9ceb73c45..0000000000 --- a/stash/.gitignore +++ /dev/null @@ -1,170 +0,0 @@ -# Miscellaneous - -# github-markdown-preview previews -**/*.md.html - -# travis-build.sh output -builds - -# Stop fights between Scott's rbenv/RubyMine environment and David's rvm/IntelliJ environment - -.idea -**/*.iml -**/.generators -**/.rakeTasks - -# Random things to gitignore -node_modules/* - -#### joe made this: http://goel.io/joe - -#####=== Ruby ===##### - -*.gem -*.rbc -/.config -/coverage/ -/InstalledFiles -/pkg/ -/spec/reports/ -/spec/examples.txt -/test/tmp/ -/test/version_tmp/ -/tmp/ - -# Used by dotenv library to load environment variables. -# .env - -## Specific to RubyMotion: -.dat* -.repl_history -build/ -*.bridgesupport -build-iPhoneOS/ -build-iPhoneSimulator/ - -## Specific to RubyMotion (use of CocoaPods): -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# vendor/Pods/ - -## Documentation cache and generated files: -/.yardoc/ -/_yardoc/ -/doc/ -/rdoc/ - -## Environment normalization: -/.bundle/ -/vendor/bundle -/lib/bundler/man/ - -# for a library or gem, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# Gemfile.lock -# .ruby-version -# .ruby-gemset - -# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: -.rvmrc - -#####=== Rails ===##### - -*.rbc -capybara-*.html -.rspec -/log -/tmp -/db/*.sqlite3 -/db/*.sqlite3-journal -/public/system -/coverage/ -/spec/tmp -**.orig -rerun.txt -pickle-email-*.html - -# TODO Comment out this rule if you are OK with secrets being uploaded to the repo -config/initializers/secret_token.rb - -# Only include if you have production secrets in this file, which is no longer a Rails default -# config/secrets.yml - -# dotenv -# TODO Comment out this rule if environment variables can be committed -.env - -## Environment normalization: -/.bundle -/vendor/bundle -.DS_Store - -# these should all be checked in to normalize the environment: -# Gemfile.lock, .ruby-version, .ruby-gemset - -# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: -.rvmrc - -# if using bower-rails ignore default bower_components path bower.json files -/vendor/assets/bower_components -*.bowerrc -bower.json -stash_engine/ui-library/ui-library/ - -# Ignore pow environment settings -.powenv - -# Ignore Byebug command history file. -.byebug_history - -#####=== Emacs ===##### -# -*- mode: gitignore; -*- -*~ -\#*\# -/.emacs.desktop -/.emacs.desktop.lock -*.elc -auto-save-list -tramp -.\#* - -# Org-mode -.org-id-locations -*_archive - -# flymake-mode -*_flymake.* - -# eshell files -/eshell/history -/eshell/lastdir - -# elpa packages -/elpa/ - -# reftex files -*.rel - -# AUCTeX auto folder -/auto/ - -# cask packages -.cask/ -dist/ - -# Flycheck -flycheck_*.el - -# server auth directory -/server/ - -# projectiles files -.projectile - -# directory configuration -.dir-locals.el - - diff --git a/stash/.rubocop.yml b/stash/.rubocop.yml deleted file mode 100644 index fc2019d46a..0000000000 --- a/stash/.rubocop.yml +++ /dev/null @@ -1 +0,0 @@ -inherit_from: ../.rubocop.yml diff --git a/stash/LICENSE.md b/stash/LICENSE.md deleted file mode 100644 index fbb9ed45b2..0000000000 --- a/stash/LICENSE.md +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 The Regents of the University of California - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/stash/README.md b/stash/README.md deleted file mode 100644 index c872b682d5..0000000000 --- a/stash/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# stash - -[![Build Status](https://travis-ci.org/CDL-Dryad/stash.svg?branch=main)](https://travis-ci.org/CDL-Dryad/stash) - -## Introduction - -**Stash** is an application framework for research data publication and -preservation. Stash enables individual scholars to: - -1. Prepare datasets for curation by reviewing best practice guidance for - the creation or acquisition of research data. -2. Select data for curation through local file browse or drag-and-drop - operation. -3. Describe data in terms of scientifically-meaning metadata. -4. Identify datasets for persistent citation, reference, and retrieval. -5. Preserve, manage, and share data in an appropriate data repository. -6. Discover, retrieve, and reuse data through faceted search and browse. - -By alleviating many of the barriers that have historically precluded wider -adoption of open data principles, Stash empowers individual scholars to -assert active curation control over their research outputs; encourages more -widespread data preservation, publication, sharing, and reuse; -and promotes open scholarly inquiry and advancement. - -[Dash](https://dash.ucop.edu/) is the -[UC Curation Center](http://www.cdlib.org/uc3/)'s implementation of Stash. -For the Dash source code, see the [dashv2](https://github.com/CDLUC3/dashv2) -repository. - -The next generation of [Dryad](https://datadryad.org) is being rebuilt -with the Stash core. For the Dryad source code, see the -[dryad](https://github.com/datadryad/dryad-app) repository. - -## Contributing - -For individual projects, `bundle exec rspec` will run unit tests, check test -coverage, and check code style. Use `bundle exec rubocop -a` to identify -code style problems and auto-fix any that can be auto-fixed. In general, -all projects follow the top-level [`rubocop.yml`](rubocop.yml) code style -configuration, with judicious exceptions. - -Run [`travis-build.rb`](travis-build.rb) in the top-level `stash` directory -to bundle, test, and style-check all projects. - diff --git a/stash/documentation/images/Screenshot from 2017-01-12 14-05-55.png b/stash/documentation/images/Screenshot from 2017-01-12 14-05-55.png deleted file mode 100644 index 9bd938aaa6..0000000000 Binary files a/stash/documentation/images/Screenshot from 2017-01-12 14-05-55.png and /dev/null differ diff --git a/stash/documentation/images/Screenshot from 2017-01-12 14-06-35.png b/stash/documentation/images/Screenshot from 2017-01-12 14-06-35.png deleted file mode 100644 index 452c16d7f0..0000000000 Binary files a/stash/documentation/images/Screenshot from 2017-01-12 14-06-35.png and /dev/null differ diff --git a/stash/documentation/images/Screenshot from 2017-01-12 14-07-26.png b/stash/documentation/images/Screenshot from 2017-01-12 14-07-26.png deleted file mode 100644 index 5b6653c5ce..0000000000 Binary files a/stash/documentation/images/Screenshot from 2017-01-12 14-07-26.png and /dev/null differ diff --git a/stash/documentation/images/Screenshot from 2017-01-12 14-12-32.png b/stash/documentation/images/Screenshot from 2017-01-12 14-12-32.png deleted file mode 100644 index a1d96e0ec2..0000000000 Binary files a/stash/documentation/images/Screenshot from 2017-01-12 14-12-32.png and /dev/null differ diff --git a/stash/documentation/images/dash_home.png b/stash/documentation/images/dash_home.png deleted file mode 100644 index 6072692b43..0000000000 Binary files a/stash/documentation/images/dash_home.png and /dev/null differ diff --git a/stash/documentation/images/dev_login1.png b/stash/documentation/images/dev_login1.png deleted file mode 100644 index 23284fee86..0000000000 Binary files a/stash/documentation/images/dev_login1.png and /dev/null differ diff --git a/stash/documentation/images/dev_login2.png b/stash/documentation/images/dev_login2.png deleted file mode 100644 index aa77eb44b3..0000000000 Binary files a/stash/documentation/images/dev_login2.png and /dev/null differ diff --git a/stash/documentation/images/explore1.png b/stash/documentation/images/explore1.png deleted file mode 100644 index d6317f4ecb..0000000000 Binary files a/stash/documentation/images/explore1.png and /dev/null differ diff --git a/stash/documentation/images/explore2.png b/stash/documentation/images/explore2.png deleted file mode 100644 index 0b5e0999c1..0000000000 Binary files a/stash/documentation/images/explore2.png and /dev/null differ diff --git a/stash/documentation/images/explore3.png b/stash/documentation/images/explore3.png deleted file mode 100644 index b2623e9d1b..0000000000 Binary files a/stash/documentation/images/explore3.png and /dev/null differ diff --git a/stash/documentation/images/solr1.png b/stash/documentation/images/solr1.png deleted file mode 100644 index dec087e3ed..0000000000 Binary files a/stash/documentation/images/solr1.png and /dev/null differ diff --git a/stash/documentation/images/solr2.png b/stash/documentation/images/solr2.png deleted file mode 100644 index 9e80da5141..0000000000 Binary files a/stash/documentation/images/solr2.png and /dev/null differ diff --git a/stash/documentation/images/solr3.png b/stash/documentation/images/solr3.png deleted file mode 100644 index 52e6a123b6..0000000000 Binary files a/stash/documentation/images/solr3.png and /dev/null differ diff --git a/stash/documentation/images/solr4.png b/stash/documentation/images/solr4.png deleted file mode 100644 index 534ac59b92..0000000000 Binary files a/stash/documentation/images/solr4.png and /dev/null differ diff --git a/stash/documentation/images/solr5.png b/stash/documentation/images/solr5.png deleted file mode 100644 index 6675e9ac6d..0000000000 Binary files a/stash/documentation/images/solr5.png and /dev/null differ diff --git a/stash/documentation/images/solr6.png b/stash/documentation/images/solr6.png deleted file mode 100644 index bfdf2c63bb..0000000000 Binary files a/stash/documentation/images/solr6.png and /dev/null differ diff --git a/stash/documentation/images/structure.png b/stash/documentation/images/structure.png deleted file mode 100644 index 52aba95d07..0000000000 Binary files a/stash/documentation/images/structure.png and /dev/null differ diff --git a/stash/script/counter-uploader/Gemfile b/stash/script/counter-uploader/Gemfile deleted file mode 100644 index 92978a4cc0..0000000000 --- a/stash/script/counter-uploader/Gemfile +++ /dev/null @@ -1,4 +0,0 @@ -source 'https://rubygems.org' -gem 'byebug' -gem 'http' -gem 'nokogiri' diff --git a/stash/script/counter-uploader/Gemfile.lock b/stash/script/counter-uploader/Gemfile.lock deleted file mode 100644 index a0bf96e014..0000000000 --- a/stash/script/counter-uploader/Gemfile.lock +++ /dev/null @@ -1,45 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - addressable (2.8.1) - public_suffix (>= 2.0.2, < 6.0) - byebug (11.1.3) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - ffi (1.15.5) - ffi-compiler (1.0.1) - ffi (>= 1.0.0) - rake - http (5.1.0) - addressable (~> 2.8) - http-cookie (~> 1.0) - http-form_data (~> 2.2) - llhttp-ffi (~> 0.4.0) - http-cookie (1.0.5) - domain_name (~> 0.5) - http-form_data (2.3.0) - llhttp-ffi (0.4.0) - ffi-compiler (~> 1.0) - rake (~> 13.0) - nokogiri (1.16.5-arm64-darwin) - racc (~> 1.4) - nokogiri (1.16.5-x86_64-linux) - racc (~> 1.4) - public_suffix (5.0.0) - racc (1.7.3) - rake (13.0.6) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) - -PLATFORMS - arm64-darwin-21 - x86_64-linux - -DEPENDENCIES - byebug - http - nokogiri - -BUNDLED WITH - 2.3.22 diff --git a/stash/script/counter-uploader/tmp/.keep b/stash/script/counter-uploader/tmp/.keep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stash/spec_helpers/factory_helper.rb b/stash/spec_helpers/factory_helper.rb deleted file mode 100644 index b4c95baf0d..0000000000 --- a/stash/spec_helpers/factory_helper.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'factory_bot' -require 'pathname' -require 'byebug' - -# I had a horrible time with FactoryBot, probably because our super mega engine stack is unusual -# It likes to load factories multiple times or never and had to require in individual spec files and -# use FactoryBot.find_definitions in the spec files where it is needed - -# see also https://stackoverflow.com/questions/9300231/factory-already-registered-user-factorygirlduplicatedefinitionerror for more fun - -# for a while it was having trouble finding the path for our definitions, this helped, may need again later. -# base_path = File.join(StashApi::Engine.root, 'spec/factories') -# definition_paths = [base_path] + Pathname.new(base_path).children.select(&:directory?).map(&:to_s) - -RSpec.configure do |config| - config.include FactoryBot::Syntax::Methods - FactoryBot.reload # this seems to fix the FactoryBot find_definitions problem about stuff already loaded - # otherwise if we need to load the definitions, maybe could catch the error instead and ignore reloading them -end diff --git a/stash/stash-wrapper/.gitignore b/stash/stash-wrapper/.gitignore deleted file mode 100644 index c05f1d2240..0000000000 --- a/stash/stash-wrapper/.gitignore +++ /dev/null @@ -1,125 +0,0 @@ -# Ruby defaults - -/.bundle/ -/.yardoc -/Gemfile.lock -/_yardoc/ -/coverage/ -/doc/ -/pkg/ -/spec/reports/ -/tmp/ -*.bundle -*.so -*.o -*.a -mkmf.log - -# Built gem -*.gem -Gemfile.lock - -# Database - -db/*.sqlite3 - -# Logs - -/log/ - -# Mac OS - -.DS_Store -#### joe made this: http://goel.io/joe - -#####=== JetBrains ===##### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff: -.idea/workspace.xml -.idea/tasks.xml - -# Sensitive or high-churn files: -.idea/dataSources/ -.idea/dataSources.ids -.idea/dataSources.xml -.idea/dataSources.local.xml -.idea/sqlDataSources.xml -.idea/dynamic.xml -.idea/uiDesigner.xml - -# Gradle: -.idea/gradle.xml -.idea/libraries - -# Mongo Explorer plugin: -.idea/mongoSettings.xml - -## File-based project format: -*.iws - -## Plugin-specific files: - -# IntelliJ -/out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -#####=== Emacs ===##### -# -*- mode: gitignore; -*- -*~ -\#*\# -/.emacs.desktop -/.emacs.desktop.lock -*.elc -auto-save-list -tramp -.\#* - -# Org-mode -.org-id-locations -*_archive - -# flymake-mode -*_flymake.* - -# eshell files -/eshell/history -/eshell/lastdir - -# elpa packages -/elpa/ - -# reftex files -*.rel - -# AUCTeX auto folder -/auto/ - -# cask packages -.cask/ -dist/ - -# Flycheck -flycheck_*.el - -# server auth directory -/server/ - -# projectiles files -.projectile - -# directory configuration -.dir-locals.el - diff --git a/stash/stash-wrapper/.rakeTasks b/stash/stash-wrapper/.rakeTasks deleted file mode 100644 index f2274b233b..0000000000 --- a/stash/stash-wrapper/.rakeTasks +++ /dev/null @@ -1,7 +0,0 @@ - - diff --git a/stash/stash-wrapper/.rubocop.yml b/stash/stash-wrapper/.rubocop.yml deleted file mode 100644 index bc4380894c..0000000000 --- a/stash/stash-wrapper/.rubocop.yml +++ /dev/null @@ -1,10 +0,0 @@ -inherit_from: ../../.rubocop.yml - -# Disable various checks for sample code -Style/ClassAndModuleChildren: - Exclude: - - 'example.rb' - -Style/MixinUsage: - Exclude: - - 'example.rb' diff --git a/stash/stash-wrapper/.ruby-version b/stash/stash-wrapper/.ruby-version deleted file mode 100644 index b38ebbfce2..0000000000 --- a/stash/stash-wrapper/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -3.0.4 \ No newline at end of file diff --git a/stash/stash-wrapper/.yardopts b/stash/stash-wrapper/.yardopts deleted file mode 100644 index 29c933bcf1..0000000000 --- a/stash/stash-wrapper/.yardopts +++ /dev/null @@ -1 +0,0 @@ ---markup markdown diff --git a/stash/stash-wrapper/CHANGES.md b/stash/stash-wrapper/CHANGES.md deleted file mode 100644 index 4c57677ef6..0000000000 --- a/stash/stash-wrapper/CHANGES.md +++ /dev/null @@ -1,103 +0,0 @@ -## 0.1.16 (14 November 2022) - -- Upgrade ruby to 3.0 - -## 0.1.15 (30 September 2021) - -- Ruby upgrade, rubocop fixes -- Update gems - -## 0.1.14 (14 September 2020) - -- Upgrade to ruby 2.4.10 -- Rubocop fixes -- Move tests to main spec directory -- Upgrade to bundler and rubocop - -## 0.1.13 (13 November 2019) - -- Upgrade ruby to 2.4.4 -- Test fixes (travis and rubocop) -- Gem security updates - -## 0.1.12 (14 November 2018) - -- Change stash-wrapper namespace URI to https://dash.ucop.edu/stash_wrapper/ and schema location to - https://dash.ucop.edu/stash_wrapper/stash_wrapper.xsd (formerly both URLs were http://dash.cdlib.org/) -- Update to Ruby 2.4.1 -- Update to Rubocop 0.57.2 -- Update dependencies - -## 0.1.11.1 (5 August 2016) - -- In `License::CC_BY`, use "Creative Commons Attribution 4.0 International (CC BY 4.0)" - as name, as per [summary](https://creativecommons.org/licenses/by/4.0/), instead of - "Creative Commons Attribution 4.0 International (CC-BY)". - -## 0.1.11 (5 August 2016) - -- In the convenience constant `License::CC_BY`, use the - [human-readable summary](https://creativecommons.org/licenses/by/4.0/) URL for the license - instead of the [legal code](https://creativecommons.org/licenses/by/4.0/legalcode). -- In the convenience constant `License::CC_ZERO`, use the - [human-readable summary](https://creativecommons.org/publicdomain/zero/1.0/) URL for the license - instead of the [legal code](https://creativecommons.org/publicdomain/zero/1.0/legalcode). - -## 0.1.10 (28 July 2016) - -- Added convenience constant `License::CC_ZERO` for the - [CC0](https://creativecommons.org/publicdomain/zero/1.0/legalcode) public domain declaration -- Allow `License` to take a string as a `uri` parameter, so long as that string is a valid URI -- Validate parameters for: - - `StashWrapper` - - `StashAdministrative` (fixes issue #2) - - `Embargo` - - `Identifier` - - `Inventory` - - `Size` - - `Version` - -## 0.1.9 (18 May 2016) - -- Update to XML::MappingExtensions 0.4.1 - -## 0.1.8 (17 May 2016) - -- Update to XML::MappingExtensions 0.4.0 - -## 0.1.7 (2 May 2016) - -- Fix issue where namespace would not be set correctly when round-tripping from XML - -## 0.1.6 (2 May 2016) - -- Update to XML::MappingExtensions 0.3.6 and remove now-unnecessary namespace hacks -- Update to TypesafeEnum 0.1.7 for improved debug output - -## 0.1.5 (28 April 2016) - -- Update to XML::MappingExtensions 0.3.5 to fix issues with `Date.xmlschema` misbehaving - in a Rails / ActiveSupport environment - -## 0.1.4 (25 April 2016) - -- Replace all `require_relative` with absolute `require` to avoid symlink issues - -## 0.1.3 (19 April 2016) - -- Add convenience method `StashWrapper.file_names` to return a list of filenames - from the inventory - -## 0.1.2 (31 March 2016) - -- Add convenience method `Embargo.none` to create a no-embargo embargo element -- Make `StashAdministrative` (and thereby `StashWrapper`) default to `Embargo.none` - if no `Embargo` is provided - -## 0.1.1 (16 March 2016) - -- Fix gem metadata - -## 0.1.0 (16 March 2016) - -- Initial release diff --git a/stash/stash-wrapper/Gemfile b/stash/stash-wrapper/Gemfile deleted file mode 100644 index 93a12e5cbc..0000000000 --- a/stash/stash-wrapper/Gemfile +++ /dev/null @@ -1,19 +0,0 @@ -source 'https://rubygems.org' - -gemspec - -group :development, :local_dev, :test do - gem 'byebug' - gem 'colorize' - gem 'diffy' - gem 'equivalent-xml' - gem 'factory_bot_rails', require: false - gem 'nokogiri' - gem 'rake' - gem 'rspec' - gem 'rspec-rails' - gem 'rubocop' - gem 'simplecov' - gem 'simplecov-console' - gem 'yard' -end diff --git a/stash/stash-wrapper/LICENSE.md b/stash/stash-wrapper/LICENSE.md deleted file mode 100644 index 951df55a18..0000000000 --- a/stash/stash-wrapper/LICENSE.md +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 The Regents of the University of California - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/stash/stash-wrapper/README.md b/stash/stash-wrapper/README.md deleted file mode 100644 index 145cacf224..0000000000 --- a/stash/stash-wrapper/README.md +++ /dev/null @@ -1,230 +0,0 @@ -# stash-wrapper - -[![Build Status](https://travis-ci.org/CDL-Dryad/stash-wrapper.svg?branch=main)](https://travis-ci.org/CDL-Dryad/stash-wrapper) -[![Code Climate](https://codeclimate.com/github/CDL-Dryad/stash-wrapper.svg)](https://codeclimate.com/github/CDL-Dryad/stash-wrapper) -[![Inline docs](http://inch-ci.org/github/CDL-Dryad/stash-wrapper.svg)](http://inch-ci.org/github/CDL-Dryad/stash-wrapper) -[![Gem Version](https://img.shields.io/gem/v/stash-wrapper.svg)](https://github.com/CDL-Dryad/stash-wrapper/releases) - -Gem for working with the [Stash](https://github.com/CDL-Dryad/stash) -[XML wrapper format](https://dash.ucop.edu/stash_wrapper/stash_wrapper.xsd). - -The `StashWrapper` object graph mostly mirrors the `stash_wrapper` schema, though some -simpler elements have been collapsed into object attributes. Also, some classes and -attributes have slightly different names from the corresponding XML attributes in order -to avoid colliding with Ruby keywords (e.g. `end` ⇒ `end_date`) or standard types -(e.g. `file` ⇒ `StashFile`). - -| Schema element | Corresponding class or field | Attribute type | -| -------------- | ------------------- | ---- | -| `` | `StashWrapper` | | -| `` | `Identifier` | | -| `` | `StashAdministrative` | | -| `` | `Version` | | -| `` | `Version.version_number` | `Integer` | -| `` | `Version.date` | `Date` | | -| `` | `License` | | -| `` | `License.name` | `String` | -| `` | `License.uri` | `URI` | -| `` | `Embargo` | | -| `` | `Embargo.type` | `EmbargoType` | -| `` | `Embargo.period` | `String` | -| `` | `Embargo.start_date` | `Date` | -| `` | `Embargo.end_date` | `Date` | -| `` | `Inventory` | | -| `` | `StashFile` | | -| `` | `StashFile.pathname` | `String` | -| `` | `Size` | | -| `` | `StashFile.mime_type` | `MIME::Type` | -| `` | `StashWrapper.descriptive_elements` | `Array` | - -Note that [TypesafeEnum](https://github.com/dmolesUC3/typesafe_enum) classes are provided -for embargo type (`EmbargoType`), identifier type (`IdentifierType`), and size unit -(`SizeUnit`). - -## Usage - -The `Stash::Wrapper::StashWrapper` class represents a single Stash wrapper document. -It accepts a payload of one or more XML metadata documents in the form of the -`descriptive_elements` attribute, an array of `REXML::Element` objects. On calling -`save_to_xml` on the `StashWrapper` instance, these elements will be embedded in the -wrapper's `` element. - -### Full example - -```ruby -require 'stash/wrapper' - -ST = Stash::Wrapper - -identifier = ST::Identifier.new( - type: ST::IdentifierType::DOI, - value: '10.14749/1407399498' -) - -version = ST::Version.new( - number: 1, - date: Date.new(2013, 8, 18), - note: 'Sample wrapped Datacite document' -) - -license = ST::License::CC_BY - -embargo = ST::Embargo.new( - type: ST::EmbargoType::DOWNLOAD, - period: '1 year', - start_date: Date.new(2013, 8, 18), - end_date: Date.new(2014, 8, 18) -) - -inventory = ST::Inventory.new( - files: [ - ST::StashFile.new( - pathname: 'HSRC_MasterSampleII.dat', size_bytes: 12_345, mime_type: 'text/plain' - ), - ST::StashFile.new( - pathname: 'HSRC_MasterSampleII.csv', size_bytes: 67_890, mime_type: 'text/csv' - ), - ST::StashFile.new( - pathname: 'HSRC_MasterSampleII.sas7bdat', size_bytes: 123_456, mime_type: 'application/x-sas-data' - ), - ]) - -datacite_file = 'spec/data/wrapper/wrapper-2-payload.xml' -datacite_root = REXML::Document.new(File.read(datacite_file)).root - -wrapper = ST::StashWrapper.new( - identifier: identifier, - version: version, - license: license, - embargo: embargo, - inventory: inventory, - descriptive_elements: [datacite_root] -) - -wrapper_xml = wrapper.save_to_xml - -formatter = REXML::Formatters::Pretty.new -formatter.compact = true -puts formatter.write(wrapper_xml, '') -``` - -## Generating sample data - -The script `bin/gen_stash_wrapper_sample` will generate sample wrapper files with embedded -datacite metadata and [lorem ipsum](https://en.wikipedia.org/wiki/Lorem_ipsum)-style -placeholder content. With no arguments, it will generate one file and write it to standard -output; with a numeric argument, it will generate that number of files and write them to the -current working directory. - -When generating multiple files, the script pulls from a relatively small pool of randomly -generated authors (1000), publishers (100), and resource types (20), so that files generated -in the same session will share some metadata field values. The MIME types of the `` -entries in a single session will also be pulled from a small subset (20) of real MIME types, -and the file extensions should match, but the MIME types, being randomly selected, are likely -to be nonsensical. - -### Single file to standard output -``` -% gen_stash_wrapper_sample - - 10.21585/def1000001 - - - 1 - 2014-03-16Z - Mecum noctem illam superiorem; iam intellege - - - Creative Commons Attribution 4.0 International (CC BY 4.0) - https://creativecommons.org/licenses/by/4.0/ - - - none - none - 2014-03-16Z - 2014-03-16Z - - - - nocte.mng - 2244 - video/x-mng - - - constrictam.htc - 2228 - text/x-component - - - teneri.plt - 55719 - application/vnd.hp-HPGL - - - oculis.uvg - 8080 - image/vnd.dece.graphic - - - - - - 10.21585/def1000001 - - - Interficiere Statum - Armis Speculabuntur - Iste Relinqueres Opimius - Ordinis Vivis - - - - Admirandum, dies - - Furorem Nostro Multis Mores Nocturnum Ahala Tam - 2014 - - convenit - domus - neque - ora - paulo - perniciosum - poena - res - scientia - tuorum - - te - - - Pridem oportebat, in te conferri pestem, quam tu in nos omnes iam diu - machinaris. an vero vir amplissumus, scipio, pontifex maximus, - gracchum mediocriter labefactantem statum rei publicae privatus - interfecit; catilinam orbem terrae caede atque incendiis vastare - cupientem nos consules perferemus? nam illa nimis antiqua praetereo, - quod servilius ahala maelium novis rebus studentem manu sua occidit. - fuit, fuit ista quondam in hac re publica virtus, ut viri. - - - - - -``` - -### Multiple files -``` -% cd /tmp -% gen_stash_wrapper_sample 10 -/tmp/stash_wrapper-01.xml -/tmp/stash_wrapper-02.xml -/tmp/stash_wrapper-03.xml -/tmp/stash_wrapper-04.xml -/tmp/stash_wrapper-05.xml -/tmp/stash_wrapper-06.xml -/tmp/stash_wrapper-07.xml -/tmp/stash_wrapper-08.xml -/tmp/stash_wrapper-09.xml -/tmp/stash_wrapper-10.xml -``` diff --git a/stash/stash-wrapper/Rakefile b/stash/stash-wrapper/Rakefile deleted file mode 100644 index fc5229c7cc..0000000000 --- a/stash/stash-wrapper/Rakefile +++ /dev/null @@ -1,48 +0,0 @@ -# ------------------------------------------------------------ -# RSpec - -require 'rspec/core' -require 'rspec/core/rake_task' - -namespace :spec do - - desc 'Run all unit tests' - RSpec::Core::RakeTask.new(:unit) do |task| - task.rspec_opts = %w[--color --format documentation --order default] - task.pattern = 'unit/**/*_spec.rb' - end - - task all: [:unit] -end - -desc 'Run all tests' -task spec: 'spec:all' - -# ------------------------------------------------------------ -# Coverage - -desc 'Run all unit tests with coverage' -task :coverage do - ENV['COVERAGE'] = 'true' - Rake::Task['spec:unit'].execute -end - -# ------------------------------------------------------------ -# RuboCop - -require 'rubocop/rake_task' -RuboCop::RakeTask.new - -# ------------------------------------------------------------ -# Miscellaneous - -task :debug_load_path do - puts $LOAD_PATH -end - -# ------------------------------------------------------------ -# Defaults - -desc 'Run unit tests, check test coverage' -# rubocop now covered in main app -task default: %i[coverage] diff --git a/stash/stash-wrapper/example.rb b/stash/stash-wrapper/example.rb deleted file mode 100755 index 095d9366b3..0000000000 --- a/stash/stash-wrapper/example.rb +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env ruby - -require 'stash/wrapper' - -include Stash::Wrapper - -identifier = Identifier.new( - type: IdentifierType::DOI, - value: '10.14749/1407399498' -) - -version = Version.new( - number: 1, - date: Date.new(2013, 8, 18), - note: 'Sample wrapped Datacite document' -) - -license = License::CC_BY - -embargo = Embargo.new( - type: EmbargoType::DOWNLOAD, - period: '1 year', - start_date: Date.new(2013, 8, 18), - end_date: Date.new(2014, 8, 18) -) - -inventory = Inventory.new( - files: [ - StashFile.new( - pathname: 'HSRC_MasterSampleII.dat', size_bytes: 12_345, mime_type: 'text/plain' - ), - StashFile.new( - pathname: 'HSRC_MasterSampleII.csv', size_bytes: 67_890, mime_type: 'text/csv' - ), - StashFile.new( - pathname: 'HSRC_MasterSampleII.sas7bdat', size_bytes: 123_456, mime_type: 'application/x-sas-data' - ) - ] -) - -datacite_file = 'spec/data/wrapper/wrapper-2-payload.xml' -datacite_root = REXML::Document.new(File.read(datacite_file)).root - -wrapper = StashWrapper.new( - identifier: identifier, - version: version, - license: license, - embargo: embargo, - inventory: inventory, - descriptive_elements: [datacite_root] -) - -puts wrapper.write_xml diff --git a/stash/stash-wrapper/lib/stash/wrapper.rb b/stash/stash-wrapper/lib/stash/wrapper.rb deleted file mode 100644 index 714e2ff773..0000000000 --- a/stash/stash-wrapper/lib/stash/wrapper.rb +++ /dev/null @@ -1,6 +0,0 @@ -module Stash - # Code relating to the {https://dash.ucop.edu/stash_wrapper/ Stash wrapper format} - module Wrapper - Dir.glob(File.expand_path('wrapper/*.rb', __dir__)).each(&method(:require)) - end -end diff --git a/stash/stash-wrapper/lib/stash/wrapper/module_info.rb b/stash/stash-wrapper/lib/stash/wrapper/module_info.rb deleted file mode 100644 index 170ac06dd9..0000000000 --- a/stash/stash-wrapper/lib/stash/wrapper/module_info.rb +++ /dev/null @@ -1,13 +0,0 @@ -module Stash - # Code relating to the {https://dash.ucop.edu/stash_wrapper/ Stash wrapper format} - module Wrapper - # The name of this gem - NAME = 'stash-wrapper'.freeze - - # The version of this gem - VERSION = '0.1.16'.freeze - - # The copyright notice for this gem - COPYRIGHT = 'Copyright (c) 2016 The Regents of the University of California'.freeze - end -end diff --git a/stash/stash-wrapper/stash-wrapper.gemspec b/stash/stash-wrapper/stash-wrapper.gemspec deleted file mode 100644 index 3b91dba0df..0000000000 --- a/stash/stash-wrapper/stash-wrapper.gemspec +++ /dev/null @@ -1,57 +0,0 @@ -lib = File.expand_path('lib', __dir__) -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) - -# The following URL clarifies how gemspecs work vs the normal Gemfiles and that gemspecs generally should be more generous with -# version dependencies if released for public use separately. Some doesn't apply since our gems are usually just a -# way of dividing our application. We may or may not want to check in Gemfile.lock for our private gems since app-specific -# unlike a public gem/engine that is expected to be used in a variety of outside applications. -# https://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/ - -# Development dependencies become really somewhat useless or work at cross-purposes in some Ruby/Rails environments -# and you can't really depend on them to fulfil your dependencies correctly for testing/development environments. See this thread -# where a developer finds them less than useful and very confusing for modern rails environments, yet the maintainers -# don't want to touch the problems, surprises and confusion about development dependencies. -# https://github.com/rubygems/rubygems/issues/1104 - -# But in any case, the takeaway here is that it's probably better for us to put these requirements into test/development groups -# using the Gemfile for our private gems and engines so the the gem requirements actually get satisfied correctly on -# travis or on new software installs intended for development or testing because add_development_dependency is weak sauce -# for our uses. - -require 'uri' -require 'stash/wrapper/module_info' - -Gem::Specification.new do |s| - s.name = Stash::Wrapper::NAME - s.version = Stash::Wrapper::VERSION - s.authors = ['David Moles'] - s.email = ['david.moles@ucop.edu'] - s.summary = 'Parses and generates Stash wrapper XML documents' - s.description = 'A gem for working with the Stash wrapper XML format' - s.license = 'MIT' - - s.required_ruby_version = '~> 3.0.4' - - origin = `git config --get remote.origin.url`.chomp - origin_uri = origin.start_with?('http') ? URI(origin) : URI(origin.gsub(%r{git@([^:]+)(.com|.org)[^/]+}, 'http://\1\2')) - s.homepage = URI::HTTP.build(host: origin_uri.host, path: origin_uri.path.chomp('.git')).to_s - - s.files = `git ls-files -z`.split("\x0") - s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) } - - s.require_paths = ['lib'] - - s.add_dependency 'typesafe_enum', '~> 0.1.9' - s.add_dependency 'xml-mapping_extensions', '~> 0.4.9' - - # s.add_development_dependency 'diffy' - # s.add_development_dependency 'equivalent-xml' - # s.add_development_dependency 'nokogiri' - # s.add_development_dependency 'rake' - # s.add_development_dependency 'rubocop' - # s.add_development_dependency 'simplecov' - # s.add_development_dependency 'simplecov-console' - # s.add_development_dependency 'yard' - - s.metadata['rubygems_mfa_required'] = 'true' -end diff --git a/stash/test-cases/README.md b/stash/test-cases/README.md deleted file mode 100644 index 6988eafd57..0000000000 --- a/stash/test-cases/README.md +++ /dev/null @@ -1 +0,0 @@ -Manual test cases for Dash/Stash. diff --git a/stash/test-cases/uploads/.gitignore b/stash/test-cases/uploads/.gitignore deleted file mode 100644 index e560daa3f6..0000000000 --- a/stash/test-cases/uploads/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.md.html - diff --git a/stash/test-cases/uploads/README.md b/stash/test-cases/uploads/README.md deleted file mode 100644 index 095e535bc4..0000000000 --- a/stash/test-cases/uploads/README.md +++ /dev/null @@ -1,17 +0,0 @@ -Test cases for file uploads. - -## Creating new datasets - -- [New dataset with local files](new-dataset-local-files.md) -- [New dataset with URL manifest](new-dataset-manifest.md) - -Workflow ([PDF version here](new-dataset-workflow.pdf)): - -![Workflow for new datasets](new-dataset-workflow.png) - -## Updating existing datasets - -- [Updating a dataset with local files](updated-dataset-local-files.md) -- [Updating a dataset with a URL manifest](updated-dataset-manifest.md) - - diff --git a/stash/test-cases/uploads/new-dataset-local-files.md b/stash/test-cases/uploads/new-dataset-local-files.md deleted file mode 100644 index 83e040147e..0000000000 --- a/stash/test-cases/uploads/new-dataset-local-files.md +++ /dev/null @@ -1,68 +0,0 @@ -# New dataset with local files - -1. log in -1. select **My datasets** -1. select **Start new dataset** -1. enter minimal necessary metadata for submission (title, creator, etc.) -1. select **Upload data** -1. make sure **Drag and drop or choose files from your computer** is selected -1. click **Choose files** - - choose one or more files -1. drag some files into the **Drag and drop files here** area -1. for all files: - - ✓ check that the chosen files appear in the list - - ✓ check that the dropped files appear in the list - - ✓ check that the file sizes are correct - - ✓ check that the **Total** size is correct (should be the total of all file sizes) - - ✓ check that the **New in this version** size is correct (should be the same as **Total** size) - - ✓ check that the **I confirm…** check box appears - - ✓ check that the **Upload** button appears - - ✓ check that the **Upload** button is disabled -1. click **Remove** on one or more files - - for each file: - - ✓ check that the removed file disappears from the list - - ✓ check that the **Total** size is adjusted correctly - - ✓ check that the **New in this version** size is adjusted correctly - - when all files have been removed: - - ✓ check that the **I confirm…** check box disappears - - ✓ check that the **Upload** button disappears -1. choose and/or drag and drop some more files, including at least one - reasonably large file (> 10 MB) - - ✓ check that the **I confirm…** check box and **Upload** button reappear -1. tick the **I confirm…** check box - - ✓ check that the **Upload** button is enabled -1. click **Proceed to review** (lower right) - - ✓ check that a **You have files that have not been uploaded** dialog appears - - dismiss the dialog -1. click **Review and submit** (top right) - - ✓ check that a **You have files that have not been uploaded** dialog appears - - dismiss the dialog -1. click **Upload** -1. for large (-ish) files, ✓ check that: - - a progress bar appears next to each file - - a **Cancel** link appears next to each file - - clicking the **Cancel** link before progress completes removes the file from the list -1. for smallish files, and for *completed* large files, - - ✓ check that a check mark appears next to the file name - - ✓ check that the **Cancel** link changes to **Delete** -1. click **Delete** on one or more files - - for each file: - - ✓ check that the removed file disappears from the list - - ✓ check that the **Total** size is adjusted correctly - - ✓ check that the **New in this version** size is adjusted correctly - - when all files have been deleted: - - ✓ check that the **I confirm…** check box disappears - - ✓ check that the **Upload** button disappears -1. choose and/or drag and drop some more files - - ✓ check that the **I confirm…** check box and **Upload** button reappear -1. tick the **I confirm…** check box -1. click **Upload** -1. when all files have uploaded, click **Proceed to review** or **Review and submit** - - ✓ check that the uploaded files appear in the **Review data files** section -1. tick the **By checking this box, I agree...** (CC-BY) box -1. click **Submit** -1. wait for the dataset’s status to apepar as **published** -1. on the dataset landing page: - - ✓ check that the files appear, with the correct sizes, under **Data files** - - click **Download the dataset** - - ✓ check that the files appear, with the correct sizes, in the downloaded ZIP file diff --git a/stash/test-cases/uploads/new-dataset-manifest.md b/stash/test-cases/uploads/new-dataset-manifest.md deleted file mode 100644 index 3e15310c84..0000000000 --- a/stash/test-cases/uploads/new-dataset-manifest.md +++ /dev/null @@ -1,55 +0,0 @@ -# New dataset with URL manifest - -1. log in -1. select **My datasets** -1. select **Start new dataset** -1. enter minimal necessary metadata for submission (title, creator, etc.) -1. select **Upload data** -1. select **Enter URLs of file locations** - - ✓ check that the **Validate files** button is disabled -1. enter the following (good) URLs: - - http://web.mit.edu/ajb/www/tdwarf/tdwarf_data.txt - - http://mypage.siu.edu/lhartman/phono/source.txt - - http://user.engineering.uiowa.edu/~xwu3/epsii/Lecture20/source.txt -1. enter the following (bad) URLs: - - http://httpstat.us/403 - - http://httpstat.us/404 - - http://httpstat.us/418 - - http://httpstat.us/500 - - http://httpstat.us/522 - - http://httpstat.us/524 -1. tick the **I confirm…** check box - - ✓ check that the **Validate files** button is enabled -1. click **Validate files** - - ✓ check that the URLs all disappear from the **Enter files** box - - ✓ check that the bad URLs all appear in the **Validation status** table - - ✓ check that the good URLs appear in the **Uploaded Files** table, as follows: - - | Filename | URL | Size | Version | Actions | - | -------- | --- | ---- | ------- | ------- | - | source.txt | http://mypage.siu.edu/lhartman/phono/source.txt | 708.25 kB | 1 | Delete | - | source-2.txt | http://user.engineering.uiowa.edu/~xwu3/epsii/Lecture20/source.txt | 357 B | 1 | Delete | - | tdwarf_data.txt | http://web.mit.edu/ajb/www/tdwarf/tdwarf_data.txt | 12.14 kB | 1 | Delete | - - - ✓ check that the second `source.txt` has been renamed to `source-2.txt`, as above - - ✓ check that the total size is correct -1. click **Proceed to review** or **Review and submit** - - ✓ check that only the good files appear under **Review data files** - - *(Q: Should we show the bad files as errors that need to be corrected? —DM)* -1. click **Upload data** to return to the upload page - - ✓ check that the **Enter files** box and **Validation status** are empty - - *(Note: Not sure this behavior is good; should we still show old/bad URLs? —DM)* -1. Reenter the bad URLs above and click **Validate files** again -1. on the first bad URL in the **Validation status** table, click **Edit** - - ✓ check that the URL disappears from the table - - ✓ check that the URL reappears in the **Enter files** box -1. on the other bad URLs in the **Validation status** table, click **Delete** - - ✓ check that each URL disappears from the table -1. click **Proceed to review** or **Review and submit** -1. tick the **By checking this box, I agree...** (CC-BY) box -1. click **Submit** -1. wait for the dataset’s status to apepar as **published** -1. on the dataset landing page: - - ✓ check that the files appear, with the correct sizes, under **Data files** - - click **Download the dataset** - - ✓ check that the files appear, with the correct sizes, in the downloaded ZIP file diff --git a/stash/test-cases/uploads/new-dataset-workflow.pdf b/stash/test-cases/uploads/new-dataset-workflow.pdf deleted file mode 100644 index 1080dfcbfe..0000000000 Binary files a/stash/test-cases/uploads/new-dataset-workflow.pdf and /dev/null differ diff --git a/stash/test-cases/uploads/new-dataset-workflow.png b/stash/test-cases/uploads/new-dataset-workflow.png deleted file mode 100644 index 89a694ddd6..0000000000 Binary files a/stash/test-cases/uploads/new-dataset-workflow.png and /dev/null differ diff --git a/stash/test-cases/uploads/updated-dataset-local-files.md b/stash/test-cases/uploads/updated-dataset-local-files.md deleted file mode 100644 index c1427e644c..0000000000 --- a/stash/test-cases/uploads/updated-dataset-local-files.md +++ /dev/null @@ -1,85 +0,0 @@ -# Updating a dataset with local files - -1. log in -1. select **My datasets** -1. select an existing, **published** dataset -1. select **Upload data** - - ✓ check that files from the existing version(s) are listed under **Upload files** - - ✓ check that each file has a check mark - - ✓ check that **New in this version**, below the table, shows **0 bytes** -1. make sure **Drag and drop or choose files from your computer** is selected -1. click **Choose files** - - choose one or more files -1. drag some files into the **Drag and drop files here** area - - including at least one file with the same name as an existing file -1. for all files: - - ✓ check that the chosen files appear in the list - - ✓ check that the dropped files appear in the list - - ✓ check that the file sizes are correct - - ✓ check that the **Total** size is correct (should be the total of all file sizes shown) - - ✓ check that the **New in this version** reflects the added files - - ✓ check that the **I confirm…** check box appears - - ✓ check that the **Upload** button appears - - ✓ check that the **Upload** button is disabled -1. for the file with the same name: - - ✓ check that there is now *no* checkmark next to the file name - - ✓ check that the message **Your previous file [filename] has been - replaced in your upload list with a newer file with the same name.** - appears below the table. - - *(Note: It may then disappear, for some reason.`¯\_(ツ)_/¯`—DM)* -1. click **Remove** on the file with the same name, and: - - ✓ check that the old file reappears (w/checkmark and old size) -1. click **Remove** on one or more of the old files - - for each file: - - ✓ check that the removed file disappears from the list - - ✓ check that the **Total** size is adjusted correctly -1. click **Remove** on one or more of the newly added files - - for each file: - - ✓ check that the removed file disappears from the list - - ✓ check that the **Total** size is adjusted correctly - - ✓ check that the **New in this version** size is adjusted correctly - - when all files have been removed: - - ✓ check that the **I confirm…** check box disappears - - ✓ check that the **Upload** button disappears -1. choose and/or drag and drop some more files, including at least one - reasonably large file (> 10 MB) - - ✓ check that the **I confirm…** check box and **Upload** button reappear -1. tick the **I confirm…** check box - - ✓ check that the **Upload** button is ebnabled -1. click **Proceed to review** (lower right) - - ✓ check that a **You have files that have not been uploaded** dialog appears - - dismiss the dialog -1. click **Review and submit** (top right) - - ✓ check that a **You have files that have not been uploaded** dialog appears - - dismiss the dialog -1. click **Upload** -1. for large (-ish) files, ✓ check that: - - a progress bar appears next to each file - - a **Cancel** link appears next to each file - - clicking the **Cancel** link before progress completes removes the file from the list -1. for smallish files, and for *completed* large files, - - ✓ check that a check mark appears next to the file name - - ✓ check that the **Cancel** link changes to **Delete** -1. click **Delete** on one or more files - - for each file: - - ✓ check that the removed file disappears from the list - - ✓ check that the **Total** size is adjusted correctly - - ✓ check that the **New in this version** size is adjusted correctly - - when all files have been deleted: - - ✓ check that the **I confirm…** check box disappears - - ✓ check that the **Upload** button disappears -1. choose and/or drag and drop some more files - - ✓ check that the **I confirm…** check box and **Upload** button reappear -1. tick the **I confirm…** check box -1. click **Upload** -1. when all files have uploaded, click **Proceed to review** or **Review and submit** - - ✓ check that the uploaded files appear in the **Review data files** section -1. tick the **By checking this box, I agree...** (CC-BY) box -1. click **Submit** -1. wait for the dataset’s status to apepar as **published** -1. on the dataset landing page: - - ✓ check that the files appear, with the correct sizes, under **Data files** - - click **Download the dataset** - - ✓ check that the files appear, with the correct sizes, in the downloaded ZIP file - - ✓ check that any replaced files have been replaced - diff --git a/stash/test-cases/uploads/updated-dataset-manifest.md b/stash/test-cases/uploads/updated-dataset-manifest.md deleted file mode 100644 index 4c19c09641..0000000000 --- a/stash/test-cases/uploads/updated-dataset-manifest.md +++ /dev/null @@ -1,30 +0,0 @@ -# Updating a dataset with a URL manifest - -1. log in -1. select **My datasets** -1. select an existing, **published** dataset -1. select **Upload data** - - ✓ check that the old files appear in the **Uploaded Files** table -1. select **Enter URLs of file locations** - - ✓ check that the **Validate files** button is disabled -1. enter a (good) URL for a file with the same name as an existing file -1. tick the **I confirm…** check box - - ✓ check that the **Validate files** button is enabled -1. click **Validate files** - - ✓ check that the URL disappears from the **Enter files** box - - ✓ check that the URL appears in the **Uploaded Files** table - - ✓ check that all old files appear in the **Uploaded Files** table - - ✓ check that the file for the new URL has been renamed to avoid collision with the old file - - _(Note: This behavior is different from the local files workflow.—DM)_ - - ✓ check that the total size is correct -1. click **Proceed to review** or **Review and submit** - - ✓ check that both new and old files appear under **Review data files** - - ✓ check that the **By checking this box, I agree...** (CC-BY) box is already ticked -1. click **Submit** -1. wait for the dataset’s status to apepar as **published** -1. on the dataset landing page: - - ✓ check that the files appear, with the correct sizes, under **Data files** - - click **Download the dataset** - - ✓ check that the files appear, with the correct sizes, in the downloaded ZIP file - - diff --git a/stash/test-cases/uploads/updated-dataset-workflow.pdf b/stash/test-cases/uploads/updated-dataset-workflow.pdf deleted file mode 100644 index d0c62896d4..0000000000 Binary files a/stash/test-cases/uploads/updated-dataset-workflow.pdf and /dev/null differ diff --git a/stash/test-cases/uploads/updated-dataset-workflow.png b/stash/test-cases/uploads/updated-dataset-workflow.png deleted file mode 100644 index 192692edce..0000000000 Binary files a/stash/test-cases/uploads/updated-dataset-workflow.png and /dev/null differ diff --git a/stash/test-cases/uploads/upload-workflows.graffle b/stash/test-cases/uploads/upload-workflows.graffle deleted file mode 100644 index 66a4a2e9a3..0000000000 Binary files a/stash/test-cases/uploads/upload-workflows.graffle and /dev/null differ