moab-versioning 6.1.1 → 6.1.2

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: 0fb403abc29dd5b88bd2a34f29717876e846ebf9cf90bc2129534794c499e472
4
- data.tar.gz: ef320be8188580b0502e343b86bd0f39213e29aa53f8eeb25b0aa722b3273ace
3
+ metadata.gz: 7ee90f0940591133476bcd8eb26fd6d210dac5927c1ade040b94056a0a271521
4
+ data.tar.gz: f105d5e796fb41f0ab8c38afc70c983b30ac5840868285731af13ca0e844934a
5
5
  SHA512:
6
- metadata.gz: 381b7705b914b10714249571e0eca3ac4ac67496b3ee15995dc7c58dbbbfe92085c6b4bd17b386424c6d75889e4f3313b90a55fa20ea5293f733106d4ae1f510
7
- data.tar.gz: f845dab613e3addc79f5b9e34270a40174b95fbe6435dc0013cedfeb1ad6bebcf3390c9f5077d1063a58e3281b0a2330f68ba9d8a63a9624f8c0b55e4b86a379
6
+ metadata.gz: 18e970e6f03a4ef17112ba603579f8dc4eae8e4a53dc952cd6ef55f5ab66670d21a58b6df94c3827a1e0660b4786802ffc0a7f7db094f6fc13196f5b64624df0
7
+ data.tar.gz: 6ee40f28548c85fa09d5a702ce2e50fb869eb81e40901830b3738ba30af7d7cb1759ca8cef58e082704f84fd106479f2eb1fd176c327e8ff0efcd3bb8e7ad6f6
data/lib/moab/bagger.rb CHANGED
@@ -227,12 +227,12 @@ module Moab
227
227
  manifest_file[type] = manifest_pathname[type].open('w')
228
228
  end
229
229
  bag_pathname.children.each do |file|
230
- unless file.directory? || file.basename.to_s[0, 11] == 'tagmanifest'
231
- signature = FileSignature.new.signature_from_file(file)
232
- fixity = signature.fixity
233
- DEFAULT_CHECKSUM_TYPES.each do |type|
234
- manifest_file[type].puts("#{fixity[type]} #{file.basename}") if fixity[type]
235
- end
230
+ next unless include_in_tagfile_manifests?(file)
231
+
232
+ signature = FileSignature.new.signature_from_file(file)
233
+ fixity = signature.fixity
234
+ DEFAULT_CHECKSUM_TYPES.each do |type|
235
+ manifest_file[type].puts("#{fixity[type]} #{file.basename}") if fixity[type]
236
236
  end
237
237
  end
238
238
  ensure
@@ -245,6 +245,13 @@ module Moab
245
245
  end
246
246
  end
247
247
 
248
+ def include_in_tagfile_manifests?(file)
249
+ basename = file.basename.to_s
250
+ return false if file.directory? || basename.start_with?('tagmanifest') || basename.match?(/\A\.nfs\w+\z/)
251
+
252
+ true
253
+ end
254
+
248
255
  # @return [Boolean] Create a tar file containing the bag
249
256
  def create_tarfile(tar_pathname = nil)
250
257
  bag_name = bag_pathname.basename
@@ -364,7 +364,7 @@ module Moab
364
364
  end
365
365
  # Are any of the filenames the same in set of oldnames and set of newnames?
366
366
  intersection = oldnames & newnames
367
- intersection.count > 0
367
+ intersection.any?
368
368
  end
369
369
 
370
370
  # @param [Array<Array<String>>] filepairs The set of oldname, newname pairs for all files being renamed
@@ -161,7 +161,7 @@ module Moab
161
161
  # @return [String] Returns either the version ID (if inventory is a version manifest) or the name of the directory
162
162
  # that was harvested to create the inventory
163
163
  def data_source
164
- data_source = (groups.collect { |g| g.data_source.to_s }).join('|')
164
+ data_source = groups.collect { |g| g.data_source.to_s }.join('|')
165
165
  if data_source.start_with?('contentMetadata')
166
166
  version_id ? "v#{version_id}-#{data_source}" : "new-#{data_source}"
167
167
  else
@@ -75,7 +75,7 @@ module Moab
75
75
 
76
76
  def check_correctly_named_version_dirs
77
77
  errors = []
78
- errors << result_hash(MISSING_DIR, 'no versions exist') unless version_directories.count > 0
78
+ errors << result_hash(MISSING_DIR, 'no versions exist') unless version_directories.any?
79
79
  version_directories.each do |version_dir|
80
80
  errors << result_hash(VERSION_DIR_BAD_FORMAT, version_dir) unless VERSION_DIR_PATTERN.match?(version_dir)
81
81
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moab-versioning
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.1
4
+ version: 6.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay
@@ -11,7 +11,7 @@ authors:
11
11
  - John Martin
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2025-07-09 00:00:00.000000000 Z
14
+ date: 2025-09-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: druid-tools
@@ -83,20 +83,6 @@ dependencies:
83
83
  - - ">="
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
- - !ruby/object:Gem::Dependency
87
- name: pry-byebug
88
- requirement: !ruby/object:Gem::Requirement
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- version: '0'
93
- type: :development
94
- prerelease: false
95
- version_requirements: !ruby/object:Gem::Requirement
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: '0'
100
86
  - !ruby/object:Gem::Dependency
101
87
  name: rake
102
88
  requirement: !ruby/object:Gem::Requirement