om 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.textile +4 -0
- data/lib/om/version.rb +1 -1
- data/lib/om/xml/term_value_operators.rb +0 -7
- data/spec/unit/term_value_operators_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad2b503450c856d7a7e3dbd55bab9545419c04f9
|
4
|
+
data.tar.gz: 2c97e1ce0d2f2b2524e1cca742726d50a2fc814f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9cf738d9afa3d3c08d1e2a2cb349b2c6a13b7dfc42b7400384094f3fed29f324cdf83cf1511e69452c24fb07f937a817b9759fdbbb19a2cda6b30b3bc1e16fc
|
7
|
+
data.tar.gz: 879531480232ee5d238745cba12be106c0b3566b38827053d930afbdcfffe78f88738159b7f63753057bb6e0a03b6e0dae2a76c7f22f79a5c2684a55b1eb31c7
|
data/History.textile
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
h3. 3.0.1 (25 Jun 2013)
|
2
|
+
Fix bug where values that were the same as the existing values were
|
3
|
+
removed from the update list
|
4
|
+
|
1
5
|
h3. 3.0.0 (20 Jun 2013)
|
2
6
|
Return an array instead of a hash Term#update_values
|
3
7
|
When passing an array to Term#update_values, it will overwrite all of
|
data/lib/om/version.rb
CHANGED
@@ -89,13 +89,6 @@ module OM::XML::TermValueOperators
|
|
89
89
|
# Populate the response hash appropriately, using hierarchical names for terms as keys rather than the given pointers.
|
90
90
|
result = new_values.dup
|
91
91
|
|
92
|
-
# Skip any submitted values if the new value matches the current values
|
93
|
-
new_values.each_with_index do |val, index|
|
94
|
-
if !val.nil? && current_values[index] == val
|
95
|
-
new_values.delete_at(index)
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
92
|
# Fill out the pointer completely if the final term is a NamedTermProxy
|
100
93
|
if term.kind_of? OM::XML::NamedTermProxy
|
101
94
|
pointer.pop
|
@@ -92,6 +92,12 @@ describe "OM::XML::TermValueOperators" do
|
|
92
92
|
@article.update_values( { [{"person"=>"0"}, "role"]=>"the role" }).should == expected_result
|
93
93
|
@article.update_values( { [{:person=>0}, :role]=>"the role" }).should == expected_result
|
94
94
|
end
|
95
|
+
|
96
|
+
it "should replace stuff with the same value (in this case 'one')" do
|
97
|
+
@article.update_values( { [{:person=>0}, :role]=>["one"] })
|
98
|
+
@article.update_values( { [{:person=>0}, :role]=>["one", "two"] })
|
99
|
+
@article.term_values( {:person=>0}, :role).should == ["one", "two"]
|
100
|
+
end
|
95
101
|
|
96
102
|
it "should traverse named term proxies transparently" do
|
97
103
|
@article.term_values( :journal, :issue, :start_page).should_not == ["108"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: om
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zumwalt
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|