stash-merritt 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +193 -0
- data/.rubocop.yml +32 -0
- data/.ruby-version +1 -0
- data/.travis.yml +12 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +326 -0
- data/LICENSE.md +22 -0
- data/README.md +53 -0
- data/Rakefile +49 -0
- data/lib/datacite/mapping/datacite_xml_factory.rb +212 -0
- data/lib/stash/merritt/ezid_helper.rb +50 -0
- data/lib/stash/merritt/module_info.rb +12 -0
- data/lib/stash/merritt/repository.rb +17 -0
- data/lib/stash/merritt/submission_job.rb +90 -0
- data/lib/stash/merritt/submission_package/data_one_manifest_builder.rb +41 -0
- data/lib/stash/merritt/submission_package/merritt_datacite_builder.rb +22 -0
- data/lib/stash/merritt/submission_package/merritt_delete_builder.rb +25 -0
- data/lib/stash/merritt/submission_package/merritt_oaidc_builder.rb +130 -0
- data/lib/stash/merritt/submission_package/stash_wrapper_builder.rb +59 -0
- data/lib/stash/merritt/submission_package.rb +125 -0
- data/lib/stash/merritt/sword_helper.rb +58 -0
- data/lib/stash/merritt.rb +5 -0
- data/lib/stash.rb +5 -0
- data/spec/.rubocop.yml +10 -0
- data/spec/config/app_config.yml +3 -0
- data/spec/config/database.yml +7 -0
- data/spec/config/licenses.yml +18 -0
- data/spec/data/archive/mrt-datacite.xml +121 -0
- data/spec/data/archive/mrt-dataone-manifest.txt +32 -0
- data/spec/data/archive/mrt-oaidc.xml +38 -0
- data/spec/data/archive/stash-wrapper.xml +213 -0
- data/spec/data/archive.zip +0 -0
- data/spec/data/dc4-with-funding-references.xml +123 -0
- data/spec/db/datacite/mapping/datacite_xml_factory_spec.rb +56 -0
- data/spec/db/stash/merritt/merritt_oaidc_builder_spec.rb +72 -0
- data/spec/db/stash/merritt/submission_package_spec.rb +174 -0
- data/spec/db/stash/merritt/sword_helper_spec.rb +162 -0
- data/spec/db_spec_helper.rb +31 -0
- data/spec/rspec_custom_matchers.rb +92 -0
- data/spec/spec_helper.rb +86 -0
- data/spec/unit/stash/merritt/ezid_helper_spec.rb +88 -0
- data/spec/unit/stash/merritt/repository_spec.rb +19 -0
- data/spec/unit/stash/merritt/submission_job_spec.rb +127 -0
- data/spec/util/resource_builder.rb +333 -0
- data/stash-merritt.gemspec +48 -0
- data/stash-merritt.iml +147 -0
- data/stash-merritt.ipr +127 -0
- data/travis-local-deps.sh +43 -0
- metadata +337 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bf3299ac7ab5dfacd5f34d68f94f58985126cc1a
|
4
|
+
data.tar.gz: 199ad43c3ff3149474c5fa96096afa9b7aac6715
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d3810a1472c76152187acaa66e9b2c294c324deb3ccd3a40361b772d10492cfc22a54bb7ae0be10565220b6f8b4d568e947325f757e824df5613d6f86bcc70bd
|
7
|
+
data.tar.gz: ee05c454262f4ce76e86ef138a8243374fb03a52587f97f4e1cab2e863d858e26ea655c3bbdacccca63836406a8fb63f40dbcc4a1b56fde65fbd5291b7da5510
|
data/.gitignore
ADDED
@@ -0,0 +1,193 @@
|
|
1
|
+
#### joe made this: http://goel.io/joe
|
2
|
+
|
3
|
+
#### ruby ####
|
4
|
+
*.gem
|
5
|
+
*.rbc
|
6
|
+
/.config
|
7
|
+
/coverage/
|
8
|
+
/InstalledFiles
|
9
|
+
/pkg/
|
10
|
+
/spec/reports/
|
11
|
+
/spec/examples.txt
|
12
|
+
/test/tmp/
|
13
|
+
/test/version_tmp/
|
14
|
+
/tmp/
|
15
|
+
|
16
|
+
# Used by dotenv library to load environment variables.
|
17
|
+
# .env
|
18
|
+
|
19
|
+
## Specific to RubyMotion:
|
20
|
+
.dat*
|
21
|
+
.repl_history
|
22
|
+
build/
|
23
|
+
*.bridgesupport
|
24
|
+
build-iPhoneOS/
|
25
|
+
build-iPhoneSimulator/
|
26
|
+
|
27
|
+
## Specific to RubyMotion (use of CocoaPods):
|
28
|
+
#
|
29
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
30
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
31
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
32
|
+
#
|
33
|
+
# vendor/Pods/
|
34
|
+
|
35
|
+
## Documentation cache and generated files:
|
36
|
+
/.yardoc/
|
37
|
+
/_yardoc/
|
38
|
+
/doc/
|
39
|
+
/rdoc/
|
40
|
+
|
41
|
+
## Environment normalization:
|
42
|
+
/.bundle/
|
43
|
+
/vendor/bundle
|
44
|
+
/lib/bundler/man/
|
45
|
+
|
46
|
+
# for a library or gem, you might want to ignore these files since the code is
|
47
|
+
# intended to run in multiple environments; otherwise, check them in:
|
48
|
+
# Gemfile.lock
|
49
|
+
# .ruby-version
|
50
|
+
# .ruby-gemset
|
51
|
+
|
52
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
53
|
+
.rvmrc
|
54
|
+
|
55
|
+
#### rails ####
|
56
|
+
*.rbc
|
57
|
+
capybara-*.html
|
58
|
+
.rspec
|
59
|
+
/log
|
60
|
+
/tmp
|
61
|
+
/db/*.sqlite3
|
62
|
+
/db/*.sqlite3-journal
|
63
|
+
/public/system
|
64
|
+
/coverage/
|
65
|
+
/spec/tmp
|
66
|
+
**.orig
|
67
|
+
rerun.txt
|
68
|
+
pickle-email-*.html
|
69
|
+
|
70
|
+
# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
|
71
|
+
config/initializers/secret_token.rb
|
72
|
+
|
73
|
+
# Only include if you have production secrets in this file, which is no longer a Rails default
|
74
|
+
# config/secrets.yml
|
75
|
+
|
76
|
+
# dotenv
|
77
|
+
# TODO Comment out this rule if environment variables can be committed
|
78
|
+
.env
|
79
|
+
|
80
|
+
## Environment normalization:
|
81
|
+
/.bundle
|
82
|
+
/vendor/bundle
|
83
|
+
|
84
|
+
# these should all be checked in to normalize the environment:
|
85
|
+
# Gemfile.lock, .ruby-version, .ruby-gemset
|
86
|
+
|
87
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
88
|
+
.rvmrc
|
89
|
+
|
90
|
+
# if using bower-rails ignore default bower_components path bower.json files
|
91
|
+
/vendor/assets/bower_components
|
92
|
+
*.bowerrc
|
93
|
+
bower.json
|
94
|
+
|
95
|
+
# Ignore pow environment settings
|
96
|
+
.powenv
|
97
|
+
|
98
|
+
# Ignore Byebug command history file.
|
99
|
+
.byebug_history
|
100
|
+
|
101
|
+
#### emacs ####
|
102
|
+
# -*- mode: gitignore; -*-
|
103
|
+
*~
|
104
|
+
\#*\#
|
105
|
+
/.emacs.desktop
|
106
|
+
/.emacs.desktop.lock
|
107
|
+
*.elc
|
108
|
+
auto-save-list
|
109
|
+
tramp
|
110
|
+
.\#*
|
111
|
+
|
112
|
+
# Org-mode
|
113
|
+
.org-id-locations
|
114
|
+
*_archive
|
115
|
+
|
116
|
+
# flymake-mode
|
117
|
+
*_flymake.*
|
118
|
+
|
119
|
+
# eshell files
|
120
|
+
/eshell/history
|
121
|
+
/eshell/lastdir
|
122
|
+
|
123
|
+
# elpa packages
|
124
|
+
/elpa/
|
125
|
+
|
126
|
+
# reftex files
|
127
|
+
*.rel
|
128
|
+
|
129
|
+
# AUCTeX auto folder
|
130
|
+
/auto/
|
131
|
+
|
132
|
+
# cask packages
|
133
|
+
.cask/
|
134
|
+
dist/
|
135
|
+
|
136
|
+
# Flycheck
|
137
|
+
flycheck_*.el
|
138
|
+
|
139
|
+
# server auth directory
|
140
|
+
/server/
|
141
|
+
|
142
|
+
# projectiles files
|
143
|
+
.projectile
|
144
|
+
|
145
|
+
#### jetbrains ####
|
146
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
147
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
148
|
+
|
149
|
+
# User-specific stuff:
|
150
|
+
.idea/workspace.xml
|
151
|
+
.idea/tasks.xml
|
152
|
+
.idea/dictionaries
|
153
|
+
.idea/vcs.xml
|
154
|
+
.idea/jsLibraryMappings.xml
|
155
|
+
|
156
|
+
# Sensitive or high-churn files:
|
157
|
+
.idea/dataSources.ids
|
158
|
+
.idea/dataSources.xml
|
159
|
+
.idea/dataSources.local.xml
|
160
|
+
.idea/sqlDataSources.xml
|
161
|
+
.idea/dynamic.xml
|
162
|
+
.idea/uiDesigner.xml
|
163
|
+
|
164
|
+
# Gradle:
|
165
|
+
.idea/gradle.xml
|
166
|
+
.idea/libraries
|
167
|
+
|
168
|
+
# Mongo Explorer plugin:
|
169
|
+
.idea/mongoSettings.xml
|
170
|
+
|
171
|
+
## File-based project format:
|
172
|
+
*.iws
|
173
|
+
|
174
|
+
## Plugin-specific files:
|
175
|
+
|
176
|
+
# IntelliJ
|
177
|
+
/out/
|
178
|
+
|
179
|
+
# mpeltonen/sbt-idea plugin
|
180
|
+
.idea_modules/
|
181
|
+
|
182
|
+
# JIRA plugin
|
183
|
+
atlassian-ide-plugin.xml
|
184
|
+
|
185
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
186
|
+
com_crashlytics_export_strings.xml
|
187
|
+
crashlytics.properties
|
188
|
+
crashlytics-build.properties
|
189
|
+
fabric.properties
|
190
|
+
|
191
|
+
# Raketasks
|
192
|
+
.rakeTasks
|
193
|
+
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
AllCops:
|
2
|
+
# Suppress complaints about post-2.0 syntax
|
3
|
+
TargetRubyVersion: 2.2
|
4
|
+
|
5
|
+
# Disable line-length check; it's too easy for the cure to be worse than the disease
|
6
|
+
Metrics/LineLength:
|
7
|
+
Enabled: False
|
8
|
+
|
9
|
+
# Disable problematic module documentation check (see https://github.com/bbatsov/rubocop/issues/947)
|
10
|
+
Style/Documentation:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
# Allow one line around class body (Style/EmptyLines will still disallow two or more)
|
14
|
+
Style/EmptyLinesAroundClassBody:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
# Allow one line around module body (Style/EmptyLines will still disallow two or more)
|
18
|
+
Style/EmptyLinesAroundModuleBody:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
# Allow one line around block body (Style/EmptyLines will still disallow two or more)
|
22
|
+
Style/EmptyLinesAroundBlockBody:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
# Unclear why it's a good idea to give parameters semantically meaningless names
|
26
|
+
Style/SingleLineBlockParams:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
# These 'set' methods aren't conventional accessors, but Rubocop doesn't know that
|
30
|
+
Style/AccessorMethodName:
|
31
|
+
Exclude:
|
32
|
+
- 'spec/util/resource_builder.rb'
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.5
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,326 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../stash_engines/stash_datacite
|
3
|
+
specs:
|
4
|
+
stash_datacite (0.0.5)
|
5
|
+
datacite-mapping (~> 0.2, >= 0.2.5)
|
6
|
+
kaminari
|
7
|
+
leaflet-rails
|
8
|
+
rails (~> 4.2.4)
|
9
|
+
responders (~> 2.0)
|
10
|
+
rubyzip (>= 1.0.0)
|
11
|
+
stash-wrapper (~> 0.1, >= 0.1.11.1)
|
12
|
+
stash_ezid_datacite (~> 0.1)
|
13
|
+
|
14
|
+
PATH
|
15
|
+
remote: ../stash_engines/stash_engine
|
16
|
+
specs:
|
17
|
+
stash_engine (0.0.17)
|
18
|
+
amoeba (~> 3.0.0)
|
19
|
+
carrierwave (~> 0.10.0)
|
20
|
+
concurrent-ruby (~> 1.0)
|
21
|
+
filesize (~> 0.1.1)
|
22
|
+
font-awesome-rails
|
23
|
+
jquery-fileupload-rails (~> 0.4.6)
|
24
|
+
jquery-rails
|
25
|
+
jquery-turbolinks
|
26
|
+
jquery-ui-rails
|
27
|
+
kaminari
|
28
|
+
omniauth (~> 1.2.2)
|
29
|
+
omniauth-google-oauth2 (~> 0.2.9)
|
30
|
+
omniauth-orcid (~> 1.0.21)
|
31
|
+
omniauth-shibboleth (~> 1.2.1)
|
32
|
+
rails (~> 4.2.4)
|
33
|
+
redcarpet (~> 3.3)
|
34
|
+
stash-sword (~> 0.1, >= 0.1.5)
|
35
|
+
wicked_pdf (~> 1.1.0)
|
36
|
+
wkhtmltopdf-binary (~> 0.12.3.1)
|
37
|
+
|
38
|
+
PATH
|
39
|
+
remote: .
|
40
|
+
specs:
|
41
|
+
stash-merritt (0.0.1)
|
42
|
+
rubyzip (~> 1.1)
|
43
|
+
stash_datacite
|
44
|
+
stash_engine
|
45
|
+
stash_ezid_datacite (~> 0.1)
|
46
|
+
|
47
|
+
GEM
|
48
|
+
remote: https://rubygems.org/
|
49
|
+
specs:
|
50
|
+
actionmailer (4.2.7.1)
|
51
|
+
actionpack (= 4.2.7.1)
|
52
|
+
actionview (= 4.2.7.1)
|
53
|
+
activejob (= 4.2.7.1)
|
54
|
+
mail (~> 2.5, >= 2.5.4)
|
55
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
56
|
+
actionpack (4.2.7.1)
|
57
|
+
actionview (= 4.2.7.1)
|
58
|
+
activesupport (= 4.2.7.1)
|
59
|
+
rack (~> 1.6)
|
60
|
+
rack-test (~> 0.6.2)
|
61
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
62
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
63
|
+
actionview (4.2.7.1)
|
64
|
+
activesupport (= 4.2.7.1)
|
65
|
+
builder (~> 3.1)
|
66
|
+
erubis (~> 2.7.0)
|
67
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
68
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
69
|
+
activejob (4.2.7.1)
|
70
|
+
activesupport (= 4.2.7.1)
|
71
|
+
globalid (>= 0.3.0)
|
72
|
+
activemodel (4.2.7.1)
|
73
|
+
activesupport (= 4.2.7.1)
|
74
|
+
builder (~> 3.1)
|
75
|
+
activerecord (4.2.7.1)
|
76
|
+
activemodel (= 4.2.7.1)
|
77
|
+
activesupport (= 4.2.7.1)
|
78
|
+
arel (~> 6.0)
|
79
|
+
activesupport (4.2.7.1)
|
80
|
+
i18n (~> 0.7)
|
81
|
+
json (~> 1.7, >= 1.7.7)
|
82
|
+
minitest (~> 5.1)
|
83
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
84
|
+
tzinfo (~> 1.1)
|
85
|
+
addressable (2.5.0)
|
86
|
+
public_suffix (~> 2.0, >= 2.0.2)
|
87
|
+
amoeba (3.0.0)
|
88
|
+
activerecord (>= 3.2.6)
|
89
|
+
arel (6.0.4)
|
90
|
+
ast (2.3.0)
|
91
|
+
builder (3.2.3)
|
92
|
+
carrierwave (0.10.0)
|
93
|
+
activemodel (>= 3.2.0)
|
94
|
+
activesupport (>= 3.2.0)
|
95
|
+
json (>= 1.7)
|
96
|
+
mime-types (>= 1.16)
|
97
|
+
colorize (0.8.1)
|
98
|
+
concurrent-ruby (1.0.4)
|
99
|
+
crack (0.4.3)
|
100
|
+
safe_yaml (~> 1.0.0)
|
101
|
+
database_cleaner (1.5.3)
|
102
|
+
datacite-mapping (0.2.5)
|
103
|
+
typesafe_enum (~> 0.1, >= 0.1.7)
|
104
|
+
xml-mapping_extensions (~> 0.4, >= 0.4.7)
|
105
|
+
diff-lcs (1.3)
|
106
|
+
diffy (3.1.0)
|
107
|
+
docile (1.1.5)
|
108
|
+
domain_name (0.5.20161129)
|
109
|
+
unf (>= 0.0.5, < 1.0.0)
|
110
|
+
equivalent-xml (0.6.0)
|
111
|
+
nokogiri (>= 1.4.3)
|
112
|
+
erubis (2.7.0)
|
113
|
+
ezid-client (1.5.0)
|
114
|
+
hashie (~> 3.4, >= 3.4.3)
|
115
|
+
faraday (0.10.1)
|
116
|
+
multipart-post (>= 1.2, < 3)
|
117
|
+
filesize (0.1.1)
|
118
|
+
font-awesome-rails (4.7.0.1)
|
119
|
+
railties (>= 3.2, < 5.1)
|
120
|
+
globalid (0.3.7)
|
121
|
+
activesupport (>= 4.1.0)
|
122
|
+
hashdiff (0.3.2)
|
123
|
+
hashie (3.5.1)
|
124
|
+
hirb (0.7.3)
|
125
|
+
http-cookie (1.0.3)
|
126
|
+
domain_name (~> 0.5)
|
127
|
+
i18n (0.8.0)
|
128
|
+
jquery-fileupload-rails (0.4.7)
|
129
|
+
actionpack (>= 3.1)
|
130
|
+
railties (>= 3.1)
|
131
|
+
sass (>= 3.2)
|
132
|
+
jquery-rails (4.2.2)
|
133
|
+
rails-dom-testing (>= 1, < 3)
|
134
|
+
railties (>= 4.2.0)
|
135
|
+
thor (>= 0.14, < 2.0)
|
136
|
+
jquery-turbolinks (2.1.0)
|
137
|
+
railties (>= 3.1.0)
|
138
|
+
turbolinks
|
139
|
+
jquery-ui-rails (6.0.1)
|
140
|
+
railties (>= 3.2.16)
|
141
|
+
json (1.8.6)
|
142
|
+
jwt (1.5.6)
|
143
|
+
kaminari (1.0.1)
|
144
|
+
activesupport (>= 4.1.0)
|
145
|
+
kaminari-actionview (= 1.0.1)
|
146
|
+
kaminari-activerecord (= 1.0.1)
|
147
|
+
kaminari-core (= 1.0.1)
|
148
|
+
kaminari-actionview (1.0.1)
|
149
|
+
actionview
|
150
|
+
kaminari-core (= 1.0.1)
|
151
|
+
kaminari-activerecord (1.0.1)
|
152
|
+
activerecord
|
153
|
+
kaminari-core (= 1.0.1)
|
154
|
+
kaminari-core (1.0.1)
|
155
|
+
leaflet-rails (1.0.2)
|
156
|
+
loofah (2.0.3)
|
157
|
+
nokogiri (>= 1.5.9)
|
158
|
+
mail (2.6.4)
|
159
|
+
mime-types (>= 1.16, < 4)
|
160
|
+
mime-types (2.99.3)
|
161
|
+
mini_portile2 (2.1.0)
|
162
|
+
minitest (5.10.1)
|
163
|
+
multi_json (1.12.1)
|
164
|
+
multi_xml (0.6.0)
|
165
|
+
multipart-post (2.0.0)
|
166
|
+
mysql2 (0.4.5)
|
167
|
+
netrc (0.11.0)
|
168
|
+
nokogiri (1.7.0.1)
|
169
|
+
mini_portile2 (~> 2.1.0)
|
170
|
+
oauth2 (1.3.0)
|
171
|
+
faraday (>= 0.8, < 0.11)
|
172
|
+
jwt (~> 1.0)
|
173
|
+
multi_json (~> 1.3)
|
174
|
+
multi_xml (~> 0.5)
|
175
|
+
rack (>= 1.2, < 3)
|
176
|
+
omniauth (1.2.2)
|
177
|
+
hashie (>= 1.2, < 4)
|
178
|
+
rack (~> 1.0)
|
179
|
+
omniauth-google-oauth2 (0.2.10)
|
180
|
+
addressable (~> 2.3)
|
181
|
+
jwt (~> 1.0)
|
182
|
+
multi_json (~> 1.3)
|
183
|
+
omniauth (>= 1.1.1)
|
184
|
+
omniauth-oauth2 (~> 1.3.1)
|
185
|
+
omniauth-oauth2 (1.3.1)
|
186
|
+
oauth2 (~> 1.0)
|
187
|
+
omniauth (~> 1.2)
|
188
|
+
omniauth-orcid (1.0.38)
|
189
|
+
omniauth-oauth2 (~> 1.3.1)
|
190
|
+
omniauth-shibboleth (1.2.1)
|
191
|
+
omniauth (>= 1.0.0)
|
192
|
+
parser (2.3.3.1)
|
193
|
+
ast (~> 2.2)
|
194
|
+
powerpack (0.1.1)
|
195
|
+
public_suffix (2.0.5)
|
196
|
+
rack (1.6.5)
|
197
|
+
rack-test (0.6.3)
|
198
|
+
rack (>= 1.0)
|
199
|
+
rails (4.2.7.1)
|
200
|
+
actionmailer (= 4.2.7.1)
|
201
|
+
actionpack (= 4.2.7.1)
|
202
|
+
actionview (= 4.2.7.1)
|
203
|
+
activejob (= 4.2.7.1)
|
204
|
+
activemodel (= 4.2.7.1)
|
205
|
+
activerecord (= 4.2.7.1)
|
206
|
+
activesupport (= 4.2.7.1)
|
207
|
+
bundler (>= 1.3.0, < 2.0)
|
208
|
+
railties (= 4.2.7.1)
|
209
|
+
sprockets-rails
|
210
|
+
rails-deprecated_sanitizer (1.0.3)
|
211
|
+
activesupport (>= 4.2.0.alpha)
|
212
|
+
rails-dom-testing (1.0.8)
|
213
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
214
|
+
nokogiri (~> 1.6)
|
215
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
216
|
+
rails-html-sanitizer (1.0.3)
|
217
|
+
loofah (~> 2.0)
|
218
|
+
railties (4.2.7.1)
|
219
|
+
actionpack (= 4.2.7.1)
|
220
|
+
activesupport (= 4.2.7.1)
|
221
|
+
rake (>= 0.8.7)
|
222
|
+
thor (>= 0.18.1, < 2.0)
|
223
|
+
rainbow (2.2.1)
|
224
|
+
rake (10.5.0)
|
225
|
+
redcarpet (3.4.0)
|
226
|
+
responders (2.3.0)
|
227
|
+
railties (>= 4.2.0, < 5.1)
|
228
|
+
rest-client (2.0.0)
|
229
|
+
http-cookie (>= 1.0.2, < 2.0)
|
230
|
+
mime-types (>= 1.16, < 4.0)
|
231
|
+
netrc (~> 0.8)
|
232
|
+
rspec (3.5.0)
|
233
|
+
rspec-core (~> 3.5.0)
|
234
|
+
rspec-expectations (~> 3.5.0)
|
235
|
+
rspec-mocks (~> 3.5.0)
|
236
|
+
rspec-core (3.5.4)
|
237
|
+
rspec-support (~> 3.5.0)
|
238
|
+
rspec-expectations (3.5.0)
|
239
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
240
|
+
rspec-support (~> 3.5.0)
|
241
|
+
rspec-mocks (3.5.0)
|
242
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
243
|
+
rspec-support (~> 3.5.0)
|
244
|
+
rspec-support (3.5.0)
|
245
|
+
rubocop (0.47.1)
|
246
|
+
parser (>= 2.3.3.1, < 3.0)
|
247
|
+
powerpack (~> 0.1)
|
248
|
+
rainbow (>= 1.99.1, < 3.0)
|
249
|
+
ruby-progressbar (~> 1.7)
|
250
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
251
|
+
ruby-progressbar (1.8.1)
|
252
|
+
rubyzip (1.2.0)
|
253
|
+
safe_yaml (1.0.4)
|
254
|
+
sass (3.4.23)
|
255
|
+
simplecov (0.9.2)
|
256
|
+
docile (~> 1.1.0)
|
257
|
+
multi_json (~> 1.0)
|
258
|
+
simplecov-html (~> 0.9.0)
|
259
|
+
simplecov-console (0.2.0)
|
260
|
+
colorize
|
261
|
+
hirb
|
262
|
+
simplecov
|
263
|
+
simplecov-html (0.9.0)
|
264
|
+
sprockets (3.7.1)
|
265
|
+
concurrent-ruby (~> 1.0)
|
266
|
+
rack (> 1, < 3)
|
267
|
+
sprockets-rails (3.2.0)
|
268
|
+
actionpack (>= 4.0)
|
269
|
+
activesupport (>= 4.0)
|
270
|
+
sprockets (>= 3.0.0)
|
271
|
+
stash-sword (0.1.5)
|
272
|
+
rest-client (~> 2.0, = 2.0.0)
|
273
|
+
typesafe_enum (~> 0.1, >= 0.1.7)
|
274
|
+
xml-mapping_extensions (~> 0.4, >= 0.4.1)
|
275
|
+
stash-wrapper (0.1.11.1)
|
276
|
+
typesafe_enum (~> 0.1, >= 0.1.7)
|
277
|
+
xml-mapping_extensions (~> 0.4, >= 0.4.2)
|
278
|
+
stash_ezid_datacite (0.1.5)
|
279
|
+
ezid-client (~> 1.5)
|
280
|
+
thor (0.19.4)
|
281
|
+
thread_safe (0.3.5)
|
282
|
+
turbolinks (5.0.1)
|
283
|
+
turbolinks-source (~> 5)
|
284
|
+
turbolinks-source (5.0.0)
|
285
|
+
typesafe_enum (0.1.7)
|
286
|
+
tzinfo (1.2.2)
|
287
|
+
thread_safe (~> 0.1)
|
288
|
+
unf (0.1.4)
|
289
|
+
unf_ext
|
290
|
+
unf_ext (0.0.7.2)
|
291
|
+
unicode-display_width (1.1.3)
|
292
|
+
webmock (1.24.6)
|
293
|
+
addressable (>= 2.3.6)
|
294
|
+
crack (>= 0.3.2)
|
295
|
+
hashdiff
|
296
|
+
wicked_pdf (1.1.0)
|
297
|
+
wkhtmltopdf-binary (0.12.3.1)
|
298
|
+
xml-mapping (0.10.0)
|
299
|
+
xml-mapping_extensions (0.4.7)
|
300
|
+
mime-types (~> 2.5)
|
301
|
+
typesafe_enum (~> 0.1, >= 0.1.5)
|
302
|
+
xml-mapping (~> 0.10)
|
303
|
+
yard (0.9.8)
|
304
|
+
|
305
|
+
PLATFORMS
|
306
|
+
ruby
|
307
|
+
|
308
|
+
DEPENDENCIES
|
309
|
+
bundler (~> 1.7)
|
310
|
+
database_cleaner (~> 1.5)
|
311
|
+
diffy (~> 3.1)
|
312
|
+
equivalent-xml (~> 0.6.0)
|
313
|
+
mysql2 (~> 0.3)
|
314
|
+
rake (~> 10.4)
|
315
|
+
rspec (~> 3.2)
|
316
|
+
rubocop (~> 0.47)
|
317
|
+
simplecov (~> 0.9.2)
|
318
|
+
simplecov-console (~> 0.2.0)
|
319
|
+
stash-merritt!
|
320
|
+
stash_datacite!
|
321
|
+
stash_engine!
|
322
|
+
webmock (~> 1.24)
|
323
|
+
yard (~> 0.8)
|
324
|
+
|
325
|
+
BUNDLED WITH
|
326
|
+
1.13.7
|
data/LICENSE.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 The Regents of the University of California
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# Stash::Merritt
|
2
|
+
|
3
|
+
[](https://travis-ci.org/CDLUC3/stash-merritt)
|
4
|
+
[](https://codeclimate.com/github/CDLUC3/stash-merritt)
|
5
|
+
[](http://inch-ci.org/github/CDLUC3/stash-merritt)
|
6
|
+
|
7
|
+
Packaging and
|
8
|
+
[SWORD 2.0](http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html)
|
9
|
+
deposit module for submitting
|
10
|
+
[Stash](https://github.com/CDLUC3/stash_engine) datasets to
|
11
|
+
[Merritt](http://www.cdlib.org/uc3/merritt/).
|
12
|
+
|
13
|
+
## Submission process
|
14
|
+
|
15
|
+
1. mint a new DOI with EZID, if not already present
|
16
|
+
1. generate:
|
17
|
+
- Datacite XML, including DOI
|
18
|
+
- Stash wrapper XML
|
19
|
+
- Dublin Core metadata XML
|
20
|
+
- DataONE manifest
|
21
|
+
- `mrt-delete.txt`, if needed
|
22
|
+
1. create ZIP archive including:
|
23
|
+
- Datacite XML
|
24
|
+
- Stash wrapper XML
|
25
|
+
- DublinCore XML
|
26
|
+
- DataONE manifest
|
27
|
+
- `mrt-delete.txt`, if present
|
28
|
+
- all user-uploaded files
|
29
|
+
1. submit to SWORD
|
30
|
+
1. determine landing page URL based on DOI
|
31
|
+
1. submit Datacite XML and landing page URL to EZID
|
32
|
+
1. clean up temporary files
|
33
|
+
|
34
|
+
## Development
|
35
|
+
|
36
|
+
### Test database creation
|
37
|
+
|
38
|
+
For compatibility with Travis, you need
|
39
|
+
|
40
|
+
1. a local MySQL installation
|
41
|
+
2. a `travis@localhost` user with no password
|
42
|
+
3. a `stash_merritt` database
|
43
|
+
4. `travis` to have all privileges on that database
|
44
|
+
|
45
|
+
This should look something like:
|
46
|
+
|
47
|
+
```
|
48
|
+
$ mysql -u root
|
49
|
+
mysql> create user 'travis'@'localhost';
|
50
|
+
mysql> create database 'stash_merritt' character set UTF8mb4 collate utf8mb4_bin;
|
51
|
+
mysql> use 'stash_merritt';
|
52
|
+
mysql> grant all on 'stash_merritt'.* to 'travis'@'localhost';
|
53
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# ------------------------------------------------------------
|
2
|
+
# RSpec
|
3
|
+
|
4
|
+
require 'rspec/core'
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
|
7
|
+
namespace :spec do
|
8
|
+
desc 'Run all unit tests'
|
9
|
+
RSpec::Core::RakeTask.new(:unit) do |task|
|
10
|
+
task.rspec_opts = %w(--color --format documentation --order default)
|
11
|
+
task.pattern = 'unit/**/*_spec.rb'
|
12
|
+
end
|
13
|
+
|
14
|
+
desc 'Run all database tests'
|
15
|
+
RSpec::Core::RakeTask.new(:db) do |task|
|
16
|
+
task.rspec_opts = %w(--color --format documentation --order default)
|
17
|
+
task.pattern = 'db/**/*_spec.rb'
|
18
|
+
end
|
19
|
+
|
20
|
+
desc 'Run unit and database tests as single suite (for coverage)'
|
21
|
+
RSpec::Core::RakeTask.new(:unified) do |task|
|
22
|
+
task.rspec_opts = %w(--color --format documentation --order default)
|
23
|
+
task.pattern = '{db,unit}/**/*_spec.rb'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
desc 'Run all tests'
|
28
|
+
task spec: %w(spec:unit spec:db)
|
29
|
+
|
30
|
+
# ------------------------------------------------------------
|
31
|
+
# Coverage
|
32
|
+
|
33
|
+
desc 'Run all unit tests with coverage'
|
34
|
+
task :coverage do
|
35
|
+
ENV['COVERAGE'] = 'true'
|
36
|
+
Rake::Task['spec:unified'].execute
|
37
|
+
end
|
38
|
+
|
39
|
+
# ------------------------------------------------------------
|
40
|
+
# RuboCop
|
41
|
+
|
42
|
+
require 'rubocop/rake_task'
|
43
|
+
RuboCop::RakeTask.new
|
44
|
+
|
45
|
+
# ------------------------------------------------------------
|
46
|
+
# Defaults
|
47
|
+
|
48
|
+
desc 'Run unit tests, check test coverage, run acceptance tests, check code style'
|
49
|
+
task default: [:coverage, :rubocop]
|