om 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.textile CHANGED
@@ -1,16 +1,20 @@
1
- h3.1.2.3
1
+ h3. 1.2.4
2
2
 
3
- NamedTermProxies can now point to terms at the root of a Terminology
3
+ TerminologyBuilder.root now passes on its options to the root term builder that it creates.
4
4
 
5
- h3.1.2.0
5
+ h3. 1.2.3
6
+
7
+ NamedTermProxies can now point to terms at the root of a Terminology
8
+
9
+ h3. 1.2.0
6
10
 
7
11
  added OM::XML::TemplateRegistry for built-in templating and creation of new XML nodes
8
12
 
9
- h3.1.1.1
10
-
13
+ h3. 1.1.1
14
+
11
15
  "HYDRA-395":https://jira.duraspace.org/browse/HYDRA-395: Fixed bug that prevented you from appending term values with apostrophes in them
12
16
 
13
- h2.1.1.0
17
+ h2. 1.1.0
14
18
 
15
19
  HYDRA-371: Provide a way to specify a term that points to nodes where an attribute is not set
16
20
 
@@ -24,47 +28,47 @@ HYDRA-371: Provide a way to specify a term that points to nodes where an attribu
24
28
 
25
29
  namePart[not(@type)]
26
30
 
27
- h3.1.0.1
31
+ h3. 1.0.1
28
32
 
29
33
  HYDRA-329: Allow for NamedTermProxies at root of Terminology
30
34
 
31
- h2.1.0.0
35
+ h2. 1.0.0
32
36
 
33
37
  Stable release
34
38
 
35
- h3.0.1.10
39
+ h3. 0.1.10
36
40
 
37
41
  Improving generation of constrained xpath queries
38
42
 
39
- h3.0.1.9
43
+ h3. 0.1.9
40
44
 
41
45
  Improving support for deeply nested nodes (still needs work though)
42
46
 
43
- h3.0.1.5
47
+ h3. 0.1.5
44
48
 
45
49
  * root_property now inserts an entry into the properties hash
46
50
  * added .generate method for building new instances of declared properties
47
51
  * refinements to accessor_xpath
48
52
 
49
- h3.0.1.4
53
+ h3. 0.1.4
50
54
 
51
55
  * made attribute_xpath idempotent
52
56
 
53
- h3.0.1.3
57
+ h3. 0.1.3
54
58
 
55
59
  * added accessor_generic_name and accessor_hierarchical_name methods
56
60
 
57
- h3.0.1.2
61
+ h3. 0.1.2
58
62
 
59
63
  * changed syntax for looking up accessors with (optional) index values -- no using [{:person=>1}, :first_name] instead of [:person, 1, :first_name]
60
64
 
61
- h3.0.1.1
65
+ h3. 0.1.1
62
66
 
63
67
  RENAMED to om (formerly opinionated-xml)
64
68
 
65
69
  * broke up functionality into Modules
66
70
  * added OM::XML::Accessor functionality
67
71
 
68
- h3.0.1
72
+ h3. 0.1
69
73
 
70
74
  Note: OX v.1 Does not handle treating attribute values as the changing "value" of a node
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.3
1
+ 1.2.4
@@ -181,7 +181,6 @@ module OM::XML::TermXpathGenerator
181
181
  relative_path << proxy_relative_path
182
182
  current_location = proxy_term
183
183
  rescue Exception => e
184
- debugger
185
184
  raise "There's a problem with the #{term.name} OM::XML::NamedTermProxy, whose proxy pointer is #{term.proxy_pointer}. The #{proxy_pointer} pointer is returning #{proxy_term.inspect}"
186
185
  end
187
186
  end
@@ -41,6 +41,9 @@ class OM::XML::Terminology
41
41
  end
42
42
  end
43
43
  root_term_builder = OM::XML::Term::Builder.new(opts.fetch(:path,:root).to_s.sub(/[_!]$/, '')).is_root_term(true)
44
+ term_opts = opts.dup
45
+ term_opts.delete(:schema)
46
+ root_term_builder.settings.merge!(term_opts)
44
47
  @term_builders[root_term_builder.name] = root_term_builder
45
48
 
46
49
  return root_term_builder
data/om.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{om}
8
- s.version = "1.2.3"
8
+ s.version = "1.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Zumwalt"]
12
- s.date = %q{2011-04-19}
12
+ s.date = %q{2011-05-02}
13
13
  s.description = %q{OM (Opinionated Metadata): A library to help you tame sprawling XML schemas like MODS. Wraps Nokogiri documents in objects with miscellaneous helper methods for doing things like retrieve generated xpath queries or look up properties based on a simplified DSL}
14
14
  s.email = %q{matt.zumwalt@yourmediashelf.com}
15
15
  s.extra_rdoc_files = [
@@ -123,6 +123,11 @@ Gem::Specification.new do |s|
123
123
  s.add_development_dependency(%q<ruby-debug>, [">= 0"])
124
124
  s.add_development_dependency(%q<jeweler>, [">= 0"])
125
125
  s.add_development_dependency(%q<equivalent-xml>, [">= 0.2.4"])
126
+ s.add_development_dependency(%q<rspec>, ["< 2.0.0"])
127
+ s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
128
+ s.add_development_dependency(%q<ruby-debug>, [">= 0"])
129
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
130
+ s.add_development_dependency(%q<equivalent-xml>, [">= 0.2.4"])
126
131
  s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.2"])
127
132
  s.add_development_dependency(%q<rspec>, ["< 2.0.0"])
128
133
  s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
@@ -157,6 +162,11 @@ Gem::Specification.new do |s|
157
162
  s.add_dependency(%q<ruby-debug>, [">= 0"])
158
163
  s.add_dependency(%q<jeweler>, [">= 0"])
159
164
  s.add_dependency(%q<equivalent-xml>, [">= 0.2.4"])
165
+ s.add_dependency(%q<rspec>, ["< 2.0.0"])
166
+ s.add_dependency(%q<mocha>, [">= 0.9.8"])
167
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
168
+ s.add_dependency(%q<jeweler>, [">= 0"])
169
+ s.add_dependency(%q<equivalent-xml>, [">= 0.2.4"])
160
170
  s.add_dependency(%q<nokogiri>, [">= 1.4.2"])
161
171
  s.add_dependency(%q<rspec>, ["< 2.0.0"])
162
172
  s.add_dependency(%q<mocha>, [">= 0.9.8"])
@@ -192,6 +202,11 @@ Gem::Specification.new do |s|
192
202
  s.add_dependency(%q<ruby-debug>, [">= 0"])
193
203
  s.add_dependency(%q<jeweler>, [">= 0"])
194
204
  s.add_dependency(%q<equivalent-xml>, [">= 0.2.4"])
205
+ s.add_dependency(%q<rspec>, ["< 2.0.0"])
206
+ s.add_dependency(%q<mocha>, [">= 0.9.8"])
207
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
208
+ s.add_dependency(%q<jeweler>, [">= 0"])
209
+ s.add_dependency(%q<equivalent-xml>, [">= 0.2.4"])
195
210
  s.add_dependency(%q<nokogiri>, [">= 1.4.2"])
196
211
  s.add_dependency(%q<rspec>, ["< 2.0.0"])
197
212
  s.add_dependency(%q<mocha>, [">= 0.9.8"])
@@ -70,7 +70,6 @@ describe "OM::XML::Accessors" do
70
70
  pending "nesting is too deep..."
71
71
  @sample.retrieve(*[:edit_access, :machine, :person]).length.should == 0
72
72
  @sample.update_properties([:edit_access, :machine, :person]=>"user id").should == {"edit_access_machine_person"=>{"-1"=>"user id"}}
73
- debugger
74
73
  @sample.retrieve(*[:edit_access, :machine, :person]).length.should == 1
75
74
  @sample.retrieve(*[:edit_access, :machine, :person]).first.text.should == "user id"
76
75
  end
@@ -176,8 +176,15 @@ describe "OM::XML::Terminology::Builder" do
176
176
  terminology = @test_builder.build
177
177
  terminology.schema.should == "http://www.loc.gov/standards/mods/v3/mods-3-2.xsd"
178
178
  terminology.namespaces.should == { "oxns"=>"one:two", 'xmlns' => 'one:two', 'xmlns:foo' => 'bar' }
179
- terminology.retrieve_term(:mods).should be_instance_of OM::XML::Term
180
- terminology.retrieve_term(:mods).is_root_term?.should == true
179
+ end
180
+ it "should create an explicit term correspoinding to the root node and pass any additional settings into that term" do
181
+ @test_builder.root(:path=>"fwoop", :xmlns => 'one:two', 'xmlns:foo' => 'bar', :index_as=>[:not_searchable], :namespace_prefix=>"foox")
182
+ terminology = @test_builder.build
183
+ term = terminology.retrieve_term(:fwoop)
184
+ term.should be_instance_of OM::XML::Term
185
+ term.is_root_term?.should == true
186
+ term.index_as.should == [:not_searchable]
187
+ term.namespace_prefix.should == "foox"
181
188
  end
182
189
  it "should work within a builder block" do
183
190
  @builder_with_block.term_builders[:mods].settings[:is_root_term].should == true
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: om
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 3
10
- version: 1.2.3
9
+ - 4
10
+ version: 1.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Zumwalt
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-19 00:00:00 -05:00
18
+ date: 2011-05-02 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -426,11 +426,87 @@ dependencies:
426
426
  - 4
427
427
  version: 0.2.4
428
428
  requirement: *id027
429
+ - !ruby/object:Gem::Dependency
430
+ type: :development
431
+ prerelease: false
432
+ name: rspec
433
+ version_requirements: &id028 !ruby/object:Gem::Requirement
434
+ none: false
435
+ requirements:
436
+ - - <
437
+ - !ruby/object:Gem::Version
438
+ hash: 15
439
+ segments:
440
+ - 2
441
+ - 0
442
+ - 0
443
+ version: 2.0.0
444
+ requirement: *id028
445
+ - !ruby/object:Gem::Dependency
446
+ type: :development
447
+ prerelease: false
448
+ name: mocha
449
+ version_requirements: &id029 !ruby/object:Gem::Requirement
450
+ none: false
451
+ requirements:
452
+ - - ">="
453
+ - !ruby/object:Gem::Version
454
+ hash: 43
455
+ segments:
456
+ - 0
457
+ - 9
458
+ - 8
459
+ version: 0.9.8
460
+ requirement: *id029
461
+ - !ruby/object:Gem::Dependency
462
+ type: :development
463
+ prerelease: false
464
+ name: ruby-debug
465
+ version_requirements: &id030 !ruby/object:Gem::Requirement
466
+ none: false
467
+ requirements:
468
+ - - ">="
469
+ - !ruby/object:Gem::Version
470
+ hash: 3
471
+ segments:
472
+ - 0
473
+ version: "0"
474
+ requirement: *id030
475
+ - !ruby/object:Gem::Dependency
476
+ type: :development
477
+ prerelease: false
478
+ name: jeweler
479
+ version_requirements: &id031 !ruby/object:Gem::Requirement
480
+ none: false
481
+ requirements:
482
+ - - ">="
483
+ - !ruby/object:Gem::Version
484
+ hash: 3
485
+ segments:
486
+ - 0
487
+ version: "0"
488
+ requirement: *id031
489
+ - !ruby/object:Gem::Dependency
490
+ type: :development
491
+ prerelease: false
492
+ name: equivalent-xml
493
+ version_requirements: &id032 !ruby/object:Gem::Requirement
494
+ none: false
495
+ requirements:
496
+ - - ">="
497
+ - !ruby/object:Gem::Version
498
+ hash: 31
499
+ segments:
500
+ - 0
501
+ - 2
502
+ - 4
503
+ version: 0.2.4
504
+ requirement: *id032
429
505
  - !ruby/object:Gem::Dependency
430
506
  type: :runtime
431
507
  prerelease: false
432
508
  name: nokogiri
433
- version_requirements: &id028 !ruby/object:Gem::Requirement
509
+ version_requirements: &id033 !ruby/object:Gem::Requirement
434
510
  none: false
435
511
  requirements:
436
512
  - - ">="
@@ -441,12 +517,12 @@ dependencies:
441
517
  - 4
442
518
  - 2
443
519
  version: 1.4.2
444
- requirement: *id028
520
+ requirement: *id033
445
521
  - !ruby/object:Gem::Dependency
446
522
  type: :development
447
523
  prerelease: false
448
524
  name: rspec
449
- version_requirements: &id029 !ruby/object:Gem::Requirement
525
+ version_requirements: &id034 !ruby/object:Gem::Requirement
450
526
  none: false
451
527
  requirements:
452
528
  - - <
@@ -457,12 +533,12 @@ dependencies:
457
533
  - 0
458
534
  - 0
459
535
  version: 2.0.0
460
- requirement: *id029
536
+ requirement: *id034
461
537
  - !ruby/object:Gem::Dependency
462
538
  type: :development
463
539
  prerelease: false
464
540
  name: mocha
465
- version_requirements: &id030 !ruby/object:Gem::Requirement
541
+ version_requirements: &id035 !ruby/object:Gem::Requirement
466
542
  none: false
467
543
  requirements:
468
544
  - - ">="
@@ -473,12 +549,12 @@ dependencies:
473
549
  - 9
474
550
  - 8
475
551
  version: 0.9.8
476
- requirement: *id030
552
+ requirement: *id035
477
553
  - !ruby/object:Gem::Dependency
478
554
  type: :development
479
555
  prerelease: false
480
556
  name: ruby-debug
481
- version_requirements: &id031 !ruby/object:Gem::Requirement
557
+ version_requirements: &id036 !ruby/object:Gem::Requirement
482
558
  none: false
483
559
  requirements:
484
560
  - - ">="
@@ -487,12 +563,12 @@ dependencies:
487
563
  segments:
488
564
  - 0
489
565
  version: "0"
490
- requirement: *id031
566
+ requirement: *id036
491
567
  - !ruby/object:Gem::Dependency
492
568
  type: :development
493
569
  prerelease: false
494
570
  name: jeweler
495
- version_requirements: &id032 !ruby/object:Gem::Requirement
571
+ version_requirements: &id037 !ruby/object:Gem::Requirement
496
572
  none: false
497
573
  requirements:
498
574
  - - ">="
@@ -501,12 +577,12 @@ dependencies:
501
577
  segments:
502
578
  - 0
503
579
  version: "0"
504
- requirement: *id032
580
+ requirement: *id037
505
581
  - !ruby/object:Gem::Dependency
506
582
  type: :development
507
583
  prerelease: false
508
584
  name: equivalent-xml
509
- version_requirements: &id033 !ruby/object:Gem::Requirement
585
+ version_requirements: &id038 !ruby/object:Gem::Requirement
510
586
  none: false
511
587
  requirements:
512
588
  - - ">="
@@ -517,7 +593,7 @@ dependencies:
517
593
  - 2
518
594
  - 4
519
595
  version: 0.2.4
520
- requirement: *id033
596
+ requirement: *id038
521
597
  description: "OM (Opinionated Metadata): A library to help you tame sprawling XML schemas like MODS. Wraps Nokogiri documents in objects with miscellaneous helper methods for doing things like retrieve generated xpath queries or look up properties based on a simplified DSL"
522
598
  email: matt.zumwalt@yourmediashelf.com
523
599
  executables: []