revs-utils 2.0.0 → 2.0.1

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
- ZDhhZDFiZDllZWY5MjhhMjE1NTBlN2YxYzNjYTM1YjdlMjk1NTU4ZA==
4
+ NzE4MjQzODgwY2E3MDFmMjk5ZGFkZjVkZTYwMDZmYmNlNzIyYTRjZQ==
5
5
  data.tar.gz: !binary |-
6
- NjJiY2E0MGRjZTllZGE1YTRlNGJiZjg1NDcyNmM5YzcwOWNmNDQwYg==
6
+ NThhMmUwOGY1Yzk4NzFhMGY1OGQwMjBjOTQzNmJhOTE1NzQ5Y2RlYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjE0YmY4NWViN2U3ZDE5ZjRhMWM2ZWQxYWM3ZTkyNDQ5MTRkYjE4YjUyZDUx
10
- OWFkZGNjOGFjN2JjNTZlZWQzMDVlZWMzMDM2YjEzN2Y4MmVkODgyMDUxM2E3
11
- NzkyOTdhYWQ0OTRjNGNlMDA0YzYyNGUwOWY4NTcwNTI1ZGUyZmM=
9
+ NWMwZjRmNmEwYTgzYmY1ODM2YjQ0M2QwMmQ0MmZjMjBkY2JhOGMwMzJkYWEw
10
+ YjAzOTk3OGM0NzA4ZWIxYWMzMzU4NjM2Njg2NDM5OWUyMjZhZjhhMmEwMzk3
11
+ ZjJkMjhkM2Y3NzRkZTc0NTE5ZGQ3OGEzYmI5YWU5OTMzYmNkMjc=
12
12
  data.tar.gz: !binary |-
13
- NDEwNGY0NDg5MjdiYWIxMDZhZDhmMGRlZGMzYmE4NzM5OGYzZjhmZjBiOWE0
14
- NDY1Mzg2NjU0MWQ1M2JkY2Q3NjE4ZTIxNDZkOWU0YWE4N2Q1OTQ0ZjlkN2Qz
15
- MTc1NjgzMTQ1NjJjNWFmMDUyMmQ3YzNmNzQ5MjY2MWFmMGY2ZjE=
13
+ YTdjOTVmZTYzYTE4MzM4ZTdmMTA0MjVlMDNjOWM3MDgwZDRkZGU3OTJkMGNl
14
+ ODM4OTZhYWE3YWVkOTkwZDFjMDU4MTBhZThhNjhiNzY5OTUxODFhNWY4MDll
15
+ MTYzNmQxMDExMDJiMzYyNTNhN2E1Mzk0ZmI5M2ZjN2UyOWFlZGQ=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- revs-utils (2.0.0)
4
+ revs-utils (2.0.1)
5
5
  actionpack (~> 4.1.6)
6
6
  countries (= 0.9.2)
7
7
  rdf
@@ -10,16 +10,16 @@ GEM
10
10
  remote: http://rubygems.org/
11
11
  remote: http://sul-gems.stanford.edu/
12
12
  specs:
13
- actionpack (4.1.6)
14
- actionview (= 4.1.6)
15
- activesupport (= 4.1.6)
13
+ actionpack (4.1.9)
14
+ actionview (= 4.1.9)
15
+ activesupport (= 4.1.9)
16
16
  rack (~> 1.5.2)
17
17
  rack-test (~> 0.6.2)
18
- actionview (4.1.6)
19
- activesupport (= 4.1.6)
18
+ actionview (4.1.9)
19
+ activesupport (= 4.1.9)
20
20
  builder (~> 3.1)
21
21
  erubis (~> 2.7.0)
22
- activesupport (4.1.6)
22
+ activesupport (4.1.9)
23
23
  i18n (~> 0.6, >= 0.6.9)
24
24
  json (~> 1.7, >= 1.7.7)
25
25
  minitest (~> 5.1)
@@ -31,19 +31,21 @@ GEM
31
31
  currencies (0.4.2)
32
32
  diff-lcs (1.2.5)
33
33
  erubis (2.7.0)
34
- i18n (0.6.11)
35
- json (1.8.1)
34
+ i18n (0.7.0)
35
+ json (1.8.2)
36
+ link_header (0.0.8)
36
37
  lyberteam-gems-devel (1.0.1)
37
38
  rake (>= 0.8.7)
38
39
  rest-client
39
40
  mime-types (2.3)
40
- minitest (5.4.1)
41
+ minitest (5.5.1)
41
42
  netrc (0.7.7)
42
43
  rack (1.5.2)
43
- rack-test (0.6.2)
44
+ rack-test (0.6.3)
44
45
  rack (>= 1.0)
45
46
  rake (10.3.2)
46
- rdf (1.1.6)
47
+ rdf (1.1.7)
48
+ link_header (~> 0.0, >= 0.0.8)
47
49
  rest-client (1.7.2)
48
50
  mime-types (>= 1.16, < 3.0)
49
51
  netrc (~> 0.7)
data/README.rdoc CHANGED
@@ -19,10 +19,11 @@ Shared methods and functions used by revs-indexer, pre-assembly and bulk metadat
19
19
  - <b>1.0.7</b> Label column needs to be there but does not need to have a value to register
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
+ - <b>2.0.1</b> Add more common format corrections
22
23
 
