revs-utils 2.1.3 → 2.1.4
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 +8 -8
- data/README.rdoc +1 -1
- data/lib/revs-utils/version.rb +1 -1
- data/lib/revs-utils.rb +1 -1
- data/spec/revs-utils_spec.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2RjZDhhMzYxMmY5YjRlNDk0OGYyYzA3OTIyNjE3OTFkZGM2OTY5Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDRkOWQ3OGI0NWRhMGQ2NmEwM2MzOTY3YWM5M2FmZTA1ZWI1YmExOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzYxZTczN2FiZDk0N2Y3YWM1ZGIzNDY1MWMyYWU2OTYzNmE4ZDk0MzcyYTY5
|
10
|
+
MTJlOWRmYjQxOTViMDgxZDgwZTI4OTcwMWE1MmQxYjczYjU1ZTU3MzdlN2M0
|
11
|
+
ODlhNjk4YzdmMWRkZDU3YWM5MjVkNGViZmJlYzg1ZWFlZTU3MDc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2RhNDllNjliZjJiNjU5Y2JhMTU2YTYzYWU3MmJjOTBiZGIxMWYzMWQwZjQ3
|
14
|
+
MTIxYmQ1NmU1MWRiZGQ5ODc5NzM1YTNmYzM5ZjU0NGY2MjIyYjEwNGQ0NTBh
|
15
|
+
NGIyMDg4YjBkOWMwNjVjYzk5YWI2MTNkYzcxYmUxN2I4ZjViOGI=
|
data/README.rdoc
CHANGED
@@ -23,7 +23,7 @@ Shared methods and functions used by revs-indexer, pre-assembly and bulk metadat
|
|
23
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
|
24
24
|
- <b>2.0.4</b> Fix issues with year parsing
|
25
25
|
- <b>2.0.10</b> Update to latest version of actionpack
|
26
|
-
- <b>2.1.0</b> Add field mapping and other common methods used in both revs digital library and revs-indexing
|
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
|
|
28
28
|
== Running tests
|
29
29
|
|
data/lib/revs-utils/version.rb
CHANGED
data/lib/revs-utils.rb
CHANGED
@@ -72,7 +72,7 @@ module Revs
|
|
72
72
|
|
73
73
|
# these are used in the revs solr document in the main revs digital library rails app, as well as the revs-indexing-service app
|
74
74
|
def revs_location(doc_hash)
|
75
|
-
[doc_hash[:
|
75
|
+
[doc_hash[:city_sections_ssi],doc_hash[:cities_ssi],doc_hash[:states_ssi],doc_hash[:countries_ssi]].reject(&:blank?).join(', ')
|
76
76
|
end
|
77
77
|
|
78
78
|
# these are used in the revs solr document in the main revs digital library rails app, as well as the revs-indexing-service app
|
data/spec/revs-utils_spec.rb
CHANGED
@@ -156,6 +156,13 @@ describe "Revs-Utils" do
|
|
156
156
|
@revs.revs_get_state_name('IN').should == "Indiana"
|
157
157
|
end
|
158
158
|
|
159
|
+
it "should parse locations" do
|
160
|
+
@revs.revs_location({:cities_ssi=>'Paris',:countries_ssi=>'France'}).should == 'Paris, France'
|
161
|
+
@revs.revs_location({:id=>'123',:title_tsi=>'Test'}).should == ''
|
162
|
+
@revs.revs_location({:city_sections_ssi=>'Rue Cool 123',:cities_ssi=>'Paris',:countries_ssi=>'France'}).should == 'Rue Cool 123, Paris, France'
|
163
|
+
@revs.revs_location({:city_sections_ssi=>'Cool Street',:cities_ssi=>'Paris',:states_ssi=>'Texas',:countries_ssi=>'USA'}).should == 'Cool Street, Paris, Texas, USA'
|
164
|
+
end
|
165
|
+
|
159
166
|
it "should parse 1950s and 1950's correctly" do
|
160
167
|
|
161
168
|
@revs.parse_years('1950s').should == ['1950','1951','1952','1953','1954','1955','1956','1957','1958','1959']
|