hydra-file_characterization 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5d7bfac9adb8dec899a9e598255637841aaeba51754c56ac52f4e6eda93f5d1
4
- data.tar.gz: f5cd50a069ada9dede312853101cdb463cbd722db331d418ae18cb7fe2641e6f
3
+ metadata.gz: 56c9450e6385d299449923153c0a07fd7ff7b40fc4f79c39c825ac0be4b7a1db
4
+ data.tar.gz: d6ba20b50f5e4709ecb41efce1765eed9a6fb8f1fd9e327db59c5852be8ebd53
5
5
  SHA512:
6
- metadata.gz: 9d478b249740cbf248f0ea4e053541d9169104920040bb2e563018bee9c0b58ac3419e07b2c937f4e4ae6015a6c4be11a712a9a6fd3a1825d7ba0d0528f16a30
7
- data.tar.gz: 97d13c1f85ca53511a707d5e5338fcbc72c6405bc85bd99b3beaacd34e4faad735a04362f90a948c03cb1700de9145487b81c96d9fc57488a32647f84378d834
6
+ metadata.gz: 4c7a22258f318ab543e96844675e8cd92cce87e451b5c03e1979e73c95d71ef397d9494981b90d5db7d38f1aa4ff1c01ca315ad774b5d5813cc300496cb1a44e
7
+ data.tar.gz: bf1472f33609315976ec758316b73cd6d37e78cdf0c822d20c23bae45709eeacf4440ba359a83a9ae35bd0ec6fffff088b9f4593d09817ac86e9cb63a4ecaf67
data/.circleci/config.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  version: 2.1
3
3
  orbs:
4
- samvera: samvera/circleci-orb@0
4
+ samvera: samvera/circleci-orb@1
5
5
  jobs:
6
6
  test:
7
7
  parameters:
@@ -9,7 +9,7 @@ jobs:
9
9
  type: string
10
10
  bundler_version:
11
11
  type: string
12
- default: 1.17.3
12
+ default: 2.3.11
13
13
  rails_version:
14
14
  type: string
15
15
  executor:
@@ -46,46 +46,116 @@ workflows:
46
46
  ci:
47
47
  jobs:
48
48
  - test:
49
- name: ruby2-7_rails6-0
50
- ruby_version: 2.7.0
51
- rails_version: 6.0.2
49
+ name: ruby3-2_rails7
50
+ ruby_version: 3.2.0
51
+ rails_version: 7.0.4.1
52
+ - test:
53
+ name: ruby3-1_rails7
54
+ ruby_version: 3.1.3
55
+ rails_version: 7.0.4.1
56
+ - test:
57
+ name: ruby3-0_rails7
58
+ ruby_version: 3.0.5
59
+ rails_version: 7.0.4.1
60
+ - test:
61
+ name: ruby3-2_rails6-1
62
+ ruby_version: 3.2.0
63
+ rails_version: 6.1.7.1
64
+ - test:
65
+ name: ruby3-1_rails6-1
66
+ ruby_version: 3.1.3
67
+ rails_version: 6.1.7.1
68
+ - test:
69
+ name: ruby3-0_rails6-1
70
+ ruby_version: 3.0.5
71
+ rails_version: 6.1.7.1
52
72
  - test:
53
- name: ruby2-6_rails6-0
54
- ruby_version: 2.6.5
55
- rails_version: 6.0.2
73
+ name: ruby3-2_rails6-0
74
+ ruby_version: 3.2.0
75
+ rails_version: 6.0.6.1
56
76
  - test:
57
- name: ruby2-5_rails6-0
58
- ruby_version: 2.5.7
59
- rails_version: 6.0.2
77
+ name: ruby3-1_rails6-0
78
+ ruby_version: 3.1.3
79
+ rails_version: 6.0.6.1
80
+ - test:
81
+ name: ruby3-0_rails6-0
82
+ ruby_version: 3.0.5
83
+ rails_version: 6.0.6.1
84
+ - test:
85
+ name: ruby2-7_rails7-0
86
+ ruby_version: 2.7.7
87
+ rails_version: 7.0.4.1
88
+ - test:
89
+ name: ruby2-7_rails6-1
90
+ ruby_version: 2.7.7
91
+ rails_version: 6.1.7.1
92
+ - test:
93
+ name: ruby2-7_rails6-0
94
+ ruby_version: 2.7.7
95
+ rails_version: 6.0.6.1
60
96
  - test:
61
97
  name: ruby2-7_rails5-2
