active-fedora 8.1.0 → 8.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
  SHA1:
3
- metadata.gz: f80f162fa9ed3128b27996f14c735381637053d0
4
- data.tar.gz: 7fd1c593871f7b7e02176bd4498b65d5c58e5bc9
3
+ metadata.gz: 402cc2862ebc8b90d81a374461a67bef373f7806
4
+ data.tar.gz: 060ed97a31b4b2ec9b09ff515e7f05d9d155aae7
5
5
  SHA512:
6
- metadata.gz: a35dc73b4243b5b5c3c3c647ae84102126e0e7781e6b65b88a140c65407055ba6e846a6281af56d8440f79fba19d1b78e04fbbe0dc079c13a714d042e3278840
7
- data.tar.gz: 49a39ac794359b97de9d8165fed133211950b6f2e4ce2b8fdf84d9550dc0a659bad1c39cd09d7dc52cacc957e3019f96ef728614cd412325da6b687cfd95b3fa
6
+ metadata.gz: a9e901ffbe6a901c8676b8cc29e89b8d51f4d15dc3c55b1d14c48211673441d4c66a5734bd77513d89f5c69893ac8ea717de4ba32ab5a2b1db348978cd23127b
7
+ data.tar.gz: f31e3ba7edb66489becbb171119b8a4d9c5b4dd938f10e81edebaef71014e287cdc3e9af0314cf7e7ef2968a3522b42a28b98b143f41dff8261d9a95a2bd0539
@@ -1,22 +1,14 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.1
3
+ - 2.3.1
4
4
 
5
- gemfile:
6
- - gemfiles/rails3.gemfile
7
- - gemfiles/rails4.gemfile
8
- - gemfiles/rails4.1.gemfile
9
5
 
10
-
11
6
  matrix:
12
7
  include:
13
- - rvm: 2.1.0
14
- gemfile: gemfiles/rails4.gemfile
15
- - rvm: 2.0.0
16
- gemfile: gemfiles/rails4.gemfile
17
- - rvm: 1.9.3
18
- gemfile: gemfiles/rails4.gemfile
19
-
8
+ - rvm: 2.2.5
9
+ env: RAILS_VERSION=4.2.7.1
10
+ - rvm: 2.1.10
11
+ env: RAILS_VERSION=4.2.7.1
20
12
 
21
13
  notifications:
22
14
  irc: "irc.freenode.org#projecthydra"
@@ -24,3 +16,5 @@ notifications:
24
16
  env:
25
17
  global:
26
18
  - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
19
+
20
+ jdk: oraclejdk8
data/Gemfile CHANGED
@@ -9,3 +9,5 @@ group :test do
9
9
  end
10
10
 
11
11
  gem 'jruby-openssl', :platform=> :jruby
12
+ gem 'activemodel', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
13
+ gem 'linkeddata', '~> 1.99'
@@ -14,13 +14,13 @@ Gem::Specification.new do |s|
14
14
  s.license = "APACHE2"
15
15
  s.required_ruby_version = '>= 1.9.3'
16
16
 
17
- s.add_dependency 'rsolr', "~> 1.0.11"
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
20
  s.add_dependency "activesupport", '>= 3.0.0'
21
21
  s.add_dependency "rubydora", '~> 1.8'
22
22
  s.add_dependency "active-triples", '~> 0.4.0'
23
- s.add_dependency "rdf-rdfxml", '~> 1.1.0'
23
+ s.add_dependency "rdf-rdfxml", '~> 1.1'
24
24
  s.add_dependency "deprecation"
25
25
  s.add_development_dependency "rdoc"
26
26
  s.add_development_dependency "yard"
@@ -10,22 +10,25 @@ module ActiveFedora
10
10
  end
11
11
 
12
12
  def id_reader
13
- @full_result ||= begin
13
+ begin
14
14
  # need to find the id with the correct class
15
15
  ids = @owner.ids_for_outbound(@reflection.options[:property])
16
16
 
17
- return if ids.empty?
17
+ return if ids.empty?
18
+
18
19
  # This incurs a lot of overhead, but it's necessary if the users use one property for more than one association.
19
20
  # e.g.
20
21
  # belongs_to :author, property: :has_member, class_name: 'Person'
21
22
  # belongs_to :publisher, property: :has_member
22
-
23
- results = SolrService.query(construct_query(ids))
24
- if results.present?
25
- results.first
23
+
24
+ if @owner.reflections.one? { |k, v| v.options[:property] == @reflection.options[:property] }
25
+ @full_results = nil
26
+ ids.first
27
+ else
28
+ @full_results = SolrService.query(construct_query(ids))
29
+ @full_results.first['id'] if @full_results.present?
26
30
  end
27
31
  end
28
- @full_result['id'] if @full_result
29
32
  end
30
33
 
31
34
  def replace(record)
