om 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +3 -4
- data/History.textile +4 -0
- data/VERSION +1 -1
- data/lib/om/xml/term_value_operators.rb +1 -0
- data/om.gemspec +2 -2
- data/spec/unit/term_value_operators_spec.rb +6 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
@@ -2,15 +2,14 @@ GEM
|
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
4
|
columnize (0.3.2)
|
5
|
-
facets (2.9.
|
5
|
+
facets (2.9.1)
|
6
6
|
git (1.2.5)
|
7
|
-
jeweler (1.5.
|
7
|
+
jeweler (1.5.2)
|
8
8
|
bundler (~> 1.0.0)
|
9
9
|
git (>= 1.2.5)
|
10
10
|
rake
|
11
11
|
linecache (0.43)
|
12
|
-
mocha (0.9.
|
13
|
-
rake
|
12
|
+
mocha (0.9.12)
|
14
13
|
nokogiri (1.4.4)
|
15
14
|
rake (0.8.7)
|
16
15
|
rspec (1.3.1)
|
data/History.textile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
@@ -137,6 +137,7 @@ module OM::XML::TermValueOperators
|
|
137
137
|
|
138
138
|
builder = Nokogiri::XML::Builder.with(parent_node) do |xml|
|
139
139
|
new_values.each do |builder_new_value|
|
140
|
+
builder_new_value.gsub!(/'/, "\\\\'") # escape any apostrophes in the new value
|
140
141
|
builder_arg = eval('"'+ template + '"') # this inserts builder_new_value into the builder template
|
141
142
|
eval(builder_arg)
|
142
143
|
end
|
data/om.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{om}
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.1"
|
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"]
|
12
|
-
s.date = %q{2011-03-
|
12
|
+
s.date = %q{2011-03-08}
|
13
13
|
s.description = %q{OM (Opinionated Metadata): A library to help you tame sprawling XML schemas like MODS. Wraps Nokogiri documents in objects with miscellaneous helper methods for doing things like retrieve generated xpath queries or look up properties based on a simplified DSL}
|
14
14
|
s.email = %q{matt.zumwalt@yourmediashelf.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -106,7 +106,12 @@ describe "OM::XML::TermValueOperators" do
|
|
106
106
|
@article.find_by_terms({:journal=>0}, {:issue=>1}, :pages, :start).first.text.should == "434"
|
107
107
|
end
|
108
108
|
|
109
|
-
|
109
|
+
it "should accommodate appending term values with apostrophes in them" do
|
110
|
+
@article.find_by_terms(:person, :description).should be_empty # making sure that there's no description node -- forces a value_append
|
111
|
+
terms_update_hash = {[:person, :description]=>" 'phrul gyi lde mig"}
|
112
|
+
result = @article.update_values(terms_update_hash)
|
113
|
+
@article.term_values(:person, :description).should include(" 'phrul gyi lde mig")
|
114
|
+
end
|
110
115
|
|
111
116
|
### Examples copied over form nokogiri_datastream_spec
|
112
117
|
|
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:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
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-03-
|
18
|
+
date: 2011-03-08 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|