active-fedora 8.4.2 → 8.5.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
  SHA1:
3
- metadata.gz: a785fa56e5709791afe64fc36b3eaf3f51fd5557
4
- data.tar.gz: a4871a6e43d779bdfea81e96726532131d8bde9f
3
+ metadata.gz: 4974eb96df12d79e7d11f6fe3597c3dfb95fe017
4
+ data.tar.gz: b562792daabda45401cc1a203c426df2e3b75d62
5
5
  SHA512:
6
- metadata.gz: 54a6209639d2a5f51d1d41b0478b5a712d8eeec86fb1358ff7ea5e567ae4ecc18a8e5c325c3f4fafff26277b0de3e472e61a84c235278cec783a8808fdd181b6
7
- data.tar.gz: 086cbeb31c69b9c61ab31dd4750588dee86442f82fff454de9c096bc3f5aac7ef3f3d558f861aca90fd73d669731845c2f57275de0615141b36386f6ef561875
6
+ metadata.gz: 3653cf10baf9e0b68f500dff5feb7a7d38b0651159fb1a8f5493dbe68e20bb1b79d58eb53944c43a800ea47ed5d46fec7b144211149c7496048471df8f1d8def
7
+ data.tar.gz: adbd259ede621a91f344cceb56ed3e0f73ae37b9202ec91186d2b7bf8c079f723cf7a56589625da99c6a39cb7ef440b416d658ffbd1875593fcb144da786bf21
@@ -1,14 +1,19 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.1
4
-
3
+ - 2.5.1
5
4
 
6
5
  matrix:
7
6
  include:
8
- - rvm: 2.2.5
9
- env: RAILS_VERSION=4.2.7.1
7
+ - rvm: 2.5.1
8
+ env: RAILS_VERSION=5.2.0
9
+ - rvm: 2.4.4
10
+ env: RAILS_VERSION=5.1.6
11
+ - rvm: 2.3.7
12
+ env: RAILS_VERSION=5.0.7
13
+ - rvm: 2.2.10
14
+ env: RAILS_VERSION=4.2.10
10
15
  - rvm: 2.1.10
11
- env: RAILS_VERSION=4.2.7.1
16
+ env: RAILS_VERSION=4.2.10
12
17
 
13
18
  env:
14
19
  global:
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.add_dependency 'rsolr', ">= 1.0.11", '< 3'
18
18
  s.add_dependency 'om', '~> 3.1'
19
19
  s.add_dependency 'nom-xml', '>= 0.5.1'
20
- s.add_dependency "activesupport", '>= 3.0.0'
20
+ s.add_dependency "activesupport", '>= 4.2.10'
21
21
  s.add_dependency "rubydora", '>= 1.8.0', '< 3'
22
22
  s.add_dependency "active-triples", '~> 0.4.0'
23
23
  s.add_dependency "rdf-rdfxml", '~> 1.1'
@@ -11,7 +11,7 @@ module ActiveFedora
11
11
  after_save :clear_changed_attributes
12
12
  def clear_changed_attributes
13
13
  @previously_changed = changes
14
- @changed_attributes.clear
14
+ clear_attribute_changes(changes.keys)
15
15
  end
16
16
  end
17
17
 
@@ -66,16 +66,16 @@ module ActiveFedora
66
66
 
67
67
  # don't want content eagerly loaded by proxy, so implementing methods that would be implemented by define_attribute_methods
68
68
  def ng_xml_will_change!
69
- changed_attributes['ng_xml'] = nil
69
+ attributes_changed_by_setter[:ng_xml] = nil
70
70
  end
71
71
 
72
72
  def ng_xml_doesnt_change!
73
- changed_attributes.delete('ng_xml')
73
+ clear_attribute_changes([:ng_xml])
74
74
  end
75
75
 
76
76
  # don't want content eagerly loaded by proxy, so implementing methods that would be implemented by define_attribute_methods
77
77
  def ng_xml_changed?
78
- changed_attributes.has_key? 'ng_xml'
78
+ changed_attributes.has_key? :ng_xml
79
79
  end
80
80
 
81
81
  def datastream_content
@@ -6,7 +6,11 @@ module ActiveFedora
6
6
  before_save do
7
7
  if content.blank?
8
8
  ActiveFedora::Base.logger.warn "Cowardly refusing to save a datastream with empty content: #{self.inspect}" if ActiveFedora::Base.logger
9
- false
9
+ if ActiveSupport.version >= Gem::Version.new('5.0')
10
+ throw(:abort)
11
+ else
12
+ false
13
+ end
10
14
  end
11
15
  end
12
16
 
@@ -295,5 +299,10 @@ module ActiveFedora
295
299
  end
296
300
  end
297
301
 
302
+ def reset_profile_attributes
303
+ super
304
+ clear_attribute_changes([:ng_xml])
305
+ end
306
+
298
307
  end
299
308
  end
@@ -39,7 +39,11 @@ module ActiveFedora
39
39
  before_save do
40
40
  if content.blank?
41
41
  ActiveFedora::Base.logger.warn "Cowardly refusing to save a datastream with empty content: #{self.inspect}" if ActiveFedora::Base.logger
42
- false
42
+ if ActiveSupport.version >= Gem::Version.new('5.0')
43
+ throw(:abort)
44
+ else
45
+ false
46
+ end
43
47
  end
44
48
  end
45
49
 
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "8.4.2"
2
+ VERSION = "8.5.0"
3
3
  end
@@ -10,6 +10,11 @@ shared_examples_for "An ActiveModel" do
10
10
  def assert_kind_of(klass, inspected_object)
11
11
  expect(inspected_object).to be_kind_of(klass)
12
12
  end
13
+
14
+ def assert_respond_to(obj, meth, msg = nil)
15
+ expect(obj).to respond_to meth
16
+ end
17
+
13
18
  include ActiveModel::Lint::Tests
14
19
 
15
20
  ActiveModel::Lint::Tests.public_instance_methods.map{|m| m.to_s}.grep(/^test/).each do |m|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.4.2
4
+ version: 8.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-03-13 00:00:00.000000000 Z
13
+ date: 2018-04-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr
@@ -66,14 +66,14 @@ dependencies:
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 3.0.0
69
+ version: 4.2.10
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 3.0.0
76
+ version: 4.2.10
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: rubydora
79
79
  requirement: !ruby/object:Gem::Requirement
@@ -563,7 +563,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
563
563
  version: '0'
564
564
  requirements: []
565
565
  rubyforge_project:
566
- rubygems_version: 2.5.1
566
+ rubygems_version: 2.6.11
567
567
  signing_key:
568
568
  specification_version: 4
569
569
  summary: A convenience libary for manipulating documents in the Fedora Repository.