revs-utils 2.0.1 → 2.0.3

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
- NzE4MjQzODgwY2E3MDFmMjk5ZGFkZjVkZTYwMDZmYmNlNzIyYTRjZQ==
4
+ YmQyZmJhNjFjNWRjNjQyZDg2OTcxMWYyYTExZTQzMDA1ZTVlNjFmYQ==
5
5
  data.tar.gz: !binary |-
6
- NThhMmUwOGY1Yzk4NzFhMGY1OGQwMjBjOTQzNmJhOTE1NzQ5Y2RlYg==
6
+ MmQxZjNiYmYwOGVmNjhhYzRkMTdlNzA4N2VlODExOGQ4MDliNTZjOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWMwZjRmNmEwYTgzYmY1ODM2YjQ0M2QwMmQ0MmZjMjBkY2JhOGMwMzJkYWEw
10
- YjAzOTk3OGM0NzA4ZWIxYWMzMzU4NjM2Njg2NDM5OWUyMjZhZjhhMmEwMzk3
11
- ZjJkMjhkM2Y3NzRkZTc0NTE5ZGQ3OGEzYmI5YWU5OTMzYmNkMjc=
9
+ ZGJkMzM4ODFjMmY4ODg5Y2I3YTg4ZTQwZGY3MmJiOTFlY2I4NzgwNmJjYzZj
10
+ NzM4ZDQwNWZlM2Q2Y2VhOGM3YzBkYjk2ODczMjhmYTdhODY2ZGYzNTc0Zjdl
11
+ ZDFjNjMyYzkzNTUyYTcwNjMwNDY4NzAwYTg3NjRmOWMyMWU5MWM=
12
12
  data.tar.gz: !binary |-
13
- YTdjOTVmZTYzYTE4MzM4ZTdmMTA0MjVlMDNjOWM3MDgwZDRkZGU3OTJkMGNl
14
- ODM4OTZhYWE3YWVkOTkwZDFjMDU4MTBhZThhNjhiNzY5OTUxODFhNWY4MDll
15
- MTYzNmQxMDExMDJiMzYyNTNhN2E1Mzk0ZmI5M2ZjN2UyOWFlZGQ=
13
+ MzE2NDhiMjVkY2UwZThiOTQ5ZjEwMWViN2NlNjZlMDlmZDEwZTg4ZTI4ZmQ5
14
+ YjZhMmM3OGQ5YmJjMmI2MjJkZjk1YTI5N2IyNGRkY2I1NjQ2YjJjZmYxYzFl
15
+ YjUwZjIwYTliYTAzY2MyY2FjZmY0Njc0OWI3ZTYyMDUzMGY4OTc=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- revs-utils (2.0.1)
4
+ revs-utils (2.0.2)
5
5
  actionpack (~> 4.1.6)
6
6
  countries (= 0.9.2)
7
7
  rdf
data/README.rdoc CHANGED
@@ -20,6 +20,7 @@ Shared methods and functions used by revs-indexer, pre-assembly and bulk metadat
20
20
  - <b>1.0.8</b> Update clean_collection_name method to deal with other possible names
21
21
  - <b>2.0.0</b> Updating to use ActionPack 4 for Rails 4 applications. For Rails 3, continue to use 1.x.y releases.
22
22
  - <b>2.0.1</b> Add more common format corrections
23
+ - <b>2.0.2 and 2.0.3</b> Update valid for metadata method so it is not sensitive to blank or uppercase columns
23
24
 
24
25
  == Running tests
25
26
 
@@ -1,5 +1,5 @@
1
1
  module Revs
2
2
  module Utils
3
- VERSION = "2.0.1"
3
+ VERSION = "2.0.3"
4
4
  end
5
5
  end
data/lib/revs-utils.rb CHANGED
@@ -99,7 +99,7 @@ module Revs
99
99
  #Pass this function a CSV file and it will return true if the proper headers are there and each entry has the required fields filled in.
100
100
  def valid_for_metadata(file_path)
101
101
  file = read_csv_with_headers(file_path)
102
- file_headers=file[0].keys
102
+ file_headers=file[0].keys.reject(&:blank?).collect(&:downcase)
103
103
  #The file doesn't need to have all the metadata values, it just can't have headers that aren't used for metadata or registration
104
104
  if file_headers.include?('date') && file_headers.include?('year') # can't have both date and year
105
105
  return false
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.0.1
4
+ version: 2.0.3
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-01-15 00:00:00.000000000 Z
11
+ date: 2015-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: countries