pubid-iso 0.7.0 → 0.7.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4fd0f754d87e7496c307221422d69bb36c6d4b497843eafa27a547d68bcd4e6
4
- data.tar.gz: c1d58a83fb0d672111b9fe6d0dc28df87c0070e483c3c19d487e7c2618c99293
3
+ metadata.gz: 554740ba301fe225d6b7a58931013bb6d33d2c9ffa41de45c2b72b53b16340e7
4
+ data.tar.gz: ad603b65a477dbf70222252e0b286226d9dc576ff24fc794e9873fdea4a0a45e
5
5
  SHA512:
6
- metadata.gz: aff91d1b6b5bc709bb4929b2901ac7ee53e35a2e67e403f4c3eec4123b8ab29a4d42604ae06ff0777be19b29d598139b224bfd7f34fe206595f3946147fb440b
7
- data.tar.gz: ec6219d66f0b62c97bb20c09adcb3c53f3d63f7fb245228e3463fe47b33d37087574f6a327461f839b0eef1f713c8ce33dd1408619194814fda9ccc8938fdab1
6
+ metadata.gz: 731c5b93d0c2a443a6d1af5c965d6eb4984279bb062d1bd3136436cf65044186332661cbc6ae51a0500131b1cc13204991c4ed8e211fe28937298db806c65817
7
+ data.tar.gz: 441fbee4c9481f6c60f7f25a7ea6256550dab0241c0fb1a048e3272eaab4b87ac1089c08d2f7a33dbd74d418151793193ee7e0d36143b8c46ac79594134b3fcf
@@ -13,7 +13,7 @@ module Pubid::Iso
13
13
  },
14
14
  }.freeze
15
15
  def self.type
16
- { key: :add, title: "Addendum" }
16
+ { key: :add, title: "Addendum", short: "ADD" }
17
17
  end
18
18
 
19
19
  def self.get_renderer_class
@@ -21,7 +21,7 @@ module Pubid::Iso
21
21
  },
22
22
  }.freeze
23
23
  def self.type
24
- { key: :amd, title: "Amendment" }
24
+ { key: :amd, title: "Amendment", short: "AMD" }
25
25
  end
26
26
 
27
27
  def self.get_renderer_class
@@ -21,7 +21,7 @@ module Pubid::Iso
21
21
  #
22
22
  # @param stage [Stage, Symbol, String] stage or typed stage, e.g. "PWI", "NP", "50.00", Stage.new(abbr: :WD), "DTR"
23
23
  # @param iteration [Integer] document iteration, eg. "1", "2", "3"
24
- # @param joint_document [Identifier] joint document
24
+ # @param joint_document [Identifier, Hash] joint document
25
25
  # @param supplements [Array<Supplement>] supplements
26
26
  # @param tctype [String] Technical Committee type, eg. "TC", "JTC"
27
27
  # @param sctype [String] TC subsommittee, eg. "SC"
@@ -30,7 +30,7 @@ module Pubid::Iso
30
30
  # @param scnumber [Integer] Subsommittee number, eg. "1", "2"
31
31
  # @param wgnumber [Integer] Working group number, eg. "1", "2"
32
32
  # @param dirtype [String] Directives document type, eg. "JTC"
33
- # @param base [Identifier] base document for supplement's identifier
33
+ # @param base [Identifier, Hash] base document for supplement's identifier
34
34
  # @param type [nil, :tr, :ts, :amd, :cor, :guide, :dir, :tc, Type] document's type, eg. :tr, :ts, :amd, :cor, Type.new(:tr)
35
35
  # @raise [Errors::SupplementWithoutYearOrStageError] when trying to apply
36
36
  # supplement to the document without edition year or stage
@@ -68,7 +68,13 @@ module Pubid::Iso
68
68
  end
69
69
 
70
70
  @iteration = iteration.to_i if iteration
71
- @joint_document = joint_document if joint_document
71
+ if joint_document
72
+ if joint_document.is_a?(Hash)
73
+ @joint_document = Identifier.create(**joint_document)
74
+ else
75
+ @joint_document = joint_document
76
+ end
77
+ end
72
78
  @tctype = tctype if tctype
73
79
  @sctype = sctype.to_s if sctype
74
80
  @wgtype = wgtype.to_s if wgtype
@@ -77,7 +83,13 @@ module Pubid::Iso
77
83
  @wgnumber = wgnumber.to_s if wgnumber
78
84
  @dir = dir.to_s if dir
79
85
  @dirtype = dirtype.to_s if dirtype
80
- @base = base if base
86
+ if base
87
+ if base.is_a?(Hash)
88
+ @base = Identifier.create(**base)
89
+ else
90
+ @base = base
91
+ end
92
+ end
81
93
  @part = part if part
82
94
  @addendum = addendum if addendum
83
95
  @edition = edition
@@ -22,7 +22,7 @@ module Pubid::Iso
22
22
  }.freeze
23
23
 
24
24
  def self.type
25
- { key: :cor, title: "Corrigendum" }
25
+ { key: :cor, title: "Corrigendum", short: "COR" }
26
26
  end
27
27
 
28
28
  def self.get_renderer_class
@@ -16,7 +16,7 @@ module Pubid::Iso
16
16
  end
17
17
 
18
18
  def self.type
19
- { key: :dir, title: "Directives" }
19
+ { key: :dir, title: "Directives", short: "DIR" }
20
20
  end
21
21
 
22
22
  def self.get_renderer_class
@@ -8,7 +8,7 @@ module Pubid::Iso
8
8
  TYPED_STAGES = {}.freeze
9
9
 
10
10
  def self.type
11
- { key: :ext, title: "Extract" }
11
+ { key: :ext, title: "Extract", short: "EXT" }
12
12
  end
13
13
 
14
14
  def self.get_renderer_class
@@ -25,7 +25,7 @@ module Pubid::Iso
25
25
  end
26
26
 
27
27
  def self.type
28
- { key: :guide, title: "Guide" }
28
+ { key: :guide, title: "Guide", short: "GUIDE" }
29
29
  end
30
30
  end
31
31
  end
@@ -39,7 +39,7 @@ module Pubid::Iso
39
39
  end
40
40
 
41
41
  def self.type
42
- { key: :is, title: "International Standard" }
42
+ { key: :is, title: "International Standard", short: nil }
43
43
  end
44
44
  end
45
45
  end
@@ -19,7 +19,7 @@ module Pubid::Iso
19
19
  }.freeze
20
20
 
21
21
  def self.type
22
- { key: :isp, title: "International Standardized Profile" }
22
+ { key: :isp, title: "International Standardized Profile", short: "ISP" }
23
23
  end
24
24
 
25
25
  def self.get_renderer_class
@@ -14,7 +14,7 @@ module Pubid::Iso
14
14
  }.freeze
15
15
 
16
16
  def self.type
17
- { key: :iwa, title: "International Workshop Agreement" }
17
+ { key: :iwa, title: "International Workshop Agreement", short: "IWA" }
18
18
  end
19
19
 
20
20
  def self.get_renderer_class
@@ -19,7 +19,7 @@ module Pubid::Iso
19
19
  }.freeze
20
20
 
21
21
  def self.type
22
- { key: :pas, title: "Publicly Available Specification" }
22
+ { key: :pas, title: "Publicly Available Specification", short: "PAS" }
23
23
  end
24
24
 
25
25
  def self.get_renderer_class
@@ -8,7 +8,7 @@ module Pubid::Iso
8
8
  TYPED_STAGES = {}.freeze
9
9
 
10
10
  def self.type
11
- { key: :r, title: "Recommendation" }
11
+ { key: :r, title: "Recommendation", short: "R" }
12
12
  end
13
13
 
14
14
  def self.get_renderer_class
@@ -24,7 +24,7 @@ module Pubid::Iso
24
24
  end
25
25
 
26
26
  def self.type
27
- { key: :sup, title: "Supplement", values: %w[Supplement Suppl SUP] }
27
+ { key: :sup, title: "Supplement", values: %w[Supplement Suppl SUP], short: "SUP" }
28
28
  end
29
29
 
30
30
  def self.get_renderer_class
@@ -8,7 +8,7 @@ module Pubid::Iso
8
8
  TYPED_STAGES = {}.freeze
9
9
 
10
10
  def self.type
11
- { key: :tc, title: "Technical Committee" }
11
+ { key: :tc, title: "Technical Committee", short: "TC" }
12
12
  end
13
13
 
14
14
  def self.get_renderer_class
@@ -19,7 +19,7 @@ module Pubid::Iso
19
19
  }.freeze
20
20
 
21
21
  def self.type
22
- { key: :tr, title: "Technical Report" }
22
+ { key: :tr, title: "Technical Report", short: "TR" }
23
23
  end
24
24
 
25
25
  def self.get_renderer_class
@@ -19,7 +19,7 @@ module Pubid::Iso
19
19
  }.freeze
20
20
 
21
21
  def self.type
22
- { key: :ts, title: "Technical Specification" }
22
+ { key: :ts, title: "Technical Specification", short: "TS" }
23
23
  end
24
24
 
25
25
  def self.get_renderer_class
@@ -19,7 +19,7 @@ module Pubid::Iso
19
19
  }.freeze
20
20
 
21
21
  def self.type
22
- { key: :tta, title: "Technology Trends Assessments" }
22
+ { key: :tta, title: "Technology Trends Assessments", short: "TTA" }
23
23
  end
24
24
 
25
25
  def self.get_renderer_class
@@ -1,5 +1,5 @@
1
1
  module Pubid
2
2
  module Iso
3
- VERSION = "0.7.0".freeze
3
+ VERSION = "0.7.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubid-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
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-12-29 00:00:00.000000000 Z
11
+ date: 2024-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake