hydra-access-controls 12.0.1 → 12.1.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: cb6758e64e46375378c0ab402d42197ac1ed64af8f9ec87bda1ee603c2fa4e4e
4
- data.tar.gz: 2e7f290acefb3924c5947e5ada34b54cdf0a64f3a127422c72cb5fdef8fe88c6
3
+ metadata.gz: d746a886953c496a8dc25145ca468473f24988db6d2aeabe191b3001a7570b3e
4
+ data.tar.gz: 2b3d9f45bef0f184f735c16cfeb5ca8155ca5f6328d9e241c0065375d732b2f2
5
5
  SHA512:
6
- metadata.gz: 80f663ea54a156cf6a5ded46a0aae98a1df9e8953ca0999fa56a8668b266cc855a4db8aa1933dd2989c4c5df9ea989146af1989089059640412a573417901d01
7
- data.tar.gz: 299fffeb06237d336774894d209313e968173446276210821a42a896522c5a3d17ee0ae67c428c856405cab04a3246a820fc54bd7fce5b613ea328d27c69b6ff
6
+ metadata.gz: 476fc32fd3f1b0accceb8e5c67f14a15d057dc3be62ca483af84b0174f068e68a282dcab5ecdfa9854130650b9ab2743ce30bb53a71c037cb907ad7aab5a38c5
7
+ data.tar.gz: 6340762ebeb31c19aeb67d185a0da530f0b57394bb7e982a9f19f2cd1c24fd1402df769b1ef1c1c2690b8c3458679ee9b6dafe9074a61efff471e3a90923be09
@@ -93,7 +93,7 @@ module Hydra
93
93
  end
94
94
  if visibility != expected_visibility
95
95
  failure_message << "visibility should be #{expected_visibility} but it is currently #{visibility}. Call embargo_visibility! on this object to repair."
96
- self.errors[:embargo] << failure_message
96
+ self.errors.add(:embargo, failure_message)
97
97
  return false
98
98
  end
99
99
  true
@@ -122,7 +122,7 @@ module Hydra
122
122
  end
123
123
  if visibility != expected_visibility
124
124
  failure_message << "visibility should be #{expected_visibility} but it is currently #{visibility}. Call lease_visibility! on this object to repair."
125
- self.errors[:lease] << failure_message
125
+ self.errors.add(:lease, failure_message)
126
126
  return false
127
127
  end
128
128
  true
@@ -6,13 +6,13 @@ module Hydra
6
6
  begin
7
7
  if date = value.to_date
8
8
  if date <= Date.today
9
- record.errors[attribute] << "Must be a future date"
9
+ record.errors.add(attribute, "Must be a future date")
10
10
  end
11
11
  else
12
- record.errors[attribute] << "Invalid Date Format"
12
+ record.errors.add(attribute, "Invalid Date Format")
13
13
  end
14
14
  rescue ArgumentError, NoMethodError
15
- record.errors[attribute] << "Invalid Date Format"
15
+ record.errors.add(attribute, "Invalid Date Format")
16
16
  end
17
17
  end
18
18
  end
@@ -15,10 +15,11 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = version
17
17
  gem.license = "APACHE-2.0"
18
+ gem.metadata = { "rubygems_mfa_required" => "true" }
18
19
 
19
20
  gem.required_ruby_version = '>= 2.4'
20
21
 
21
- gem.add_dependency 'activesupport', '>= 5.2', '< 7'
22
+ gem.add_dependency 'activesupport', '>= 5.2', '< 7.1'
22
23
  gem.add_dependency 'active-fedora', '>= 10.0.0'
23
24
  gem.add_dependency 'blacklight-access_controls', '~> 6.0'
24
25
  gem.add_dependency 'cancancan', '>= 1.8', '< 4'
@@ -38,12 +38,16 @@ module Hydra
38
38
 
39
39
  file = File.join(Rails.root, filename)
40
40
 
41
- unless File.exists?(file)
41
+ unless File.exist?(file)
42
42
  raise "ip-range configuration file not found. Expected: #{file}."
43
43
  end
44
44
 
45
45
  begin
46
- yml = YAML::load_file(file)
46
+ yml = if Psych::VERSION > '4.0'
47
+ YAML.safe_load(File.read(file), aliases: true)
48
+ else
49
+ YAML.safe_load(File.read(file), [], [], true)
50
+ end
47
51
  rescue
48
52
  raise("#{filename} was found, but could not be parsed.\n")
49
53
  end
@@ -56,7 +56,7 @@ module Hydra::RoleMapperBehavior
56
56
  filename = 'config/role_map.yml'
57
57
  file = File.join(Rails.root, filename)
58
58
 
59
- unless File.exists?(file)
59
+ unless File.exist?(file)
60
60
  raise "You are missing a role map configuration file: #{filename}. Have you run \"rails generate hydra:head\"?"
61
61
  end
62
62
 
@@ -67,7 +67,11 @@ module Hydra::RoleMapperBehavior
67
67
  end
68
68
 
69
69
  begin
70
- yml = YAML::load(erb)
70
+ yml = if Psych::VERSION > '4.0'
71
+ YAML.safe_load(erb, aliases: true)
72
+ else
73
+ YAML.safe_load(erb, [], [], true)
74
+ end
71
75
  rescue
72
76
  raise("#{filename} was found, but could not be parsed.\n")
73
77
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-access-controls
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.0.1
4
+ version: 12.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  - Justin Coyne
9
9
  - Matt Zumwalt
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-05-17 00:00:00.000000000 Z
13
+ date: 2023-01-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '5.2'
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
- version: '7'
24
+ version: '7.1'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -31,7 +31,7 @@ dependencies:
31
31
  version: '5.2'
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: '7'
34
+ version: '7.1'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: active-fedora
37
37
  requirement: !ruby/object:Gem::Requirement
@@ -207,8 +207,9 @@ files:
207
207
  homepage: https://github.com/samvera/hydra-head/tree/master/hydra-access-controls
208
208
  licenses:
209
209
  - APACHE-2.0
210
- metadata: {}
211
- post_install_message:
210
+ metadata:
211
+ rubygems_mfa_required: 'true'
212
+ post_install_message:
212
213
  rdoc_options: []
213
214
  require_paths:
214
215
  - lib
@@ -223,8 +224,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
224
  - !ruby/object:Gem::Version
224
225
  version: '0'
225
226
  requirements: []
226
- rubygems_version: 3.1.4
227
- signing_key:
227
+ rubygems_version: 3.3.26
228
+ signing_key:
228
229
  specification_version: 4
229
230
  summary: Access controls for project hydra
230
231
  test_files: