relaton-render 0.5.12 → 0.5.13

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: cc53c422d4ce23993d680552ab161d6adfdc2d20d2404df34ff7584b1ea6f3ef
4
- data.tar.gz: d7a69378efe30b0e71423aa2b027afcb2cd617d4d8dbd52f20ddee8c63fdc74b
3
+ metadata.gz: ff9e0dafe6ba6d6df3cd7f3e98057a96400abe99c90e8f8a14525b18d019d673
4
+ data.tar.gz: 450df19a0aec2275174c164559838023a977ffdfb435f0e07730081c46f4bcfb
5
5
  SHA512:
6
- metadata.gz: 57a7197ead73c25e93192d5c8981829aa346c3806b7f140adb5b5be4d00820b9567f6c82b90d00c0b3eca4b388fcd0193e75fcb4afbe5c1426d82d60c1b944cc
7
- data.tar.gz: 68be12ff63e3232cd156e6742c8d7a2a3bcdf78a542ba1098cea48a9e47618f3048598101ad17f0b3985d46647c24c1e26fcdf483fb37dc30e228f8ce1e50e78
6
+ metadata.gz: 1f408ad815ea069f7bf8eca30461eaa1965f6303e57a37698d66135159d70e93bcc90ffaf5f49bb3dc173a4e689e7d5090baa60b510aca95b5fe2d50cf0bb196
7
+ data.tar.gz: 070304e5689852b644ff5d072e18d7354e5d274196afa4b1f85f89e3edfb865c93642bcce1bd18a9d195217e9ec1cbe1a63782549382308ee67632a1d9dcc108
@@ -7,11 +7,13 @@ on:
7
7
  inputs:
8
8
  next_version:
9
9
  description: |
10
- Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
10
+ Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
11
+ Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
11
12
  required: true
12
13
  default: 'skip'
13
- push:
14
- tags: [ v* ]
14
+ repository_dispatch:
15
+ types: [ do-release ]
16
+
15
17
 
16
18
  jobs:
17
19
  release:
@@ -105,11 +105,13 @@ module Relaton
105
105
  end
106
106
 
107
107
  def role_inflect(contribs, role)
108
- role.nil? || contribs.size.zero? ||
108
+ role.nil? || contribs.empty? ||
109
109
  %w(author publisher distributor
110
110
  authorizer).include?(role) and return nil
111
111
  number = contribs.size > 1 ? "pl" : "sg"
112
- @r.i18n.get[role][number] || role
112
+ x = @r.i18n.get[role]
113
+ x.is_a?(Hash) or return role
114
+ x[number] || role
113
115
  end
114
116
 
115
117
  def editionformat(edn, num)
@@ -135,7 +137,7 @@ module Relaton
135
137
  num.nil? ||
136
138
  (num.is_a?(Hash) && num[:status].nil? &&
137
139
  num[:iteration].nil?) and return nil
138
- @r.i18n.draft.sub(/%/, num)
140
+ @r.i18n.draft.sub("%", num)
139
141
  end
140
142
 
141
143
  def extentformat(extent, hash)
@@ -145,7 +147,7 @@ module Relaton
145
147
  extentformat1(k, v, m, e1)
146
148
  m
147
149
  end
148
- @r.extenttemplate.render(ret.merge(type: hash[:type]))
150
+ @r.extenttemplate.render(hash.merge(ret))
149
151
  end.join("; ")
150
152
  end
151
153
 
@@ -195,7 +197,7 @@ module Relaton
195
197
  value_raw[:to] or num = "sg"
196
198
  end
197
199
  @r.i18n.l10n(@r.i18n.get[is_size ? "size" : "extent"][type][num]
198
- .sub(/%/, value))
200
+ .sub("%", value))
199
201
  end
200
202
 
201
203
  def date_range(hash)
@@ -22,6 +22,7 @@ extenttemplate:
22
22
  standard: book
23
23
  techreport: book
24
24
  inbook: "{{ volume }}: {{ page }}"
25
+ article: "{{ volume }} {{issue}} , {{ page }}, {{ duration }}"
25
26
  misc: "{{ volume }} {{issue}} , {{ page }}, {{ duration }}"
26
27
  sizetemplate:
27
28
  dataset: "{{ data }}"
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Render
3
- VERSION = "0.5.12".freeze
3
+ VERSION = "0.5.13".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-render
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.12
4
+ version: 0.5.13
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-04-08 00:00:00.000000000 Z
11
+ date: 2023-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  - !ruby/object:Gem::Version
240
240
  version: '0'
241
241
  requirements: []
242
- rubygems_version: 3.1.6
242
+ rubygems_version: 3.3.26
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: Rendering of ISO 690 XML