stanford-mods 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00674c31e1fc276d254e80b69d023dc5791b8f6c
4
- data.tar.gz: d5448fb18520caaae0020e836acb26ae25ffee1c
3
+ metadata.gz: 3e11869869acbc44ced43f18b2e841b530be9aee
4
+ data.tar.gz: 914221e3a96408944fd4a9fe7f0548a7b8ab4831
5
5
  SHA512:
6
- metadata.gz: d9aaa70cf1f63dd16c7a52f029f926f494802a29640e01c53c522bb99e761c1db06fd90809d9c1a962a3470bdc83f13b4e2d05f57162b61d981d65c272132b99
7
- data.tar.gz: 275f10f95d7e7037db5309d8c79384e1d7f52ca47d407d0846219ff8c905eec5023a7013ae1f745c3b416533a28912fa3e870fb6e1919560a57244dc452b09c8
6
+ metadata.gz: 2cfadfcdb3f53691746e654a4fd7cc33afb9be2d32c6bcf1892f6a7fa7731b60b5ba22bb0e30e6411aa6ac5300b0de114fa66f3bfd9be55da9706289425a9005
7
+ data.tar.gz: e8344b4c4bcdf5b095c9a57b4ef0e4c797317c6ab8f4a3b01280b4bd7557bf1199de7a978e924b24c6054d4c41c966f35af13cd0f5794f506f966b540adafb7b
data/README.rdoc CHANGED
@@ -59,6 +59,7 @@ Example Using SearchWorks Mixins:
59
59
  6. Create new Pull Request
60
60
 
61
61
  == Releases
62
+ * <b>1.1.1</b> Minor bug fixes
62
63
  * <b>1.1.0</b> Changed mechanism for determining dates for display only and for indexing, sorting, and faceting and removed deprecated pub_date_group method
63
64
  * <b>1.0.3</b> format_main value 'Article' is now 'Book'
64
65
  * <b>1.0.2</b> add format_main and sw_genre tests to searchworks.rb
@@ -384,11 +384,11 @@ module Stanford
384
384
  end
385
385
 
386
386
  # For the date display only, the first place to look is in the dates without encoding=marc array.
387
- # If no such dates, select the first date in the pub_dates array. Otherwise return nil
387
+ # If no such dates, select the first date in the dates_marc_encoding array. Otherwise return nil
388
388
  # @return [String] value for the pub_date_display Solr field for this document or nil if none
389
389
  def pub_date_display
390
390
  return dates_no_marc_encoding.first unless dates_no_marc_encoding.empty?
391
- return pub_dates.first unless pub_dates.empty?
391
+ return dates_marc_encoding.first unless dates_marc_encoding.empty?
392
392
  return nil
393
393
  end
394
394
 
@@ -787,19 +787,23 @@ module Stanford
787
787
 
788
788
  # @return [Array<String>] dates from dateIssued and dateCreated tags from origin_info with encoding="marc"
789
789
  def dates_marc_encoding
790
- split_date_encodings unless @dates_marc_encoding
791
- return @dates_marc_encoding
790
+ @dates_marc_encoding ||= begin
791
+ parse_dates_from_originInfo
792
+ @dates_marc_encoding
793
+ end
792
794
  end
793
795
 
794
796
  # @return [Array<String>] dates from dateIssued and dateCreated tags from origin_info with encoding not "marc"
795
797
  def dates_no_marc_encoding
796
- split_date_encodings unless @dates_no_marc_encoding
797
- return @dates_no_marc_encoding
798
+ @dates_no_marc_encoding ||= begin
799
+ parse_dates_from_originInfo
800
+ @dates_no_marc_encoding
801
+ end
798
802
  end
799
803
 
800
804
  # Populate @dates_marc_encoding and @dates_no_marc_encoding from dateIssued and dateCreated tags from origin_info
801
805
  # with and without encoding=marc
802
- def split_date_encodings
806
+ def parse_dates_from_originInfo
803
807
  @dates_marc_encoding = []
804
808
  @dates_no_marc_encoding = []
805
809
  self.origin_info.dateIssued.each { |di|
@@ -1,6 +1,6 @@
1
1
  module Stanford
2
2
  module Mods
3
3
  # this is the Ruby Gem version
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stanford-mods
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay
@@ -9,76 +9,76 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-23 00:00:00.000000000 Z
12
+ date: 2015-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mods
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rdoc
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: yard
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  description: Stanford specific wrangling of MODS metadata from DOR, the Stanford Digital
@@ -92,10 +92,10 @@ extra_rdoc_files:
92
92
  - LICENSE
93
93
  - README.rdoc
94
94
  files:
95
- - .coveralls.yml
96
- - .gitignore
97
- - .travis.yml
98
- - .yardopts
95
+ - ".coveralls.yml"
96
+ - ".gitignore"
97
+ - ".travis.yml"
98
+ - ".yardopts"
99
99
  - Gemfile
100
100
  - LICENSE
101
101
  - README.rdoc
@@ -123,17 +123,17 @@ require_paths:
123
123
  - lib
124
124
  required_ruby_version: !ruby/object:Gem::Requirement
125
125
  requirements:
126
- - - '>='
126
+ - - ">="
127
127
  - !ruby/object:Gem::Version
128
128
  version: '0'
129
129
  required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - '>='
131
+ - - ">="
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  requirements: []
135
135
  rubyforge_project:
136
- rubygems_version: 2.4.3
136
+ rubygems_version: 2.2.2
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: Stanford specific wrangling of MODS metadata