cul-preservation_utils 0.1.6 → 0.1.8
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/README.md +24 -10
- data/lib/cul/preservation_utils/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7867eea089a84c978c3f9c7300f0d60b30e6a1a194fdfd488fa2f39589e23c5
|
4
|
+
data.tar.gz: dd1f09792a8c912af66364579412ee53b04223c6298b677c99528678fbc411a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6bdde9b51bd41c0636aa096fdb3ae3f0d8607eae43c104ab2db6216172f8d611e49d7e0b2f2ebf56dcb497ac304d645bab35cef697a7a2f3477bae7423684e4
|
7
|
+
data.tar.gz: 9d6c223314b939de05f1354421ee8eec1f765aec9551691e565ccdb12697814aee70b12eaa8d27e6f919601d8a1a43ab230de2a60017dc9b1ef75c00f500d399
|
data/README.md
CHANGED
@@ -1,28 +1,42 @@
|
|
1
1
|
# Cul::PreservationUtils
|
2
2
|
|
3
|
-
|
3
|
+
A collection of modules with Utility Methods related to working with Preservation objects.
|
4
4
|
|
5
|
-
|
5
|
+
Incudes:
|
6
|
+
- **FilePath**: a module for standardizing filepaths for objects used in our Preservation services.
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
8
|
+
(More modules will be added in the future)
|
10
9
|
|
11
|
-
|
10
|
+
Preservation objects are put in cloud storage, either with Google Cloud or Amazon Web Services. Validation rules for object file paths were imlpemented based on the charactersets allowed in object names in Google Cloud and AWS.
|
12
11
|
|
12
|
+
## Installation
|
13
13
|
```bash
|
14
|
-
bundle add
|
14
|
+
bundle add cul/preservation_utils
|
15
15
|
```
|
16
16
|
|
17
17
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
18
18
|
|
19
19
|
```bash
|
20
|
-
gem install
|
20
|
+
gem install cul/preservation_utils
|
21
21
|
```
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
You can access the FilePath module via namespace constants:
|
26
|
+
```
|
27
|
+
require 'cul/preservaion_utils'
|
28
|
+
|
29
|
+
# Determine if a file path is valid or not (invalid means it contains unsupported characters)
|
30
|
+
|
31
|
+
test_file_path = 'top_dir/!a$b%c%/我能.我能'
|
32
|
+
Cul::PreservationUtils::FilePath.valid_file_path?(test_file_path)
|
33
|
+
#=> False
|
34
|
+
|
35
|
+
# Remediate a file path
|
36
|
+
|
37
|
+
remediated_file_path = Cul::PreservationUtils::FilePath.remediate(test_file_path)
|
38
|
+
puts remediated_file_path #=> 'top_dir/_a_b_c_/Wo_Neng_.Wo_Neng_'
|
39
|
+
```
|
26
40
|
|
27
41
|
## Development
|
28
42
|
|
@@ -32,4 +46,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
46
|
|
33
47
|
## Contributing
|
34
48
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/cul/cul-preservation_utils.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cul-preservation_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bradley Goldsmith
|
@@ -10,39 +10,39 @@ cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
|
-
name:
|
13
|
+
name: ostruct
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version:
|
19
|
-
- - ">="
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 2.8.6
|
18
|
+
version: 0.1.0
|
22
19
|
type: :runtime
|
23
20
|
prerelease: false
|
24
21
|
version_requirements: !ruby/object:Gem::Requirement
|
25
22
|
requirements:
|
26
23
|
- - "~>"
|
27
24
|
- !ruby/object:Gem::Version
|
28
|
-
version:
|
29
|
-
- - ">="
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
version: 2.8.6
|
25
|
+
version: 0.1.0
|
32
26
|
- !ruby/object:Gem::Dependency
|
33
|
-
name:
|
27
|
+
name: stringex
|
34
28
|
requirement: !ruby/object:Gem::Requirement
|
35
29
|
requirements:
|
36
30
|
- - "~>"
|
37
31
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
32
|
+
version: '2.8'
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 2.8.6
|
39
36
|
type: :runtime
|
40
37
|
prerelease: false
|
41
38
|
version_requirements: !ruby/object:Gem::Requirement
|
42
39
|
requirements:
|
43
40
|
- - "~>"
|
44
41
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
42
|
+
version: '2.8'
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.8.6
|
46
46
|
description: PreservationUtils provides the FilePath module for standardizing filepaths
|
47
47
|
for objects used in our Preservation services.
|
48
48
|
email:
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
|
-
rubygems_version: 3.6.
|
84
|
+
rubygems_version: 3.6.9
|
85
85
|
specification_version: 4
|
86
86
|
summary: Utilities related to Preservation workflows at Columbia University Library.
|
87
87
|
test_files: []
|