om 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.textile CHANGED
@@ -1,12 +1,16 @@
1
- 1.2.0
1
+ h3.1.2.3
2
+
3
+ NamedTermProxies can now point to terms at the root of a Terminology
4
+
5
+ h3.1.2.0
2
6
 
3
7
  added OM::XML::TemplateRegistry for built-in templating and creation of new XML nodes
4
8
 
5
- 1.1.1
9
+ h3.1.1.1
6
10
 
7
11
  "HYDRA-395":https://jira.duraspace.org/browse/HYDRA-395: Fixed bug that prevented you from appending term values with apostrophes in them
8
12
 
9
- 1.1.0
13
+ h2.1.1.0
10
14
 
11
15
  HYDRA-371: Provide a way to specify a term that points to nodes where an attribute is not set
12
16
 
@@ -20,47 +24,47 @@ HYDRA-371: Provide a way to specify a term that points to nodes where an attribu
20
24
 
21
25
  namePart[not(@type)]
22
26
 
23
- 1.0.1
27
+ h3.1.0.1
24
28
 
25
29
  HYDRA-329: Allow for NamedTermProxies at root of Terminology
26
30
 
27
- 1.0.0
31
+ h2.1.0.0
28
32
 
29
33
  Stable release
30
34
 
31
- 0.1.10
35
+ h3.0.1.10
32
36
 
33
37
  Improving generation of constrained xpath queries
34
38
 
35
- 0.1.9
39
+ h3.0.1.9
36
40
 
37
41
  Improving support for deeply nested nodes (still needs work though)
38
42
 
39
- 0.1.5
43
+ h3.0.1.5
40
44
 
41
45
  * root_property now inserts an entry into the properties hash
42
46
  * added .generate method for building new instances of declared properties
43
47
  * refinements to accessor_xpath
44
48
 
45
- 0.1.4
49
+ h3.0.1.4
46
50
 
47
51
  * made attribute_xpath idempotent
48
52
 
49
- 0.1.3
53
+ h3.0.1.3
50
54
 
51
55
  * added accessor_generic_name and accessor_hierarchical_name methods
52
56
 
53
- 0.1.2
57
+ h3.0.1.2
54
58
 
55
59
  * changed syntax for looking up accessors with (optional) index values -- no using [{:person=>1}, :first_name] instead of [:person, 1, :first_name]
56
60
 
57
- 0.1.1
61
+ h3.0.1.1
58
62
 
59
63
  RENAMED to om (formerly opinionated-xml)
60
64
 
61
65
  * broke up functionality into Modules
62
66
  * added OM::XML::Accessor functionality
63
67
 
64
- 0.1
68
+ h3.0.1
65
69
 
66
70
  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.2
1
+ 1.2.3
@@ -169,13 +169,21 @@ module OM::XML::TermXpathGenerator
169
169
  current_location = term.parent.nil? ? term.terminology : term.parent
170
170
  relative_path = ""
171
171
  term.proxy_pointer.each_with_index do |proxy_pointer, proxy_pointer_index|
172
+ begin
172
173
  proxy_term = current_location.retrieve_term(proxy_pointer)
174
+ if proxy_term.nil?
175
+ proxy_term = terminology.retrieve_term(proxy_pointer)
176
+ end
173
177
  proxy_relative_path = proxy_term.xpath_relative
174
178
  if proxy_pointer_index > 0
175
179
  proxy_relative_path = "/"+proxy_relative_path
176
180
  end
177
181
  relative_path << proxy_relative_path
178
182
  current_location = proxy_term
183
+ rescue Exception => e
184
+ debugger
185
+ 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
+ end
179
187
  end
180
188
  else
181
189
  relative_path = term.xpath_relative
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.2"
8
+ s.version = "1.2.3"
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-03-26}
12
+ s.date = %q{2011-04-19}
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 = [
@@ -113,6 +113,16 @@ Gem::Specification.new do |s|
113
113
  s.add_development_dependency(%q<ruby-debug>, [">= 0"])
114
114
  s.add_development_dependency(%q<jeweler>, [">= 0"])
115
115
  s.add_development_dependency(%q<equivalent-xml>, [">= 0.2.4"])
116
+ s.add_development_dependency(%q<rspec>, ["< 2.0.0"])
117
+ s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
118
+ s.add_development_dependency(%q<ruby-debug>, [">= 0"])
119
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
120
+ s.add_development_dependency(%q<equivalent-xml>, [">= 0.2.4"])
121
+ s.add_development_dependency(%q<rspec>, ["< 2.0.0"])
122
+ s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
123
+ s.add_development_dependency(%q<ruby-debug>, [">= 0"])
124
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
125
+ s.add_development_dependency(%q<equivalent-xml>, [">= 0.2.4"])
116
126
  s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.2"])
117
127
  s.add_development_dependency(%q<rspec>, ["< 2.0.0"])
118
128
  s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
@@ -137,6 +147,16 @@ Gem::Specification.new do |s|
137
147
  s.add_dependency(%q<ruby-debug>, [">= 0"])
138
148
  s.add_dependency(%q<jeweler>, [">= 0"])
139
149
  s.add_dependency(%q<equivalent-xml>, [">= 0.2.4"])
150
+ s.add_dependency(%q<rspec>, ["< 2.0.0"])
151
+ s.add_dependency(%q<mocha>, [">= 0.9.8"])
152
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
153
+ s.add_dependency(%q<jeweler>, [">= 0"])
154
+ s.add_dependency(%q<equivalent-xml>, [">= 0.2.4"])
155
+ s.add_dependency(%q<rspec>, ["< 2.0.0"])
156
+ s.add_dependency(%q<mocha>, [">= 0.9.8"])
157
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
158
+ s.add_dependency(%q<jeweler>, [">= 0"])
159
+ s.add_dependency(%q<equivalent-xml>, [">= 0.2.4"])
140
160
  s.add_dependency(%q<nokogiri>, [">= 1.4.2"])
141
161
  s.add_dependency(%q<rspec>, ["< 2.0.0"])
142
162
  s.add_dependency(%q<mocha>, [">= 0.9.8"])
@@ -162,6 +182,16 @@ Gem::Specification.new do |s|
162
182
  s.add_dependency(%q<ruby-debug>, [">= 0"])
163
183
  s.add_dependency(%q<jeweler>, [">= 0"])
164
184
  s.add_dependency(%q<equivalent-xml>, [">= 0.2.4"])
185
+ s.add_dependency(%q<rspec>, ["< 2.0.0"])
186
+ s.add_dependency(%q<mocha>, [">= 0.9.8"])
187
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
188
+ s.add_dependency(%q<jeweler>, [">= 0"])
189
+ s.add_dependency(%q<equivalent-xml>, [">= 0.2.4"])
190
+ s.add_dependency(%q<rspec>, ["< 2.0.0"])
191
+ s.add_dependency(%q<mocha>, [">= 0.9.8"])
192
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
193
+ s.add_dependency(%q<jeweler>, [">= 0"])
194
+ s.add_dependency(%q<equivalent-xml>, [">= 0.2.4"])
165
195
  s.add_dependency(%q<nokogiri>, [">= 1.4.2"])
166
196
  s.add_dependency(%q<rspec>, ["< 2.0.0"])
167
197
  s.add_dependency(%q<mocha>, [">= 0.9.8"])
@@ -13,6 +13,7 @@ describe "OM::XML::NamedTermProxy" do
13
13
  t.my_proxy(:proxy=>[:foo, :bar])
14
14
  }
15
15
  t.adoptive_parent(:ref=>[:parent], :attributes=>{:type=>"adoptive"})
16
+ t.parentfoobarproxy(:proxy=>[:parent, :foo, :bar])
16
17
  end
17
18
 
18
19
  @test_terminology = @test_terminology_builder.build
@@ -36,4 +37,7 @@ describe "OM::XML::NamedTermProxy" do
36
37
  proxy2.proxied_term.should == @test_terminology.retrieve_term(:adoptive_parent, :foo, :bar)
37
38
  proxy2.xpath.should == '//oxns:parent[@type="adoptive"]/oxns:foo/oxns:bar'
38
39
  end
40
+ it "should support NamedTermProxies that point to root terms" do
41
+ @test_terminology.xpath_for(:parentfoobarproxy).should == "//oxns:parent/oxns:foo/oxns:bar"
42
+ end
39
43
  end
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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 2
10
- version: 1.2.2
9
+ - 3
10
+ version: 1.2.3
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-03-26 00:00:00 -05:00
18
+ date: 2011-04-19 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -274,11 +274,163 @@ dependencies:
274
274
  - 4
275
275
  version: 0.2.4
276
276
  requirement: *id017
277
+ - !ruby/object:Gem::Dependency
278
+ type: :development
279
+ prerelease: false
280
+ name: rspec
281
+ version_requirements: &id018 !ruby/object:Gem::Requirement
282
+ none: false
283
+ requirements:
284
+ - - <
285
+ - !ruby/object:Gem::Version
286
+ hash: 15
287
+ segments:
288
+ - 2
289
+ - 0
290
+ - 0
291
+ version: 2.0.0
292
+ requirement: *id018
293
+ - !ruby/object:Gem::Dependency
294
+ type: :development
295
+ prerelease: false
296
+ name: mocha
297
+ version_requirements: &id019 !ruby/object:Gem::Requirement
298
+ none: false
299
+ requirements:
300
+ - - ">="
301
+ - !ruby/object:Gem::Version
302
+ hash: 43
303
+ segments:
304
+ - 0
305
+ - 9
306
+ - 8
307
+ version: 0.9.8
308
+ requirement: *id019
309
+ - !ruby/object:Gem::Dependency
310
+ type: :development
311
+ prerelease: false
312
+ name: ruby-debug
313
+ version_requirements: &id020 !ruby/object:Gem::Requirement
314
+ none: false
315
+ requirements:
316
+ - - ">="
317
+ - !ruby/object:Gem::Version
318
+ hash: 3
319
+ segments:
320
+ - 0
321
+ version: "0"
322
+ requirement: *id020
323
+ - !ruby/object:Gem::Dependency
324
+ type: :development
325
+ prerelease: false
326
+ name: jeweler
327
+ version_requirements: &id021 !ruby/object:Gem::Requirement
328
+ none: false
329
+ requirements:
330
+ - - ">="
331
+ - !ruby/object:Gem::Version
332
+ hash: 3
333
+ segments:
334
+ - 0
335
+ version: "0"
336
+ requirement: *id021
337
+ - !ruby/object:Gem::Dependency
338
+ type: :development
339
+ prerelease: false
340
+ name: equivalent-xml
341
+ version_requirements: &id022 !ruby/object:Gem::Requirement
342
+ none: false
343
+ requirements:
344
+ - - ">="
345
+ - !ruby/object:Gem::Version
346
+ hash: 31
347
+ segments:
348
+ - 0
349
+ - 2
350
+ - 4
351
+ version: 0.2.4
352
+ requirement: *id022
353
+ - !ruby/object:Gem::Dependency
354
+ type: :development
355
+ prerelease: false
356
+ name: rspec
357
+ version_requirements: &id023 !ruby/object:Gem::Requirement
358
+ none: false
359
+ requirements:
360
+ - - <
361
+ - !ruby/object:Gem::Version
362
+ hash: 15
363
+ segments:
364
+ - 2
365
+ - 0
366
+ - 0
367
+ version: 2.0.0
368
+ requirement: *id023
369
+ - !ruby/object:Gem::Dependency
370
+ type: :development
371
+ prerelease: false
372
+ name: mocha
373
+ version_requirements: &id024 !ruby/object:Gem::Requirement
374
+ none: false
375
+ requirements:
376
+ - - ">="
377
+ - !ruby/object:Gem::Version
378
+ hash: 43
379
+ segments:
380
+ - 0
381
+ - 9
382
+ - 8
383
+ version: 0.9.8
384
+ requirement: *id024
385
+ - !ruby/object:Gem::Dependency
386
+ type: :development
387
+ prerelease: false
388
+ name: ruby-debug
389
+ version_requirements: &id025 !ruby/object:Gem::Requirement
390
+ none: false
391
+ requirements:
392
+ - - ">="
393
+ - !ruby/object:Gem::Version
394
+ hash: 3
395
+ segments:
396
+ - 0
397
+ version: "0"
398
+ requirement: *id025
399
+ - !ruby/object:Gem::Dependency
400
+ type: :development
401
+ prerelease: false
402
+ name: jeweler
403
+ version_requirements: &id026 !ruby/object:Gem::Requirement
404
+ none: false
405
+ requirements:
406
+ - - ">="
407
+ - !ruby/object:Gem::Version
408
+ hash: 3
409
+ segments:
410
+ - 0
411
+ version: "0"
412
+ requirement: *id026
413
+ - !ruby/object:Gem::Dependency
414
+ type: :development
415
+ prerelease: false
416
+ name: equivalent-xml
417
+ version_requirements: &id027 !ruby/object:Gem::Requirement
418
+ none: false
419
+ requirements:
420
+ - - ">="
421
+ - !ruby/object:Gem::Version
422
+ hash: 31
423
+ segments:
424
+ - 0
425
+ - 2
426
+ - 4
427
+ version: 0.2.4
428
+ requirement: *id027
277
429
  - !ruby/object:Gem::Dependency
278
430
  type: :runtime
279
431
  prerelease: false
280
432
  name: nokogiri
281
- version_requirements: &id018 !ruby/object:Gem::Requirement
433
+ version_requirements: &id028 !ruby/object:Gem::Requirement
282
434
  none: false
283
435
  requirements:
284
436
  - - ">="
@@ -289,12 +441,12 @@ dependencies:
289
441
  - 4
290
442
  - 2
291
443
  version: 1.4.2
292
- requirement: *id018
444
+ requirement: *id028
293
445
  - !ruby/object:Gem::Dependency
294
446
  type: :development
295
447
  prerelease: false
296
448
  name: rspec
297
- version_requirements: &id019 !ruby/object:Gem::Requirement
449
+ version_requirements: &id029 !ruby/object:Gem::Requirement
298
450
  none: false
299
451
  requirements:
300
452
  - - <
@@ -305,12 +457,12 @@ dependencies:
305
457
  - 0
306
458
  - 0
307
459
  version: 2.0.0
308
- requirement: *id019
460
+ requirement: *id029
309
461
  - !ruby/object:Gem::Dependency
310
462
  type: :development
311
463
  prerelease: false
312
464
  name: mocha
313
- version_requirements: &id020 !ruby/object:Gem::Requirement
465
+ version_requirements: &id030 !ruby/object:Gem::Requirement
314
466
  none: false
315
467
  requirements:
316
468
  - - ">="
@@ -321,12 +473,12 @@ dependencies:
321
473
  - 9
322
474
  - 8
323
475
  version: 0.9.8
324
- requirement: *id020
476
+ requirement: *id030
325
477
  - !ruby/object:Gem::Dependency
326
478
  type: :development
327
479
  prerelease: false
328
480
  name: ruby-debug
329
- version_requirements: &id021 !ruby/object:Gem::Requirement
481
+ version_requirements: &id031 !ruby/object:Gem::Requirement
330
482
  none: false
331
483
  requirements:
332
484
  - - ">="
@@ -335,12 +487,12 @@ dependencies:
335
487
  segments:
336
488
  - 0
337
489
  version: "0"
338
- requirement: *id021
490
+ requirement: *id031
339
491
  - !ruby/object:Gem::Dependency
340
492
  type: :development
341
493
  prerelease: false
342
494
  name: jeweler
343
- version_requirements: &id022 !ruby/object:Gem::Requirement
495
+ version_requirements: &id032 !ruby/object:Gem::Requirement
344
496
  none: false
345
497
  requirements:
346
498
  - - ">="
@@ -349,12 +501,12 @@ dependencies:
349
501
  segments:
350
502
  - 0
351
503
  version: "0"
352
- requirement: *id022
504
+ requirement: *id032
353
505
  - !ruby/object:Gem::Dependency
354
506
  type: :development
355
507
  prerelease: false
356
508
  name: equivalent-xml
357
- version_requirements: &id023 !ruby/object:Gem::Requirement
509
+ version_requirements: &id033 !ruby/object:Gem::Requirement
358
510
  none: false
359
511
  requirements:
360
512
  - - ">="
@@ -365,7 +517,7 @@ dependencies:
365
517
  - 2
366
518
  - 4
367
519
  version: 0.2.4
368
- requirement: *id023
520
+ requirement: *id033
369
521
  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"
370
522
  email: matt.zumwalt@yourmediashelf.com
371
523
  executables: []