pubid-iso 0.1.4 → 0.1.5

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: e9a5dae3e19189666e2259f498813de7aa502ee7d68e1ec4567d493be74e3acb
4
- data.tar.gz: f7834ffc05c7eaeec131aaef54804512d2e6d9e5494da8fe286e9730493dd7be
3
+ metadata.gz: d0daa77a77b864f2c4799226d5a5d458a3a852ba5321bf243f5415082ca66d52
4
+ data.tar.gz: 2efd25c20e35d80cd14a2f286e435eab2d017a295b08fb16f7c05ff079fe8986
5
5
  SHA512:
6
- metadata.gz: 5a3319d163496c073813d052ecc873fb6f2f90e2351f1c8ac891c2c093c56a59d8405bc942f44b3f57e013f1f7149a7b3a35fc7b73ca3c58a0116ebce5e85b63
7
- data.tar.gz: 3c72a547b1abaa06142caa496e8ce6d3769499954bfeaf3f9b01a470017bd3f38a1682be9e793f7eaab019ce202367feeda9d771f13ad14cf11b9cd901dafd42
6
+ metadata.gz: e740022023d24557f1650de284b22411176ac4fb09d6ecac8bb8c3a69a328dcaeeb79aadc0c3a5644840fadd1167699a010039dbedd5f5412f82387a7566c88c
7
+ data.tar.gz: 3d7437f44ed7e4fc6496b315d30940ea79bb3e4e275ea1bb1f973fe2a7927c339ec57758a90494a27afcba71c266dae4bf1d9cd61a7002a4e9bdb515e9ca6a49
@@ -5,7 +5,8 @@ module Pubid::Iso
5
5
  :amendment, :amendment_version, :amendment_number,
6
6
  :corrigendum, :corrigendum_version, :corrigendum_number,
7
7
  :amendment_stage, :corrigendum_stage, :joint_document,
8
- :tctype, :sctype, :wgtype, :tcnumber, :scnumber, :wgnumber
8
+ :tctype, :sctype, :wgtype, :tcnumber, :scnumber, :wgnumber,
9
+ :urn_stage
9
10
 
10
11
  LANGUAGES = {
11
12
  "ru" => "R",
data/lib/pubid/iso/urn.rb CHANGED
@@ -54,10 +54,14 @@ module Pubid::Iso
54
54
  end
55
55
 
56
56
  def render_stage(stage)
57
+ return ":stage-#{sprintf('%05.2f', stage)}#{iteration}" if stage.is_a?(Float)
58
+
57
59
  ":stage-#{sprintf('%05.2f', STAGES[stage.to_sym])}#{iteration}"
58
60
  end
59
61
 
60
62
  def stage
63
+ return render_stage(@urn_stage) if @urn_stage
64
+
61
65
  return render_stage(@stage) if @stage
62
66
 
63
67
  return render_stage(@amendment_stage) if @amendment_stage
@@ -1,5 +1,5 @@
1
1
  module Pubid
2
2
  module Iso
3
- VERSION = "0.1.4".freeze
3
+ VERSION = "0.1.5".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.1.4
4
+ version: 0.1.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: 2022-05-19 00:00:00.000000000 Z
11
+ date: 2022-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake