pubid-bsi 0.3.2 → 0.3.3

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: bb4fce04e4bfe5eecff76c52da8cd5d407fae84df89fdebb93aa468011766c73
4
- data.tar.gz: 54008141e01fb0696f681f687d42c96998dbff4bca61022e6c3718a3efe569df
3
+ metadata.gz: b9b1b24dd6dc7d676b713c129048024912b0be521e85ad82eb7799e1907777e3
4
+ data.tar.gz: 3a4a26d9876e256b37eac627980ef641f119ba8c5589533a77650d0bb927d25b
5
5
  SHA512:
6
- metadata.gz: d1869ebbd26478af24a05c499c893d0060e3545f34d2730ad03336b80af766e6ec5cfbeeadb8bba11d1d39d7628ee7995c52f9ff65a7bed424dbf8e10022d3af
7
- data.tar.gz: 8fa6f383e1c39d04e336bae6f8cbd5bd055c8282d14ae8fa441301e00d899fd1aa1a26c383e340f151f28ab1e580068e550ef626f7fa82879a8a362dc4ec1201
6
+ metadata.gz: 8ddbaa4e4c855b9f2f4e13aa0142eb52da46245cb4af1a72af6af58963cb82ce1390cc6f757323e5d14a5f748584fc67e766cfa2e04db99998c69f9e038eec30
7
+ data.tar.gz: bf664f8fe1d9689a7287ec82ae76eae731dca7e9adb1af193b1b3914e33748b29aebca68a523f1d96121a9fc0c5461ff428db8d523eb61526b57206e767102af
@@ -3,10 +3,21 @@ module Pubid::Bsi::Renderer
3
3
  TYPE = "".freeze
4
4
 
5
5
  def render_identifier(params)
6
- suffix = "%{supplement}%{tracked_changes}%{translation}%{pdf}" % params
7
- return "%{publisher} %{adopted}#{suffix}" % params unless params[:adopted].to_s.empty?
8
-
9
- "%{publisher} %{number}%{part}%{edition}%{year}%{month}#{suffix}" % params
6
+ suffix = "%{year}%{month}%{supplement}%{tracked_changes}%{translation}%{pdf}" % params
7
+ unless params[:adopted].to_s.empty?
8
+ # ignore year for adopted document if already defined for base document
9
+ unless params[:year].empty?
10
+ params[:adopted].year = nil
11
+ # ignore year for adopted identifier assigned to adopted identifier
12
+ if params[:adopted].respond_to?(:adopted) && params[:adopted].adopted
13
+ params[:adopted].adopted.year = nil
14
+ end
15
+ end
16
+
17
+ return "%{publisher} %{adopted}#{suffix}" % params
18
+ end
19
+
20
+ "%{publisher} %{number}%{part}%{edition}#{suffix}" % params
10
21
  end
11
22
 
12
23
  def render_month(month, _opts, _params)
@@ -1,5 +1,5 @@
1
1
  module Pubid
2
2
  module Bsi
3
- VERSION = "0.3.2".freeze
3
+ VERSION = "0.3.3".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubid-bsi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
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-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake