om 1.4.0 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.textile CHANGED
@@ -1,3 +1,7 @@
1
+ h3. 1.4.2
2
+
3
+ "HYDRA-667":https://jira.duraspace.org/browse/HYDRA-667 Fixed bug where updating nodes wasn't marking the document as dirty
4
+
1
5
  h3. 1.4.0
2
6
 
3
7
  Added dynamic node access DSL. Added a warning when calling an index on a proxy term.
data/lib/om/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Om
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.2"
3
3
  end
@@ -73,6 +73,7 @@ module OM
73
73
  @document.term_value_update(xpath, y.to_i, z)
74
74
  end
75
75
  end
76
+ @document.dirty = true
76
77
  end
77
78
 
78
79
  def sanitize_new_values(new_values)
data/lib/om/xml/term.rb CHANGED
@@ -250,9 +250,9 @@ class OM::XML::Term
250
250
  if self.path.include?(":")
251
251
  ns_prefix = self.path[0..path.index(":")-1]
252
252
  path_name = self.path[path.index(":")+1..-1]
253
- template = "xml[\"#{ns_prefix}\"].#{path_name}( #{OM::XML.delimited_list(node_options)} )" + node_child_template
253
+ template = "xml['#{ns_prefix}'].#{path_name}( #{OM::XML.delimited_list(node_options)} )" + node_child_template
254
254
  elsif !self.namespace_prefix.nil? and self.namespace_prefix != 'oxns'
255
- template = "xml[\"#{self.namespace_prefix}\"].#{self.path}( #{OM::XML.delimited_list(node_options)} )" + node_child_template
255
+ template = "xml['#{self.namespace_prefix}'].#{self.path}( #{OM::XML.delimited_list(node_options)} )" + node_child_template
256
256
  else
257
257
  template = "xml.#{self.path}( #{OM::XML.delimited_list(node_options)} )" + node_child_template
258
258
  end
@@ -67,6 +67,7 @@ describe "OM::XML::DynamicNode" do
67
67
  end
68
68
 
69
69
  it "should append nodes at the specified index if possible" do
70
+ @article.expects(:dirty=).with(true).twice
70
71
  @article.journal.title_info = ["all", "for", "the"]
71
72
  @article.journal.title_info(3, 'glory')
72
73
  @article.term_values(:journal, :title_info).should == ["all", "for", "the", "glory"]
@@ -173,9 +173,9 @@ describe "OM::XML::Term" do
173
173
 
174
174
  it "should work for namespaced nodes" do
175
175
  @ical_date = OM::XML::Term.new(:ical_date, :path=>"ical:date")
176
- @ical_date.xml_builder_template.should == "xml[\"ical\"].date( '\#{builder_new_value}' )"
176
+ @ical_date.xml_builder_template.should == "xml[\'ical\'].date( '\#{builder_new_value}' )"
177
177
  @ical_date = OM::XML::Term.new(:ical_date, :path=>"date", :namespace_prefix=>"ical")
178
- @ical_date.xml_builder_template.should == "xml[\"ical\"].date( '\#{builder_new_value}' )"
178
+ @ical_date.xml_builder_template.should == "xml[\'ical\'].date( '\#{builder_new_value}' )"
179
179
  end
180
180
 
181
181
  it "should work for nodes with default_content_path" do
@@ -87,6 +87,8 @@ describe "OM::XML::Terminology" do
87
87
 
88
88
  it "should expand proxy and get sub terms" do
89
89
  @test_full_terminology.retrieve_node(:title, :main_title_lang).xpath.should == '//oxns:titleInfo/oxns:title/@xml:lang'
90
+ ### retrieve_term() will not cross proxies
91
+ @test_full_terminology.retrieve_term(:title_info, :main_title, :main_title_lang).xpath.should == '//oxns:titleInfo/oxns:title/@xml:lang'
90
92
  end
91
93
 
92
94
  it "constructs templates for value-driven searches" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: om
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 4
9
- - 0
10
- version: 1.4.0
9
+ - 2
10
+ version: 1.4.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Zumwalt
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-29 00:00:00 -05:00
18
+ date: 2011-09-21 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  requirements: []
214
214
 
215
215
  rubyforge_project:
216
- rubygems_version: 1.5.2
216
+ rubygems_version: 1.6.2
217
217
  signing_key:
218
218
  specification_version: 3
219
219
  summary: "OM (Opinionated Metadata): A library to help you tame sprawling XML schemas like MODS."