similarity_tree 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDMwNDI5ODQ4ZTU2NDhiYjM4NmViMDM2NTlhYTA1OGU2MzI4Yjk2Ng==
4
+ OWUwYTdjOTM1MTIwOWJhODA4YWVhYjM0OTBjMTE5OTIzZmZiOWVhMg==
5
5
  data.tar.gz: !binary |-
6
- ZDM2ZmI2OTY4M2Q4MTlkODQ0Yjg1NTlmMmFiMWQ2OTY5ZDE0MTk5NA==
6
+ NDdjZjU3ZDBlNGUwYTliZGM4MGRkZDdhYWYyNWNlYWI0YWRiMTQ5MA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YjhlZmM2Y2M0MDFhYjcwODU0OWJkZDE4MmM3NGViOTVkNzg2NzI0MDNiOTVl
10
- MzRjMzk2YTY2YzI5NTJjNDE1YjEwMmY0YjM5ZTJjNThkYjI4MDZiYzZkODcx
11
- OWEzZTU4MDgxODAyOGVjNWFjZjE1NTgxMTgxYjdiOWNhMjNiOTk=
9
+ MzU3YTZkNDNjY2Q4NmZhYzEyN2NhZWUzZjI1ODViOWY5ZDM2MTE4MjQ3ODI4
10
+ NDg5NWU0OGNjYmVlMjQ5ZTQ2M2U3ZWYwNWY4ODU1M2JhY2NiYzllMTI3NWZi
11
+ NDhmN2I4MGU0OGU5NzVkYTc2N2M5ZGUwN2RhM2MwMDJiMTU2ZmI=
12
12
  data.tar.gz: !binary |-
13
- NmUxNmVjOTMyMTdiYTU0Njk2MjY2YzAwNjI4NmUzMDQ4NzM5MTJlNDdmODUw
14
- NjM3YTY2ZTkwZDRiYzc1ZWI2MGU1NTJjZGVhZjI3YjA0NTM4ZWY4YzI2Yzc1
15
- NmJjMmM2NmFiZDZkNDVlODYyZmUxZjk0NTZkNDgyZjkwOTEwNzA=
13
+ Mjk5MzBiOTgwOTI2NDIxZjJjMTVhYmIyODljMDhiNWRjZmEzOGE1ODYwM2Ri
14
+ ZDFhYjE0MjcwZDY4MWY4MjZmYTBjZGViMDJjZDIzNjRiNWRhNDZlZWE2MTA3
15
+ ZmFlODZjNTkzMWJiOGU1MDI2MDU4YjVlN2JhZmZhNTJmNTVhNTQ=
@@ -29,9 +29,9 @@ module SimilarityTree
29
29
  result[:children] = children.map {|c| c.to_h} unless children.nil? || children.empty?
30
30
  result[:diff_score] = diff_score unless diff_score.nil?
31
31
 
32
- # if the content node has an as_json function, merge-in these attributes
33
- if content.respond_to?(:as_json) && content.is_a?(Hash)
34
- result = content.as_json.merge(result)
32
+ # if the content node has an as_json function, insert these attributes
33
+ if content.respond_to?(:as_json) && content.as_json.is_a?(Hash)
34
+ result[:content] = content.as_json.merge(result)
35
35
  end
36
36
  result
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module SimilarityTree
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: similarity_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kent Mewhort