om 1.8.1 → 1.9.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/Rakefile +1 -1
  2. data/container_spec.rb +14 -14
  3. data/lib/om.rb +12 -9
  4. data/lib/om/samples/mods_article.rb +9 -9
  5. data/lib/om/tree_node.rb +6 -6
  6. data/lib/om/version.rb +1 -1
  7. data/lib/om/xml.rb +33 -31
  8. data/lib/om/xml/container.rb +12 -12
  9. data/lib/om/xml/document.rb +19 -18
  10. data/lib/om/xml/dynamic_node.rb +50 -45
  11. data/lib/om/xml/named_term_proxy.rb +13 -13
  12. data/lib/om/xml/node_generator.rb +3 -3
  13. data/lib/om/xml/template_registry.rb +26 -18
  14. data/lib/om/xml/term.rb +46 -30
  15. data/lib/om/xml/term_value_operators.rb +56 -52
  16. data/lib/om/xml/term_xpath_generator.rb +57 -51
  17. data/lib/om/xml/terminology.rb +10 -8
  18. data/lib/om/xml/terminology_based_solrizer.rb +90 -0
  19. data/lib/om/xml/validation.rb +19 -19
  20. data/lib/om/xml/vocabulary.rb +4 -4
  21. data/lib/tasks/om.rake +6 -4
  22. data/om.gemspec +2 -1
  23. data/spec/fixtures/mods_article.rb +90 -0
  24. data/spec/fixtures/mods_articles/hydrangea_article1.xml +2 -2
  25. data/spec/integration/differentiated_elements_spec.rb +2 -2
  26. data/spec/integration/element_value_spec.rb +13 -13
  27. data/spec/integration/proxies_and_ref_spec.rb +15 -15
  28. data/spec/integration/querying_documents_spec.rb +18 -24
  29. data/spec/integration/rights_metadata_integration_example_spec.rb +18 -18
  30. data/spec/integration/selective_querying_spec.rb +1 -1
  31. data/spec/integration/serialization_spec.rb +13 -13
  32. data/spec/integration/set_reentrant_terminology_spec.rb +10 -10
  33. data/spec/integration/xpathy_stuff_spec.rb +16 -16
  34. data/spec/spec_helper.rb +2 -2
  35. data/spec/unit/container_spec.rb +29 -28
  36. data/spec/unit/document_spec.rb +50 -49
  37. data/spec/unit/dynamic_node_spec.rb +45 -57
  38. data/spec/unit/named_term_proxy_spec.rb +16 -16
  39. data/spec/unit/node_generator_spec.rb +7 -7
  40. data/spec/unit/nokogiri_sanity_spec.rb +30 -30
  41. data/spec/unit/om_spec.rb +5 -5
  42. data/spec/unit/template_registry_spec.rb +69 -69
  43. data/spec/unit/term_builder_spec.rb +77 -77
  44. data/spec/unit/term_spec.rb +73 -79
  45. data/spec/unit/term_value_operators_spec.rb +191 -186
  46. data/spec/unit/term_xpath_generator_spec.rb +43 -37
  47. data/spec/unit/terminology_builder_spec.rb +85 -85
  48. data/spec/unit/terminology_spec.rb +98 -98
  49. data/spec/unit/validation_spec.rb +22 -22
  50. data/spec/unit/xml_serialization_spec.rb +22 -21
  51. data/spec/unit/xml_spec.rb +7 -7
  52. data/spec/unit/xml_terminology_based_solrizer_spec.rb +109 -0
  53. metadata +57 -17
  54. checksums.yaml +0 -7
  55. data/.rspec +0 -1
  56. data/.rubocop.yml +0 -1
  57. data/.rubocop_todo.yml +0 -382
  58. data/.travis.yml +0 -10
  59. data/gemfiles/gemfile.rails3 +0 -11
  60. data/gemfiles/gemfile.rails4 +0 -10
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe "OM::XML::Validation" do
4
-
4
+
5
5
  before(:all) do
6
6
  class ValidationTest
7
7
  include OM::XML::Container
@@ -9,38 +9,38 @@ describe "OM::XML::Validation" do
9
9
  self.schema_url = "http://www.loc.gov/standards/mods/v3/mods-3-2.xsd"
10
10
  end
11
11
  end
12
-
12
+
13
13
  before(:each) do
14
14
  @sample = ValidationTest.from_xml("<foo><bar>1</bar></foo>")
15
15
  end
16
-
17
- ## Validation Support
16
+
17
+ ## Validation Support
18
18
  # Some of these tests fail when you don't have an internet connection because the mods schema includes other xsd schemas by URL reference.
19
19
 
20
20
  describe '#schema_url' do
21
21
  it "should allow you to set the schema url" do
22
- expect(ValidationTest.schema_url).to eq("http://www.loc.gov/standards/mods/v3/mods-3-2.xsd")
22
+ ValidationTest.schema_url.should == "http://www.loc.gov/standards/mods/v3/mods-3-2.xsd"
23
23
  end
24
24
  end
25
-
25
+
26
26
  describe "#schema" do
27
27
  it "should return an instance of Nokogiri::XML::Schema loaded from the schema url -- fails if no internet connection" do
28
- skip "no internet connection"
29
- expect(ValidationTest.schema).to be_kind_of Nokogiri::XML::Schema
28
+ pending "no internet connection"
29
+ ValidationTest.schema.should be_kind_of Nokogiri::XML::Schema
30
30
  end
31
31
  end
32
32
 
33
33
  describe "#validate" do
34
34
  it "should validate the provided document against the schema provided in class definition -- fails if no internet connection" do
35
- skip "no internet connection"
36
- expect(ValidationTest.schema).to receive(:validate).with(@sample).and_return([])
35
+ pending "no internet connection"
36
+ ValidationTest.schema.should_receive(:validate).with(@sample).and_return([])
37
37
  ValidationTest.validate(@sample)
38
38
  end
39
39
  end
40
40
 
41
41
  describe ".validate" do
42
42
  it "should rely on class validate method" do
43
- expect(ValidationTest).to receive(:validate).with(@sample)
43
+ ValidationTest.should_receive(:validate).with(@sample)
44
44
  @sample.validate
45
45
  end
46
46
  end
@@ -49,32 +49,32 @@ describe "OM::XML::Validation" do
49
49
  before(:all) do
50
50
  ValidationTest.schema_file = nil
51
51
  end
52
-
52
+
53
53
  after(:all) do
54
54
  ValidationTest.schema_file = fixture("mods-3-2.xsd")
55
55
  end
56
-
56
+
57
57
  it "should lazy load the schema file from the @schema_url" do
58
- expect(ValidationTest.instance_variable_get(:@schema_file)).to be_nil
59
- expect(ValidationTest).to receive(:file_from_url).with(ValidationTest.schema_url).and_return("fake file").once
58
+ ValidationTest.instance_variable_get(:@schema_file).should be_nil
59
+ ValidationTest.should_receive(:file_from_url).with(ValidationTest.schema_url).once.and_return("fake file")
60
60
  ValidationTest.schema_file
61
- expect(ValidationTest.instance_variable_get(:@schema_file)).to eq("fake file")
62
- expect(ValidationTest.schema_file).to eq("fake file")
61
+ ValidationTest.instance_variable_get(:@schema_file).should == "fake file"
62
+ ValidationTest.schema_file.should == "fake file"
63
63
  end
64
64
  end
65
65
 
66
66
  describe "#file_from_url" do
67
67
  it "should retrieve a file from the provided url over HTTP" do
68
- expect(ValidationTest).to receive(:open).with("http://google.com")
68
+ ValidationTest.should_receive(:open).with("http://google.com")
69
69
  ValidationTest.send(:file_from_url, "http://google.com")
70
70
  end
71
71
  it "should raise an error if the url is invalid" do
72
- expect {ValidationTest.send(:file_from_url, "")}.to raise_error(RuntimeError, "Could not retrieve file from . Error: No such file or directory - ")
73
- expect {ValidationTest.send(:file_from_url, "foo")}.to raise_error(RuntimeError, "Could not retrieve file from foo. Error: No such file or directory - foo")
72
+ lambda {ValidationTest.send(:file_from_url, "")}.should raise_error(RuntimeError, "Could not retrieve file from . Error: No such file or directory - ")
73
+ lambda {ValidationTest.send(:file_from_url, "foo")}.should raise_error(RuntimeError, "Could not retrieve file from foo. Error: No such file or directory - foo")
74
74
  end
75
75
  it "should raise an error if file retrieval fails" do
76
- skip "no internet connection"
77
- expect {ValidationTest.send(:file_from_url, "http://fedora-commons.org/nonexistent_file")}.to raise_error(RuntimeError, "Could not retrieve file from http://fedora-commons.org/nonexistent_file. Error: 404 Not Found")
76
+ pending "no internet connection"
77
+ lambda {ValidationTest.send(:file_from_url, "http://fedora-commons.org/nonexistent_file")}.should raise_error(RuntimeError, "Could not retrieve file from http://fedora-commons.org/nonexistent_file. Error: 404 Not Found")
78
78
  end
79
79
  end
80
80
  end
@@ -7,13 +7,14 @@ describe "OM::XML::Terminology.to_xml" do
7
7
  it "should put terminology details into the xml" do
8
8
  expected_xml = "<namespaces>\n <namespace>\n <name>oxns</name>\n <identifier>http://www.loc.gov/mods/v3</identifier>\n </namespace>\n <namespace>\n <name>xmlns:foo</name>\n <identifier>http://my.custom.namespace</identifier>\n </namespace>\n <namespace>\n <name>xmlns</name>\n <identifier>http://www.loc.gov/mods/v3</identifier>\n </namespace>\n</namespaces>"
9
9
  xml = @terminology.to_xml
10
- expect(xml.xpath("/terminology/schema").to_xml).to eq("<schema>http://www.loc.gov/standards/mods/v3/mods-3-2.xsd</schema>")
11
- expect(xml.xpath("/terminology/namespaces").to_xml).to be_equivalent_to expected_xml
10
+ xml.xpath("/terminology/schema").to_xml.should == "<schema>http://www.loc.gov/standards/mods/v3/mods-3-2.xsd</schema>"
11
+ xml.xpath("/terminology/namespaces").to_xml.should be_equivalent_to expected_xml
12
12
  end
13
13
  it "should call .to_xml on all of the terms" do
14
+ options = {}
14
15
  doc = Nokogiri::XML::Document.new
15
- @terminology.terms.values.each {|term| expect(term).to receive(:to_xml) }
16
- @terminology.to_xml({}, doc)
16
+ @terminology.terms.values.each {|term| term.should_receive(:to_xml) }
17
+ @terminology.to_xml(options,doc)
17
18
  end
18
19
  end
19
20
 
@@ -26,33 +27,33 @@ describe "OM::XML::Term.to_xml" do
26
27
  end
27
28
  it "should return an xml representation of the Term" do
28
29
  xml = @person_first_name.to_xml
29
- expect(xml.xpath("/term").first.attributes["name"].value).to eq("first_name")
30
- expect(xml.xpath("/term/attributes/type").first.text).to eq("given")
31
- expect(xml.xpath("/term/path").first.text).to eq("namePart")
32
- expect(xml.xpath("/term/namespace_prefix").first.text).to eq("oxns")
33
- expect(xml.xpath("/term/children/*")).to be_empty
34
- expect(xml.xpath("/term/xpath/relative").first.text).to eq("oxns:namePart[@type=\"given\"]")
35
- expect(xml.xpath("/term/xpath/absolute").first.text).to eq("//oxns:name[@type=\"personal\"]/oxns:namePart[@type=\"given\"]")
36
- expect(xml.xpath("/term/xpath/constrained").first.text).to eq("//oxns:name[@type=\\\"personal\\\"]/oxns:namePart[@type=\\\"given\\\" and contains(., \\\"\#{constraint_value}\\\")]")
37
- expect(xml.xpath("/term/index_as").first.text).to eq("")
38
- expect(xml.xpath("/term/required").first.text).to eq("false")
39
- expect(xml.xpath("/term/data_type").first.text).to eq("string")
30
+ xml.xpath("/term").first.attributes["name"].value.should == "first_name"
31
+ xml.xpath("/term/attributes/type").first.text.should == "given"
32
+ xml.xpath("/term/path").first.text.should == "namePart"
33
+ xml.xpath("/term/namespace_prefix").first.text.should == "oxns"
34
+ xml.xpath("/term/children/*").should be_empty
35
+ xml.xpath("/term/xpath/relative").first.text.should == "oxns:namePart[@type=\"given\"]"
36
+ xml.xpath("/term/xpath/absolute").first.text.should == "//oxns:name[@type=\"personal\"]/oxns:namePart[@type=\"given\"]"
37
+ xml.xpath("/term/xpath/constrained").first.text.should == "//oxns:name[@type=\\\"personal\\\"]/oxns:namePart[@type=\\\"given\\\" and contains(., \\\"\#{constraint_value}\\\")]"
38
+ xml.xpath("/term/index_as").first.text.should == ""
39
+ xml.xpath("/term/required").first.text.should == "false"
40
+ xml.xpath("/term/data_type").first.text.should == "string"
40
41
  end
41
42
  it "should capture root term info" do
42
43
  xml = @terminology.root_terms.first.to_xml
43
- expect(xml.xpath("/term/is_root_term").text).to eq("true")
44
- expect(@person_first_name.to_xml.xpath("/term/is_root_term")).to be_empty
44
+ xml.xpath("/term/is_root_term").text.should == "true"
45
+ @person_first_name.to_xml.xpath("/term/is_root_term").should be_empty
45
46
  end
46
47
  it "should allow you to pass in a document to add the term to" do
47
48
  doc = Nokogiri::XML::Document.new
48
- expect(@person_first_name.to_xml({}, doc)).to eq(doc)
49
+ @person_first_name.to_xml({}, doc).should == doc
49
50
  end
50
51
  it "should include children" do
51
52
  children = @person.to_xml.xpath("//term[@name=\"person\"]/children/*")
52
- expect(children.length).to eq(12)
53
- children.each {|child| expect(child.name).to eq("term")}
53
+ children.length.should == 12
54
+ children.each {|child| child.name.should == "term"}
54
55
  end
55
56
  it "should skip children if :children=>false" do
56
- expect(@person.to_xml(:children=>false).xpath("children")).to be_empty
57
+ @person.to_xml(:children=>false).xpath("children").should be_empty
57
58
  end
58
59
  end
@@ -1,22 +1,22 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe "OM::XML::Container" do
4
-
4
+
5
5
  before(:all) do
6
6
  class XMLTest
7
7
  include OM::XML
8
8
  end
9
9
  end
10
-
10
+
11
11
  it "should automatically include the other modules" do
12
- expect(XMLTest.included_modules).to include(OM::XML::Container)
13
- expect(XMLTest.included_modules).to include(OM::XML::Validation)
12
+ XMLTest.included_modules.should include(OM::XML::Container)
13
+ XMLTest.included_modules.should include(OM::XML::Validation)
14
14
  end
15
-
15
+
16
16
  describe "#sanitize_pointer" do
17
17
  it "should convert any nested arrays into hashes" do
18
- expect(XMLTest.sanitize_pointer( [[:person,1],:role] )).to eq([{:person=>1},:role])
18
+ XMLTest.sanitize_pointer( [[:person,1],:role] ).should == [{:person=>1},:role]
19
19
  end
20
20
  end
21
-
21
+
22
22
  end
@@ -0,0 +1,109 @@
1
+ require 'spec_helper'
2
+ require 'fixtures/mods_article'
3
+
4
+ # TODO: there should be no dependencies on OM in Solrizer
5
+ describe OM::XML::TerminologyBasedSolrizer do
6
+
7
+ before(:all) do
8
+ Samples::ModsArticle.send(:include, OM::XML::TerminologyBasedSolrizer)
9
+ end
10
+
11
+ before(:each) do
12
+ article_xml = fixture( File.join("mods_articles", "hydrangea_article1.xml") )
13
+ @mods_article = Samples::ModsArticle.from_xml(article_xml)
14
+ end
15
+
16
+ describe ".to_solr" do
17
+
18
+ it "should provide .to_solr and return a SolrDocument" do
19
+ @mods_article.should respond_to(:to_solr)
20
+ @mods_article.to_solr.should be_kind_of(Hash)
21
+ end
22
+
23
+ it "should optionally allow you to provide the Hash to add fields to and return that document when done" do
24
+ doc = Hash.new
25
+ @mods_article.to_solr(doc).should equal(doc)
26
+ end
27
+
28
+ it "should iterate through the terminology terms, calling .solrize_term on each and passing in the solr doc" do
29
+ solr_doc = Hash.new
30
+ @mods_article.field_mapper = Solrizer::FieldMapper.new
31
+ Samples::ModsArticle.terminology.terms.each_pair do |k,v|
32
+ @mods_article.should_receive(:solrize_term).with(v, solr_doc, @mods_article.field_mapper)
33
+ end
34
+ @mods_article.to_solr(solr_doc)
35
+ end
36
+
37
+ it "should use Solr mappings to generate field names" do
38
+ solr_doc = @mods_article.to_solr
39
+ solr_doc["abstract"].should be_nil
40
+ # NOTE: OM's old default expected stored and indexed; this is a change.
41
+ solr_doc["abstract_tesim"].should == ["ABSTRACT"]
42
+ solr_doc["title_info_1_language_tesim"].should == ["finnish"]
43
+ solr_doc["person_1_role_0_text_tesim"].should == ["teacher"]
44
+ # No index_as on the code field.
45
+ solr_doc["person_1_role_0_code_tesim"].should be_nil
46
+ solr_doc["person_last_name_tesim"].sort.should == ["FAMILY NAME", "Gautama"]
47
+ solr_doc["topic_tag_tesim"].sort.should == ["CONTROLLED TERM", "TOPIC 1", "TOPIC 2"]
48
+ # These are a holdover from an old verison of OM
49
+ solr_doc['journal_0_issue_0_publication_date_dtsim'].should == ["2007-02-01T00:00:00Z"]
50
+ end
51
+
52
+ end
53
+
54
+ describe ".solrize_term" do
55
+
56
+ it "should add fields to a solr document for all nodes corresponding to the given term and its children" do
57
+ solr_doc = Hash.new
58
+ result = @mods_article.solrize_term(Samples::ModsArticle.terminology.retrieve_term(:title_info), solr_doc)
59
+ result.should == solr_doc
60
+ end
61
+
62
+ it "should add multiple fields based on index_as" do
63
+ fake_solr_doc = {}
64
+ term = Samples::ModsArticle.terminology.retrieve_term(:name)
65
+ term.children[:namePart].index_as = [:searchable, :displayable, :facetable]
66
+
67
+ @mods_article.solrize_term(term, fake_solr_doc)
68
+
69
+ expected_names = ["DR.", "FAMILY NAME", "GIVEN NAMES", "PERSON_ID"]
70
+ %w(_teim _sim).each do |suffix|
71
+ actual_names = fake_solr_doc["name_0_namePart#{suffix}"].sort
72
+ actual_names.should == expected_names
73
+ end
74
+ end
75
+
76
+ it "should add fields based on type using proxy" do
77
+ unless RUBY_VERSION.match("1.8.7")
78
+ solr_doc = Hash.new
79
+ result = @mods_article.solrize_term(Samples::ModsArticle.terminology.retrieve_term(:pub_date), solr_doc)
80
+ solr_doc["pub_date_dtsim"].should == ["2007-02-01T00:00:00Z"]
81
+ end
82
+ end
83
+
84
+ it "should add fields based on type using ref" do
85
+ solr_doc = Hash.new
86
+ result = @mods_article.solrize_term(Samples::ModsArticle.terminology.retrieve_term(:issue_date), solr_doc)
87
+ solr_doc["issue_date_dtsim"].should == ["2007-02-15T00:00:00Z"]
88
+ end
89
+
90
+ it "shouldn't index terms where index_as is an empty array" do
91
+ fake_solr_doc = {}
92
+ term = Samples::ModsArticle.terminology.retrieve_term(:name)
93
+ term.children[:namePart].index_as = []
94
+
95
+ @mods_article.solrize_term(term, fake_solr_doc)
96
+ fake_solr_doc["name_0_namePart_teim"].should be_nil
97
+ end
98
+
99
+ it "should index terms where index_as is searchable" do
100
+ fake_solr_doc = {}
101
+ term = Samples::ModsArticle.terminology.retrieve_term(:name)
102
+ term.children[:namePart].index_as = [:searchable]
103
+
104
+ @mods_article.solrize_term(term, fake_solr_doc)
105
+
106
+ fake_solr_doc["name_0_namePart_teim"].sort.should == ["DR.", "FAMILY NAME", "GIVEN NAMES", "PERSON_ID"]
107
+ end
108
+ end
109
+ end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: om
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.9.0.pre1
5
+ prerelease: 6
5
6
  platform: ruby
6
7
  authors:
7
8
  - Matt Zumwalt
@@ -9,11 +10,12 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2015-10-17 00:00:00.000000000 Z
13
+ date: 2013-02-03 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: activesupport
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
20
  - - ">="
19
21
  - !ruby/object:Gem::Version
@@ -21,6 +23,7 @@ dependencies:
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
28
  - - ">="
26
29
  - !ruby/object:Gem::Version
@@ -28,6 +31,7 @@ dependencies:
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: activemodel
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
36
  - - ">="
33
37
  - !ruby/object:Gem::Version
@@ -35,13 +39,31 @@ dependencies:
35
39
  type: :runtime
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
44
  - - ">="
40
45
  - !ruby/object:Gem::Version
41
46
  version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: solrizer
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 3.0.0.pre8
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: 3.0.0.pre8
42
63
  - !ruby/object:Gem::Dependency
43
64
  name: nokogiri
44
65
  requirement: !ruby/object:Gem::Requirement
66
+ none: false
45
67
  requirements:
46
68
  - - ">="
47
69
  - !ruby/object:Gem::Version
@@ -49,6 +71,7 @@ dependencies:
49
71
  type: :runtime
50
72
  prerelease: false
51
73
  version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
52
75
  requirements:
53
76
  - - ">="
54
77
  - !ruby/object:Gem::Version
@@ -56,6 +79,7 @@ dependencies:
56
79
  - !ruby/object:Gem::Dependency
57
80
  name: mediashelf-loggable
58
81
  requirement: !ruby/object:Gem::Requirement
82
+ none: false
59
83
  requirements:
60
84
  - - ">="
61
85
  - !ruby/object:Gem::Version
@@ -63,6 +87,7 @@ dependencies:
63
87
  type: :runtime
64
88
  prerelease: false
65
89
  version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
66
91
  requirements:
67
92
  - - ">="
68
93
  - !ruby/object:Gem::Version
@@ -70,6 +95,7 @@ dependencies:
70
95
  - !ruby/object:Gem::Dependency
71
96
  name: deprecation
72
97
  requirement: !ruby/object:Gem::Requirement
98
+ none: false
73
99
  requirements:
74
100
  - - ">="
75
101
  - !ruby/object:Gem::Version
@@ -77,6 +103,7 @@ dependencies:
77
103
  type: :runtime
