active_fedora-crosswalks 0.0.6 → 0.0.7
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.
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
MTUyZTM3NzViNTgzZGQ1OGI3MWI1ZjVkMzEzM2MwMDJjMDI4NmMyMw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
OTMwZThhMjljNTRlMWFlNzQxYmVlMGZlNjdkMDZjNGVmNzVlZTA2MQ==
|
|
7
7
|
!binary "U0hBNTEy":
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
YzYzYmM1MzA0YmQ0NWU1MGE1NmY3YjFhNGEwYWUyZWMyM2JiMzIyMjk0ZWFi
|
|
10
|
+
ZmUyZWM4MTI5YzNhNjg2ZWIxMGU4ZmNiM2U0NDRjNmQxZWViNzcxOGMxOTcw
|
|
11
|
+
Yjc3OGYzZWFmZjY1N2E2NzQ4ZmUzNDhiOTYyNjdiYWI1MTM3OGE=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
YjU4MTM2MjJmMzYwNmFmOTE4NWE1MGY2YzRkMDEwNWI3OWYxMTI2ZWVlYmJh
|
|
14
|
+
ZmZlMzQ4MjA4NWVlZjA5OGIyNjcxY2UxMmMzNmE4MDgyMjIxYmMyNzg4Y2Ri
|
|
15
|
+
ZjgwYzExZWZlMTVjM2EwY2JlYWZlYTJhOTFkMmU5NjY4YWYxYmY=
|
|
@@ -4,10 +4,17 @@ module ActiveFedora
|
|
|
4
4
|
# Override content so when it's called it performs crosswalks first.
|
|
5
5
|
def content
|
|
6
6
|
crosswalkers.each do |crosswalker|
|
|
7
|
-
crosswalker.
|
|
7
|
+
crosswalker.sync_values
|
|
8
8
|
end
|
|
9
9
|
super
|
|
10
10
|
end
|
|
11
|
+
def content=(*args)
|
|
12
|
+
result = super(*args)
|
|
13
|
+
crosswalkers.each do |crosswalker|
|
|
14
|
+
crosswalker.sync_values(:force_target => true)
|
|
15
|
+
end
|
|
16
|
+
return result
|
|
17
|
+
end
|
|
11
18
|
def crosswalk_fields
|
|
12
19
|
@crosswalk_fields ||= []
|
|
13
20
|
end
|
|
@@ -19,6 +19,30 @@ describe ActiveFedora::Crosswalks::Crosswalkable do
|
|
|
19
19
|
it "should be able to reload" do
|
|
20
20
|
expect {asset.load_datastreams}.not_to raise_error
|
|
21
21
|
end
|
|
22
|
+
context "when content is set directly" do
|
|
23
|
+
context "on the crosswalk datastream" do
|
|
24
|
+
before(:each) do
|
|
25
|
+
asset.xwalkMetadata.title = "Test"
|
|
26
|
+
old_content = asset.xwalkMetadata.content
|
|
27
|
+
asset.xwalkMetadata.title = "Testing"
|
|
28
|
+
asset.xwalkMetadata.content = old_content
|
|
29
|
+
end
|
|
30
|
+
it "should set the source datastream" do
|
|
31
|
+
expect(asset.descMetadata.other_title).to eq ["Test"]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
context "on the source datastream" do
|
|
35
|
+
before(:each) do
|
|
36
|
+
asset.descMetadata.other_title = "Test"
|
|
37
|
+
old_content = asset.descMetadata.content
|
|
38
|
+
asset.descMetadata.other_title = "Testing"
|
|
39
|
+
asset.descMetadata.content = old_content
|
|
40
|
+
end
|
|
41
|
+
it "should set the crosswalked datastream" do
|
|
42
|
+
expect(asset.xwalkMetadata.title).to eq ["Test"]
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
22
46
|
context "when a field is set" do
|
|
23
47
|
context "on the source datastream" do
|
|
24
48
|
before(:each) do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_fedora-crosswalks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Trey Terrell
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-10-
|
|
11
|
+
date: 2013-10-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|