pubid-iec 0.2.2 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/lib/pubid/iec/identifier/amendment.rb +22 -0
 - data/lib/pubid/iec/identifier/base.rb +59 -3
 - data/lib/pubid/iec/identifier/component_specification.rb +15 -0
 - data/lib/pubid/iec/identifier/conformity_assessment.rb +15 -0
 - data/lib/pubid/iec/identifier/corrigendum.rb +22 -0
 - data/lib/pubid/iec/identifier/guide.rb +15 -0
 - data/lib/pubid/iec/identifier/international_standard.rb +69 -0
 - data/lib/pubid/iec/identifier/interpretation_sheet.rb +48 -0
 - data/lib/pubid/iec/identifier/operational_document.rb +15 -0
 - data/lib/pubid/iec/identifier/publicly_available_specification.rb +28 -0
 - data/lib/pubid/iec/identifier/societal_technology_trend_report.rb +16 -0
 - data/lib/pubid/iec/identifier/supplement.rb +18 -0
 - data/lib/pubid/iec/identifier/systems_reference_document.rb +15 -0
 - data/lib/pubid/iec/identifier/technical_report.rb +48 -0
 - data/lib/pubid/iec/identifier/technical_specification.rb +48 -0
 - data/lib/pubid/iec/identifier/technology_report.rb +15 -0
 - data/lib/pubid/iec/identifier/test_report_form.rb +40 -0
 - data/lib/pubid/iec/identifier/white_paper.rb +15 -0
 - data/lib/pubid/iec/identifier/working_document.rb +39 -0
 - data/lib/pubid/iec/parser.rb +27 -16
 - data/lib/pubid/iec/renderer/amendment.rb +7 -0
 - data/lib/pubid/iec/renderer/corrigendum.rb +7 -0
 - data/lib/pubid/iec/renderer/interpretation_sheet.rb +17 -0
 - data/lib/pubid/iec/renderer/pubid.rb +30 -7
 - data/lib/pubid/iec/renderer/urn.rb +15 -2
 - data/lib/pubid/iec/renderer/urn_amendment.rb +10 -0
 - data/lib/pubid/iec/renderer/urn_corrigendum.rb +9 -0
 - data/lib/pubid/iec/renderer/urn_supplement.rb +11 -0
 - data/lib/pubid/iec/renderer/working_document.rb +11 -0
 - data/lib/pubid/iec/renderer/working_document_urn.rb +16 -0
 - data/lib/pubid/iec/transformer.rb +2 -2
 - data/lib/pubid/iec/version.rb +1 -1
 - data/lib/pubid/iec/working_document.rb +11 -0
 - data/lib/pubid/iec/working_document_parser.rb +24 -0
 - data/lib/pubid/iec.rb +38 -49
 - data/stages.yaml +0 -29
 - metadata +33 -8
 - data/lib/pubid/iec/amendment.rb +0 -11
 - data/lib/pubid/iec/corrigendum.rb +0 -11
 - data/lib/pubid/iec/type.rb +0 -25
 
    
        data/lib/pubid/iec/parser.rb
    CHANGED
    
    | 
         @@ -4,7 +4,7 @@ module Pubid::Iec 
     | 
|
| 
       4 
4 
     | 
    
         
             
              class Parser < Pubid::Core::Parser
         
     | 
| 
       5 
5 
     | 
    
         
             
                rule(:organization) do
         
     | 
| 
       6 
6 
     | 
    
         
             
                  str("IECEE") | str("IECEx") | str("IECQ") | str("IEC") | str("ISO") |
         
     | 
| 
       7 
     | 
    
         
            -
                    str("IEEE") | str("CISPR")
         
     | 
| 
      
 7 
     | 
    
         
            +
                    str("IEEE") | str("CISPR") | str("ASTM")
         
     | 
| 
       8 
8 
     | 
    
         
             
                end
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                rule(:stage) do
         
     | 
| 
         @@ -12,10 +12,7 @@ module Pubid::Iec 
     | 
|
| 
       12 
12 
     | 
    
         
             
                end
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
                rule(:type) do
         
     | 
| 
       15 
     | 
    
         
            -
                  ( 
     | 
| 
       16 
     | 
    
         
            -
                    str("TEC") | str("STTR") | str("WP") | str("Guide") | str("GUIDE") | str("OD") |
         
     | 
| 
       17 
     | 
    
         
            -
                    str("CS") | str("CA")
         
     | 
| 
       18 
     | 
    
         
            -
                  ).as(:type)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  array_to_str(Identifier.config.types.map { |type| type.type[:short] }.flatten.compact).as(:type)
         
     | 
| 
       19 
16 
     | 
    
         
             
                end
         
     | 
| 
       20 
17 
     | 
    
         | 
| 
       21 
18 
     | 
    
         
             
                rule(:part) do
         
     | 
| 
         @@ -33,19 +30,25 @@ module Pubid::Iec 
     | 
|
| 
       33 
30 
     | 
    
         | 
| 
       34 
31 
     | 
    
         
             
                rule(:amendment) do
         
     | 
| 
       35 
32 
     | 
    
         
             
                  ((str("/") | str("+") | space).maybe >>
         
     | 
| 
       36 
     | 
    
         
            -
                    str("AMD") >>
         
     | 
| 
      
 33 
     | 
    
         
            +
                    (str("AMD") | str("A")) >>
         
     | 
| 
       37 
34 
     | 
    
         
             
                    digits.as(:number) >>
         
     | 
| 
       38 
35 
     | 
    
         
             
                    (str(":") >> digits.as(:year)).maybe).as(:amendments)
         
     | 
| 
       39 
36 
     | 
    
         
             
                end
         
     | 
| 
       40 
37 
     | 
    
         | 
| 
      
 38 
     | 
    
         
            +
                rule(:interpretation_sheet) do
         
     | 
| 
      
 39 
     | 
    
         
            +
                  (str("/") >> str("ISH") >>
         
     | 
| 
      
 40 
     | 
    
         
            +
                    digits.as(:number) >>
         
     | 
| 
      
 41 
     | 
    
         
            +
                    (str(":") >> digits.as(:year)).maybe).as(:interpretation_sheet)
         
     | 
| 
      
 42 
     | 
    
         
            +
                end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
       41 
44 
     | 
    
         
             
                rule(:fragment) do
         
     | 
| 
       42 
45 
     | 
    
         
             
                  (str("/") >> str("FRAG") >> match('[\dA-Z]').repeat(1).as(:fragment)).maybe
         
     | 
| 
       43 
46 
     | 
    
         
             
                end
         
     | 
| 
       44 
47 
     | 
    
         | 
| 
       45 
48 
     | 
    
         
             
                rule(:corrigendum) do
         
     | 
| 
       46 
     | 
    
         
            -
                  ((str("/") | space).maybe >>
         
     | 
| 
      
 49 
     | 
    
         
            +
                  ((str("/") | str(" + ") | space).maybe >>
         
     | 
| 
       47 
50 
     | 
    
         
             
                    str("COR") >>
         
     | 
| 
       48 
     | 
    
         
            -
                    digits.as(:number) >>
         
     | 
| 
      
 51 
     | 
    
         
            +
                    digits.as(:number).maybe >>
         
     | 
| 
       49 
52 
     | 
    
         
             
                    (str(":") >> digits.as(:year)).maybe).as(:corrigendums)
         
     | 
| 
       50 
53 
     | 
    
         
             
                end
         
     | 
| 
       51 
54 
     | 
    
         | 
| 
         @@ -55,19 +58,20 @@ module Pubid::Iec 
     | 
|
| 
       55 
58 
     | 
    
         | 
| 
       56 
59 
     | 
    
         
             
                rule(:number) do
         
     | 
| 
       57 
60 
     | 
    
         
             
                  (digits | str("SYMBOL") | str("SYCSMARTENERGY") | str("SyCLVDC") |
         
     | 
| 
       58 
     | 
    
         
            -
                    str("SYCLVDC") | str("SyCCOMM") | str("SyCAAL") | str("VIM")) >>
         
     | 
| 
       59 
     | 
    
         
            -
                    match("[A-Z]").maybe
         
     | 
| 
      
 61 
     | 
    
         
            +
                    str("SYCLVDC") | str("SyCCOMM") | str("SyCAAL") | str("VIM") | match("[A-Za-z0-9 ]").repeat) >>
         
     | 
| 
      
 62 
     | 
    
         
            +
                    ((str(":") >> match("[A-Z]").repeat(1)) | match("[A-Z]")).maybe
         
     | 
| 
       60 
63 
     | 
    
         
             
                end
         
     | 
| 
       61 
64 
     | 
    
         | 
| 
       62 
65 
     | 
    
         
             
                rule(:std_document_body) do
         
     | 
| 
       63 
     | 
    
         
            -
                  ( 
     | 
| 
       64 
     | 
    
         
            -
                    number.as(:number) >>
         
     | 
| 
      
 66 
     | 
    
         
            +
                  ((str("/") | space) >> type).maybe >>
         
     | 
| 
      
 67 
     | 
    
         
            +
                    space >> number.as(:number) >>
         
     | 
| 
       65 
68 
     | 
    
         
             
                    edition.maybe >>
         
     | 
| 
       66 
69 
     | 
    
         
             
                    part.maybe >>
         
     | 
| 
       67 
70 
     | 
    
         
             
                    conjuction_part.maybe >>
         
     | 
| 
       68 
     | 
    
         
            -
                    (space? >> str(":") >> year). 
     | 
| 
      
 71 
     | 
    
         
            +
                    (space? >> str(":") >> year >> (str("-") >> month_digits.as(:month) >>
         
     | 
| 
      
 72 
     | 
    
         
            +
                      (str("-") >> day_digits.as(:day)).maybe).maybe).maybe >>
         
     | 
| 
       69 
73 
     | 
    
         
             
                    ((amendment >> corrigendum.maybe) | corrigendum).repeat >>
         
     | 
| 
       70 
     | 
    
         
            -
                    fragment.maybe
         
     | 
| 
      
 74 
     | 
    
         
            +
                    interpretation_sheet.maybe >> fragment.maybe
         
     | 
| 
       71 
75 
     | 
    
         
             
                end
         
     | 
| 
       72 
76 
     | 
    
         | 
| 
       73 
77 
     | 
    
         
             
                rule(:vap) do
         
     | 
| 
         @@ -79,12 +83,19 @@ module Pubid::Iec 
     | 
|
| 
       79 
83 
     | 
    
         
             
                  space >> str("DB").as(:database)
         
     | 
| 
       80 
84 
     | 
    
         
             
                end
         
     | 
| 
       81 
85 
     | 
    
         | 
| 
      
 86 
     | 
    
         
            +
                rule(:language) do
         
     | 
| 
      
 87 
     | 
    
         
            +
                  str("(") >> (
         
     | 
| 
      
 88 
     | 
    
         
            +
                    (match["a-z"].repeat(1).as(:language) >> str("-").maybe).repeat(1)
         
     | 
| 
      
 89 
     | 
    
         
            +
                  ) >> str(")")
         
     | 
| 
      
 90 
     | 
    
         
            +
                end
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
       82 
92 
     | 
    
         
             
                rule(:identifier) do
         
     | 
| 
       83 
     | 
    
         
            -
                  (originator.maybe >> (space.maybe >> stage.as(:stage)).maybe >> 
     | 
| 
      
 93 
     | 
    
         
            +
                  (originator.maybe >> (space.maybe >> stage.as(:stage)).maybe >>
         
     | 
| 
       84 
94 
     | 
    
         
             
                    std_document_body >>
         
     | 
| 
       85 
95 
     | 
    
         
             
                    vap.maybe >> database.maybe >>
         
     | 
| 
       86 
96 
     | 
    
         
             
                    edition.maybe >>
         
     | 
| 
       87 
     | 
    
         
            -
                    (str(":") >> year).maybe 
     | 
| 
      
 97 
     | 
    
         
            +
                    (str(":") >> year).maybe >>
         
     | 
| 
      
 98 
     | 
    
         
            +
                    language.maybe)
         
     | 
| 
       88 
99 
     | 
    
         
             
                end
         
     | 
| 
       89 
100 
     | 
    
         | 
| 
       90 
101 
     | 
    
         
             
                rule(:root) { identifier }
         
     | 
| 
         @@ -0,0 +1,17 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Pubid::Iec::Renderer
         
     | 
| 
      
 2 
     | 
    
         
            +
              class InterpretationSheet < Pubid
         
     | 
| 
      
 3 
     | 
    
         
            +
                def render_identifier(params)
         
     | 
| 
      
 4 
     | 
    
         
            +
                  type_prefix = params[:typed_stage].nil? || params[:typed_stage].empty? ? "ISH" : ""
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
                  "%{base}/%{typed_stage}#{type_prefix}%{number}%{year}" % params
         
     | 
| 
      
 7 
     | 
    
         
            +
                end
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                def render_typed_stage(typed_stage, _opts, _params)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  typed_stage
         
     | 
| 
      
 11 
     | 
    
         
            +
                end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                def render_year(year, _opts, _params)
         
     | 
| 
      
 14 
     | 
    
         
            +
                  ":#{year}"
         
     | 
| 
      
 15 
     | 
    
         
            +
                end
         
     | 
| 
      
 16 
     | 
    
         
            +
              end
         
     | 
| 
      
 17 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -1,12 +1,17 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Pubid::Iec::Renderer
         
     | 
| 
       2 
2 
     | 
    
         
             
              class Pubid < Pubid::Core::Renderer::Base
         
     | 
| 
       3 
3 
     | 
    
         
             
                def render_identifier(params)
         
     | 
| 
       4 
     | 
    
         
            -
                  "%{publisher}%{type}%{stage} %{number}%{part}%{conjuction_part}"\
         
     | 
| 
      
 4 
     | 
    
         
            +
                  "%{publisher}%{type}%{typed_stage}%{stage} %{number}%{part}%{conjuction_part}"\
         
     | 
| 
       5 
5 
     | 
    
         
             
                  "%{part_version}%{version}%{iteration}"\
         
     | 
| 
       6 
     | 
    
         
            -
                  "%{year}%{amendments}%{corrigendums}%{fragment}%{vap}%{edition}%{ 
     | 
| 
      
 6 
     | 
    
         
            +
                  "%{year}%{month}%{day}%{amendments}%{corrigendums}%{fragment}%{vap}%{edition}%{database}" % params
         
     | 
| 
      
 7 
     | 
    
         
            +
                end
         
     | 
| 
      
 8 
     | 
    
         
            +
                def render_typed_stage(typed_stage, _opts, _params)
         
     | 
| 
      
 9 
     | 
    
         
            +
                  " #{typed_stage}"
         
     | 
| 
       7 
10 
     | 
    
         
             
                end
         
     | 
| 
       8 
11 
     | 
    
         | 
| 
       9 
12 
     | 
    
         
             
                def render_type(type, _opts, _params)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  return if params[:typed_stage]
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
       10 
15 
     | 
    
         
             
                  " #{type}"
         
     | 
| 
       11 
16 
     | 
    
         
             
                end
         
     | 
| 
       12 
17 
     | 
    
         | 
| 
         @@ -14,7 +19,9 @@ module Pubid::Iec::Renderer 
     | 
|
| 
       14 
19 
     | 
    
         
             
                  " #{vap}"
         
     | 
| 
       15 
20 
     | 
    
         
             
                end
         
     | 
| 
       16 
21 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
                def render_stage(stage, _opts,  
     | 
| 
      
 22 
     | 
    
         
            +
                def render_stage(stage, _opts, params)
         
     | 
| 
      
 23 
     | 
    
         
            +
                  return if params[:typed_stage]
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
       18 
25 
     | 
    
         
             
                  " #{stage}"
         
     | 
| 
       19 
26 
     | 
    
         
             
                end
         
     | 
| 
       20 
27 
     | 
    
         | 
| 
         @@ -30,12 +37,12 @@ module Pubid::Iec::Renderer 
     | 
|
| 
       30 
37 
     | 
    
         
             
                  params[:vap] == "CSV" && "+" || "/"
         
     | 
| 
       31 
38 
     | 
    
         
             
                end
         
     | 
| 
       32 
39 
     | 
    
         | 
| 
       33 
     | 
    
         
            -
                def render_amendments(amendments, _opts,  
     | 
| 
       34 
     | 
    
         
            -
                  supplement_prefix(params) +  
     | 
| 
      
 40 
     | 
    
         
            +
                def render_amendments(amendments, _opts, _params)
         
     | 
| 
      
 41 
     | 
    
         
            +
                  supplement_prefix(params) + amendments.sort.map(&:to_s).join("+")
         
     | 
| 
       35 
42 
     | 
    
         
             
                end
         
     | 
| 
       36 
43 
     | 
    
         | 
| 
       37 
     | 
    
         
            -
                def render_corrigendums(corrigendums, _opts,  
     | 
| 
       38 
     | 
    
         
            -
                  supplement_prefix(params) +  
     | 
| 
      
 44 
     | 
    
         
            +
                def render_corrigendums(corrigendums, _opts, _params)
         
     | 
| 
      
 45 
     | 
    
         
            +
                  supplement_prefix(params) + corrigendums.sort.map(&:to_s).join("+")
         
     | 
| 
       39 
46 
     | 
    
         
             
                end
         
     | 
| 
       40 
47 
     | 
    
         | 
| 
       41 
48 
     | 
    
         
             
                def render_version(version, _opts, params)
         
     | 
| 
         @@ -63,5 +70,21 @@ module Pubid::Iec::Renderer 
     | 
|
| 
       63 
70 
     | 
    
         
             
                    "#{conjunction_symbol}#{conjuction_parts}"
         
     | 
| 
       64 
71 
     | 
    
         
             
                  end
         
     | 
| 
       65 
72 
     | 
    
         
             
                end
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
                def render_month(month, opts, _params)
         
     | 
| 
      
 75 
     | 
    
         
            +
                  "-#{month}" if opts[:with_edition_month_date]
         
     | 
| 
      
 76 
     | 
    
         
            +
                end
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
                def render_day(day, opts, _params)
         
     | 
| 
      
 79 
     | 
    
         
            +
                  "-#{day}" if opts[:with_edition_month_date]
         
     | 
| 
      
 80 
     | 
    
         
            +
                end
         
     | 
| 
      
 81 
     | 
    
         
            +
             
     | 
| 
      
 82 
     | 
    
         
            +
                def render_language(language, opts, _params)
         
     | 
| 
      
 83 
     | 
    
         
            +
                  if language.is_a?(Array)
         
     | 
| 
      
 84 
     | 
    
         
            +
                    "(#{language.map(&:to_s).sort.join('-')})"
         
     | 
| 
      
 85 
     | 
    
         
            +
                  else
         
     | 
| 
      
 86 
     | 
    
         
            +
                    "(#{language})"
         
     | 
| 
      
 87 
     | 
    
         
            +
                  end
         
     | 
| 
      
 88 
     | 
    
         
            +
                end
         
     | 
| 
       66 
89 
     | 
    
         
             
              end
         
     | 
| 
       67 
90 
     | 
    
         
             
            end
         
     | 
| 
         @@ -56,7 +56,7 @@ module Pubid::Iec::Renderer 
     | 
|
| 
       56 
56 
     | 
    
         
             
                  "urn:iec:std:%{publisher}%{copublisher}%{type}:%{number}"\
         
     | 
| 
       57 
57 
     | 
    
         
             
                  "%{part}%{conjuction_part}%{year}%{stage}%{vap}"\
         
     | 
| 
       58 
58 
     | 
    
         
             
                  "%{urn_stage}%{corrigendum_stage}%{iteration}%{version}%{part_version}"\
         
     | 
| 
       59 
     | 
    
         
            -
                  "%{edition}%{amendments}%{corrigendums}%{fragment} 
     | 
| 
      
 59 
     | 
    
         
            +
                  "%{edition}%{amendments}%{corrigendums}%{fragment}" % params
         
     | 
| 
       60 
60 
     | 
    
         
             
                end
         
     | 
| 
       61 
61 
     | 
    
         | 
| 
       62 
62 
     | 
    
         
             
                def render_number(number, _opts, _params)
         
     | 
| 
         @@ -92,7 +92,20 @@ module Pubid::Iec::Renderer 
     | 
|
| 
       92 
92 
     | 
    
         
             
                end
         
     | 
| 
       93 
93 
     | 
    
         | 
| 
       94 
94 
     | 
    
         
             
                def render_type(type, _, _)
         
     | 
| 
       95 
     | 
    
         
            -
                  ":#{type. 
     | 
| 
      
 95 
     | 
    
         
            +
                  ":#{type.downcase}"
         
     | 
| 
       96 
96 
     | 
    
         
             
                end
         
     | 
| 
      
 97 
     | 
    
         
            +
             
     | 
| 
      
 98 
     | 
    
         
            +
                def render_amendments(amendments, _opts, _params)
         
     | 
| 
      
 99 
     | 
    
         
            +
                  amendments&.map(&:urn)&.join || ""
         
     | 
| 
      
 100 
     | 
    
         
            +
                end
         
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
                def render_corrigendums(corrigendums, _opts, _params)
         
     | 
| 
      
 103 
     | 
    
         
            +
                  corrigendums&.map(&:urn)&.join || ""
         
     | 
| 
      
 104 
     | 
    
         
            +
                end
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
                def render_language(language, _opts, _params)
         
     | 
| 
      
 107 
     | 
    
         
            +
                  ":" + (language.is_a?(Array) ? language.join("-") : language)
         
     | 
| 
      
 108 
     | 
    
         
            +
                end
         
     | 
| 
      
 109 
     | 
    
         
            +
             
     | 
| 
       97 
110 
     | 
    
         
             
              end
         
     | 
| 
       98 
111 
     | 
    
         
             
            end
         
     | 
| 
         @@ -0,0 +1,16 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Pubid::Iec::Renderer
         
     | 
| 
      
 2 
     | 
    
         
            +
              class WorkingDocumentUrn < Urn
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
                def render_identifier(params)
         
     | 
| 
      
 5 
     | 
    
         
            +
                  "urn:iec:working-document:%{technical_committee}:%{number}%{stage}" % params
         
     | 
| 
      
 6 
     | 
    
         
            +
                end
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                def render_technical_committee(technical_committee, _opts, _params)
         
     | 
| 
      
 9 
     | 
    
         
            +
                  technical_committee.to_s.gsub("/", "-").downcase
         
     | 
| 
      
 10 
     | 
    
         
            +
                end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                def render_stage(stage, _opts, _params)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  ":stage-#{stage.to_s.downcase}"
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
      
 15 
     | 
    
         
            +
              end
         
     | 
| 
      
 16 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/pubid/iec/version.rb
    CHANGED
    
    
| 
         @@ -0,0 +1,24 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "pubid-core"
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Pubid::Iec
         
     | 
| 
      
 4 
     | 
    
         
            +
              class WorkingDocumentParser < Pubid::Core::Parser
         
     | 
| 
      
 5 
     | 
    
         
            +
                rule(:stage) do
         
     | 
| 
      
 6 
     | 
    
         
            +
                  array_to_str(Identifier::WorkingDocument::STAGES).as(:stage)
         
     | 
| 
      
 7 
     | 
    
         
            +
                end
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                rule(:technical_committee) do
         
     | 
| 
      
 10 
     | 
    
         
            +
                  ((str("CIS/") >> match("[A-Z]")) |
         
     | 
| 
      
 11 
     | 
    
         
            +
                  (match("[A-Za-z0-9-]").repeat(1))).as(:technical_committee)
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                rule(:number) do
         
     | 
| 
      
 15 
     | 
    
         
            +
                  (digits >> match("[A-Z]").maybe >> str("(F)").maybe).as(:number)
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                rule(:identifier) do
         
     | 
| 
      
 19 
     | 
    
         
            +
                  technical_committee >> str("/") >> number >> (str("/") >> stage).maybe
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                rule(:root) { identifier }
         
     | 
| 
      
 23 
     | 
    
         
            +
              end
         
     | 
| 
      
 24 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/pubid/iec.rb
    CHANGED
    
    | 
         @@ -10,68 +10,57 @@ end 
     | 
|
| 
       10 
10 
     | 
    
         
             
            require "pubid-core"
         
     | 
| 
       11 
11 
     | 
    
         
             
            require_relative "iec/errors"
         
     | 
| 
       12 
12 
     | 
    
         
             
            require_relative "iec/stage"
         
     | 
| 
       13 
     | 
    
         
            -
            # require_relative "iec/type"
         
     | 
| 
       14 
13 
     | 
    
         
             
            require_relative "iec/parser"
         
     | 
| 
       15 
14 
     | 
    
         
             
            require_relative "iec/trf_parser"
         
     | 
| 
       16 
     | 
    
         
            -
            require_relative "iec/amendment"
         
     | 
| 
       17 
     | 
    
         
            -
            require_relative "iec/corrigendum"
         
     | 
| 
       18 
15 
     | 
    
         
             
            require_relative "iec/renderer/pubid"
         
     | 
| 
       19 
16 
     | 
    
         
             
            require_relative "iec/renderer/trf_pubid"
         
     | 
| 
       20 
17 
     | 
    
         
             
            require_relative "iec/renderer/urn"
         
     | 
| 
       21 
18 
     | 
    
         
             
            require_relative "iec/renderer/trf_urn"
         
     | 
| 
      
 19 
     | 
    
         
            +
            require_relative "iec/renderer/working_document"
         
     | 
| 
      
 20 
     | 
    
         
            +
            require_relative "iec/renderer/working_document_urn"
         
     | 
| 
      
 21 
     | 
    
         
            +
            require_relative "iec/renderer/interpretation_sheet"
         
     | 
| 
       22 
22 
     | 
    
         
             
            require_relative "iec/transformer"
         
     | 
| 
       23 
23 
     | 
    
         
             
            require_relative "iec/identifier/base"
         
     | 
| 
      
 24 
     | 
    
         
            +
            require_relative "iec/identifier/international_standard"
         
     | 
| 
      
 25 
     | 
    
         
            +
            require_relative "iec/identifier/technical_report"
         
     | 
| 
      
 26 
     | 
    
         
            +
            require_relative "iec/identifier/technical_specification"
         
     | 
| 
      
 27 
     | 
    
         
            +
            require_relative "iec/identifier/publicly_available_specification"
         
     | 
| 
      
 28 
     | 
    
         
            +
            require_relative "iec/identifier/guide"
         
     | 
| 
      
 29 
     | 
    
         
            +
            require_relative "iec/identifier/operational_document"
         
     | 
| 
      
 30 
     | 
    
         
            +
            require_relative "iec/identifier/component_specification"
         
     | 
| 
      
 31 
     | 
    
         
            +
            require_relative "iec/identifier/systems_reference_document"
         
     | 
| 
      
 32 
     | 
    
         
            +
            require_relative "iec/identifier/conformity_assessment"
         
     | 
| 
      
 33 
     | 
    
         
            +
            require_relative "iec/identifier/test_report_form"
         
     | 
| 
      
 34 
     | 
    
         
            +
            require_relative "iec/identifier/supplement"
         
     | 
| 
      
 35 
     | 
    
         
            +
            require_relative "iec/identifier/amendment"
         
     | 
| 
      
 36 
     | 
    
         
            +
            require_relative "iec/identifier/corrigendum"
         
     | 
| 
      
 37 
     | 
    
         
            +
            require_relative "iec/identifier/white_paper"
         
     | 
| 
      
 38 
     | 
    
         
            +
            require_relative "iec/identifier/technology_report"
         
     | 
| 
      
 39 
     | 
    
         
            +
            require_relative "iec/identifier/societal_technology_trend_report"
         
     | 
| 
      
 40 
     | 
    
         
            +
            require_relative "iec/identifier/interpretation_sheet"
         
     | 
| 
      
 41 
     | 
    
         
            +
            require_relative "iec/working_document_parser"
         
     | 
| 
      
 42 
     | 
    
         
            +
            require_relative "iec/identifier/working_document"
         
     | 
| 
       24 
43 
     | 
    
         
             
            require_relative "iec/trf_identifier"
         
     | 
| 
       25 
44 
     | 
    
         
             
            require_relative "iec/identifier"
         
     | 
| 
      
 45 
     | 
    
         
            +
            require_relative "iec/working_document"
         
     | 
| 
       26 
46 
     | 
    
         | 
| 
       27 
47 
     | 
    
         
             
            config = Pubid::Core::Configuration.new
         
     | 
| 
       28 
48 
     | 
    
         
             
            config.stages = YAML.load_file(File.join(File.dirname(__FILE__), "../../stages.yaml"))
         
     | 
| 
       29 
49 
     | 
    
         
             
            config.stage_class = Pubid::Iec::Stage
         
     | 
| 
       30 
     | 
    
         
            -
            config. 
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
                                  },
         
     | 
| 
       46 
     | 
    
         
            -
                                  srd: {
         
     | 
| 
       47 
     | 
    
         
            -
                                    short: "SRD",
         
     | 
| 
       48 
     | 
    
         
            -
                                  },
         
     | 
| 
       49 
     | 
    
         
            -
                                  tec: {
         
     | 
| 
       50 
     | 
    
         
            -
                                    short: "TEC",
         
     | 
| 
       51 
     | 
    
         
            -
                                  },
         
     | 
| 
       52 
     | 
    
         
            -
                                  sttr: {
         
     | 
| 
       53 
     | 
    
         
            -
                                    short: "STTR",
         
     | 
| 
       54 
     | 
    
         
            -
                                  },
         
     | 
| 
       55 
     | 
    
         
            -
                                  wp: {
         
     | 
| 
       56 
     | 
    
         
            -
                                    short: "WP",
         
     | 
| 
       57 
     | 
    
         
            -
                                  },
         
     | 
| 
       58 
     | 
    
         
            -
                                  guide: {
         
     | 
| 
       59 
     | 
    
         
            -
                                    long: "Guide",
         
     | 
| 
       60 
     | 
    
         
            -
                                    short: "Guide",
         
     | 
| 
       61 
     | 
    
         
            -
                                  },
         
     | 
| 
       62 
     | 
    
         
            -
                                  od: {
         
     | 
| 
       63 
     | 
    
         
            -
                                    short: "OD",
         
     | 
| 
       64 
     | 
    
         
            -
                                  },
         
     | 
| 
       65 
     | 
    
         
            -
                                  cs: {
         
     | 
| 
       66 
     | 
    
         
            -
                                    short: "CS",
         
     | 
| 
       67 
     | 
    
         
            -
                                  },
         
     | 
| 
       68 
     | 
    
         
            -
                                  ca: {
         
     | 
| 
       69 
     | 
    
         
            -
                                    short: "CA",
         
     | 
| 
       70 
     | 
    
         
            -
                                  },
         
     | 
| 
       71 
     | 
    
         
            -
                                  trf: {
         
     | 
| 
       72 
     | 
    
         
            -
                                    long: "Test Report Form",
         
     | 
| 
       73 
     | 
    
         
            -
                                    short: "TRF",
         
     | 
| 
       74 
     | 
    
         
            -
                                  }
         
     | 
| 
      
 50 
     | 
    
         
            +
            config.default_type = Pubid::Iec::Identifier::InternationalStandard
         
     | 
| 
      
 51 
     | 
    
         
            +
            config.types = [Pubid::Iec::Identifier::InternationalStandard,
         
     | 
| 
      
 52 
     | 
    
         
            +
                            Pubid::Iec::Identifier::TechnicalReport,
         
     | 
| 
      
 53 
     | 
    
         
            +
                            Pubid::Iec::Identifier::TechnicalSpecification,
         
     | 
| 
      
 54 
     | 
    
         
            +
                            Pubid::Iec::Identifier::PubliclyAvailableSpecification,
         
     | 
| 
      
 55 
     | 
    
         
            +
                            Pubid::Iec::Identifier::Guide,
         
     | 
| 
      
 56 
     | 
    
         
            +
                            Pubid::Iec::Identifier::OperationalDocument,
         
     | 
| 
      
 57 
     | 
    
         
            +
                            Pubid::Iec::Identifier::ComponentSpecification,
         
     | 
| 
      
 58 
     | 
    
         
            +
                            Pubid::Iec::Identifier::SystemsReferenceDocument,
         
     | 
| 
      
 59 
     | 
    
         
            +
                            Pubid::Iec::Identifier::ConformityAssessment,
         
     | 
| 
      
 60 
     | 
    
         
            +
                            Pubid::Iec::Identifier::TestReportForm,
         
     | 
| 
      
 61 
     | 
    
         
            +
                            Pubid::Iec::Identifier::WritePaper,
         
     | 
| 
      
 62 
     | 
    
         
            +
                            Pubid::Iec::Identifier::TechnologyReport,
         
     | 
| 
      
 63 
     | 
    
         
            +
                            Pubid::Iec::Identifier::SocietalTechnologyTrendReport,
         
     | 
| 
      
 64 
     | 
    
         
            +
                            Pubid::Iec::Identifier::InterpretationSheet]
         
     | 
| 
       75 
65 
     | 
    
         | 
| 
       76 
     | 
    
         
            -
                                }.freeze
         
     | 
| 
       77 
66 
     | 
    
         
             
            Pubid::Iec::Identifier.set_config(config)
         
     | 
    
        data/stages.yaml
    CHANGED
    
    | 
         @@ -1,52 +1,23 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            abbreviations:
         
     | 
| 
       2 
2 
     | 
    
         
             
              ACD: "20.99"
         
     | 
| 
       3 
3 
     | 
    
         
             
              ACDV: "30.99"
         
     | 
| 
       4 
     | 
    
         
            -
              ADTR: "40.99"
         
     | 
| 
       5 
     | 
    
         
            -
              ADTS: "40.99"
         
     | 
| 
       6 
     | 
    
         
            -
              AFDIS: "40.99"
         
     | 
| 
       7 
4 
     | 
    
         
             
              APUB: "50.99"
         
     | 
| 
       8 
5 
     | 
    
         
             
              BPUB: "60.00"
         
     | 
| 
       9 
6 
     | 
    
         
             
              CAN: "30.98"
         
     | 
| 
       10 
     | 
    
         
            -
              CCDV: "40.20"
         
     | 
| 
       11 
7 
     | 
    
         
             
              CD: "30.20"
         
     | 
| 
       12 
     | 
    
         
            -
              CDISH: "50.20"
         
     | 
| 
       13 
8 
     | 
    
         
             
              CDM: "30.60"
         
     | 
| 
       14 
     | 
    
         
            -
              CDPAS: "50.20"
         
     | 
| 
       15 
     | 
    
         
            -
              CDTR: "50.20"
         
     | 
| 
       16 
     | 
    
         
            -
              CDTS: "50.20"
         
     | 
| 
       17 
     | 
    
         
            -
              CDVM: "40.91"
         
     | 
| 
       18 
     | 
    
         
            -
              CFDIS: "50.20"
         
     | 
| 
       19 
     | 
    
         
            -
              DECDISH: "50.00"
         
     | 
| 
       20 
     | 
    
         
            -
              DECFDIS: "50.00"
         
     | 
| 
       21 
9 
     | 
    
         
             
              DECPUB: "60.00"
         
     | 
| 
       22 
10 
     | 
    
         
             
              DEL: "10.98"
         
     | 
| 
       23 
11 
     | 
    
         
             
              DELPUB: "99.60"
         
     | 
| 
       24 
     | 
    
         
            -
              DTRM: "50.92"
         
     | 
| 
       25 
     | 
    
         
            -
              DTSM: "50.92"
         
     | 
| 
       26 
12 
     | 
    
         
             
              MERGED: "30.97"
         
     | 
| 
       27 
     | 
    
         
            -
              NCDV: "40.91"
         
     | 
| 
       28 
     | 
    
         
            -
              NDTR: "50.92"
         
     | 
| 
       29 
     | 
    
         
            -
              NDTS: "50.92"
         
     | 
| 
       30 
     | 
    
         
            -
              NFDIS: "50.92"
         
     | 
| 
       31 
13 
     | 
    
         
             
              PCC: "30.60"
         
     | 
| 
       32 
14 
     | 
    
         
             
              PNW: "10.20"
         
     | 
| 
       33 
15 
     | 
    
         
             
              PPUB: "60.60"
         
     | 
| 
       34 
     | 
    
         
            -
              PRVC: "40.60"
         
     | 
| 
       35 
     | 
    
         
            -
              PRVD: "50.60"
         
     | 
| 
       36 
     | 
    
         
            -
              PRVDISH: "50.60"
         
     | 
| 
       37 
     | 
    
         
            -
              PRVDPAS: "50.60"
         
     | 
| 
       38 
     | 
    
         
            -
              PRVDTR: "50.60"
         
     | 
| 
       39 
     | 
    
         
            -
              PRVDTS: "50.60"
         
     | 
| 
       40 
16 
     | 
    
         
             
              PRVN: "10.60"
         
     | 
| 
       41 
17 
     | 
    
         
             
              PWI: "00.00"
         
     | 
| 
       42 
     | 
    
         
            -
              RDISH: "50.00"
         
     | 
| 
       43 
     | 
    
         
            -
              RFDIS: "50.00"
         
     | 
| 
       44 
18 
     | 
    
         
             
              RPUB: "60.00"
         
     | 
| 
       45 
19 
     | 
    
         
             
              SPLIT: "30.96"
         
     | 
| 
       46 
20 
     | 
    
         
             
              TCDV: "40.00"
         
     | 
| 
       47 
     | 
    
         
            -
              TDISH: "50.00"
         
     | 
| 
       48 
     | 
    
         
            -
              TDTR: "50.00"
         
     | 
| 
       49 
     | 
    
         
            -
              TDTS: "50.00"
         
     | 
| 
       50 
21 
     | 
    
         
             
              TPUB: "60.00"
         
     | 
| 
       51 
22 
     | 
    
         
             
              WPUB: "95.99"
         
     | 
| 
       52 
23 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: pubid-iec
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.2.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Ribose Inc.
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2023- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2023-08-06 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rake
         
     | 
| 
         @@ -58,14 +58,14 @@ dependencies: 
     | 
|
| 
       58 
58 
     | 
    
         
             
                requirements:
         
     | 
| 
       59 
59 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       60 
60 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       61 
     | 
    
         
            -
                    version: 1.8. 
     | 
| 
      
 61 
     | 
    
         
            +
                    version: 1.8.6
         
     | 
| 
       62 
62 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       63 
63 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       64 
64 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       65 
65 
     | 
    
         
             
                requirements:
         
     | 
| 
       66 
66 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       67 
67 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       68 
     | 
    
         
            -
                    version: 1.8. 
     | 
| 
      
 68 
     | 
    
         
            +
                    version: 1.8.6
         
     | 
| 
       69 
69 
     | 
    
         
             
            description: Library to generate, parse and manipulate IEC PubID.
         
     | 
| 
       70 
70 
     | 
    
         
             
            email:
         
     | 
| 
       71 
71 
     | 
    
         
             
            - open.source@ribose.com
         
     | 
| 
         @@ -79,22 +79,47 @@ files: 
     | 
|
| 
       79 
79 
     | 
    
         
             
            - README.adoc
         
     | 
| 
       80 
80 
     | 
    
         
             
            - lib/pubid-iec.rb
         
     | 
| 
       81 
81 
     | 
    
         
             
            - lib/pubid/iec.rb
         
     | 
| 
       82 
     | 
    
         
            -
            - lib/pubid/iec/amendment.rb
         
     | 
| 
       83 
     | 
    
         
            -
            - lib/pubid/iec/corrigendum.rb
         
     | 
| 
       84 
82 
     | 
    
         
             
            - lib/pubid/iec/errors.rb
         
     | 
| 
       85 
83 
     | 
    
         
             
            - lib/pubid/iec/identifier.rb
         
     | 
| 
      
 84 
     | 
    
         
            +
            - lib/pubid/iec/identifier/amendment.rb
         
     | 
| 
       86 
85 
     | 
    
         
             
            - lib/pubid/iec/identifier/base.rb
         
     | 
| 
      
 86 
     | 
    
         
            +
            - lib/pubid/iec/identifier/component_specification.rb
         
     | 
| 
      
 87 
     | 
    
         
            +
            - lib/pubid/iec/identifier/conformity_assessment.rb
         
     | 
| 
      
 88 
     | 
    
         
            +
            - lib/pubid/iec/identifier/corrigendum.rb
         
     | 
| 
      
 89 
     | 
    
         
            +
            - lib/pubid/iec/identifier/guide.rb
         
     | 
| 
      
 90 
     | 
    
         
            +
            - lib/pubid/iec/identifier/international_standard.rb
         
     | 
| 
      
 91 
     | 
    
         
            +
            - lib/pubid/iec/identifier/interpretation_sheet.rb
         
     | 
| 
      
 92 
     | 
    
         
            +
            - lib/pubid/iec/identifier/operational_document.rb
         
     | 
| 
      
 93 
     | 
    
         
            +
            - lib/pubid/iec/identifier/publicly_available_specification.rb
         
     | 
| 
      
 94 
     | 
    
         
            +
            - lib/pubid/iec/identifier/societal_technology_trend_report.rb
         
     | 
| 
      
 95 
     | 
    
         
            +
            - lib/pubid/iec/identifier/supplement.rb
         
     | 
| 
      
 96 
     | 
    
         
            +
            - lib/pubid/iec/identifier/systems_reference_document.rb
         
     | 
| 
      
 97 
     | 
    
         
            +
            - lib/pubid/iec/identifier/technical_report.rb
         
     | 
| 
      
 98 
     | 
    
         
            +
            - lib/pubid/iec/identifier/technical_specification.rb
         
     | 
| 
      
 99 
     | 
    
         
            +
            - lib/pubid/iec/identifier/technology_report.rb
         
     | 
| 
      
 100 
     | 
    
         
            +
            - lib/pubid/iec/identifier/test_report_form.rb
         
     | 
| 
      
 101 
     | 
    
         
            +
            - lib/pubid/iec/identifier/white_paper.rb
         
     | 
| 
      
 102 
     | 
    
         
            +
            - lib/pubid/iec/identifier/working_document.rb
         
     | 
| 
       87 
103 
     | 
    
         
             
            - lib/pubid/iec/parser.rb
         
     | 
| 
      
 104 
     | 
    
         
            +
            - lib/pubid/iec/renderer/amendment.rb
         
     | 
| 
      
 105 
     | 
    
         
            +
            - lib/pubid/iec/renderer/corrigendum.rb
         
     | 
| 
      
 106 
     | 
    
         
            +
            - lib/pubid/iec/renderer/interpretation_sheet.rb
         
     | 
| 
       88 
107 
     | 
    
         
             
            - lib/pubid/iec/renderer/pubid.rb
         
     | 
| 
       89 
108 
     | 
    
         
             
            - lib/pubid/iec/renderer/trf_pubid.rb
         
     | 
| 
       90 
109 
     | 
    
         
             
            - lib/pubid/iec/renderer/trf_urn.rb
         
     | 
| 
       91 
110 
     | 
    
         
             
            - lib/pubid/iec/renderer/urn.rb
         
     | 
| 
      
 111 
     | 
    
         
            +
            - lib/pubid/iec/renderer/urn_amendment.rb
         
     | 
| 
      
 112 
     | 
    
         
            +
            - lib/pubid/iec/renderer/urn_corrigendum.rb
         
     | 
| 
      
 113 
     | 
    
         
            +
            - lib/pubid/iec/renderer/urn_supplement.rb
         
     | 
| 
      
 114 
     | 
    
         
            +
            - lib/pubid/iec/renderer/working_document.rb
         
     | 
| 
      
 115 
     | 
    
         
            +
            - lib/pubid/iec/renderer/working_document_urn.rb
         
     | 
| 
       92 
116 
     | 
    
         
             
            - lib/pubid/iec/stage.rb
         
     | 
| 
       93 
117 
     | 
    
         
             
            - lib/pubid/iec/transformer.rb
         
     | 
| 
       94 
118 
     | 
    
         
             
            - lib/pubid/iec/trf_identifier.rb
         
     | 
| 
       95 
119 
     | 
    
         
             
            - lib/pubid/iec/trf_parser.rb
         
     | 
| 
       96 
     | 
    
         
            -
            - lib/pubid/iec/type.rb
         
     | 
| 
       97 
120 
     | 
    
         
             
            - lib/pubid/iec/version.rb
         
     | 
| 
      
 121 
     | 
    
         
            +
            - lib/pubid/iec/working_document.rb
         
     | 
| 
      
 122 
     | 
    
         
            +
            - lib/pubid/iec/working_document_parser.rb
         
     | 
| 
       98 
123 
     | 
    
         
             
            - stages.yaml
         
     | 
| 
       99 
124 
     | 
    
         
             
            - update_codes.yaml
         
     | 
| 
       100 
125 
     | 
    
         
             
            homepage: https://github.com/metanorma/pubid-iec
         
     | 
| 
         @@ -116,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       116 
141 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       117 
142 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       118 
143 
     | 
    
         
             
            requirements: []
         
     | 
| 
       119 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 144 
     | 
    
         
            +
            rubygems_version: 3.3.26
         
     | 
| 
       120 
145 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       121 
146 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       122 
147 
     | 
    
         
             
            summary: Library to generate, parse and manipulate IEC PubID.
         
     | 
    
        data/lib/pubid/iec/amendment.rb
    DELETED
    
    
    
        data/lib/pubid/iec/type.rb
    DELETED
    
    | 
         @@ -1,25 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module Pubid::Iec
         
     | 
| 
       2 
     | 
    
         
            -
              class Type < Pubid::Core::Type
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
                # # Create new type
         
     | 
| 
       5 
     | 
    
         
            -
                # # @param type [Symbol]
         
     | 
| 
       6 
     | 
    
         
            -
                # def initialize(type = :is)
         
     | 
| 
       7 
     | 
    
         
            -
                #   type = type.to_s.downcase.to_sym unless type.is_a?(Symbol)
         
     | 
| 
       8 
     | 
    
         
            -
                #
         
     | 
| 
       9 
     | 
    
         
            -
                #   raise Errors::WrongTypeError, "#{type} type is not available" unless TYPE_NAMES.key?(type)
         
     | 
| 
       10 
     | 
    
         
            -
                #
         
     | 
| 
       11 
     | 
    
         
            -
                #   @type = type
         
     | 
| 
       12 
     | 
    
         
            -
                # end
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
                # def self.parse(type_string)
         
     | 
| 
       15 
     | 
    
         
            -
                #   TYPE_NAMES.each do |type, values|
         
     | 
| 
       16 
     | 
    
         
            -
                #     return new(type) if values[:short].upcase == type_string.to_s.upcase
         
     | 
| 
       17 
     | 
    
         
            -
                #   end
         
     | 
| 
       18 
     | 
    
         
            -
                #   raise Errors::ParseTypeError, "Cannot parse '#{type_string}' type"
         
     | 
| 
       19 
     | 
    
         
            -
                # end
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
                def to_s(format = :short)
         
     | 
| 
       22 
     | 
    
         
            -
                  TYPE_NAMES[type][format]
         
     | 
| 
       23 
     | 
    
         
            -
                end
         
     | 
| 
       24 
     | 
    
         
            -
              end
         
     | 
| 
       25 
     | 
    
         
            -
            end
         
     |