slaw 0.6.8 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slaw/version.rb +1 -1
- data/lib/slaw/za/act.treetop +1 -1
- data/lib/slaw/za/act_nodes.rb +1 -1
- data/spec/za/act_spec.rb +56 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c547c592602183d308cb921d933342705d3abfc5
|
4
|
+
data.tar.gz: 6c51e8eb899baa73562df3e6ce80f6d29ad7e048
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b529abf4b1c3040c3217a02ea2abf5ac534f76cca5863b0c5d84049a835d5a835247d0b0768c75bf80aae9cefdca57409573f162cad4e78324a28c6f84646f01
|
7
|
+
data.tar.gz: 5405a71b050b492e998e01a6e29d8c7cf02d498912759207902b81114bbc76e3aae487d0de1112a23114e7c4aabf8f04d9c634be2ee326168e49237f75d72997
|
data/lib/slaw/version.rb
CHANGED
data/lib/slaw/za/act.treetop
CHANGED
data/lib/slaw/za/act_nodes.rb
CHANGED
data/spec/za/act_spec.rb
CHANGED
@@ -402,6 +402,55 @@ EOS
|
|
402
402
|
</subsection>
|
403
403
|
</section>'
|
404
404
|
end
|
405
|
+
|
406
|
+
it 'should handle a remark in a schedule' do
|
407
|
+
node = parse :schedule, <<EOS
|
408
|
+
Schedule 1
|
409
|
+
A Title
|
410
|
+
|
411
|
+
[[Schedule 1 added by Act 23 of 2004]]
|
412
|
+
|
413
|
+
Some content
|
414
|
+
EOS
|
415
|
+
to_xml(node, "").should == '<doc name="schedule1">
|
416
|
+
<meta>
|
417
|
+
<identification source="#slaw">
|
418
|
+
<FRBRWork>
|
419
|
+
<FRBRthis value="/za/act/1980/01/schedule1"/>
|
420
|
+
<FRBRuri value="/za/act/1980/01"/>
|
421
|
+
<FRBRalias value="Schedule 1"/>
|
422
|
+
<FRBRdate date="1980-01-01" name="Generation"/>
|
423
|
+
<FRBRauthor href="#council" as="#author"/>
|
424
|
+
<FRBRcountry value="za"/>
|
425
|
+
</FRBRWork>
|
426
|
+
<FRBRExpression>
|
427
|
+
<FRBRthis value="/za/act/1980/01/eng@/schedule1"/>
|
428
|
+
<FRBRuri value="/za/act/1980/01/eng@"/>
|
429
|
+
<FRBRdate date="1980-01-01" name="Generation"/>
|
430
|
+
<FRBRauthor href="#council" as="#author"/>
|
431
|
+
<FRBRlanguage language="eng"/>
|
432
|
+
</FRBRExpression>
|
433
|
+
<FRBRManifestation>
|
434
|
+
<FRBRthis value="/za/act/1980/01/eng@/schedule1"/>
|
435
|
+
<FRBRuri value="/za/act/1980/01/eng@"/>
|
436
|
+
<FRBRdate date="2015-05-20" name="Generation"/>
|
437
|
+
<FRBRauthor href="#slaw" as="#author"/>
|
438
|
+
</FRBRManifestation>
|
439
|
+
</identification>
|
440
|
+
</meta>
|
441
|
+
<mainBody>
|
442
|
+
<article id="schedule-1">
|
443
|
+
<heading>A Title</heading>
|
444
|
+
<content>
|
445
|
+
<p>
|
446
|
+
<remark status="editorial">[Schedule 1 added by Act 23 of 2004]</remark>
|
447
|
+
</p>
|
448
|
+
<p>Some content</p>
|
449
|
+
</content>
|
450
|
+
</article>
|
451
|
+
</mainBody>
|
452
|
+
</doc>'
|
453
|
+
end
|
405
454
|
end
|
406
455
|
|
407
456
|
#-------------------------------------------------------------------------------
|
@@ -534,9 +583,9 @@ EOS
|
|
534
583
|
|
535
584
|
sched = node.schedules.elements[0]
|
536
585
|
sched.schedule_heading.schedule_heading_prefix.text_value.should == "Schedule"
|
537
|
-
sched.statements.elements[0].
|
538
|
-
sched.statements.elements[1].
|
539
|
-
sched.statements.elements[2].
|
586
|
+
sched.statements.elements[0].clauses.text_value.should == "Subject to approval in terms of this By-Law, the erection:"
|
587
|
+
sched.statements.elements[1].clauses.text_value.should == "1. Foo"
|
588
|
+
sched.statements.elements[2].clauses.text_value.should == "2. Bar"
|
540
589
|
end
|
541
590
|
|
542
591
|
it 'should handle many schedules' do
|
@@ -555,15 +604,15 @@ EOS
|
|
555
604
|
sched.schedule_heading.schedule_heading_prefix.text_value.should == "Schedule"
|
556
605
|
sched.schedule_heading.schedule_title.content.text_value.should == "A Title"
|
557
606
|
sched.schedule_heading.num.text_value.should == "1"
|
558
|
-
sched.statements.elements[0].
|
559
|
-
sched.statements.elements[1].
|
607
|
+
sched.statements.elements[0].clauses.text_value.should == "1. Foo"
|
608
|
+
sched.statements.elements[1].clauses.text_value.should == "2. Bar"
|
560
609
|
|
561
610
|
sched = node.schedules.elements[1]
|
562
611
|
sched.schedule_heading.schedule_heading_prefix.text_value.should == "Schedule"
|
563
612
|
sched.schedule_heading.schedule_title.content.text_value.should == "Another Title"
|
564
613
|
sched.schedule_heading.num.text_value.should == "2"
|
565
|
-
sched.statements.elements[0].
|
566
|
-
sched.statements.elements[1].
|
614
|
+
sched.statements.elements[0].clauses.text_value.should == "Baz"
|
615
|
+
sched.statements.elements[1].clauses.text_value.should == "Boom"
|
567
616
|
end
|
568
617
|
|
569
618
|
it 'should serialise many schedules correctly' do
|