etda_utilities 0.17.0 → 0.19.0
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 +4 -4
- data/.github/workflows/ruby-ci.yml +2 -4
- data/.rubocop.yml +5 -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/etda_file_paths.rb +6 -6
- data/lib/etda_utilities/hosts.rb +24 -10
- data/lib/etda_utilities/partner.rb +4 -0
- data/lib/etda_utilities/partner.yml +12 -2
- 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: 112648ea28d76db4b2a2fae233aa429351da5d6ef818f00a47e1475e6902a958
|
|
4
|
+
data.tar.gz: 88ace546f783b11104c28c00a6caf93cc5b07b25f88cb651fc0917703a4679fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 59d9d7bcd9a7b2d0ef734ba937f56045f5290430dd15d65ee2d433212798e2e96a5c43e86920384e38ebfef07c30c86a7a3da26f1eb1a645beff16feff392c1f
|
|
7
|
+
data.tar.gz: dc1c37aef7c8de64aa46107f3a88a943fe1f7429d5107d8f633e2ffe1efedd692644472bd99a62870e1c575a25afae9633072cf832e1fff893d1b163a9c47367
|
|
@@ -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
|
@@ -12,6 +12,7 @@ Metrics/BlockLength:
|
|
|
12
12
|
Exclude:
|
|
13
13
|
- spec/lib/etda_utilities_etda_file_paths_spec.rb
|
|
14
14
|
- spec/lib/etda_utilities_partner_spec.rb
|
|
15
|
+
- spec/lib/etda_utilities_hosts_spec.rb
|
|
15
16
|
|
|
16
17
|
Metrics/MethodLength:
|
|
17
18
|
Enabled: false
|
|
@@ -159,3 +160,7 @@ Style/BlockDelimiters:
|
|
|
159
160
|
|
|
160
161
|
Naming/FileName:
|
|
161
162
|
Exclude:
|
|
163
|
+
|
|
164
|
+
Style/OptionalBooleanParameter:
|
|
165
|
+
Exclude:
|
|
166
|
+
- 'lib/etda_utilities/hosts.rb'
|
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.19.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
|
+

|
|
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"
|
|
@@ -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
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
module EtdaUtilities
|
|
4
4
|
class Hosts
|
|
5
|
+
class << self
|
|
6
|
+
def workflow_url(partner = nil, host = nil)
|
|
7
|
+
if ENV['WORKFLOW_HOST']
|
|
8
|
+
"https://#{ENV['WORKFLOW_HOST']}"
|
|
9
|
+
else
|
|
10
|
+
raise ArgumentError, "_partner and _host are required arguments" if partner.nil? || host.nil?
|
|
11
|
+
|
|
12
|
+
"https://#{new.workflow_submit_host(partner, host)}"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def explore_url(partner = nil, host = nil)
|
|
17
|
+
if ENV['EXPLORE_HOST']
|
|
18
|
+
"https://#{ENV['EXPLORE_HOST']}"
|
|
19
|
+
else
|
|
20
|
+
raise ArgumentError, "_partner and _host are required arguments" if partner.nil? || host.nil?
|
|
21
|
+
|
|
22
|
+
"https://#{new.explore_host(partner, host)}"
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
5
27
|
def workflow_submit_host(partner, environment = 'prod')
|
|
6
28
|
host_builder(partner, environment, true)
|
|
7
29
|
end
|
|
@@ -34,16 +56,8 @@ module EtdaUtilities
|
|
|
34
56
|
end
|
|
35
57
|
|
|
36
58
|
def partner_host(partner)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"etda"
|
|
40
|
-
when 'honors'
|
|
41
|
-
"honors"
|
|
42
|
-
when 'milsch'
|
|
43
|
-
"millennium-scholars"
|
|
44
|
-
when 'sset'
|
|
45
|
-
"sset"
|
|
46
|
-
end
|
|
59
|
+
host_hash = { 'graduate' => "etda", 'honors' => "honors", 'milsch' => "millennium-scholars", 'sset' => "sset" }
|
|
60
|
+
host_hash[partner]
|
|
47
61
|
end
|
|
48
62
|
end
|
|
49
63
|
end
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
graduate:
|
|
2
2
|
slug: eTD
|
|
3
3
|
name: Graduate School
|
|
4
|
+
header_title: Electronic Theses and Dissertations for Graduate School
|
|
4
5
|
email:
|
|
5
6
|
address: gradthesis@psu.edu
|
|
6
7
|
list: 'ul-etda-graduate-admin@pennstateoffice365.onmicrosoft.com'
|
|
@@ -14,6 +15,7 @@ graduate:
|
|
|
14
15
|
honors:
|
|
15
16
|
slug: eHT
|
|
16
17
|
name: Schreyer Honors College
|
|
18
|
+
header_title: Electronic Theses for Schreyer Honors College
|
|
17
19
|
email:
|
|
18
20
|
address: SHCAcademics@psu.edu
|
|
19
21
|
list: 'ul-etda-honors-admin@pennstateoffice365.onmicrosoft.com'
|
|
@@ -27,11 +29,12 @@ honors:
|
|
|
27
29
|
milsch:
|
|
28
30
|
slug: MSPT
|
|
29
31
|
name: Millennium Scholars Program
|
|
32
|
+
header_title: Electronic Theses for Millennium Scholars Program
|
|
30
33
|
email:
|
|
31
34
|
address: millennium@psu.edu
|
|
32
35
|
list: 'ul-etda-milsch-admin@pennstateoffice365.onmicrosoft.com'
|
|
33
36
|
program:
|
|
34
|
-
label: Millennium Scholars Program
|
|
37
|
+
label: Millennium Scholars Program
|
|
35
38
|
committee:
|
|
36
39
|
label: Thesis Supervisor
|
|
37
40
|
list:
|
|
@@ -40,6 +43,13 @@ milsch:
|
|
|
40
43
|
sset:
|
|
41
44
|
slug: SSETT
|
|
42
45
|
name: School of Science, Engineering, and Technology
|
|
46
|
+
header_title: Final Papers for the School of Science, Engineering, and Technology
|
|
43
47
|
email:
|
|
44
48
|
address: sset@psu.edu
|
|
45
|
-
list: 'ul-etda-sset-admin@pennstateoffice365.onmicrosoft.com'
|
|
49
|
+
list: 'ul-etda-sset-admin@pennstateoffice365.onmicrosoft.com'
|
|
50
|
+
program:
|
|
51
|
+
label: Program
|
|
52
|
+
committee:
|
|
53
|
+
label: Committee Member
|
|
54
|
+
list:
|
|
55
|
+
label: Committee Members
|
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.19.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: 2023-03-23 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
|
-
|