active-fedora 13.2.4 → 13.2.5

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: 85c4c145c52dd7a76031180b40c4a9d8d2cca56073178db2d7543264ff76afea
4
- data.tar.gz: 5e89813a2fb65dcd80487a1203bec8ca869cc3c611924440903cb22830133dcb
3
+ metadata.gz: e04e045acabedcf73c91fd93413d63e02d8548073cd938e0579bcfb65cf8c82f
4
+ data.tar.gz: a66e8b81d3d27f5858dbb1c5de880c69e6c6f4e1f13d3f11191d174788a2769b
5
5
  SHA512:
6
- metadata.gz: 8e97b32bca2819b43732657cd70b3cbb6f932b144bf00c10f390a0caee675b59a6f480637ff0fe93ad0f1b8bcfa791d1298a8dedf580b59699ff74ad8dd31240
7
- data.tar.gz: 4ca64c09d2b36a4378303ccd5cb257d0012207c44793bf93cac44be0dda1a230e87066ff19664f91d36ac42367b2539484b512012b5cdee071ae728fe399e811
6
+ metadata.gz: 39a8f3d9c0a7da3dfa15b60e315b93f7c947326b46a59f343d78e88eb21ac479dbe1e93d08e340549caecb7b2ba07d0f6ae9817524d03addfc635a87ff5bc37c
7
+ data.tar.gz: 1f08ff94aa74c88e7c554b4a3378c807e1558e164cfa561db608caf3e9ec97b7af3a7d013018ce54cefa7413fd8da98594de306cd7791e9771e71272241a2b0e
data/.circleci/config.yml CHANGED
@@ -21,7 +21,17 @@ jobs:
21
21
  RAILS_VERSION: << parameters.rails_version >>
22
22
  steps:
23
23
  - samvera/cached_checkout
24
-
24
+ - checkout
25
+ - run:
26
+ name: Check for 'master' branch
27
+ command: |
28
+ git fetch --all --quiet --prune --prune-tags
29
+ if [[ -n "$(git branch --all --list master */master)" ]]; then
30
+ echo "A branch named 'master' was found. Please remove it."
31
+ echo "$(git branch --all --list master */master)"
32
+ fi
33
+ [[ -z "$(git branch --all --list master */master)" ]]
34
+
25
35
  - samvera/bundle_for_gem:
26
36
  ruby_version: << parameters.ruby_version >>
27
37
  bundler_version: << parameters.bundler_version >>
@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
28
28
  s.add_development_dependency 'fcrepo_wrapper', '~> 0.2'
29
29
  s.add_development_dependency "github_changelog_generator"
30
30
  s.add_development_dependency "rdoc"
31
+ s.add_development_dependency "psych", "< 4" # Restricted because 4.0+ do not work with rubocop 0.56.x
31
32
  s.add_development_dependency "rails"
32
33
  s.add_development_dependency "rake"
33
34
  s.add_development_dependency "rspec", "~> 3.5"
@@ -2,7 +2,7 @@ module ActiveFedora::Core
2
2
  class FedoraIdTranslator
3
3
  SLASH = '/'.freeze
4
4
  def self.call(id)
5
- id = URI.escape(id, '[]'.freeze)
5
+ id = URI::DEFAULT_PARSER.escape(id, '[]'.freeze)
6
6
  id = "/#{id}" unless id.start_with? SLASH
7
7
  unless ActiveFedora.fedora.base_path == SLASH || id.start_with?("#{ActiveFedora.fedora.base_path}/")
8
8
  id = ActiveFedora.fedora.base_path + id
@@ -174,7 +174,7 @@ module ActiveFedora
174
174
 
175
175
  def ldp_headers
176
176
  headers = { 'Content-Type'.freeze => mime_type, 'Content-Length'.freeze => content.size.to_s }
177
- headers['Content-Disposition'.freeze] = "attachment; filename=\"#{URI.encode(@original_name)}\"" if @original_name
177
+ headers['Content-Disposition'.freeze] = "attachment; filename=\"#{URI::DEFAULT_PARSER.escape(@original_name)}\"" if @original_name
178
178
  headers
179
179
  end
180
180
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveFedora
4
- VERSION = '13.2.4'
4
+ VERSION = '13.2.5'
5
5
  end
@@ -21,6 +21,6 @@ module ActiveFedora::WithMetadata
21
21
  property :date_modified, predicate: ::RDF::Vocab::EBUCore.dateModified
22
22
  property :byte_order, predicate: SweetJPLTerms.byteOrder
23
23
  # This is a server-managed predicate which means Fedora does not let us change it.
24
- property :file_hash, predicate: ::RDF::Vocab::PREMIS.hasMessageDigest
24
+ property :file_hash, predicate: ::RDF::Vocab::PREMIS.hasMessageDigest, server_managed: true
25
25
  end
26
26
  end
@@ -1,6 +1,6 @@
1
1
  module ActiveFedora::WithMetadata
2
2
  class DefaultStrategy < ActiveTriples::ExtensionStrategy
3
- # override apply method to check if property already exists or reciever already has predicate defined.
3
+ # override apply method to check if property already exists or receiver already has predicate defined.
4
4
  # Do not add property if the rdf_resource already responds to the property name
5
5
  # Do not add property if the rdf_resource already has a property with the same predicate.
6
6
  def self.apply(resource, property)
@@ -33,7 +33,7 @@ module ActiveFedora
33
33
 
34
34
  def set_value(*args)
35
35
  super
36
- attribute_will_change! args.first
36
+ attribute_will_change! args.first unless server_managed_properties.include?(args.first)
37
37
  end
38
38
 
39
39
  def ldp_source
@@ -70,6 +70,10 @@ module ActiveFedora
70
70
  ChangeSet.new(self, self, changed_attributes.keys).changes
71
71
  end
72
72
 
73
+ def server_managed_properties
74
+ @server_managed_properties ||= properties.select { |k,v| v[:server_managed] }.keys.map(&:to_sym)
75
+ end
76
+
73
77
  class << self
74
78
  attr_writer :parent_class
75
79
 
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.2.4
4
+ version: 13.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt
8
8
  - McClain Looney
9
9
  - Justin Coyne
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-05-17 00:00:00.000000000 Z
13
+ date: 2022-01-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
@@ -212,6 +212,20 @@ dependencies:
212
212
  - - ">="
213
213
  - !ruby/object:Gem::Version
214
214
  version: '0'
215
+ - !ruby/object:Gem::Dependency
216
+ name: psych
217
+ requirement: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - "<"
220
+ - !ruby/object:Gem::Version
221
+ version: '4'
222
+ type: :development
223
+ prerelease: false
224
+ version_requirements: !ruby/object:Gem::Requirement
225
+ requirements:
226
+ - - "<"
227
+ - !ruby/object:Gem::Version
228
+ version: '4'
215
229
  - !ruby/object:Gem::Dependency
216
230
  name: rails
217
231
  requirement: !ruby/object:Gem::Requirement
@@ -589,7 +603,7 @@ homepage: https://github.com/samvera/active_fedora
589
603
  licenses:
590
604
  - Apache-2.0
591
605
  metadata: {}
592
- post_install_message:
606
+ post_install_message:
593
607
  rdoc_options: []
594
608
  require_paths:
595
609
  - lib
@@ -604,8 +618,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
604
618
  - !ruby/object:Gem::Version
605
619
  version: '0'
606
620
  requirements: []
607
- rubygems_version: 3.1.4
608
- signing_key:
621
+ rubygems_version: 3.1.6
622
+ signing_key:
609
623
  specification_version: 4
610
624
  summary: A convenience libary for manipulating documents in the Fedora Repository.
611
625
  test_files: []