etda_utilities 0.18.0 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby-ci.yml +2 -4
- data/.rubocop.yml +4 -0
- data/.ruby-version +1 -1
- data/Gemfile +0 -2
- data/Gemfile.lock +24 -23
- data/README.md +1 -1
- data/etda_utilities.gemspec +2 -0
- data/lib/etda_utilities/access_level.rb +1 -0
- data/lib/etda_utilities/access_levels_for_partners.yml +3 -3
- data/lib/etda_utilities/etda_file_paths.rb +6 -6
- data/lib/etda_utilities/hosts.rb +4 -12
- data/lib/etda_utilities/version.rb +1 -1
- metadata +8 -9
- data/.travis.yml +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1e6f1fc1ee53eb759df0bac3b41fd77994eea99ead5d98afb6130bbf5466892
|
4
|
+
data.tar.gz: 1541e43f5d8b3a66b0517029e4c879018f33800e654ea37244afc0d22a1b4e3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24ae704029023cd7c1a60c63be857897164e457347bdf49f52a9b6128ed689d0904c7465a1e63e27d80d51fcd7edf2dd4aa7b310f1e59febef8b04e2d622898c
|
7
|
+
data.tar.gz: 3184bec04b2da4f405c7807de78d4342299a563983163f7091ed61f26848099d4a55da7cf05460ac0d6f248de5e7f7208e91c7c9a1abf723c36f4a10595b73b8
|
@@ -20,7 +20,7 @@ jobs:
|
|
20
20
|
uses: actions/checkout@v2
|
21
21
|
# Add or replace dependency steps here
|
22
22
|
- name: Install Ruby and gems
|
23
|
-
uses: ruby/setup-ruby@
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
24
|
with:
|
25
25
|
bundler-cache: true
|
26
26
|
# Add or replace test runners here
|
@@ -33,11 +33,9 @@ jobs:
|
|
33
33
|
- name: Checkout code
|
34
34
|
uses: actions/checkout@v2
|
35
35
|
- name: Install Ruby and gems
|
36
|
-
uses: ruby/setup-ruby@
|
36
|
+
uses: ruby/setup-ruby@v1
|
37
37
|
with:
|
38
38
|
bundler-cache: true
|
39
39
|
# Add or replace any other lints here
|
40
|
-
- name: Security audit dependencies
|
41
|
-
run: bundle exec bundle-audit
|
42
40
|
- name: Lint Ruby files
|
43
41
|
run: bundle exec rubocop
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.3
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,25 +1,21 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
etda_utilities (0.
|
4
|
+
etda_utilities (0.20.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
ast (2.4.
|
10
|
-
bundle-audit (0.1.0)
|
11
|
-
bundler-audit
|
12
|
-
bundler-audit (0.6.1)
|
13
|
-
bundler (>= 1.2.0, < 3)
|
14
|
-
thor (~> 0.18)
|
9
|
+
ast (2.4.2)
|
15
10
|
byebug (11.1.1)
|
16
11
|
diff-lcs (1.3)
|
17
|
-
|
18
|
-
parallel (1.
|
19
|
-
parser (2.
|
20
|
-
ast (~> 2.4.
|
21
|
-
rainbow (3.
|
12
|
+
json (2.6.3)
|
13
|
+
parallel (1.22.1)
|
14
|
+
parser (3.2.1.1)
|
15
|
+
ast (~> 2.4.1)
|
16
|
+
rainbow (3.1.1)
|
22
17
|
rake (13.0.1)
|
18
|
+
regexp_parser (2.7.0)
|
23
19
|
rexml (3.2.5)
|
24
20
|
rspec (3.7.0)
|
25
21
|
rspec-core (~> 3.7.0)
|
@@ -34,25 +30,30 @@ GEM
|
|
34
30
|
diff-lcs (>= 1.2.0, < 2.0)
|
35
31
|
rspec-support (~> 3.7.0)
|
36
32
|
rspec-support (3.7.1)
|
37
|
-
rubocop (
|
38
|
-
|
33
|
+
rubocop (1.48.1)
|
34
|
+
json (~> 2.3)
|
39
35
|
parallel (~> 1.10)
|
40
|
-
parser (>= 2.
|
36
|
+
parser (>= 3.2.0.0)
|
41
37
|
rainbow (>= 2.2.2, < 4.0)
|
42
|
-
|
38
|
+
regexp_parser (>= 1.8, < 3.0)
|
39
|
+
rexml (>= 3.2.5, < 4.0)
|
40
|
+
rubocop-ast (>= 1.26.0, < 2.0)
|
43
41
|
ruby-progressbar (~> 1.7)
|
44
|
-
unicode-display_width (>=
|
45
|
-
rubocop-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
42
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
43
|
+
rubocop-ast (1.27.0)
|
44
|
+
parser (>= 3.2.1.0)
|
45
|
+
rubocop-capybara (2.17.1)
|
46
|
+
rubocop (~> 1.41)
|
47
|
+
rubocop-rspec (2.19.0)
|
48
|
+
rubocop (~> 1.33)
|
49
|
+
rubocop-capybara (~> 2.17)
|
50
|
+
ruby-progressbar (1.13.0)
|
51
|
+
unicode-display_width (2.4.2)
|
50
52
|
|
51
53
|
PLATFORMS
|
52
54
|
ruby
|
53
55
|
|
54
56
|
DEPENDENCIES
|
55
|
-
bundle-audit
|
56
57
|
bundler (~> 2.3.a)
|
57
58
|
byebug
|
58
59
|
etda_utilities!
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# EtdaUtilities
|
2
2
|
|
3
|
-
|
3
|
+
![CI](https://github.com/psu-libraries/etda_utilities/actions/workflows/ruby-ci.yml/badge.svg)
|
4
4
|
|
5
5
|
Common methods used by etda_workflow and etda_explore
|
6
6
|
|
data/etda_utilities.gemspec
CHANGED
@@ -22,6 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib", "lib/etda_utilities"]
|
24
24
|
|
25
|
+
spec.required_ruby_version = '~> 3.1'
|
26
|
+
|
25
27
|
spec.add_development_dependency "bundler", "~> 2.3.a"
|
26
28
|
spec.add_development_dependency "rake", "~> 13.0"
|
27
29
|
spec.add_development_dependency "rspec", "~> 3.0"
|
@@ -2,15 +2,15 @@ graduate:
|
|
2
2
|
access_level:
|
3
3
|
open_access: Open Access
|
4
4
|
open_access_attr:
|
5
|
-
description_html: Allows free worldwide access to the entire work beginning immediately after degree conferral. Appropriate for the majority of dissertation submissions in immediately fulfilling the requirement for making the work available to the public.
|
5
|
+
description_html: 'Allows free worldwide access to the entire work beginning immediately after degree conferral. Appropriate for the majority of dissertation submissions in immediately fulfilling the requirement for making the work available to the public. After the conferral of the degree, abstracts for all doctoral dissertations and master's theses, whether Open Access, Restricted (Penn State) or Restricted, become accessible worldwide.'
|
6
6
|
scope: released_for_publication
|
7
7
|
restricted_to_institution: 'Restricted (Penn State Only)'
|
8
8
|
restricted_to_institution_attr:
|
9
|
-
description_html: 'Access restricted to individuals having a valid Penn State Access Account, for a period of two years. Allows restricted access of the entire work beginning immediately after degree conferral. At the end of the two-year period, the status will automatically change to Open Access. <i>Intended for use by authors in cases where prior public release of the work may compromise its acceptance for publication.</i>'
|
9
|
+
description_html: 'Access restricted to individuals having a valid Penn State Access Account, for a period of two years. Allows restricted access of the entire work beginning immediately after degree conferral. At the end of the two-year period, the status will automatically change to Open Access. <i>Intended for use by authors in cases where prior public release of the work may compromise its acceptance for publication.</i> After the conferral of the degree, abstracts for all doctoral dissertations and master's theses, whether Open Access, Restricted (Penn State) or Restricted, become accessible worldwide.'
|
10
10
|
scope: final_restricted_institution
|
11
11
|
restricted: 'Restricted'
|
12
12
|
restricted_attr:
|
13
|
-
description_html: 'Restricts the entire work for the purpose of filing a patent. At the end of the two-year period, the status will automatically change to Open Access. Selection of this option requires that an invention disclosure (ID) be filed with the Office of Technology Management (OTM) prior to submission of the final thesis/dissertation, and confirmed by OTM.'
|
13
|
+
description_html: 'Restricts the entire work for the purpose of filing a patent. At the end of the two-year period, the status will automatically change to Open Access. Selection of this option requires that an invention disclosure (ID) be filed with the Office of Technology Management (OTM) prior to submission of the final thesis/dissertation, and confirmed by OTM. After the conferral of the degree, abstracts for all doctoral dissertations and master's theses, whether Open Access, Restricted (Penn State) or Restricted, become accessible worldwide.'
|
14
14
|
scope: final_withheld
|
15
15
|
no_access: ''
|
16
16
|
no_access_attr:
|
@@ -15,29 +15,29 @@ module EtdaUtilities
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def workflow_upload_final_files_path
|
18
|
-
workflow_base_path
|
18
|
+
"#{workflow_base_path}final_submission_files/"
|
19
19
|
end
|
20
20
|
|
21
21
|
def workflow_upload_format_review_path
|
22
|
-
workflow_base_path
|
22
|
+
"#{workflow_base_path}format_review_files/"
|
23
23
|
end
|
24
24
|
|
25
25
|
def workflow_restricted
|
26
|
-
workflow_base_path
|
26
|
+
"#{workflow_base_path}#{RESTRICTED_DIR}/"
|
27
27
|
end
|
28
28
|
|
29
29
|
def explore_open
|
30
|
-
explore_base_path
|
30
|
+
"#{explore_base_path}#{OPEN_DIR}/"
|
31
31
|
end
|
32
32
|
|
33
33
|
def explore_psu_only
|
34
|
-
explore_base_path
|
34
|
+
"#{explore_base_path}#{RESTRICTED_INSTITUTION_DIR}/"
|
35
35
|
end
|
36
36
|
|
37
37
|
def detailed_file_path(file_id)
|
38
38
|
str1 = format("%02d", ((file_id.to_i || 0) % 100))
|
39
39
|
str2 = file_id.to_s
|
40
|
-
str1
|
40
|
+
"#{str1}/#{str2}/"
|
41
41
|
end
|
42
42
|
|
43
43
|
def explore_download_file_path(file_id, access_level, filename)
|
data/lib/etda_utilities/hosts.rb
CHANGED
@@ -9,7 +9,7 @@ module EtdaUtilities
|
|
9
9
|
else
|
10
10
|
raise ArgumentError, "_partner and _host are required arguments" if partner.nil? || host.nil?
|
11
11
|
|
12
|
-
"https
|
12
|
+
"https://#{new.workflow_submit_host(partner, host)}"
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -19,7 +19,7 @@ module EtdaUtilities
|
|
19
19
|
else
|
20
20
|
raise ArgumentError, "_partner and _host are required arguments" if partner.nil? || host.nil?
|
21
21
|
|
22
|
-
"https
|
22
|
+
"https://#{new.explore_host(partner, host)}"
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -56,16 +56,8 @@ module EtdaUtilities
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def partner_host(partner)
|
59
|
-
|
60
|
-
|
61
|
-
"etda"
|
62
|
-
when 'honors'
|
63
|
-
"honors"
|
64
|
-
when 'milsch'
|
65
|
-
"millennium-scholars"
|
66
|
-
when 'sset'
|
67
|
-
"sset"
|
68
|
-
end
|
59
|
+
host_hash = { 'graduate' => "etda", 'honors' => "honors", 'milsch' => "millennium-scholars", 'sset' => "sset" }
|
60
|
+
host_hash[partner]
|
69
61
|
end
|
70
62
|
end
|
71
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: etda_utilities
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ajk5603@psu.edu
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -65,7 +65,6 @@ files:
|
|
65
65
|
- ".rubocop.yml"
|
66
66
|
- ".rubocop_todo.yml"
|
67
67
|
- ".ruby-version"
|
68
|
-
- ".travis.yml"
|
69
68
|
- CODEOWNERS
|
70
69
|
- CODE_OF_CONDUCT.md
|
71
70
|
- Gemfile
|
@@ -88,24 +87,24 @@ homepage: https://github.com/psu-stewardship/etda_utilities
|
|
88
87
|
licenses:
|
89
88
|
- MIT
|
90
89
|
metadata: {}
|
91
|
-
post_install_message:
|
90
|
+
post_install_message:
|
92
91
|
rdoc_options: []
|
93
92
|
require_paths:
|
94
93
|
- lib
|
95
94
|
- lib/etda_utilities
|
96
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
97
96
|
requirements:
|
98
|
-
- - "
|
97
|
+
- - "~>"
|
99
98
|
- !ruby/object:Gem::Version
|
100
|
-
version: '
|
99
|
+
version: '3.1'
|
101
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
101
|
requirements:
|
103
102
|
- - ">="
|
104
103
|
- !ruby/object:Gem::Version
|
105
104
|
version: '0'
|
106
105
|
requirements: []
|
107
|
-
rubygems_version: 3.
|
108
|
-
signing_key:
|
106
|
+
rubygems_version: 3.3.26
|
107
|
+
signing_key:
|
109
108
|
specification_version: 4
|
110
109
|
summary: A gem containing common fuctions for the ETDA applications.
|
111
110
|
test_files: []
|
data/.travis.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
cache: bundler
|
3
|
-
sudo: required
|
4
|
-
#rvm:
|
5
|
-
#- 2.6.0
|
6
|
-
jdk:
|
7
|
-
- oraclejdk12
|
8
|
-
env:
|
9
|
-
global:
|
10
|
-
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
11
|
-
- JS=true
|
12
|
-
before_install:
|
13
|
-
- "gem --version"
|
14
|
-
- "gem update --system"
|
15
|
-
- "gem --version"
|
16
|
-
- 'gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"'
|
17
|
-
script:
|
18
|
-
- gem install bundler
|
19
|
-
- gem install rspec
|
20
|
-
- bundle exec rubocop
|
21
|
-
- bundle exec rspec
|
22
|
-
notifications:
|
23
|
-
email:
|
24
|
-
recipients:
|
25
|
-
secure: "l84DQVl48Z4/O/H/zAHFL6GmnBe5BHGQZj2rBv2/X7j1QfOOQEb3h0ZVk5+RdlGLvNjgc8va0sI6JJWa8QuQa68/T6RfcBoZHb90pKOIRoZOVjiwwUYC+mdRMv5s0vemJ2VxreAoJl5JmJ6TLvy5w52G7mmMOm+1VuYPv3MuvZ3nbFwm15qz6LxiRhyUJhaXcZhi1emZYsRd+qazQ9HlkKWMoCz68gi8zWVULnRbZSIHIEj4GV5bn9L67u+699LgIjKrT1Xeh0wnb/wtPIrgwheSksgqYcaRRkBmkaajjss2Zeg5m5hUteTTsx6mSAk3QSTjqVQ0t/Kh5En68W4B/VnA8qiuLolzHqaTqid8sa4rvh/JVAU3zsOvMun5f3OZzdgf7VTXM/E3A+L25KrVTk9UcQnPHcvJvdAIlr0ZZTX2G+3Vs/XSEPQk4KRfLFSqLUm4uYvh9INki7SlB7lllYudSMQzV/5Ghg2K6UaxP9PDRRxOCVPWeYuR3H3tesdBciv+6+d3LxDdAWVbxZwphlGtS5N7NlIl2du888wQ5COaOwSAlXIQWdRvvVfvvQaTTY245jdsiToNX+KSf27bT+szpHyzOaIsT1kO4DAIdSlSxdSK600GsM5RY80iIF92mFc9EjK24WqFZ0PpaSRZ3L4aUvl+HbdS/K4+q1uTCTM="
|
26
|
-
on_success: change
|
27
|
-
on_failure: always
|
28
|
-
irc:
|
29
|
-
channels:
|
30
|
-
template:
|
31
|
-
|
32
|
-
|
33
|
-
|