rubydora 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
@@ -88,6 +88,12 @@ module Rubydora
88
88
  @content = new_content
89
89
  end
90
90
 
91
+ # Content_will_change! would be dynamically created by ActiveModel::Dirty, but it would eagerly load the content.
92
+ # We don't want to do that.
93
+ def content_will_change!
94
+ changed_attributes[:content] = nil
95
+ end
96
+
91
97
  # Retrieve the datastream profile as a hash (and cache it)
92
98
  # @return [Hash] see Fedora #getDatastream documentation for keys
93
99
  def profile
@@ -64,7 +64,6 @@ describe Rubydora::Datastream do
64
64
  end
65
65
 
66
66
  it "should rewind IO-type contents" do
67
- @mock_repository.should_receive(:datastream_dissemination).with(hash_including(:pid => 'pid', :dsid => 'dsid')).and_return('asdf')
68
67
  @mock_io = File.open('rubydora.gemspec')
69
68
  @mock_io.should_receive(:rewind)
70
69
 
@@ -105,7 +104,6 @@ describe Rubydora::Datastream do
105
104
  end
106
105
 
107
106
  it "should update the datastream when the content is changed" do
108
- @mock_repository.should_receive(:datastream_dissemination).with(hash_including(:pid => 'pid', :dsid => 'dsid')).and_return('asdf')
109
107
  @mock_repository.should_receive(:modify_datastream).with(hash_including(:content => 'test'))
110
108
  @datastream.content = "test"
111
109
  @datastream.save
@@ -113,7 +111,6 @@ describe Rubydora::Datastream do
113
111
 
114
112
  it "should be marked as changed when the content is updated" do
115
113
  @datastream.changed?.should be_false
116
- @mock_repository.should_receive(:datastream_dissemination).with(hash_including(:pid => 'pid', :dsid => 'dsid')).and_return('test')
117
114
  @datastream.content = "test"
118
115
  @datastream.changed?.should be_true
119
116
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubydora
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Beer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-14 00:00:00 -05:00
18
+ date: 2011-10-17 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency