active-fedora 5.6.3 → 5.7.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: 36cbadd6320acedd29786e7fc1205da8de33af9d
4
- data.tar.gz: 4660a096abd53d763e734c5b8c2ea992437de9ac
3
+ metadata.gz: d203bb23166b8052663ce948c2abf70dff30c060
4
+ data.tar.gz: f2c73e2fc4d6fc6ce52686864c3f07d7c1cd951e
5
5
  SHA512:
6
- metadata.gz: aa335c3d8a5a78c9a75fab436c489ff93c1bb584140e16d660698ec390a16463acf540959e9d408142cffac4179e9c13eba4443bf070e80fd845fb73ecb4ecfb
7
- data.tar.gz: 45d345c38cc5b411aea4df64292b5af9a991e0c178d031ee730f45af90fee534e4c0c980270b9bbf51294ed185f3b311db2d84dc962e3e40442a547cf016d0da
6
+ metadata.gz: 9ad8ede6c8e065cccfa12c8b3e6675bb5c9cff1c3f766c7f2cf60d871069df7087be41857df4556751a13f9e93871fbb6e23626b9364929593d260bf6e1f99ea
7
+ data.tar.gz: e30d9a768d58a756dfee0bf8cfa431a00aaca87a70f561b84c36cff1c700ef874ac7db68d482400cb389615ca30582f46366f72a2188e69dc3823d1c6ae46bf3
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source "http://rubygems.org"
4
4
 
5
5
  gemspec
6
6
  group :development, :test do
7
- gem 'simplecov', :platform => :mri_19
7
+ gem 'simplecov', :platform => [:mri_19, :mri_20]
8
8
  gem 'simplecov-rcov', :platform => :mri_19
9
9
  end
10
10
 
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.add_dependency("activesupport", '>= 3.0.0')
24
24
  s.add_dependency("builder", '~> 3.0.0')
25
25
  s.add_dependency("mediashelf-loggable")
26
- s.add_dependency("rubydora", '~>1.3')
26
+ s.add_dependency("rubydora", '~>1.6')
27
27
  s.add_dependency("rdf")
28
28
  s.add_dependency("rdf-rdfxml", '~>0.3.8')
29
29
  s.add_dependency("deprecation")
@@ -63,6 +63,9 @@ module ActiveFedora
63
63
  end
64
64
 
65
65
  def ng_xml=(new_xml)
66
+ # before we set ng_xml, we load the datastream so we know if the new value differs.
67
+ local_or_remote_content(true)
68
+
66
69
  case new_xml
67
70
  when Nokogiri::XML::Document
68
71
  self.content=new_xml.to_xml
@@ -95,22 +98,39 @@ module ActiveFedora
95
98
  def metadata?
96
99
  true
97
100
  end
101
+
102
+ def local_or_remote_content(ensure_fetch = true)
103
+ @content = to_xml if ng_xml_changed? || autocreate?
104
+ super
105
+ end
98
106
 
99
- def content
100
- to_xml
107
+ def autocreate?
108
+ changed_attributes.has_key? :profile
101
109
  end
102
110
 
103
111
  def datastream_content
104
112
  @datastream_content ||= Nokogiri::XML(super).to_xml {|config| config.no_declaration}.strip
105
113
  end
106
114
 
107
- def content=(content)
108
- @ng_xml = Nokogiri::XML::Document.parse(content)
109
- super(@ng_xml.to_s)
115
+ def content=(new_content)
116
+ if inline?
117
+ # inline datastreams may be transformed by fedora 3, so we test for equivalence instead of equality
118
+ if !EquivalentXml.equivalent?(datastream_content, new_content)
119
+ ng_xml_will_change!
120
+ @ng_xml = Nokogiri::XML::Document.parse(new_content)
121
+ super(@ng_xml.to_s)
122
+ end
123
+ else
124
+ if datastream_content != new_content
125
+ ng_xml_will_change!
126
+ @ng_xml = Nokogiri::XML::Document.parse(new_content)
127
+ super(@ng_xml.to_s)
128
+ end
129
+ end
110
130
  end