62
- ruby_version: 2.7.0
63
- rails_version: 5.2.4
98
+ ruby_version: 2.7.7
99
+ rails_version: 5.2.8.1
100
+
101
+ nightly:
102
+ triggers:
103
+ - schedule:
104
+ cron: "0 0 * * *"
105
+ filters:
106
+ branches:
107
+ only:
108
+ - main
109
+ jobs:
110
+ - test:
111
+ name: ruby3-2_rails7
112
+ ruby_version: 3.2.0
113
+ rails_version: 7.0.4.1
114
+ - test:
115
+ name: ruby3-1_rails7
116
+ ruby_version: 3.1.3
117
+ rails_version: 7.0.4.1
118
+ - test:
119
+ name: ruby3-0_rails7
120
+ ruby_version: 3.0.5
121
+ rails_version: 7.0.4.1
64
122
  - test:
65
- name: ruby2-6_rails5-2
66
- ruby_version: 2.6.5
67
- rails_version: 5.2.4
123
+ name: ruby3-2_rails6-1
124
+ ruby_version: 3.2.0
125
+ rails_version: 6.1.7.1
68
126
  - test:
69
- name: ruby2-5_rails5-2
70
- ruby_version: 2.5.7
71
- rails_version: 5.2.4
127
+ name: ruby3-1_rails6-1
128
+ ruby_version: 3.1.3
129
+ rails_version: 6.1.7.1
72
130
  - test:
73
- name: ruby2-4_rails5-2
74
- ruby_version: 2.4.9
75
- rails_version: 5.2.4
131
+ name: ruby3-0_rails6-1
132
+ ruby_version: 3.0.5
133
+ rails_version: 6.1.7.1
76
134
  - test:
77
- name: ruby2-7_rails5-1
78
- ruby_version: 2.7.0
79
- rails_version: 5.1.7
135
+ name: ruby3-2_rails6-0
136
+ ruby_version: 3.2.0
137
+ rails_version: 6.0.6.1
80
138
  - test:
81
- name: ruby2-6_rails5-1
82
- ruby_version: 2.6.5
83
- rails_version: 5.1.7
139
+ name: ruby3-1_rails6-0
140
+ ruby_version: 3.1.3
141
+ rails_version: 6.0.6.1
84
142
  - test:
85
- name: ruby2-5_rails5-1
86
- ruby_version: 2.5.7
87
- rails_version: 5.1.7
143
+ name: ruby3-0_rails6-0
144
+ ruby_version: 3.0.5
145
+ rails_version: 6.0.6.1
88
146
  - test:
89
- name: ruby2-4_rails5-1
90
- ruby_version: 2.4.9
91
- rails_version: 5.1.7
147
+ name: ruby2-7_rails7-0
148
+ ruby_version: 2.7.7
149
+ rails_version: 7.0.4.1
150
+ - test:
151
+ name: ruby2-7_rails6-1
152
+ ruby_version: 2.7.7
153
+ rails_version: 6.1.7.1
154
+ - test:
155
+ name: ruby2-7_rails6-0
156
+ ruby_version: 2.7.7
157
+ rails_version: 6.0.6.1
158
+ - test:
159
+ name: ruby2-7_rails5-2
160
+ ruby_version: 2.7.7
161
+ rails_version: 5.2.8.1
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
18
  .idea/
19
+ fits.log
data/CONTRIBUTING.md CHANGED
@@ -22,6 +22,28 @@ https://wiki.duraspace.org/display/samvera/Samvera+Community+Intellectual+Proper
22
22
 
23
23
  You should also add yourself to the `CONTRIBUTORS.md` file in the root of the project.
24
24
 
25
+ ## Language
26
+
27
+ The language we use matters. Today, tomorrow, and for years to come
28
+ people will read the code we write. They will judge us for our
29
+ design, logic, and the words we use to describe the system.
30
+
31
+ Our words should be accessible. Favor descriptive words that give
32
+ meaning while avoiding reinforcing systemic inequities. For example,
33
+ in the Samvera community, we should favor using allowed\_list instead
34
+ of whitelist, denied\_list instead of blacklist, or source/copy
35
+ instead of master/slave.
36
+
37
+ We're going to get it wrong, but this is a call to keep working to
38
+ make it right. View our code and the words we choose as a chance to
39
+ have a conversation. A chance to grow an understanding of the systems
40
+ we develop as well as the systems in which we live.
41
+
42
+ See [“Blacklists” and “whitelists”: a salutary warning concerning the
43
+ prevalence of racist language in discussions of predatory
44
+ publishing](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6148600/) for
45
+ further details.
46
+
25
47
  ## Contribution Tasks
26
48
 
27
49
  * Reporting Issues
@@ -45,15 +67,22 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
45
67
 
46
68
  * Fork the repository on GitHub
47
69
  * Create a topic branch from where you want to base your work.
48
- * This is usually the master branch.
49
- * To quickly create a topic branch based on master; `git branch fix/master/my_contribution master`
50
- * Then checkout the new branch with `git checkout fix/master/my_contribution`.
51
- * Please avoid working directly on the `master` branch.
70
+ * This is usually the `main` branch.
71
+ * To quickly create a topic branch based on `main`; `git branch fix/main/my_contribution main`
72
+ * Then checkout the new branch with `git checkout fix/main/my_contribution`.
73
+ * Please avoid working directly on the `main` branch.
74
+ * Please do not create a branch called `master`. (See note below.)
52
75
  * You may find the [hub suite of commands](https://github.com/defunkt/hub) helpful
53
76
  * Make sure you have added sufficient tests and documentation for your changes.
54
77
  * Test functionality with RSpec; Test features / UI with Capybara.
55
78
  * Run _all_ the tests to assure nothing else was accidentally broken.
56
79
 
80
+ NOTE: This repository follows the [Samvera Community Code of Conduct](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405212316/Code+of+Conduct)
81
+ and [language recommendations](#language).
82
+ Please ***do not*** create a branch called `master` for this repository or as part of
83
+ your pull request; the branch will either need to be removed or renamed before it can
84
+ be considered for inclusion in the code base and history of this repository.
85
+
57
86
  ### Documenting Code
58
87
 
59
88
  * All new public methods, modules, and classes should include inline documentation in [YARD](http://yardoc.org/).
@@ -109,15 +138,15 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
109
138
  ### Submitting Changes
110
139
 
111
140
  * Read the article ["Using Pull Requests"](https://help.github.com/articles/using-pull-requests) on GitHub.
112
- * Make sure your branch is up to date with its parent branch (i.e. master)
113
- * `git checkout master`
141
+ * Make sure your branch is up to date with its parent branch (i.e. main)
142
+ * `git checkout main`
114
143
  * `git pull --rebase`
115
144
  * `git checkout <your-branch>`
116
- * `git rebase master`
145
+ * `git rebase main`
117
146
  * It is a good idea to run your tests again.
118
147
  * If you've made more than one commit take a moment to consider whether squashing commits together would help improve their logical grouping.
119
148
  * [Detailed Walkthrough of One Pull Request per Commit](http://ndlib.github.io/practices/one-commit-per-pull-request/)
120
- * `git rebase --interactive master` ([See Github help](https://help.github.com/articles/interactive-rebase))
149
+ * `git rebase --interactive main` ([See Github help](https://help.github.com/articles/interactive-rebase))
121
150
  * Squashing your branch's changes into one commit is "good form" and helps the person merging your request to see everything that is going on.
122
151
  * Push your changes to a topic branch in your fork of the repository.
123
152
  * Submit a pull request from your fork to the project.
@@ -127,12 +156,14 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
127
156
  We adopted [Github's Pull Request Review](https://help.github.com/articles/about-pull-request-reviews/) for our repositories.
128
157
  Common checks that may occur in our repositories:
129
158
 
130
- 1. Travis CI - where our automated tests are running
131
- 2. Approval Required - Github enforces at least one person approve a pull request. Also, all reviewers that have chimed in must approve.
159
+ 1. [CircleCI](https://circleci.com/gh/samvera) - where our automated tests are running
160
+ 2. RuboCop/Bixby - where we check for style violations
161
+ 3. Approval Required - Github enforces at least one person approve a pull request. Also, all reviewers that have chimed in must approve.
162
+ 4. CodeClimate - is our code remaining healthy (at least according to static code analysis)
132
163
 
133
164
  If one or more of the required checks failed (or are incomplete), the code should not be merged (and the UI will not allow it). If all of the checks have passed, then anyone on the project (including the pull request submitter) may merge the code.
134
165
 
135
- *Example: Carolyn submits a pull request, Justin reviews the pull request and approves. However, Justin is still waiting on other checks (Travis CI is usually the culprit), so he does not merge the pull request. Eventually, all of the checks pass. At this point, Carolyn or anyone else may merge the pull request.*
166
+ *Example: Carolyn submits a pull request, Justin reviews the pull request and approves. However, Justin is still waiting on other checks (CI tests are usually the culprit), so he does not merge the pull request. Eventually, all of the checks pass. At this point, Carolyn or anyone else may merge the pull request.*
136
167
 
137
168
  #### Things to Consider When Reviewing
138
169
 
@@ -149,7 +180,7 @@ This is your chance for a mentoring moment of another developer. Take time to gi
149
180
  * Do new or changed methods, modules, and classes have documentation?
150
181
  * Does the commit contain more than it should? Are two separate concerns being addressed in one commit?
151
182
  * Does the description of the new/changed specs match your understanding of what the spec is doing?
152
- * Did the Travis tests complete successfully?
183
+ * Did the Continuous Integration tests complete successfully?
153
184
 
154
185
  If you are uncertain, bring other contributors into the conversation by assigning them as a reviewer.
155
186
 
data/README.md CHANGED
@@ -1,22 +1,36 @@
1
1
  # hydra-file_characterization
2
2
 
3
- Code: [![Version](https://badge.fury.io/rb/hydra-file_characterization.png)](http://badge.fury.io/rb/hydra-file_characterization) [![CircleCI](https://circleci.com/gh/samvera/hydra-file_characterization.svg?style=svg)](https://circleci.com/gh/samvera/hydra-file_characterization) [![Coverage Status](https://coveralls.io/repos/github/samvera/hydra-file_characterization/badge.svg?branch=master)](https://coveralls.io/github/samvera/hydra-file_characterization?branch=master)
3
+ Code:
4
+ [![Gem Version](https://badge.fury.io/rb/hydra-file_characterization.png)](http://badge.fury.io/rb/hydra-file_characterization)
5
+ [![Build Status](https://circleci.com/gh/samvera/hydra-file_characterization.svg?style=svg)](https://circleci.com/gh/samvera/hydra-file_characterization)
6
+ [![Coverage Status](https://coveralls.io/repos/github/samvera/hydra-file_characterization/badge.svg?branch=main)](https://coveralls.io/github/samvera/hydra-file_characterization?branch=main)
4
7
 
5
- Docs: [![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md) [![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE)
8
+ Docs:
9
+ [![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md)
10
+ [![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE)
6
11
 
7
- Jump in: [![Slack Status](http://slack.samvera.org/badge.svg)](http://slack.samvera.org/)
12
+ Community Support: [![Samvera Community Slack](https://img.shields.io/badge/samvera-slack-blueviolet)](http://slack.samvera.org/)
8
13
 
9
14
  # What is hydra-file_characterization?
10
15
 
11
16
  Provides a wrapper for file characterization.
12
17
 
18
+ # Supported versions
19
+
20
+ This software is currently tested against:
21
+ * FITS 1.4.1
22
+ * Ruby 2.6, 2.7, and 3.0
23
+ * Rails 6.0, 6.1, and 7.0
24
+
13
25
  ## Product Owner & Maintenance
14
26
 
15
- hydra-file_characterization is a Core Component of the Samvera community. The documentation for what this means can be found [here](http://samvera.github.io/core_components.html#requirements-for-a-core-component).
27
+ `hydra-file_characterization` was a Core Component of the Samvera Community. Given a decline in available labor required for maintenance, this project no longer has a dedicated Product Owner. The documentation for what this means can be found [here](http://samvera.github.io/core_components.html#requirements-for-a-core-component).
16
28
 
17
29
  ### Product Owner
18
30
 
19
- [little9](https://github.com/little9)
31
+ **Vacant**
32
+
33
+ _Until a Product Owner has been identified, we ask that you please direct all requests for support, bug reports, and general questions to the [`#dev` Channel on the Samvera Slack](https://samvera.slack.com/app_redirect?channel=dev)._
20
34
 
21
35
  # Help
22
36
 
@@ -77,7 +91,27 @@ fits_xml, ffprobe_xml = Hydra::FileCharacterization.characterize(contents_of_a_f
77
91
 
78
92
  ## Registering New Characterizers
79
93
 
80
- This is possible by adding a characterizer to the `Hydra::FileCharacterization::Characterizers`' namespace.
94
+ This is possible by adding a characterizer to the `Hydra::FileCharacterization::Characterizers` namespace.
95
+
96
+ ## Contributing
97
+
98
+ Running the tests:
99
+ * Install FITS v1.4.1, which is the most recent version we've tested against.
100
+ ```
101
+ mkdir ~/fits
102
+ wget "https://github.com/harvard-lts/fits/releases/download/1.4.1/fits-1.4.1.zip"
103
+ unzip -d ~/fits/ "fits-1.4.1.zip"
104
+ chmod a+x ~/fits/fits.sh
105
+ ln -s ~/fits/fits.sh ~/fits/fits
106
+ rm "fits-1.4.1.zip"
107
+ ```
108
+
109
+ * Once FITS is installed, you should be able to run the tests with: `rspec spec`
110
+
111
+
112
+ If you're working on PR for this project, create a feature branch off of `main`.
113
+
114
+ This repository follows the [Samvera Community Code of Conduct](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405212316/Code+of+Conduct) and [language recommendations](https://github.com/samvera/maintenance/blob/master/templates/CONTRIBUTING.md#language). Please ***do not*** create a branch called `master` for this repository or as part of your pull request; the branch will either need to be removed or renamed before it can be considered for inclusion in the code base and history of this repository.
81
115
 
82
116
  ## Releasing
83
117
 
@@ -97,4 +131,4 @@ This is possible by adding a characterizer to the `Hydra::FileCharacterization::
97
131
 
98
132
  This software has been developed by and is brought to you by the Samvera community. Learn more at the [Samvera website](http://samvera.org/).
99
133
 
100
- ![Samvera Logo](https://wiki.duraspace.org/download/thumbnails/87459292/samvera-fall-font2-200w.png?version=1&modificationDate=1498550535816&api=v2)
134
+ ![Samvera Logo](https://samvera.org/wp-content/uploads/2017/06/samvera-logo-tm.svg)
@@ -28,9 +28,10 @@ Gem::Specification.new do |gem|
28
28
  gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
29
29
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
30
30
  gem.require_paths = ["lib"]
31
+ gem.metadata = { "rubygems_mfa_required" => "true" }
31
32
 
32
33
  gem.add_dependency "activesupport", ">= 3.0.0"
33
- gem.add_development_dependency 'bixby', '~> 3.0.0'
34
+ gem.add_development_dependency 'bixby'
34
35
  gem.add_development_dependency 'coveralls'
35
36
  gem.add_development_dependency 'github_changelog_generator'
36
37
  gem.add_development_dependency "guard"
@@ -7,17 +7,7 @@ module Hydra::FileCharacterization::Characterizers
7
7
  protected
8
8
 
9
9
  def command
10
- "curl -k -F datafile=@#{filename} #{ENV['FITS_SERVLET_URL']}/examine"
11
- end
12
-
13
- # Remove any non-XML output that precedes the <?xml> tag
14
- # See: https://github.com/harvard-lts/fits/issues/20
15
- # https://github.com/harvard-lts/fits/issues/40
16
- # https://github.com/harvard-lts/fits/issues/46
17
- def post_process(raw_output)
18
- md = /\A(.*)(<\?xml.*)\Z/m.match(raw_output)
19
- logger.warn "FITS produced non-xml output: \"#{md[1].chomp}\"" unless md[1].empty?
20
- md[2]
10
+ "curl -s -k -F datafile=@'#{filename}' #{ENV['FITS_SERVLET_URL']}/examine"
21
11
  end
22
12
  end
23
13
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Hydra
3
3
  module FileCharacterization
4
- VERSION = "1.1.2"
4
+ VERSION = "1.2.0"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-file_characterization
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Treacy
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2020-06-10 00:00:00.000000000 Z
14
+ date: 2023-02-01 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -31,16 +31,16 @@ dependencies:
31
31
  name: bixby
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - "~>"
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 3.0.0
36
+ version: '0'
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 3.0.0
43
+ version: '0'
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: coveralls
46
46
  requirement: !ruby/object:Gem::Requirement
@@ -192,7 +192,8 @@ files:
192
192
  homepage: https://github.com/projecthydra/hydra-file_characterization
193
193
  licenses:
194
194
  - APACHE2
195
- metadata: {}
195
+ metadata:
196
+ rubygems_mfa_required: 'true'
196
197
  post_install_message:
197
198
  rdoc_options: []
198
199
  require_paths:
@@ -208,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
208
209
  - !ruby/object:Gem::Version
209
210
  version: '0'
210
211
  requirements: []
211
- rubygems_version: 3.1.4
212
+ rubygems_version: 3.1.6
212
213
  signing_key:
213
214
  specification_version: 4
214
215
  summary: To provide a wrapper for file characterization