active-fedora 1.1.5 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,11 @@
1
+ 1.1.6
2
+
3
+ Bug #959: Base.delete fails to delete objects from Solr even when ENABLE_SOLR_UPDATES == true
4
+
5
+ 1.1.5
6
+
7
+ Feature: Base.save triggers Solrizer if you've required the gem in your app
8
+
1
9
  1.1.2
2
10
 
3
11
  Bug: Model.find_by_solr fails when you pass it an argument of :all
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.5
1
+ 1.1.6
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{active-fedora}
8
- s.version = "1.1.5"
8
+ s.version = "1.1.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Zumwalt", "McClain Looney"]
12
- s.date = %q{2010-05-16}
12
+ s.date = %q{2010-06-14}
13
13
  s.description = %q{ActiveFedora provides for creating and managing objects in the Fedora Repository Architecture.}
14
14
  s.email = %q{matt.zumwalt@yourmediashelf.com}
15
15
  s.extra_rdoc_files = [
@@ -105,8 +105,7 @@ module ActiveFedora
105
105
  #the underlying inner_object.
106
106
  def delete
107
107
  Fedora::Repository.instance.delete(@inner_object)
108
- escaped_pid = self.pid.gsub(/(:)/, '\\:')
109
- SolrService.instance.conn.delete(escaped_pid) if ENABLE_SOLR_UPDATES
108
+ SolrService.instance.conn.delete(self.pid) if ENABLE_SOLR_UPDATES
110
109
  end
111
110
 
112
111
 
@@ -12,7 +12,10 @@ describe ActiveFedora::Base do
12
12
  end
13
13
 
14
14
  after(:each) do
15
- @test_object.delete
15
+ begin
16
+ @test_object.delete
17
+ rescue
18
+ end
16
19
  end
17
20
 
18
21
 
@@ -196,5 +199,15 @@ describe ActiveFedora::Base do
196
199
  @test_object.modified_date.should_not be_nil
197
200
  end
198
201
  end
202
+
203
+ describe "delete" do
204
+
205
+ it "should delete the object from Fedora and Solr" do
206
+ ActiveFedora::Base.find_by_solr(@test_object.pid).hits.first["id"].should == @test_object.pid
207
+ @test_object.delete
208
+ ActiveFedora::Base.find_by_solr(@test_object.pid).hits.should be_empty
209
+ end
210
+
211
+ end
199
212
 
200
213
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 1
8
- - 5
9
- version: 1.1.5
8
+ - 6
9
+ version: 1.1.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matt Zumwalt
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-16 00:00:00 -05:00
18
+ date: 2010-06-14 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency