revs-utils 2.1.11 → 2.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmNlOTFhOGJkN2JiMWYyYjAxZjZlNTUyNTI1MWNhY2M2N2E2NDJmNQ==
4
+ ZWQ5NzU3OGZkYmYwYTRiOTNiNjU5ODFlMjc0N2VmNDY4NDdjNDlhNw==
5
5
  data.tar.gz: !binary |-
6
- NzdjMTJjMjhhZDM4NzVlNTY3NmI5MjI5ZTdiZGU3NTVmMzA4NTg0YQ==
6
+ MzY4NDNkNzRkNzk1OThjZjdjMWJmYjQxMzUzY2NiMDlhNDU5ZWJmNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODk3OTg3OTBhYzQ4MjFjZTMwN2E3YjcyNDU1YmIzYzI1MjBkMWQ5NGZmOWJm
10
- Y2U3MWMzMzVkNDFmYWIyM2VmODQ0ZDA4MWNjYmE4MDQ3MDE1NzEzZmE4NDky
11
- NzJkYWY3NzQ3ZjU5ZDFjZDkyZWRlZTVlYzU5NWQ2YzUxOGRmZWE=
9
+ Y2RlOWViMmFlYzk5YTBlNGJhMWM5ZDExNzlmMjFhNjRhNGZkOTA4NzliN2Qy
10
+ MDY0MzBlYWNiOWIzZWUxNDU0YTNlYzJmNWIzNjQ5YmYzNTlmODY1OWNlYzcx
11
+ ODdkNGI3ZjBjMzNhMGQ2NjZmOGE0ZTUwMDU3YTY1ZmY4NWJmOGM=
12
12
  data.tar.gz: !binary |-
13
- MDc0Zjc5ZmE0ZTFkYTdiNGViYWVjYzAyZWFjNWI0MmEzM2Q5ODQ0ZTdjZGEx
14
- MDI2NjllOTBjM2FmMTYwNTIzOThhMTk1YTJkY2NhYTAxMzk0OTkwMWM4YmJh
15
- MWQwNjkzYjg2Mjc2OGMwM2E2YzE3NWIwYjkwNDVjYjQ2Zjk5NzU=
13
+ MGM3N2RmYWE5MjZjMDY2NjAxYTgyMDhiNTc3Y2EyYTFlOTE3YWNlMDNjYmYx
14
+ OTEyYWU1MTgwZGJjYjliODA0ZGUxNzVmNzM0M2Y4MmE2MmU0NWE4YjIyZmEz
15
+ NmQzYzBiODExYTgzYTE2Nzk5NTEzNTdhNmIzOWMwYjFkNzVlZTE=
data/README.rdoc CHANGED
@@ -26,6 +26,7 @@ Shared methods and functions used by revs-indexer, pre-assembly and bulk metadat
26
26
  - <b>2.1.0 - 2.1.4</b> Add field mapping and other common methods used in both revs digital library and revs-indexing
27
27
  - <b>2.1.10</b> Display output showing reasons for validation failures when checking manifests
28
28
  - <b>2.1.11</b> Allow for optional metadata columns in the manifest
29
+ - <b>2.1.12</b> Score computation should work with any kind of hash key
29
30
 
30
31
  == Running tests
31
32
 
@@ -1,5 +1,5 @@
1
1
  module Revs
2
2
  module Utils
3
- VERSION = "2.1.11"
3
+ VERSION = "2.1.12"
4
4
  end
5
5
  end
data/lib/revs-utils.rb CHANGED
@@ -78,12 +78,14 @@ module Revs
78
78
 
79
79
  # these are used in the revs solr document in the main revs digital library rails app, as well as the revs-indexing-service app
80
80
  def revs_location(doc_hash)
81
+ doc_hash=doc_hash.with_indifferent_access
81
82
  [doc_hash[:city_sections_ssi],doc_hash[:cities_ssi],doc_hash[:states_ssi],doc_hash[:countries_ssi]].reject(&:blank?).join(', ')
82
83
  end
83
84
 
84
85
  # these are used in the revs solr document in the main revs digital library rails app, as well as the revs-indexing-service app
85
86
  def revs_compute_score(doc_hash)
86
87
 
88
+ doc_hash=doc_hash.with_indifferent_access
87
89
  total_score=0
88
90
  total_weights=0
89
91
  revs_field_mappings.each do |field_name,field_config|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revs-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.11
4
+ version: 2.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Mangiafico
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-03 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: countries