23
24
  == Running tests
24
25
 
25
- ./bin/run_all_tests
26
+ bundle exec rake spec
26
27
 
27
28
  == Release the gem to the gemserver
28
29
 
@@ -36,7 +37,7 @@ gem build revs-utils.gemspec
36
37
 
37
38
  6. Release the gem to RubyGems:
38
39
 
39
- gem push revs-utils-1.0.8.gem # substitute actual version number
40
+ gem push revs-utils-2.0.1.gem # substitute actual version number
40
41
 
41
42
  == Installation
42
43
 
@@ -1,5 +1,5 @@
1
1
  module Revs
2
2
  module Utils
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
data/lib/revs-utils.rb CHANGED
@@ -157,6 +157,10 @@ module Revs
157
157
  "slides/color transparency"=>"color transparencies",
158
158
  "color negatives/slides"=>"color negatives",
159
159
  "black-and-white negative strips"=>"black-and-white negatives",
160
+ "black and white"=>"black-and-white negatives",
161
+ "black-and-white"=>"black-and-white negatives",
162
+ "black and white negative"=>"black-and-white negatives",
163
+ "black and white negatives"=>"black-and-white negatives",
160
164
  "color transparency"=>"color transparencies",
161
165
  "slide"=>"slides"
162
166
  }
@@ -56,12 +56,12 @@ describe "Revs-Utils" do
56
56
  @revs.revs_lookup_marque('Fords').should == {"url"=>"http://id.loc.gov/authorities/subjects/sh85050464", "value"=>"Ford automobile"}
57
57
  @revs.revs_lookup_marque('Ford Automobiles').should == {"url"=>"http://id.loc.gov/authorities/subjects/sh85050464", "value"=>"Ford automobile"}
58
58
  @revs.revs_lookup_marque('Porsche').should == {"url"=>"http://id.loc.gov/authorities/subjects/sh85105037", "value"=>"Porsche automobiles"}
59
- @revs.revs_lookup_marque('Bogus').should be_false
60
- @revs.revs_lookup_marque('').should be_false
59
+ @revs.revs_lookup_marque('Bogus').should be_falsey
60
+ @revs.revs_lookup_marque('').should be_falsey
61
61
  end
62
62
 
63
63
  it "should clean up some common format errors from an array" do
64
- @revs.revs_check_formats(['black-and-white negative','color negative','leave alone']).should == ['black-and-white negatives','color negatives','leave alone']
64
+ @revs.revs_check_formats(['black and white','color negative','black-and-white negative']).should == ['black-and-white negatives','color negatives','black-and-white negatives']
65
65
  end
66
66
 
67
67
  it "should clean up some common format errors from a string" do
@@ -75,17 +75,17 @@ describe "Revs-Utils" do
75
75
  end
76
76
 
77
77
  it "should indicate if a date is valid" do
78
- @revs.get_full_date('bogus').should be_false
78
+ @revs.get_full_date('bogus').should be_falsey
79
79
  @revs.get_full_date('5/1/1959').should == Date.strptime("5/1/1959", '%m/%d/%Y')
80
80
  @revs.get_full_date('5-1-1959').should == Date.strptime("5/1/1959", '%m/%d/%Y')
81
- @revs.get_full_date('5-1-59').should be_false # two digit year is not allowed
81
+ @revs.get_full_date('5-1-59').should be_falsey # two digit year is not allowed
82
82
  end
83
83
 
84
84
  it "should indicate if we have a valid year" do
85
- @revs.is_valid_year?('1959').should be_true
86
- @revs.is_valid_year?('bogus').should be_false
87
- @revs.is_valid_year?('1700').should be_false # too old! no cars even existed yet
88
- @revs.is_valid_year?('1700',1600).should be_true # unless we allow it to be ok
85
+ @revs.is_valid_year?('1959').should be_truthy
86
+ @revs.is_valid_year?('bogus').should be_falsey
87
+ @revs.is_valid_year?('1700').should be_falsey # too old! no cars even existed yet
88
+ @revs.is_valid_year?('1700',1600).should be_truthy # unless we allow it to be ok
89
89
  end
90
90
 
91
91
 
@@ -94,12 +94,12 @@ describe "Revs-Utils" do
94
94
  @revs.revs_get_country('US').should == "United States"
95
95
  @revs.revs_get_country('United States').should == "United States"
96
96
  @revs.revs_get_country('italy').should == "Italy"
97
- @revs.revs_get_country('Bogus').should be_false
97
+ @revs.revs_get_country('Bogus').should be_falsey
98
98
  end
99
99
 
100
100
  it "should parse a city/state correctly" do
101
101
  @revs.revs_get_city_state('San Mateo (Calif.)').should == ['San Mateo','Calif.']
102
- @revs.revs_get_city_state('San Mateo').should be_false
102
+ @revs.revs_get_city_state('San Mateo').should be_falsey
103
103
  @revs.revs_get_city_state('Indianapolis (Ind.)').should == ['Indianapolis','Ind.']
104
104
  end
105
105
 
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.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Mangiafico
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-14 00:00:00.000000000 Z
11
+ date: 2015-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: countries
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubyforge_project:
156
- rubygems_version: 2.2.2
156
+ rubygems_version: 2.4.2
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Shared methods and functions used by revs-indexer, pre-assembly and bulk