78
104
  prerelease: false
79
105
  version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
80
107
  requirements:
81
108
  - - ">="
82
109
  - !ruby/object:Gem::Version
@@ -84,20 +111,23 @@ dependencies:
84
111
  - !ruby/object:Gem::Dependency
85
112
  name: rspec
86
113
  requirement: !ruby/object:Gem::Requirement
114
+ none: false
87
115
  requirements:
88
116
  - - "~>"
89
117
  - !ruby/object:Gem::Version
90
- version: '2.99'
118
+ version: '2.0'
91
119
  type: :development
92
120
  prerelease: false
93
121
  version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
94
123
  requirements:
95
124
  - - "~>"
96
125
  - !ruby/object:Gem::Version
97
- version: '2.99'
126
+ version: '2.0'
98
127
  - !ruby/object:Gem::Dependency
99
128
  name: rake
100
129
  requirement: !ruby/object:Gem::Requirement
130
+ none: false
101
131
  requirements:
102
132
  - - ">="
103
133
  - !ruby/object:Gem::Version
@@ -105,6 +135,7 @@ dependencies:
105
135
  type: :development
106
136
  prerelease: false
107
137
  version_requirements: !ruby/object:Gem::Requirement
138
+ none: false
108
139
  requirements:
109
140
  - - ">="
110
141
  - !ruby/object:Gem::Version
@@ -112,6 +143,7 @@ dependencies:
112
143
  - !ruby/object:Gem::Dependency
113
144
  name: rdoc
114
145
  requirement: !ruby/object:Gem::Requirement
146
+ none: false
115
147
  requirements:
116
148
  - - ">="
117
149
  - !ruby/object:Gem::Version
@@ -119,6 +151,7 @@ dependencies:
119
151
  type: :development
120
152
  prerelease: false
121
153
  version_requirements: !ruby/object:Gem::Requirement
154
+ none: false
122
155
  requirements:
123
156
  - - ">="
124
157
  - !ruby/object:Gem::Version
@@ -126,6 +159,7 @@ dependencies:
126
159
  - !ruby/object:Gem::Dependency
127
160
  name: awesome_print
128
161
  requirement: !ruby/object:Gem::Requirement
162
+ none: false
129
163
  requirements:
130
164
  - - ">="
131
165
  - !ruby/object:Gem::Version
@@ -133,6 +167,7 @@ dependencies:
133
167
  type: :development
134
168
  prerelease: false
135
169
  version_requirements: !ruby/object:Gem::Requirement
170
+ none: false
136
171
  requirements:
137
172
  - - ">="
138
173
  - !ruby/object:Gem::Version
@@ -140,6 +175,7 @@ dependencies:
140
175
  - !ruby/object:Gem::Dependency
141
176
  name: equivalent-xml
142
177
  requirement: !ruby/object:Gem::Requirement
178
+ none: false
143
179
  requirements:
144
180
  - - ">="
145
181
  - !ruby/object:Gem::Version
@@ -147,11 +183,12 @@ dependencies:
147
183
  type: :development
148
184
  prerelease: false
149
185
  version_requirements: !ruby/object:Gem::Requirement
186
+ none: false
150
187
  requirements:
151
188
  - - ">="
152
189
  - !ruby/object:Gem::Version
153
190
  version: 0.2.4
154
- description: 'OM (Opinionated Metadata): A library to help you tame sprawling XML
191
+ description: ! 'OM (Opinionated Metadata): A library to help you tame sprawling XML
155
192
  schemas like MODS. Wraps Nokogiri documents in objects with miscellaneous helper
156
193
  methods for doing things like retrieve generated xpath queries or look up properties
157
194
  based on a simplified DSL'
@@ -165,10 +202,6 @@ extra_rdoc_files:
165
202
  files:
166
203
  - ".document"
167
204
  - ".gitignore"
168
- - ".rspec"
169
- - ".rubocop.yml"
170
- - ".rubocop_todo.yml"
171
- - ".travis.yml"
172
205
  - COMMON_OM_PATTERNS.textile
173
206
  - GETTING_FANCY.textile
174
207
  - GETTING_STARTED.textile
@@ -182,8 +215,6 @@ files:
182
215
  - UPDATING_DOCUMENTS.textile
183
216
  - container_spec.rb
184
217
  - devel/notes.txt
185
- - gemfiles/gemfile.rails3
186
- - gemfiles/gemfile.rails4
187
218
  - lib/om.rb
188
219
  - lib/om/samples.rb
189
220
  - lib/om/samples/mods_article.rb
@@ -200,6 +231,7 @@ files:
200
231
  - lib/om/xml/term_value_operators.rb
201
232
  - lib/om/xml/term_xpath_generator.rb
202
233
  - lib/om/xml/terminology.rb
234
+ - lib/om/xml/terminology_based_solrizer.rb
203
235
  - lib/om/xml/validation.rb
204
236
  - lib/om/xml/vocabulary.rb
205
237
  - lib/tasks/om.rake
@@ -207,6 +239,7 @@ files:
207
239
  - spec/fixtures/CBF_MODS/ARS0025_016.xml
208
240
  - spec/fixtures/RUBRIC_mods_article_template.xml
209
241
  - spec/fixtures/mods-3-2.xsd
242
+ - spec/fixtures/mods_article.rb
210
243
  - spec/fixtures/mods_articles/hydrangea_article1.xml
211
244
  - spec/fixtures/no_namespace.xml
212
245
  - spec/fixtures/test_dummy_mods.xml
@@ -238,34 +271,40 @@ files:
238
271
  - spec/unit/validation_spec.rb
239
272
  - spec/unit/xml_serialization_spec.rb
240
273
  - spec/unit/xml_spec.rb
274
+ - spec/unit/xml_terminology_based_solrizer_spec.rb
241
275
  homepage: http://github.com/projecthydra/om
242
276
  licenses: []
243
- metadata: {}
244
277
  post_install_message:
245
278
  rdoc_options: []
246
279
  require_paths:
247
280
  - lib
248
281
  required_ruby_version: !ruby/object:Gem::Requirement
282
+ none: false
249
283
  requirements:
250
284
  - - ">="
251
285
  - !ruby/object:Gem::Version
252
286
  version: '0'
287
+ segments:
288
+ - 0
289
+ hash: 3009640997456570842
253
290
  required_rubygems_version: !ruby/object:Gem::Requirement
291
+ none: false
254
292
  requirements:
255
- - - ">="
293
+ - - ">"
256
294
  - !ruby/object:Gem::Version
257
- version: '0'
295
+ version: 1.3.1
258
296
  requirements: []
259
297
  rubyforge_project:
260
- rubygems_version: 2.4.8
298
+ rubygems_version: 1.8.25
261
299
  signing_key:
262
- specification_version: 4
263
- summary: 'OM (Opinionated Metadata): A library to help you tame sprawling XML schemas
300
+ specification_version: 3
301
+ summary: ! 'OM (Opinionated Metadata): A library to help you tame sprawling XML schemas
264
302
  like MODS.'
265
303
  test_files:
266
304
  - spec/fixtures/CBF_MODS/ARS0025_016.xml
267
305
  - spec/fixtures/RUBRIC_mods_article_template.xml
268
306
  - spec/fixtures/mods-3-2.xsd
307
+ - spec/fixtures/mods_article.rb
269
308
  - spec/fixtures/mods_articles/hydrangea_article1.xml
270
309
  - spec/fixtures/no_namespace.xml
271
310
  - spec/fixtures/test_dummy_mods.xml
@@ -297,4 +336,5 @@ test_files:
297
336
  - spec/unit/validation_spec.rb
298
337
  - spec/unit/xml_serialization_spec.rb
299
338
  - spec/unit/xml_spec.rb
339
+ - spec/unit/xml_terminology_based_solrizer_spec.rb
300
340
  has_rdoc: