csl 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a40d05b869d0449dfa44789ebb566a7982370c4
4
- data.tar.gz: 250321443eee09d877016c6294f3ee4394764161
3
+ metadata.gz: 3e9a04436494ad7b0835b2ad4047f4c0619e2ed9
4
+ data.tar.gz: e45ef6316ed80e5df5e384172a79ba312c12cb1b
5
5
  SHA512:
6
- metadata.gz: 42cebdb43391419a9aa21e5e1c711de3b6a2d77afc5d0353d696dcadb2ddb60ff6f3e2098e02a8ee4e9ab160febd0d62346c6aeb0cb330facf73de0e1482463b
7
- data.tar.gz: a7df94ba34b1edde8ea787779c9779b35efad66fffebdaf6384f42c63bead587cd13fac6aeba5da0421bc1f9449acf4552bb27a1b58a9b3d400b588286d60d3f
6
+ metadata.gz: f0c793a99ea9fcb56bb0a13d07a3e20fe9a754dd986f4a052a91fc5f0c0886d0b8f9f958882a9dc50f9ee2e5053005070f96476fba228951ec409487a8a1f279
7
+ data.tar.gz: 6aceddaa4130fd9d8031c4c295eb1c19dd44f362bad9abe5a2b5459e35d20db98933a34f0fd24eaed1dd872edf8850305beb42d4f1d80ee349a8066fb703efe5
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
25
25
  and bibliographies.
26
26
  """
27
27
 
28
- s.license = 'AGPL'
28
+ s.license = 'AGPL-3.0'
29
29
  s.date = Time.now.strftime('%Y-%m-%d')
30
30
 
31
31
  s.required_ruby_version = '>= 1.9.3'
@@ -130,7 +130,7 @@ Feature: Converting numbers to ordinals using CSL locales
130
130
  <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="de">
131
131
  <terms>
132
132
  <term name="ordinal">.</term>
133
-
133
+
134
134
  <term name="long-ordinal-01">erstes</term>
135
135
  <term name="long-ordinal-01" gender-form="feminine">
136
136
  <single>erste</single>
@@ -262,9 +262,9 @@ Feature: Converting numbers to ordinals using CSL locales
262
262
  <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="nl">
263
263
  <terms>
264
264
  <term name="ordinal">ste</term>
265
-
265
+
266
266
  <term name="ordinal-00" match="whole-number">de</term>
267
-
267
+
268
268
  <term name="ordinal-02" match="last-two-digits">de</term>
269
269
  <term name="ordinal-03" match="last-two-digits">de</term>
270
270
  <term name="ordinal-04" match="last-two-digits">de</term>
@@ -636,3 +636,78 @@ Feature: Converting numbers to ordinals using CSL locales
636
636
  | 21º |
637
637
  | 21º |
638
638
  | 1001º |
639
+
640
+ @v1.0.1 @locale @ordinals @i18n @gender @lang-se
641
+ Scenario: Gendered Swedish CSL 1.0.1 locales
642
+ Given the locale:
643
+ """
644
+ <?xml version="1.0" encoding="utf-8"?>
645
+ <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="se">
646
+ <terms>
647
+ <term name="ordinal">:e</term>
648
+ <term name="ordinal-01">:a</term>
649
+ <term name="ordinal-02">:a</term>
650
+ <term name="ordinal-11">:e</term>
651
+ <term name="ordinal-12">:e</term>
652
+
653
+ <term name="long-ordinal-01">första</term>
654
+ <term name="long-ordinal-01" gender-form="masculine">förste</term>
655
+ <term name="long-ordinal-02">andra</term>
656
+ <term name="long-ordinal-02" gender-form="masculine">andre</term>
657
+ </terms>
658
+ </locale>
659
+ """
660
+ When I ordinalize these numbers:
661
+ | num | form | gender | number |
662
+ | 1 | | | |
663
+ | 2 | | | |
664
+ | 3 | | | |
665
+ | 4 | | | |
666
+ | 5 | | | |
667
+ | 6 | | | |
668
+ | 7 | | | |
669
+ | 8 | | | |
670
+ | 9 | | | |
671
+ | 10 | | | |
672
+ | 11 | | | |
673
+ | 12 | | | |
674
+ | 13 | | | |
675
+ | 21 | | | |
676
+ | 22 | | | |
677
+ | 101 | | | |
678
+ | 102 | | | |
679
+ | 111 | | | |
680
+ | 112 | | | |
681
+ | 131 | | | |
682
+ | 132 | | | |
683
+ | 1 | long | | |
684
+ | 2 | long | | |
685
+ | 1 | long | masculine | |
686
+ | 2 | long | masculine | |
687
+ Then the ordinals should be:
688
+ | ordinal |
689
+ | 1:a |
690
+ | 2:a |
691
+ | 3:e |
692
+ | 4:e |
693
+ | 5:e |
694
+ | 6:e |
695
+ | 7:e |
696
+ | 8:e |
697
+ | 9:e |
698
+ | 10:e |
699
+ | 11:e |
700
+ | 12:e |
701
+ | 13:e |
702
+ | 21:a |
703
+ | 22:a |
704
+ | 101:a |
705
+ | 102:a |
706
+ | 111:e |
707
+ | 112:e |
708
+ | 131:a |
709
+ | 132:a |
710
+ | första |
711
+ | andra |
712
+ | förste |
713
+ | andre |
@@ -409,6 +409,10 @@ module CSL
409
409
  self
410
410
  end
411
411
 
412
+ def reverse_merge(other)
413
+ other.merge(self)
414
+ end
415
+
412
416
 
413
417
  # Locales are sorted first by language, then by region; sort order is
414
418
  # alphabetical with the following exceptions: the default locale is
@@ -538,7 +538,7 @@ module CSL
538
538
  def match_conditions_for(name, conditions)
539
539
  case name
540
540
  when Node
541
- [name.nodename, name.attributes.to_hash]
541
+ conditions, name = name.attributes.to_hash, name.nodename
542
542
  when Hash
543
543
  conditions, name = name, nodename
544
544
  when Symbol
@@ -27,7 +27,7 @@ module CSL
27
27
  end
28
28
 
29
29
  def delete_children(*nodes)
30
- nodes.each do |node|
30
+ nodes.flatten.each do |node|
31
31
  delete_child node
32
32
  end
33
33
  end
@@ -1,3 +1,3 @@
1
1
  module CSL
2
- VERSION = '1.4.3'.freeze
2
+ VERSION = '1.4.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-25 00:00:00.000000000 Z
11
+ date: 2016-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: namae
@@ -121,7 +121,7 @@ files:
121
121
  - vendor/schema/csl.rng
122
122
  homepage: https://github.com/inukshuk/csl-ruby
123
123
  licenses:
124
- - AGPL
124
+ - AGPL-3.0
125
125
  metadata: {}
126
126
  post_install_message:
127
127
  rdoc_options: []
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  version: '0'
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.4.7
142
+ rubygems_version: 2.5.1
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: A Ruby CSL parser and library