etda_utilities 0.21.2 → 0.22.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49318d5e71e0d59cc273dd5680c8d0d4a2d211ff88ca26607a611f438db1c7f9
4
- data.tar.gz: fde28d6e663111a68b1b311b56ad73f2bec2d2a061dc4387da739bc0c85a77d7
3
+ metadata.gz: 4245f278114667d1184a0f3d1951b9d00586b074dfaa6856ad22999d753ee661
4
+ data.tar.gz: 0a3b2abcfefac2766023076a8e7912564cbc3853a9b381525237f433c3879dfe
5
5
  SHA512:
6
- metadata.gz: 2bb14bcdebe245fc2143fddf6dad1ac37c0fcce4386f3a7c7db751861c003b5a68941b29080cc92b723585a7ef17fdf2da981d7a2a385248c1a7062131986615
7
- data.tar.gz: 6b509d848b0e69fd68b29260308edd7769e835660804fdcfb447a586b3fbfeeae74caedc1bf221f18d5f409553bf8a0a1d9252b0f5a143f1b4dbf49ba5afeff5
6
+ metadata.gz: 57d29ea0f9f19e76ff974d28481c37d3c3a40b0a142615169c62da88d26c8a99551daebfc3dc7964174d305e1af1af9524c517409f017fcfeee659b62626f1a3
7
+ data.tar.gz: a66db6cfe92e09e224e7d0807e5e14b1333222b4e823b646106e9a56bcb51035b3d52d26ce64ea77552e89d16bb4ec1638f1b7d3bd8a00982d1091d358bb566d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- etda_utilities (0.21.2)
4
+ etda_utilities (0.22.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -24,7 +24,7 @@ honors:
24
24
  access_level:
25
25
  open_access: Open Access
26
26
  open_access_attr:
27
- description_html: Allows for open access to the body of the thesis. Note:"Withheld" status must be arranged by contacting the Honors College Records Department.
27
+ description_html: Your electronic thesis is available to anyone who wishes to access it on the web. Open access distribution makes the work more widely available. This is the default.
28
28
  scope: released_for_publication
29
29
  restricted_to_institution: 'Restricted (Penn State Only)'
30
30
  restricted_to_institution_attr:
@@ -39,20 +39,23 @@ module EtdaUtilities
39
39
  "#{explore_base_path}#{RESTRICTED_LIBERAL_ARTS_DIR}/"
40
40
  end
41
41
 
42
- def detailed_file_path(file_id)
42
+ # If remediated is true, the path will include the "remediated" subdirectory
43
+ # This will differentiate remediated files from original files while
44
+ # maintaining a similar directory structure to final_submission_files.
45
+ def detailed_file_path(file_id, remediated: false)
43
46
  str1 = format("%02d", ((file_id.to_i || 0) % 100))
44
47
  str2 = file_id.to_s
45
- "#{str1}/#{str2}/"
48
+ remediated ? "remediated/#{str1}/#{str2}/" : "#{str1}/#{str2}/"
46
49
  end
47
50
 
48
- def explore_download_file_path(file_id, access_level, filename)
51
+ def explore_download_file_path(file_id, access_level, filename, remediated: false)
49
52
  return nil if file_id.nil? || access_level.empty?
50
53
 
51
54
  return nil if access_level == 'restricted'
52
55
 
53
- return explore_open + detailed_file_path(file_id) + filename if access_level == 'open_access'
56
+ return explore_open + detailed_file_path(file_id, remediated: remediated) + filename if access_level == 'open_access'
54
57
 
55
- return explore_psu_only + detailed_file_path(file_id) + filename if ['restricted_to_institution', 'restricted_liberal_arts'].include?(access_level)
58
+ return explore_psu_only + detailed_file_path(file_id, remediated: remediated) + filename if ['restricted_to_institution', 'restricted_liberal_arts'].include?(access_level)
56
59
 
57
60
  nil
58
61
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EtdaUtilities
4
- VERSION = "0.21.2"
4
+ VERSION = "0.22.1"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etda_utilities
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.2
4
+ version: 0.22.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ajk5603@psu.edu
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-01-07 00:00:00.000000000 Z
10
+ date: 2026-08-18 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler