modsulator 0.0.6

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.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +202 -0
  3. data/README.md +7 -0
  4. data/Rakefile +43 -0
  5. data/bin/modsulator +16 -0
  6. data/lib/doc/Modsulator.html +725 -0
  7. data/lib/doc/_index.html +101 -0
  8. data/lib/doc/class_list.html +58 -0
  9. data/lib/doc/css/common.css +1 -0
  10. data/lib/doc/css/full_list.css +57 -0
  11. data/lib/doc/css/style.css +339 -0
  12. data/lib/doc/file_list.html +57 -0
  13. data/lib/doc/frames.html +26 -0
  14. data/lib/doc/index.html +101 -0
  15. data/lib/doc/js/app.js +219 -0
  16. data/lib/doc/js/full_list.js +181 -0
  17. data/lib/doc/js/jquery.js +4 -0
  18. data/lib/doc/method_list.html +87 -0
  19. data/lib/doc/top-level-namespace.html +112 -0
  20. data/lib/modsulator.rb +193 -0
  21. data/lib/modsulator/mods-3-5.xsd +1463 -0
  22. data/lib/modsulator/modsulator.xsd +35 -0
  23. data/lib/modsulator/modsulator_sheet.rb +62 -0
  24. data/lib/modsulator/modsulator_template.xlsx +0 -0
  25. data/lib/modsulator/modsulator_template.xml +198 -0
  26. data/lib/modsulator/normalizer.rb +218 -0
  27. data/lib/modsulator/validator.rb +37 -0
  28. data/spec/features/modsulator_sheet_unit_spec.rb +18 -0
  29. data/spec/features/normalizer_unit_spec.rb +152 -0
  30. data/spec/features/process_template_spec.rb +29 -0
  31. data/spec/features/validator_unit_spec.rb +43 -0
  32. data/spec/fixtures/Fitch_Chavez.xlsx +0 -0
  33. data/spec/fixtures/Fitch_Chavez.xml +2806 -0
  34. data/spec/fixtures/Fitch_King.xlsx +0 -0
  35. data/spec/fixtures/Fitch_King.xml +2560 -0
  36. data/spec/fixtures/M1463_AV_manifest.xlsx +0 -0
  37. data/spec/fixtures/M1463_AV_manifest.xml +2373 -0
  38. data/spec/fixtures/Matter_manifest.csv +295 -0
  39. data/spec/fixtures/Matter_manifest.xml +3309 -0
  40. data/spec/fixtures/PosadaSpreadsheet.xlsx +0 -0
  41. data/spec/fixtures/PosadaSpreadsheet.xml +1259 -0
  42. data/spec/fixtures/ars0056_manifest.csv +1 -0
  43. data/spec/fixtures/ars0056_manifest.xml +9728 -0
  44. data/spec/fixtures/crowdsourcing_bridget_1.xlsx +0 -0
  45. data/spec/fixtures/crowdsourcing_bridget_1.xml +606 -0
  46. data/spec/fixtures/crowdsourcing_bridget_2.xlsx +0 -0
  47. data/spec/fixtures/crowdsourcing_bridget_2.xml +3433 -0
  48. data/spec/fixtures/filled_template.xlsx +0 -0
  49. data/spec/fixtures/invalid_crowdsourcing_bridget_1.xml +606 -0
  50. data/spec/fixtures/manifest_v0174.csv +34 -0
  51. data/spec/fixtures/manifest_v0174.xml +1026 -0
  52. data/spec/fixtures/roman_coins_mods_manifest.csv +176 -0
  53. data/spec/fixtures/roman_coins_mods_manifest.xml +3025 -0
  54. data/spec/fixtures/test:002.xml +63 -0
  55. data/spec/fixtures/test_002.csv +4 -0
  56. data/spec/fixtures/test_002.xlsx +0 -0
  57. data/spec/integration_tests/integration_spec.rb +40 -0
  58. data/spec/lib/modsulator_spec.rb +21 -0
  59. data/spec/spec_helper.rb +97 -0
  60. metadata +261 -0
@@ -0,0 +1,63 @@
1
+ <?xml version="1.0"?>
2
+ <xmlDocs xmlns="http://library.stanford.edu/xmlDocs" datetime="2015-05-07 11:07:50AM" sourceFile="test_002.csv">
3
+ <xmlDoc id="descMetadata" objectId="">
4
+ <mods xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/mods/v3" version="3.5" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-5.xsd">
5
+ <titleInfo>
6
+ <title>&#xC0; la recherche du temps perdu</title>
7
+ </titleInfo>
8
+ <titleInfo type="translated">
9
+ <title>Remembrance of Things Past</title>
10
+ </titleInfo>
11
+ <titleInfo type="alternative">
12
+ <title>In Search of Lost Time</title>
13
+ </titleInfo>
14
+ <name type="personal" authority="naf" valueURI="http://lccn.loc.gov/n79021736">
15
+ <namePart>Proust, Marcel, 1871-1922</namePart>
16
+ <role>
17
+ <roleTerm type="code" authority="marcrelator">aut</roleTerm>
18
+ </role>
19
+ </name>
20
+ <name type="personal">
21
+ <namePart>Krutch, Joseph Wood</namePart>
22
+ <role>
23
+ <roleTerm type="text">translator</roleTerm>
24
+ </role>
25
+ </name>
26
+ <typeOfResource>text</typeOfResource>
27
+ <genre authority="marcgt">novel</genre>
28
+ <originInfo>
29
+ <place>
30
+ <placeTerm type="text">Paris</placeTerm>
31
+ </place>
32
+ <dateIssued keyDate="yes" encoding="iso8601">1871</dateIssued>
33
+ </originInfo>
34
+ <language>
35
+ <languageTerm authority="iso639-2b" type="code">fre</languageTerm>
36
+ </language>
37
+ <physicalDescription>
38
+ <form>print</form>
39
+ <extent>xvi, 387 p.. 28 cm.</extent>
40
+ </physicalDescription>
41
+ <abstract>A long hard night, punctuated by
42
+ raining sleep.</abstract>
43
+ <tableOfContents>v. 1. Swann's way. Within a budding grove. The Guermantes way -- v. 2. Cities of the plain. The captive. The sweet cheat gone.
44
+ The past recaptured</tableOfContents>
45
+ <note>Original edition with translators annotations.
46
+
47
+ Further annotations not anticipated.</note>
48
+ <note type="statement of responsibility">Introduction by C.K. Scott Moncrieff.
49
+
50
+ New paragraph added.</note>
51
+ <note>Translation of the seven-volume work, A la recherche du temps perdu.</note>
52
+ <subject authority="lcsh">
53
+ <topic>France--Social life and customs--Fiction</topic>
54
+ </subject>
55
+ <identifier type="isbn">057120760X</identifier>
56
+ <identifier type="isbn">9780571207602</identifier>
57
+ <location>
58
+ <physicalLocation type="repository" authority="lcsh">Repository22</physicalLocation>
59
+ <shelfLocator>VA.4221</shelfLocator>
60
+ </location>
61
+ </mods>
62
+ </xmlDoc>
63
+ </xmlDocs>
@@ -0,0 +1,4 @@
1
+ Identification,,Title #1 (main title),,,,,,,Title #2,,,,,,,,#2,Title #3,,,,,,,,#3,Name #1,,,,role for name #1,,,,Name #2,,,,role for name #2,,,,,#2,Name #3,,,,role for name #3,,,,#3,Name #4,,,,role for name #4,,,,#4,Name #5,,,,role for name #5,,,,#5,Type of Resource #1,,Type of Resource #2,#2,Type of Resource #3,#3,Genre #1,,,,Genre #2,,,,#2,Genre #3,,,,#3,Origin (dates),,,,,,"Origin (publisher, place)",,,,,Language #1,,,,Language #2,,,,#2,Language #3,,,,#3,Physical Description,,,,,Abstract,,Table of contents,,Note #1,,,Note #2,,,#2,Note #3,,,#3,Note #4,,,#4,Note #5,,,#5,"Subject, name #1",(part 1),,,,,(part 2),,,,(part 3),,,,"Subject, name #2",(part 1),,,,,(part 2),,,,(part 3),,,,#2,"Subject, name #3",(part 1),,,,,(part 2),,,,(part 3),,,,#3,"Subject, name #4",(part 1),,,,,(part 2),,,,(part 3),,,,#4,"Subject, name #5",(part 1),,,,,(part 2),,,,(part 3),,,,#5,"Subject, other #1",(part 1),,,,(part 2),,,,(part 3),,,,"Subject, other #2",(part 1),,,,(part 2),,,,(part 3),,,,#2,"Subject, other #3",(part 1),,,,(part 2),,,,(part 3),,,,#3,"Subject, other #4",(part 1),,,,(part 2),,,,(part 3),,,,#4,"Subject, other #5",(part 1),,,,(part 2),,,,(part 3),,,,#5,"Subject, cartographics",,,"Location, repository",,,"Location, call number",Identifier #1,,,Identifier #2,,,#2,Identifier #3,,,#3,Identifier #4,,,#4,Identifier #5,,,#5,Related Item,,,,,,,,,,
2
+ ,,uniform,translated,abbreviated,alternative,,,,,,,,,,,,,,,,,,,,,,personal,corporate,conference,family,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,topic,genre,geographic,temporal,,,,,,,,,, ,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,, ,topic,,,,,,,,,,,,,, ,,,,,,,,,,,,,,, ,,,,,,,,,,,,, ,,,,,,,,,,,,,, ,,,,,,,,,,,,,, ,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,preceding,succeeding,original,host,constituent,series,otherVersion,otherFormat,isReferencedBy,references,reviewOf
3
+ druid,sourceId,ti1:nonSort,ti1:title,ti1:subTitle,ti1:partNumber,ti1:partName,ti1:authority,ti1:valueURI,ti2:type,ti2:nonSort,ti2:title,ti2:subTitle,ti2:partNumber,ti2:partName,ti2:authority,ti2:valueURI,,ti3:type,ti3:nonSort,ti3:title,ti3:subTitle,ti3:partNumber,ti3:partName,ti3:authority,ti3:valueURI,,na1:namePart,na1:type,na1:authority,na1:valueURI,ro1:roleCode,ro1:roleText,ro1:authority,ro1:valueURI,na2:namePart,na2:type,na2:authority,na2:valueURI,ro2:roleCode,ro2:roleText,ro2:authority,ro2:valueURI,ro2:valueURI,,na3:namePart,na3:type,na3:authority,na3:valueURI,ro3:roleCode,ro3:roleText,ro3:authority,ro3:valueURI,,na4:namePart,na4:type,na4:authority,na4:valueURI,ro4:roleCode,ro4:roleText,ro4:authority,ro4:valueURI,,na5:namePart,na5:type,na5:authority,na5:valueURI,ro5:roleCode,ro5:roleText,ro5:authority,ro5:valueURI,,ty1:typeOfResource,ty1:manuscript,ty2:typeOfResource,,ty3:typeOfResource,,ge1:genre,ge1:type,ge1:authority,ge1:valueURI,ge2:genre,ge2:type,ge2:authority,ge2:valueURI,,ge3:genre,ge3:type,ge3:authority,ge3:valueURI,,dt:dateCreated,dt:dateCreated2,dt:dateIssued,dt:dateIssued2,dt:encoding,dt:qualifier,or:publisher,pl:placeCode,pl:placeText,pl:authority,pl:valueURI,la1:code,la1:text,la1:authority,la1:valueURI,la2:code,la2:text,la2:authority,la2:valueURI,,la3:code,la3:text,la3:authority,la3:valueURI,,ph1:form,ph1:extent,ph1:digitalOrigin,ph1:note,ph1:displayLabel,ab:abstract,ab:displayLabel,tc:tableOfContents,tc:displayLabel,no1:note,no1:type,no1:displayLabel,no2:note,no2:type,no2:displayLabel,,no3:note,no3:type,no3:displayLabel,,no4:note,no4:type,no4:displayLabel,,no5:note,no5:type,no5:displayLabel,,sn1:authority,sn1:p1:name,sn1:p1:nameType,sn1:p1:title,sn1:p1:authority,sn1:p1:valueURI,sn1:p2:type,sn1:p2:value,sn1:p2:authority,sn1:p2:valueURI,sn1:p3:type,sn1:p3:value,sn1:p3:authority,sn1:p3:valueURI,sn2:authority,sn2:p1:name,sn2:p1:nameType,sn2:p1:title,sn2:p1:authority,sn2:p1:valueURI,sn2:p2:type,sn2:p2:value,sn2:p2:authority,sn2:p2:valueURI,sn2:p3:type,sn2:p3:value,sn2:p3:authority,sn2:p3:valueURI,,sn3:authority,sn3:p1:name,sn3:p1:nameType,sn3:p1:title,sn3:p1:authority,sn3:p1:valueURI,sn3:p2:type,sn3:p2:value,sn3:p2:authority,sn3:p2:valueURI,sn3:p3:type,sn3:p3:value,sn3:p3:authority,sn3:p3:valueURI,,sn4:authority,sn4:p1:name,sn4:p1:nameType,sn4:p1:title,sn4:p1:authority,sn4:p1:valueURI,sn4:p2:type,sn4:p2:value,sn4:p2:authority,sn4:p2:valueURI,sn4:p3:type,sn4:p3:value,sn4:p3:authority,sn4:p3:valueURI,,sn5:authority,sn5:p1:name,sn5:p1:nameType,sn5:p1:title,sn5:p1:authority,sn5:p1:valueURI,sn5:p2:type,sn5:p2:value,sn5:p2:authority,sn5:p2:valueURI,sn5:p3:type,sn5:p3:value,sn5:p3:authority,sn5:p3:valueURI,,su1:authority,su1:p1:type,su1:p1:value,su1:p1:authority,su1:p1:valueURI,su1:p2:type,su1:p2:value,su1:p2:authority,su1:p2:valueURI,su1:p3:type,su1:p3:value,su1:p3:authority,su1:p3:valueURI,su2:authority,su2:p1:type,su2:p1:value,su2:p1:authority,su2:p1:valueURI,su2:p2:type,su2:p2:value,su2:p2:authority,su2:p2:valueURI,su2:p3:type,su2:p3:value,su2:p3:authority,su2:p3:valueURI,,su3:authority,su3:p1:type,su3:p1:value,su3:p1:authority,su3:p1:valueURI,su3:p2:type,su3:p2:value,su3:p2:authority,su3:p2:valueURI,su3:p3:type,su3:p3:value,su3:p3:authority,su3:p3:valueURI,,su4:authority,su4:p1:type,su4:p1:value,su4:p1:authority,su4:p1:valueURI,su4:p2:type,su4:p2:value,su4:p2:authority,su4:p2:valueURI,su4:p3:type,su4:p3:value,su4:p3:authority,su4:p3:valueURI,,su5:authority,su5:p1:type,su5:p1:value,su5:p1:authority,su5:p1:valueURI,su5:p2:type,su5:p2:value,su5:p2:authority,su5:p2:valueURI,su5:p3:type,su5:p3:value,su5:p3:authority,su5:p3:valueURI,,sc1:scale,sc1:coordinates,sc1:projection,lo:repository,lo:authority,lo:valueURI,lo:callNumber,id1:identifier,id1:type,id1:displayLabel,id2:identifier,id2:type,id2:displayLabel,,id3:identifier,id3:type,id3:displayLabel,,id4:identifier,id4:type,id4:displayLabel,,id5:identifier,id5:type,id5:displayLabel,,ri1:type,ri1:title,ri1:url,,,,,,,,
4
+ ,test:002,,À la recherche du temps perdu,,,,,,translated,,Remembrance of Things Past,,,,,,,alternative,,In Search of Lost Time,,,,,,,"Proust, Marcel, 1871-1922",personal,naf,http://lccn.loc.gov/n79021736,aut,,marcrelator,,"Krutch, Joseph Wood",personal,,,,translator,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,text,,,,,,novel,,marcgt,,,,,,,,,,,,,,1871,,iso8601,,,,Paris,,,fre,,iso639-2b,,,,,,,,,,,,print,"xvi, 387 p.. 28 cm.",,,,"A long hard night, punctuated by <br/> raining sleep.",,v. 1. Swann's way. Within a budding grove. The Guermantes way -- v. 2. Cities of the plain. The captive. The sweet cheat gone. <br>The past recaptured,,Original edition with translators annotations. <p/>Further annotations not anticipated.,,,Introduction by C.K. Scott Moncrieff.<p>New paragraph added.,statement of responsibility,,,"Translation of the seven-volume work, A la recherche du temps perdu.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,lcsh,topic,France--Social life and customs--Fiction,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Repository22,lcsh,,VA.4221,057120760X,isbn,,9780571207602,isbn,,,,,,,,,,,,,,,,,,,,,,,,,
Binary file
@@ -0,0 +1,40 @@
1
+ require 'equivalent-xml'
2
+ require 'modsulator'
3
+ require 'modsulator/validator'
4
+
5
+ describe Modsulator do
6
+ before :all do
7
+ @tmp_dir = File.expand_path("../../../tmp", __FILE__)
8
+ Dir.mkdir(@tmp_dir) unless Dir.exists?(@tmp_dir)
9
+ Dir.foreach(@tmp_dir) {|f| fn = File.join(@tmp_dir, f); File.delete(fn) if f != '.' && f != '..' && !File.directory?(fn)}
10
+ end
11
+
12
+ describe "generates and validates" do
13
+ {
14
+ 'Fitch_Chavez.xlsx' => 'Fitch_Chavez.xml',
15
+ 'Fitch_King.xlsx' => 'Fitch_King.xml',
16
+ 'M1463_AV_manifest.xlsx' => 'M1463_AV_manifest.xml',
17
+ 'Matter_manifest.csv' => 'Matter_manifest.xml',
18
+ 'PosadaSpreadsheet.xlsx' => 'PosadaSpreadsheet.xml',
19
+ 'ars0056_manifest.csv' => 'ars0056_manifest.xml',
20
+ 'manifest_v0174.csv' => 'manifest_v0174.xml',
21
+ 'roman_coins_mods_manifest.csv' => 'roman_coins_mods_manifest.xml',
22
+ 'crowdsourcing_bridget_1.xlsx' => 'crowdsourcing_bridget_1.xml',
23
+ 'crowdsourcing_bridget_2.xlsx' => 'crowdsourcing_bridget_2.xml'
24
+ }.each do |testfile, results_file|
25
+ it "converts #{testfile} correctly to valid XML" do
26
+ generated_xml_string = Modsulator.new(File.join(FIXTURES_DIR, testfile), testfile).convert_rows()
27
+ error_list = Validator.new(File.expand_path("lib/modsulator/modsulator.xsd")).validate_xml_string(generated_xml_string)
28
+ expect(error_list.length()).to eq(0)
29
+
30
+ generated_xml = Nokogiri::XML(generated_xml_string)
31
+ expected_xml = Nokogiri::XML(File.read(File.join(FIXTURES_DIR, results_file)))
32
+ expect(generated_xml).to be_equivalent_to(expected_xml).ignoring_attr_values('datetime')
33
+ end
34
+ end
35
+ end
36
+
37
+ after :all do
38
+ Dir.foreach(@tmp_dir) {|f| File.delete(File.join(@tmp_dir, f)) if f != '.' && f != '..' && !File.directory?(f)}
39
+ end
40
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+ require 'rubygems'
3
+
4
+ describe Modsulator do
5
+ describe "#validate_headers" do
6
+ subject { Modsulator.new File.join(FIXTURES_DIR, 'test_002.csv'), 'test_002.csv', template_string: "abc def ghi"}
7
+ let(:template_xml) { "abc def ghi"}
8
+ it "should include headers not in the template string" do
9
+ expect(subject.validate_headers(["abc", "phi"])).not_to include "abc"
10
+ expect(subject.validate_headers(["abc", "phi"])).to include "phi"
11
+ end
12
+ end
13
+
14
+ describe "#get_template_spreadsheet" do
15
+ it "should return the correct spreadsheet" do
16
+ downloaded_binary_string = Modsulator.get_template_spreadsheet
17
+ expected_binary_string = IO.read(File.join(File.expand_path("../../../lib/modsulator/", __FILE__), "modsulator_template.xlsx"), mode: 'rb')
18
+ expect(downloaded_binary_string).to eq(expected_binary_string)
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,97 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, consider making
10
+ # a separate helper file that requires the additional dependencies and performs
11
+ # the additional setup, and require it from the spec files that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+
16
+ require 'modsulator'
17
+ FIXTURES_DIR = File.expand_path("../fixtures", __FILE__)
18
+ XML_TEMPLATE = File.join(File.expand_path("../../lib/modsulator", __FILE__), "modsulator_template.xml")
19
+
20
+ require 'coveralls'
21
+ Coveralls.wear!
22
+
23
+ #
24
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
25
+ RSpec.configure do |config|
26
+ # rspec-expectations config goes here. You can use an alternate
27
+ # assertion/expectation library such as wrong or the stdlib/minitest
28
+ # assertions if you prefer.
29
+ config.expect_with :rspec do |expectations|
30
+ # This option will default to `true` in RSpec 4. It makes the `description`
31
+ # and `failure_message` of custom matchers include text for helper methods
32
+ # defined using `chain`, e.g.:
33
+ # be_bigger_than(2).and_smaller_than(4).description
34
+ # # => "be bigger than 2 and smaller than 4"
35
+ # ...rather than:
36
+ # # => "be bigger than 2"
37
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
38
+ end
39
+
40
+ # rspec-mocks config goes here. You can use an alternate test double
41
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
42
+ config.mock_with :rspec do |mocks|
43
+ # Prevents you from mocking or stubbing a method that does not exist on
44
+ # a real object. This is generally recommended, and will default to
45
+ # `true` in RSpec 4.
46
+ mocks.verify_partial_doubles = true
47
+ end
48
+
49
+ # The settings below are suggested to provide a good initial experience
50
+ # with RSpec, but feel free to customize to your heart's content.
51
+ =begin
52
+ # These two settings work together to allow you to limit a spec run
53
+ # to individual examples or groups you care about by tagging them with
54
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
55
+ # get run.
56
+ config.filter_run :focus
57
+ config.run_all_when_everything_filtered = true
58
+
59
+ # Limits the available syntax to the non-monkey patched syntax that is recommended.
60
+ # For more details, see:
61
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
63
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
64
+ config.disable_monkey_patching!
65
+
66
+ # This setting enables warnings. It's recommended, but in some cases may
67
+ # be too noisy due to issues in dependencies.
68
+ config.warnings = true
69
+
70
+ # Many RSpec users commonly either run the entire suite or an individual
71
+ # file, and it's useful to allow more verbose output when running an
72
+ # individual spec file.
73
+ if config.files_to_run.one?
74
+ # Use the documentation formatter for detailed output,
75
+ # unless a formatter has already been configured
76
+ # (e.g. via a command-line flag).
77
+ config.default_formatter = 'doc'
78
+ end
79
+
80
+ # Print the 10 slowest examples and example groups at the
81
+ # end of the spec run, to help surface which specs are running
82
+ # particularly slow.
83
+ config.profile_examples = 10
84
+
85
+ # Run specs in random order to surface order dependencies. If you find an
86
+ # order dependency and want to debug it, you can fix the order by providing
87
+ # the seed, which is printed after each run.
88
+ # --seed 1234
89
+ config.order = :random
90
+
91
+ # Seed global randomization in this process using the `--seed` CLI option.
92
+ # Setting this allows you to use `--seed` to deterministically reproduce
93
+ # test failures related to randomization by passing the same `--seed` value
94
+ # as the one that triggered the failure.
95
+ Kernel.srand config.seed
96
+ =end
97
+ end
metadata ADDED
@@ -0,0 +1,261 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: modsulator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.6
5
+ platform: ruby
6
+ authors:
7
+ - Tommy Ingulfsen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: roo
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '1.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: equivalent-xml
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.6.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.6.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: nokogiri
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: activesupport
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '3.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: yard
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: coveralls
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: ruby-lint
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description: Tools and libraries for working with metadata spreadsheets and MODS.
140
+ email: tommyi@stanford.edu
141
+ executables:
142
+ - modsulator
143
+ extensions: []
144
+ extra_rdoc_files: []
145
+ files:
146
+ - LICENSE
147
+ - README.md
148
+ - Rakefile
149
+ - bin/modsulator
150
+ - lib/doc/Modsulator.html
151
+ - lib/doc/_index.html
152
+ - lib/doc/class_list.html
153
+ - lib/doc/css/common.css
154
+ - lib/doc/css/full_list.css
155
+ - lib/doc/css/style.css
156
+ - lib/doc/file_list.html
157
+ - lib/doc/frames.html
158
+ - lib/doc/index.html
159
+ - lib/doc/js/app.js
160
+ - lib/doc/js/full_list.js
161
+ - lib/doc/js/jquery.js
162
+ - lib/doc/method_list.html
163
+ - lib/doc/top-level-namespace.html
164
+ - lib/modsulator.rb
165
+ - lib/modsulator/mods-3-5.xsd
166
+ - lib/modsulator/modsulator.xsd
167
+ - lib/modsulator/modsulator_sheet.rb
168
+ - lib/modsulator/modsulator_template.xlsx
169
+ - lib/modsulator/modsulator_template.xml
170
+ - lib/modsulator/normalizer.rb
171
+ - lib/modsulator/validator.rb
172
+ - spec/features/modsulator_sheet_unit_spec.rb
173
+ - spec/features/normalizer_unit_spec.rb
174
+ - spec/features/process_template_spec.rb
175
+ - spec/features/validator_unit_spec.rb
176
+ - spec/fixtures/Fitch_Chavez.xlsx
177
+ - spec/fixtures/Fitch_Chavez.xml
178
+ - spec/fixtures/Fitch_King.xlsx
179
+ - spec/fixtures/Fitch_King.xml
180
+ - spec/fixtures/M1463_AV_manifest.xlsx
181
+ - spec/fixtures/M1463_AV_manifest.xml
182
+ - spec/fixtures/Matter_manifest.csv
183
+ - spec/fixtures/Matter_manifest.xml
184
+ - spec/fixtures/PosadaSpreadsheet.xlsx
185
+ - spec/fixtures/PosadaSpreadsheet.xml
186
+ - spec/fixtures/ars0056_manifest.csv
187
+ - spec/fixtures/ars0056_manifest.xml
188
+ - spec/fixtures/crowdsourcing_bridget_1.xlsx
189
+ - spec/fixtures/crowdsourcing_bridget_1.xml
190
+ - spec/fixtures/crowdsourcing_bridget_2.xlsx
191
+ - spec/fixtures/crowdsourcing_bridget_2.xml
192
+ - spec/fixtures/filled_template.xlsx
193
+ - spec/fixtures/invalid_crowdsourcing_bridget_1.xml
194
+ - spec/fixtures/manifest_v0174.csv
195
+ - spec/fixtures/manifest_v0174.xml
196
+ - spec/fixtures/roman_coins_mods_manifest.csv
197
+ - spec/fixtures/roman_coins_mods_manifest.xml
198
+ - spec/fixtures/test:002.xml
199
+ - spec/fixtures/test_002.csv
200
+ - spec/fixtures/test_002.xlsx
201
+ - spec/integration_tests/integration_spec.rb
202
+ - spec/lib/modsulator_spec.rb
203
+ - spec/spec_helper.rb
204
+ homepage: https://github.com/sul-dlss/modsulator
205
+ licenses:
206
+ - Apache-2.0
207
+ metadata: {}
208
+ post_install_message:
209
+ rdoc_options: []
210
+ require_paths:
211
+ - lib
212
+ required_ruby_version: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: '0'
217
+ required_rubygems_version: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
222
+ requirements: []
223
+ rubyforge_project:
224
+ rubygems_version: 2.4.6
225
+ signing_key:
226
+ specification_version: 4
227
+ summary: Produces (Stanford) MODS XML from spreadsheets.
228
+ test_files:
229
+ - spec/features/modsulator_sheet_unit_spec.rb
230
+ - spec/features/normalizer_unit_spec.rb
231
+ - spec/features/process_template_spec.rb
232
+ - spec/features/validator_unit_spec.rb
233
+ - spec/fixtures/ars0056_manifest.csv
234
+ - spec/fixtures/ars0056_manifest.xml
235
+ - spec/fixtures/crowdsourcing_bridget_1.xlsx
236
+ - spec/fixtures/crowdsourcing_bridget_1.xml
237
+ - spec/fixtures/crowdsourcing_bridget_2.xlsx
238
+ - spec/fixtures/crowdsourcing_bridget_2.xml
239
+ - spec/fixtures/filled_template.xlsx
240
+ - spec/fixtures/Fitch_Chavez.xlsx
241
+ - spec/fixtures/Fitch_Chavez.xml
242
+ - spec/fixtures/Fitch_King.xlsx
243
+ - spec/fixtures/Fitch_King.xml
244
+ - spec/fixtures/invalid_crowdsourcing_bridget_1.xml
245
+ - spec/fixtures/M1463_AV_manifest.xlsx
246
+ - spec/fixtures/M1463_AV_manifest.xml
247
+ - spec/fixtures/manifest_v0174.csv
248
+ - spec/fixtures/manifest_v0174.xml
249
+ - spec/fixtures/Matter_manifest.csv
250
+ - spec/fixtures/Matter_manifest.xml
251
+ - spec/fixtures/PosadaSpreadsheet.xlsx
252
+ - spec/fixtures/PosadaSpreadsheet.xml
253
+ - spec/fixtures/roman_coins_mods_manifest.csv
254
+ - spec/fixtures/roman_coins_mods_manifest.xml
255
+ - spec/fixtures/test:002.xml
256
+ - spec/fixtures/test_002.csv
257
+ - spec/fixtures/test_002.xlsx
258
+ - spec/integration_tests/integration_spec.rb
259
+ - spec/lib/modsulator_spec.rb
260
+ - spec/spec_helper.rb
261
+ has_rdoc: