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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b79d1d1f65ee425169a4ccbf20bf083ce6b7194
4
- data.tar.gz: 0f4bd140fffda33f93e14bc2a9ddc21da17e186c
3
+ metadata.gz: ad2b503450c856d7a7e3dbd55bab9545419c04f9
4
+ data.tar.gz: 2c97e1ce0d2f2b2524e1cca742726d50a2fc814f
5
5
  SHA512:
6
- metadata.gz: 7042ec3c299b99a8cce474667d3bf88a1a66b2f79c401d78f0b27c57562e2929e1332f3200b35bb12376688ba2f9dfb648cc335449653407aff83f6328233624
7
- data.tar.gz: 8b6c21a6e6b5511ababcb568ab9af7e895704dfd643d14f893ebacb2a404d212a7e976ebba86ea5f1445e703e5f17a64f2ffa0d7f1b1bfefaddb7951aedf7bc0
6
+ metadata.gz: b9cf738d9afa3d3c08d1e2a2cb349b2c6a13b7dfc42b7400384094f3fed29f324cdf83cf1511e69452c24fb07f937a817b9759fdbbb19a2cda6b30b3bc1e16fc
7
+ data.tar.gz: 879531480232ee5d238745cba12be106c0b3566b38827053d930afbdcfffe78f88738159b7f63753057bb6e0a03b6e0dae2a76c7f22f79a5c2684a55b1eb31c7
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Om
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
@@ -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.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-21 00:00:00.000000000 Z
12
+ date: 2013-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport