stanford-mods 0.0.18 → 0.0.19

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
- NzIzMjgwZDZhMTRhMzJlMjZhZDNjMzg5NGJhZDBkMTYxZTg3MDViNA==
4
+ MDVmOGY4MDdkYmNhZmZjOWIzNzI1ZGIzZjFhMTUxMmY5ZGU4NjA4Yw==
5
5
  data.tar.gz: !binary |-
6
- ZTZlZTgyMWEyODBkNTQxYTdhMWY4OTE3YTI4N2Y0ZmU2N2QwN2NjMw==
6
+ NjE1OTAzZGJjZGVlNGYzODA1ZGRiMDkyOTMyNjdmY2JhMjNmYjcyOA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZGRhNmU1ZjZjZThkMTMzMmE2N2MxY2E4MzI3MjYwNzllZWQ3Nzk1YjZhMzM3
10
- YmU4ZWE0ZWE4ZmQ1NTk2NTE2ODUyYmUwZDBjZjNhNzc5OTQxZDkyNjVjNzM3
11
- MDllYmFkNmY3YWVkOGI4ZGJiZTVjOTE4ZGVlYzhmNzFhZTMwYjk=
9
+ ZjliMjhhYzc5ZWIyZWI5N2EwOGU1NDRhNmZkOTc2YTRhMTdjYzE4YjAwZjFk
10
+ N2RlMDMxZDA5NWJjMWZkODdiOGMzMTFlY2Y5OTBlMGExYmFlYzczMTFiYjRl
11
+ YmUyMGEyYzNhNTRhZDk0Yzg4NThjMGEwNDQ1ZjkyNjkyZmRhNjU=
12
12
  data.tar.gz: !binary |-
13
- NTk1NjA1ZmJlOGVkMmY3ZTE1YWI0MzQ4Y2E3MjMyODAxOTg2ZDRjMGUyMzNi
14
- NWE5MWJiMTlhZTM0MDg5YmJmYWQwODRkZWQ5OTg4MmUxZjJkOTkxMDJhNDk1
15
- YjczMDFlZTJiYzQ3NzQzYzIxMWY0ZDhhMmNhYzMwNjdiOWJmMmI=
13
+ OTc2ZjQ5N2JhYmU0NjgyYTU0NTI4YjI1ZjIyMzA5MzM4ZTMxMzQ3NzAzMzIy
14
+ YzBlZWRhNmQ2ZjNlNWY0OTgxZTRlYzY2NWNjZGMyNTE1NTY1NzRmMWY2NzAz
15
+ ZWM2NGU5NzZjYzJmZWQ2Y2Y3ZGVjMmYyOGYxN2M0NjQyZjdhZjA=
data/README.rdoc CHANGED
@@ -60,6 +60,7 @@ Example Using SearchWorks Mixins:
60
60
 
61
61
  == Releases
62
62
 
63
+ * <b>0.0.19</b> Additional mappings, including Hydrus formats (GRYPHONDOR-207)
63
64
  * <b>0.0.11</b> escape regex special characters when using short title in a regex
64
65
  * <b>0.0.10</b> get rid of ignore_me files
65
66
  * <b>0.0.9</b> add sw_subject_names and sw_subject_titles methods to searchworks mixin
@@ -330,6 +330,9 @@ module Stanford
330
330
  val << 'Book' if issuance and issuance.include? 'monographic'
331
331
  val << 'Journal/Periodical' if issuance and issuance.include? 'continuing'
332
332
  val << 'Journal/Periodical' if genres and genres.include? 'article'
333
+ val << 'Conference Proceedings' if genres and genres.include? 'conference publication'
334
+ val << 'Other' if genres and genres.include? 'student project report'
335
+ val << 'Book' if genres and genres.include? 'technical report'
333
336
  when 'still image'
334
337
  val << 'Image'
335
338
  when 'mixed material'
@@ -1,6 +1,6 @@
1
1
  module Stanford
2
2
  module Mods
3
3
  # this is the Ruby Gem version
4
- VERSION = "0.0.18"
4
+ VERSION = "0.0.19"
5
5
  end
6
6
  end
@@ -634,6 +634,45 @@ describe "Searchworks mixin for Stanford::Mods::Record" do
634
634
  @smods_rec.from_str(m)
635
635
  @smods_rec.format.should == ['Image']
636
636
  end
637
+ # Student Project Reports: spec via email from Vitus, August 16, 2013
638
+ it "should give a format of Other for <genre>student project report</genre> and <typeOfResource>text</typeOfResouce>" do
639
+ m = "<mods #{@ns_decl}><genre>student project report</genre><typeOfResource>text</typeOfResouce></mods>"
640
+ @smods_rec = Stanford::Mods::Record.new
641
+ @smods_rec.from_str(m)
642
+ @smods_rec.format.should == ['Other']
643
+ end
644
+ # Hydrus mappings per GRYPHONDOR-207
645
+ it "should give a format of Computer File for <genre>game</genre> and <typeOfResource>software, multimedia</typeOfResouce>" do
646
+ m = "<mods #{@ns_decl}><genre>game</genre><typeOfResource>software, multimedia</typeOfResouce></mods>"
647
+ @smods_rec = Stanford::Mods::Record.new
648
+ @smods_rec.from_str(m)
649
+ @smods_rec.format.should == ['Computer File']
650
+ end
651
+ it "should give a format of Video for <genre>motion picture</genre> and <typeOfResource>moving image</typeOfResouce>" do
652
+ m = "<mods #{@ns_decl}><genre>motion picture</genre><typeOfResource>moving image</typeOfResouce></mods>"
653
+ @smods_rec = Stanford::Mods::Record.new
654
+ @smods_rec.from_str(m)
655
+ @smods_rec.format.should == ['Video']
656
+ end
657
+ it "should give a format of Sound Recording for <genre>sound</genre> and <typeOfResource>sound recording-nonmusical</typeOfResouce>" do
658
+ m = "<mods #{@ns_decl}><genre>sound</genre><typeOfResource>sound recording-nonmusical</typeOfResouce></mods>"
659
+ @smods_rec = Stanford::Mods::Record.new
660
+ @smods_rec.from_str(m)
661
+ @smods_rec.format.should == ['Sound Recording']
662
+ end
663
+ it "should give a format of Conference Proceedings for <genre>conference publication</genre> and <typeOfResource>text</typeOfResouce>" do
664
+ m = "<mods #{@ns_decl}><genre>conference publication</genre><typeOfResource>text</typeOfResouce></mods>"
665
+ @smods_rec = Stanford::Mods::Record.new
666
+ @smods_rec.from_str(m)
667
+ @smods_rec.format.should == ['Conference Proceedings']
668
+ end
669
+ it "should give a format of Book for <genre>technical report</genre> and <typeOfResource>text</typeOfResouce>" do
670
+ m = "<mods #{@ns_decl}><genre>technical report</genre><typeOfResource>text</typeOfResouce></mods>"
671
+ @smods_rec = Stanford::Mods::Record.new
672
+ @smods_rec.from_str(m)
673
+ @smods_rec.format.should == ['Book']
674
+ end
675
+ # end Hydrus mappings
637
676
  it "should return nothing if there is no format info" do
638
677
  m = "<mods #{@ns_decl}><originInfo>
639
678
  <dateCreated>1904</dateCreated>
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: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-14 00:00:00.000000000 Z
12
+ date: 2013-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mods
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 2.0.6
163
+ rubygems_version: 2.0.7
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: Stanford specific wrangling of MODS metadata