pubid-itu 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: b4d80fe19034aa225af617ac788255fd8037aee4f3f1514d02828a04a125bf88
4
- data.tar.gz: a64f779acb1d31383fc7b83a9f792aeb554500fb15f6c262e0dcf350ac350d95
3
+ metadata.gz: 4b6a9f43860cc646babf95c556cf4aa0169f847a26415503bfa0458dd0af9af1
4
+ data.tar.gz: 6e5c30a16a55c467bb5b1d4ce00c2e6bbc7dec182b5e40815c8e8146669a10a7
5
5
  SHA512:
6
- metadata.gz: 1d02574a49f9d33a4cfa46b8f82f5717306d37da74e3d06f0fe56db38caab18e40f0de85c2371d688110092c3d51a0adbb8f8405f84ae65291d619a64b1a1771
7
- data.tar.gz: 1eca91fbdf7d953f6394565dfc57a6c1fb99fe69d589c3a73d66dfe6003c3129c2f48ebb2dad2653827e2242bdbda60dc4eacf83653f9509be07e4c17b65a06d
6
+ metadata.gz: 4049ed45d386a01a4670397674340e7c287186399c4e4b417e54b21b902b4518cc5c8660b081ee1f53e6a9cc08d947cbb7a9a0730fd7d17e0cd04aed367ec94d
7
+ data.tar.gz: c6fd2a5ad473a2325063b1112f578376d8a01947ddfdca133113a420a8357b2bdbd670b2583239ee70959fe41b80bf868dfd48e22b63215affa379d2ee55065d
@@ -102,10 +102,14 @@ module Pubid::Itu
102
102
  roman_numerals.as(:number)).as(:appendix)
103
103
  end
104
104
 
105
+ rule(:language) do
106
+ str("-") >> match["EFASCR"].as(:language)
107
+ end
108
+
105
109
  rule(:identifier) do
106
110
  str("ITU") >> (dash | space) >> sector_series_number >> supplement.maybe >>
107
111
  annex.maybe >> corrigendum.maybe >> addendum.maybe >> appendix.maybe >>
108
- published.maybe >> amendment.maybe >> str("-I").maybe
112
+ published.maybe >> amendment.maybe >> str("-I").maybe >> language.maybe
109
113
  end
110
114
 
111
115
  rule(:root) { identifier }
@@ -85,5 +85,9 @@ module Pubid::Itu::Renderer
85
85
  def render_appendix(appendix, _opts, _params)
86
86
  " App. #{appendix[:number]}"
87
87
  end
88
+
89
+ def render_language(language, _opts, _params)
90
+ "-#{LANGUAGES[language]}"
91
+ end
88
92
  end
89
93
  end
@@ -3,5 +3,9 @@ module Pubid::Itu
3
3
  rule(series: "Operational Bulletin") do
4
4
  { series: "OB" }
5
5
  end
6
+
7
+ rule(language: simple(:language)) do
8
+ { language: LANGUAGES.key(language) }
9
+ end
6
10
  end
7
11
  end
@@ -1,5 +1,5 @@
1
1
  module Pubid
2
2
  module Itu
3
- VERSION = "0.1.1".freeze
3
+ VERSION = "0.1.2".freeze
4
4
  end
5
5
  end
data/lib/pubid/itu.rb CHANGED
@@ -5,7 +5,14 @@ require "yaml"
5
5
 
6
6
  module Pubid
7
7
  module Itu
8
-
8
+ LANGUAGES = {
9
+ "ru": "R",
10
+ "fr": "F",
11
+ "en": "E",
12
+ "ar": "A",
13
+ "es": "S",
14
+ "zh": "C",
15
+ }.freeze
9
16
  end
10
17
  end
11
18
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubid-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-17 00:00:00.000000000 Z
11
+ date: 2024-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake