pubid-itu 0.1.0 → 0.1.1

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: ec23750bf87a608ae22678e7e96c322d2cbd0c2e89b811a79b128e3f85e0e3ae
4
- data.tar.gz: 3501fd05683d1cc766e90133f67cdd6b1e4b184347989c4797cad33f2103d8d5
3
+ metadata.gz: b4d80fe19034aa225af617ac788255fd8037aee4f3f1514d02828a04a125bf88
4
+ data.tar.gz: a64f779acb1d31383fc7b83a9f792aeb554500fb15f6c262e0dcf350ac350d95
5
5
  SHA512:
6
- metadata.gz: a7ae4e27f6e021070bef704c348c3bed515ac1963a2cfb1dd469e879d6af574da0cc8a70e7ed8e22ca75c8585381b5031293f4e2dfafdf7adc99f05171859c82
7
- data.tar.gz: 434c0efa0b8d6a6dff44c6f37d6a739f7d93a8745ba2fc1d1b6bda3e9b4678a48631b6c2eb5ff5be84d3a9d81c9b7c8750b5b32aead241351e1eb70d346179a5
6
+ metadata.gz: 1d02574a49f9d33a4cfa46b8f82f5717306d37da74e3d06f0fe56db38caab18e40f0de85c2371d688110092c3d51a0adbb8f8405f84ae65291d619a64b1a1771
7
+ data.tar.gz: 1eca91fbdf7d953f6394565dfc57a6c1fb99fe69d589c3a73d66dfe6003c3129c2f48ebb2dad2653827e2242bdbda60dc4eacf83653f9509be07e4c17b65a06d
@@ -31,7 +31,7 @@ module Pubid::Itu
31
31
  end
32
32
 
33
33
  def to_s(**opts)
34
- self.class.get_renderer_class.new(get_params).render(**opts)
34
+ self.class.get_renderer_class.new(to_h(deep: false)).render(**opts)
35
35
  end
36
36
 
37
37
  class << self
@@ -3,11 +3,6 @@ module Pubid::Itu
3
3
  class Recommendation < Base
4
4
  def_delegators 'Pubid::Itu::Identifier::Recommendation', :type
5
5
 
6
- def initialize(**opts)
7
- # add type when Recommendation is default type
8
- super(**opts.merge(type: "REC"))
9
- end
10
-
11
6
  def self.type
12
7
  { key: :recommendation, title: "Recommendation", short: "REC" }
13
8
  end
@@ -10,10 +10,10 @@ module Pubid::Itu
10
10
  @base = base
11
11
  end
12
12
 
13
- def get_params
13
+ def to_h(deep: false)
14
14
  # XXX: hack to render supplements using Base renderer, because we need to
15
15
  # place date published after amendment, e.g. `ITU-T G.780/Y.1351 Amd 1 (2004)`
16
- @base.get_params.merge(self.type[:key] => super)
16
+ @base.to_h(deep: deep).merge(self.type[:key] => super)
17
17
  end
18
18
 
19
19
  def self.type
@@ -1,15 +1,11 @@
1
1
  module Pubid::Itu::Renderer
2
2
  class ImplementersGuide < Base
3
3
  def render_type_series(params)
4
- "%{series}%{type}" % params
4
+ ("%{series}" % params) + (params[:series] ? ".Imp" : "Imp")
5
5
  end
6
6
 
7
7
  def render_number(number, _opts, params)
8
8
  number
9
9
  end
10
-
11
- def render_type(type, opts, _params)
12
- params[:series] ? ".Imp" : "Imp"
13
- end
14
10
  end
15
11
  end
@@ -1,5 +1,5 @@
1
1
  module Pubid
2
2
  module Itu
3
- VERSION = "0.1.0".freeze
3
+ VERSION = "0.1.1".freeze
4
4
  end
5
5
  end
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.0
4
+ version: 0.1.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: 2024-01-06 00:00:00.000000000 Z
11
+ date: 2024-01-17 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.5
61
+ version: 1.12.2
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.5
68
+ version: 1.12.2
69
69
  description: Library to generate, parse and manipulate ITU PubID.
70
70
  email:
71
71
  - open.source@ribose.com