111
131
 
112
132
  def content_changed?
113
- return false if new? and !xml_loaded
133
+ return false if !xml_loaded
114
134
  super
115
135
  end
116
136
 
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "5.6.3"
2
+ VERSION = "5.7.0"
3
3
  end
data/solr/conf/schema.xml CHANGED
@@ -168,20 +168,13 @@
168
168
  enablePositionIncrements=true ensures that a 'gap' is left to
169
169
  allow for accurate phrase queries.
170
170
  -->
171
- <filter class="solr.StopFilterFactory"
172
- ignoreCase="true"
173
- words="stopwords.txt"
174
- enablePositionIncrements="true"
175
- />
176
171
  <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
177
172
  <filter class="solr.LowerCaseFilterFactory"/>
178
173
  <filter class="solr.SnowballPorterFilterFactory" language="English"/>
179
174
  <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
180
175
  </analyzer>
181
176
  <analyzer type="query">
182
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
183
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
184
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
177
+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>
185
178
  <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
186
179
  <filter class="solr.LowerCaseFilterFactory"/>
187
180
  <filter class="solr.SnowballPorterFilterFactory" language="English"/>
@@ -195,8 +188,6 @@
195
188
  <fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
196
189
  <analyzer>
197
190
  <tokenizer class="solr.WhitespaceTokenizerFactory"/>
198
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
199
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
200
191
  <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
201
192
  <filter class="solr.LowerCaseFilterFactory"/>
202
193
  <filter class="solr.SnowballPorterFilterFactory" language="English"/>
data/spec/spec_helper.rb CHANGED
@@ -2,9 +2,6 @@ ENV["environment"] ||= 'test'
2
2
  require "bundler/setup"
3
3
 
4
4
  require 'simplecov'
5
- require 'simplecov-rcov'
6
-
7
- SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
8
5
  SimpleCov.start
9
6
 
10
7
  require 'active-fedora'
@@ -21,7 +21,7 @@ describe ActiveFedora::OmDatastream do
21
21
  before(:each) do
22
22
  @mock_inner = mock('inner object')
23
23
  @mock_repo = mock('repository')
24
- @mock_repo.stub(:datastream_dissemination=>'My Content', :config=>{})
24
+ @mock_repo.stub(:datastream_dissemination=>'My Content', :config=>{}, :datastream=>'')
25
25
  @mock_inner.stub(:repository).and_return(@mock_repo)
26
26
  @mock_inner.stub(:pid)
27
27
  @mock_inner.stub(:new? => false)
@@ -173,6 +173,7 @@ describe ActiveFedora::OmDatastream do
173
173
  it "should persist the product of .to_xml in fedora" do
174
174
  @mock_repo.stub(:datastream).and_return('')
175
175
  @test_ds.stub(:new? => true)
176
+ @test_ds.stub(:ng_xml_changed? => true)
176
177
  @test_ds.stub(:to_xml => "fake xml")
177
178
  @mock_repo.should_receive(:add_datastream).with(:pid => nil, :dsid => 'descMetadata', :versionable => true, :content => 'fake xml', :controlGroup => 'X', :dsState => 'A', :mimeType=>'text/xml')
178
179
 
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: 5.6.3
4
+ version: 5.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt
@@ -9,30 +9,8 @@ authors:
9
9
  - Justin Coyne
10
10
  autorequire:
11
11
  bindir: bin
12
- cert_chain:
13
- - |
14
- -----BEGIN CERTIFICATE-----
15
- MIIDaDCCAlCgAwIBAgIBATANBgkqhkiG9w0BAQUFADA9MQ4wDAYDVQQDDAVjaHJp
16
- czEVMBMGCgmSJomT8ixkARkWBWNiZWVyMRQwEgYKCZImiZPyLGQBGRYEaW5mbzAe
17
- Fw0xMzAzMDcwNDI1MzRaFw0xNDAzMDcwNDI1MzRaMD0xDjAMBgNVBAMMBWNocmlz
18
- MRUwEwYKCZImiZPyLGQBGRYFY2JlZXIxFDASBgoJkiaJk/IsZAEZFgRpbmZvMIIB
19
- IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2UC2Jw9BQ7bNTyVHaxGKbCqV
20
- H+BggkU9CWOBB8YA7j2ebcAjRlj6AemKWHB0fPEi9qmGaE1bMbus8IJbFcjkZNqG
21
- 6yHVdOq9tacSH4iiEdH3QioWSte0zY7vwD9u92QLaNzUAm9yjIYF6ZDNM/dl25Hb
22
- UYDURJXfLOKe3AivodRujsHRxDLFpS6FjdmwB9m8N2JBs/uOrUULB48aaa36pWWE
23
- w4rhqT9kOpZl8BRdE/pTrePlQGDZ8Oe74gVWJth4lavtMaPP+UqHigmlnFvWO9+D
24
- a+9q1qwvQ3ySYRJIACIsYaY6rlhZ6i+PGKhbCnG6at6bC9TVu2JfKbC/LBP9mwID
25
- AQABo3MwcTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU61dLp5FY
26
- qfqrGhr0V8WPGwAIEKQwGwYDVR0RBBQwEoEQY2hyaXNAY2JlZXIuaW5mbzAbBgNV
27
- HRIEFDASgRBjaHJpc0BjYmVlci5pbmZvMA0GCSqGSIb3DQEBBQUAA4IBAQBuQW5N
28
- 6NaEla5fJftOPCecLSB5z8oS+fAO8LbfcUqHSo+y/1ZkN8kF8Y1SaoqPpqxuOZ4g
29
- zX+X6k0gJHLKHTNufTaLhORd66Tp1raoW2qqKEcoshOcoQyw/mh9KYLVaQEX8US8
30
- 0yZ9dRMWFtRjwvkvueNMzLZidH+GsaDq/bxR9/9PAv+4RxQRYw+nrAglf2DxINSI
31
- o8CdBnIKvzS1JRgM172NHIwScyJdDFWxfBh1CTG9VRXTwQfyQmM0h1GThWYcdNw7
32
- W4KPvarE4dgxT4TXIIKkh/K/Z9yaYt73biInVukEI9H2HHWkuAyblxg1jcR/zy+w
33
- K27NJ2vhSpx2PPhb
34
- -----END CERTIFICATE-----
35
- date: 2013-04-11 00:00:00.000000000 Z
12
+ cert_chain: []
13
+ date: 2013-10-07 00:00:00.000000000 Z
36
14
  dependencies:
37
15
  - !ruby/object:Gem::Dependency
38
16
  name: rsolr
@@ -152,14 +130,14 @@ dependencies:
152
130
  requirements:
153
131
  - - ~>
154
132
  - !ruby/object:Gem::Version
155
- version: '1.3'
133
+ version: '1.6'
156
134
  type: :runtime
157
135
  prerelease: false
158
136
  version_requirements: !ruby/object:Gem::Requirement
159
137
  requirements:
160
138
  - - ~>
161
139
  - !ruby/object:Gem::Version
162
- version: '1.3'
140
+ version: '1.6'
163
141
  - !ruby/object:Gem::Dependency
164
142
  name: rdf
165
143
  requirement: !ruby/object:Gem::Requirement
@@ -552,7 +530,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
552
530
  version: '0'
553
531
  requirements: []
554
532
  rubyforge_project: rubyfedora
555
- rubygems_version: 2.0.0
533
+ rubygems_version: 2.0.3
556
534
  signing_key:
557
535
  specification_version: 4
558
536
  summary: A convenience libary for manipulating documents in the Fedora Repository.
checksums.yaml.gz.sig DELETED
@@ -1,3 +0,0 @@
1
- ���HQ�Pq߰� ��������}��ϰ�#��n
2
- FA�ˮ)iS����kP�j�(�ZʻIj�xגh���h6�&���$)�LAfG�7��YE��w9���F����Ħ���ۘ��y��4DdE�@8����⫐�^�# ?�iU ��@Mu�F���@+LTk��7z��7TP����
3
- I~x�W
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file