@@ -55,7 +58,13 @@ module ActiveFedora
55
58
 
56
59
  private
57
60
  def find_target
58
- ActiveFedora::SolrService.reify_solr_results([@full_result]).first if id_reader
61
+ return unless id_reader
62
+
63
+ if @full_result # side-effect from #id_reader
64
+ ActiveFedora::SolrService.reify_solr_results([@full_result]).first
65
+ else
66
+ ActiveFedora::Base.find(id_reader, cast: true)
67
+ end
59
68
  end
60
69
 
61
70
  # Constructs a query that checks solr for the correct id & class_name combination
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "8.1.0"
2
+ VERSION = "8.2.0"
3
3
  end
@@ -30,11 +30,11 @@ describe ActiveFedora::OmDatastream do
30
30
  end
31
31
 
32
32
  it "should not be changed when no fields have been set" do
33
- @obj.descMetadata.should_not be_content_changed
33
+ @obj.descMetadata.should_not be_changed
34
34
  end
35
35
  it "should be changed when a field has been set" do
36
36
  @obj.descMetadata.title = 'Foobar'
37
- @obj.descMetadata.should be_content_changed
37
+ @obj.descMetadata.should be_changed
38
38
  end
39
39
  describe "#changed?" do
40
40
  it "should not be changed if the new xml matches the old xml" do
@@ -3,6 +3,10 @@ shared_examples_for "An ActiveModel" do
3
3
  expect(test).to eq(true)
4
4
  end
5
5
 
6
+ def assert_equal(test, obj)
7
+ expect(test).to eq(obj)
8
+ end
9
+
6
10
  def assert_kind_of(klass, inspected_object)
7
11
  expect(inspected_object).to be_kind_of(klass)
8
12
  end
@@ -123,7 +123,7 @@ describe ActiveFedora do
123
123
  it "should raise a NameError if the class isn't found" do
124
124
  expect {
125
125
  ActiveFedora.class_from_string("FooClass", ParentClass::OtherSiblingClass)
126
- }.to raise_error NameError, "uninitialized constant FooClass"
126
+ }.to raise_error NameError, /uninitialized constant FooClass/
127
127
  end
128
128
  end
129
129
  end
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.1.0
4
+ version: 8.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt
@@ -10,22 +10,28 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-05-18 00:00:00.000000000 Z
13
+ date: 2016-10-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - "~>"
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: 1.0.11
22
+ - - "<"
23
+ - !ruby/object:Gem::Version
24
+ version: '3'
22
25
  type: :runtime
23
26
  prerelease: false
24
27
  version_requirements: !ruby/object:Gem::Requirement
25
28
  requirements:
26
- - - "~>"
29
+ - - ">="
27
30
  - !ruby/object:Gem::Version
28
31
  version: 1.0.11
32
+ - - "<"
33
+ - !ruby/object:Gem::Version
34
+ version: '3'
29
35
  - !ruby/object:Gem::Dependency
30
36
  name: om
31
37
  requirement: !ruby/object:Gem::Requirement
@@ -102,14 +108,14 @@ dependencies:
102
108
  requirements:
103
109
  - - "~>"
104
110
  - !ruby/object:Gem::Version
105
- version: 1.1.0
111
+ version: '1.1'
106
112
  type: :runtime
107
113
  prerelease: false
108
114
  version_requirements: !ruby/object:Gem::Requirement
109
115
  requirements:
110
116
  - - "~>"
111
117
  - !ruby/object:Gem::Version
112
- version: 1.1.0
118
+ version: '1.1'
113
119
  - !ruby/object:Gem::Dependency
114
120
  name: deprecation
115
121
  requirement: !ruby/object:Gem::Requirement
@@ -294,9 +300,6 @@ files:
294
300
  - config/solr.yml
295
301
  - config/solr_mappings_af_0.1.yml
296
302
  - config/solr_mappings_bl_2.4.yml
297
- - gemfiles/rails3.gemfile
298
- - gemfiles/rails4.1.gemfile
299
- - gemfiles/rails4.gemfile
300
303
  - lib/active-fedora.rb
301
304
  - lib/active_fedora.rb
302
305
  - lib/active_fedora/association_relation.rb
@@ -554,9 +557,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
554
557
  version: '0'
555
558
  requirements: []
556
559
  rubyforge_project:
557
- rubygems_version: 2.2.2
560
+ rubygems_version: 2.5.1
558
561
  signing_key:
559
562
  specification_version: 4
560
563
  summary: A convenience libary for manipulating documents in the Fedora Repository.
561
564
  test_files: []
562
- has_rdoc:
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec :path=>"../"
4
-
5
- gem 'activemodel', '~> 3.2.13'
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec :path=>"../"
4
-
5
- gem 'activemodel', '4.1.0.rc1'
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec :path=>"../"
4
-
5
- gem 'activemodel', '~> 4.0.0'