revs-utils 2.1.12 → 2.1.13

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
- ZWQ5NzU3OGZkYmYwYTRiOTNiNjU5ODFlMjc0N2VmNDY4NDdjNDlhNw==
4
+ YmMwNjA1NGQ5ZWQxMTRjMWJkNGE3YTkzMGRlYTFiNjYwZDU4MjEzZA==
5
5
  data.tar.gz: !binary |-
6
- MzY4NDNkNzRkNzk1OThjZjdjMWJmYjQxMzUzY2NiMDlhNDU5ZWJmNg==
6
+ NTgxYjhiN2Q3NmRiN2NhNWY2MGM3MGFkM2U5NzgyYjQ0OTg5MDM3YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2RlOWViMmFlYzk5YTBlNGJhMWM5ZDExNzlmMjFhNjRhNGZkOTA4NzliN2Qy
10
- MDY0MzBlYWNiOWIzZWUxNDU0YTNlYzJmNWIzNjQ5YmYzNTlmODY1OWNlYzcx
11
- ODdkNGI3ZjBjMzNhMGQ2NjZmOGE0ZTUwMDU3YTY1ZmY4NWJmOGM=
9
+ MGY2ZGNlZDdiYjJjZTgxOGU3NzZjNWE2ZjAwZDNhMDQ4Y2MxNDExN2UyMGFh
10
+ MTc1NzM3MzdlZDI4MGNiMjgxNGU1NTczY2IzYTBlYjFiZTEwNjA5NzBiMGY3
11
+ OGQzMjdmNTg3NGU4YjU1MGZhNDIxZGQwNzE4NzM0MGUyZThjNjE=
12
12
  data.tar.gz: !binary |-
13
- MGM3N2RmYWE5MjZjMDY2NjAxYTgyMDhiNTc3Y2EyYTFlOTE3YWNlMDNjYmYx
14
- OTEyYWU1MTgwZGJjYjliODA0ZGUxNzVmNzM0M2Y4MmE2MmU0NWE4YjIyZmEz
15
- NmQzYzBiODExYTgzYTE2Nzk5NTEzNTdhNmIzOWMwYjFkNzVlZTE=
13
+ MDM5ZGU5MDgzM2JhNzE0N2VmNjM3NjJmZTBkMDQ2YWI4YWZlZmQ5YjMwODA2
14
+ ZDEwOWIyMzQyOWJjZTFhZDA4YjM5OWE4NmFjODMyM2ZkNzIxMGRmNmYwODJi
15
+ YmVhNGU2NDRmZmQzYmFjNjllZGU0NzMwMWIzNzc1NjYzMTY0YTg=
data/README.rdoc CHANGED
@@ -27,6 +27,7 @@ Shared methods and functions used by revs-indexer, pre-assembly and bulk metadat
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
29
  - <b>2.1.12</b> Score computation should work with any kind of hash key
30
+ - <b>2.1.13</b> Add more information when sourceIDs are not unique
30
31
 
31
32
  == Running tests
32
33
 
@@ -1,5 +1,5 @@
1
1
  module Revs
2
2
  module Utils
3
- VERSION = "2.1.12"
3
+ VERSION = "2.1.13"
4
4
  end
5
5
  end
data/lib/revs-utils.rb CHANGED
@@ -199,7 +199,10 @@ module Revs
199
199
  sources << row[get_manifest_section(REGISTER)['sourceid']]
200
200
  end
201
201
  result4 = (sources.uniq.size == sources.size)
202
- puts "sourceIDs are not all unique" unless result4
202
+ unless result4
203
+ puts "sourceIDs are not all unique"
204
+ puts sources.uniq.map { | e | [sources.count(e), e] }.select { | c, _ | c > 1 }.sort.reverse.map { | c, e | "#{e}: #{c}" } # show all non-unique sourceIDs and their frequency
205
+ end
203
206
  return (result1 && result2 && result3 && result4)
204
207
 
205
208
  end
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.12
4
+ version: 2.1.13
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-09 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: countries