relaton-iso-bib 1.7.0 → 1.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: dcb10aff8412c86a24ebdc56ad3236dbb6539479d33c5ce5a974c0f331c6614f
4
- data.tar.gz: 667381a5e8ab39c940dd06b5e671707e5b7fc20755ba98a2ce5b4558e230d436
3
+ metadata.gz: 8c9c23ffe34d6c88e2c4ad97f693507a6f5a19df868c2d3dffc7f4170ed1f245
4
+ data.tar.gz: b1e42d7f8c70e44aa7c8e9ea6a9e4dab84343a6a4b98d92bb12450ab0d97b2ea
5
5
  SHA512:
6
- metadata.gz: 472a1a8703fd5b9c0bfc464da7f1b1565c28986ad1ca76662ebe5ffe46f47aaca75d28f015a0be5a2e1d5c0e80af8146c666108a86bab62e8679c06e32d191be
7
- data.tar.gz: 93fb843644985615a1e9c1fcf466eae8e799e437a039f71c3f381575171e97d2a480ef98da14c43c3b2891d9d8f581179f807fd92befc8bcfe2972b332bbfc78
6
+ metadata.gz: 0b66cc94883fcc30a72eb92649d48fb1145ec7536bfbcf31c5c4339cf61617e49f64102a79e64350bf656b592db6874ac655ca9042bb6227ef88126ecc215ec4
7
+ data.tar.gz: 344ceb897089bc97ba601c9ab9aa009c419a9c218ff9331a7cebd5034cebdf1d9170280fcb6afab8f1dbb15d78ea7a307ffdc303cda6750a2c99a89ce6dbf285
@@ -0,0 +1,46 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: rake
4
+
5
+ on:
6
+ push:
7
+ branches: [ master, main ]
8
+ tags: [ v* ]
9
+ pull_request:
10
+
11
+ jobs:
12
+ rake:
13
+ name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
14
+ runs-on: ${{ matrix.os }}
15
+ continue-on-error: ${{ matrix.experimental }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby: [ '2.7', '2.6', '2.5', '2.4' ]
20
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
21
+ experimental: [ false ]
22
+ include:
23
+ - ruby: '3.0'
24
+ os: 'ubuntu-latest'
25
+ experimental: true
26
+ - ruby: '3.0'
27
+ os: 'windows-latest'
28
+ experimental: true
29
+ - ruby: '3.0'
30
+ os: 'macos-latest'
31
+ experimental: true
32
+ steps:
33
+ - uses: actions/checkout@v2
34
+ with:
35
+ submodules: true
36
+
37
+ # https://github.com/ruby-debug/debase/issues/89#issuecomment-686827382
38
+ - if: matrix.os == 'macos-latest' && matrix.ruby == '2.5'
39
+ run: echo BUNDLE_BUILD__DEBASE="--with-cflags=\"-Wno-error=implicit-function-declaration\"" >> $GITHUB_ENV
40
+
41
+ - uses: ruby/setup-ruby@v1
42
+ with:
43
+ ruby-version: ${{ matrix.ruby }}
44
+ bundler-cache: true
45
+
46
+ - run: bundle exec rake
data/README.adoc CHANGED
@@ -454,7 +454,7 @@ bib_hash = RelatonIsoBib::HashConverter.hash_to_bib hash
454
454
  => {:id=>"ISO/TC211",
455
455
  ...
456
456
 
457
- RelatonIsoBib::IsoBibliographicItem.new bib_hash
457
+ RelatonIsoBib::IsoBibliographicItem.new **bib_hash
458
458
  => #<RelatonIsoBib::IsoBibliographicItem:0x007fdb95ba98e8
459
459
  ...
460
460
  ----
@@ -10,7 +10,7 @@ module RelatonIsoBib
10
10
  def self.grammar_hash
11
11
  gem_path = File.expand_path "..", __dir__
12
12
  grammars_path = File.join gem_path, "grammars", "*"
13
- grammars = Dir[grammars_path].sort.map { |gp| File.read gp }.join
13
+ grammars = Dir[grammars_path].sort.map { |gp| File.read gp, encoding: "UTF-8" }.join
14
14
  Digest::MD5.hexdigest grammars
15
15
  end
16
16
  end
@@ -35,13 +35,13 @@ module RelatonIsoBib
35
35
  # @param secretariat [String, NilClass]
36
36
  def initialize(technical_committee:, **args) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/AbcSize
37
37
  @technical_committee = technical_committee.map do |tc|
38
- tc.is_a?(Hash) ? IsoSubgroup.new(tc) : tc
38
+ tc.is_a?(Hash) ? IsoSubgroup.new(**tc) : tc
39
39
  end
40
40
  @subcommittee = args.fetch(:subcommittee, []).map do |sc|
41
- sc.is_a?(Hash) ? IsoSubgroup.new(sc) : sc
41
+ sc.is_a?(Hash) ? IsoSubgroup.new(**sc) : sc
42
42
  end
43
43
  @workgroup = args.fetch(:workgroup, []).map do |wg|
44
- wg.is_a?(Hash) ? IsoSubgroup.new(wg) : wg
44
+ wg.is_a?(Hash) ? IsoSubgroup.new(**wg) : wg
45
45
  end
46
46
  @secretariat = args[:secretariat]
47
47
  end
@@ -9,7 +9,7 @@ module RelatonIsoBib
9
9
  # @param item [Hash]
10
10
  # @retirn [RelatonIsoBib::IsoBibliographicItem]
11
11
  def bib_item(item)
12
- IsoBibliographicItem.new(item)
12
+ IsoBibliographicItem.new(**item)
13
13
  end
14
14
 
15
15
  #
@@ -18,7 +18,7 @@ module RelatonIsoBib
18
18
  # @param title [Hash]
19
19
  # @return [RelatonBib::TypedTitleString]
20
20
  def typed_title_strig(title)
21
- RelatonBib::TypedTitleString.new title
21
+ RelatonBib::TypedTitleString.new **title
22
22
  end
23
23
 
24
24
  # @param ret [Hash]
@@ -45,9 +45,7 @@ module RelatonIsoBib
45
45
  def structuredidentifier_hash_to_bib(ret)
46
46
  return unless ret[:structuredidentifier]
47
47
 
48
- ret[:structuredidentifier] = RelatonIsoBib::StructuredIdentifier.new(
49
- ret[:structuredidentifier],
50
- )
48
+ ret[:structuredidentifier] = RelatonIsoBib::StructuredIdentifier.new(**ret[:structuredidentifier])
51
49
  end
52
50
  end
53
51
  end
@@ -131,20 +131,20 @@ module RelatonIsoBib
131
131
  copyright link fetched docid formattedref extent accesslocation
132
132
  classification validity doctype keyword].include? k
133
133
  end
134
- super super_args
134
+ super **super_args
135
135
 
136
136
  @type = args[:type] || "standard"
137
137
 
138
138
  if args[:editorialgroup]
139
139
  @editorialgroup = if args[:editorialgroup].is_a?(Hash)
140
- EditorialGroup.new(args[:editorialgroup])
140
+ EditorialGroup.new(**args[:editorialgroup])
141
141
  else args[:editorialgroup]
142
142
  end
143
143
  end
144
144
 
145
145
  @structuredidentifier = args[:structuredidentifier]
146
146
  # @doctype = args[:doctype] || "international-standard"
147
- @ics = args.fetch(:ics, []).map { |i| i.is_a?(Hash) ? Ics.new(i) : i }
147
+ @ics = args.fetch(:ics, []).map { |i| i.is_a?(Hash) ? Ics.new(**i) : i }
148
148
  @stagename = args[:stagename]
149
149
  @id_attribute = true
150
150
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonIsoBib
2
- VERSION = "1.7.0".freeze
2
+ VERSION = "1.7.1".freeze
3
3
  end
@@ -24,7 +24,7 @@ module RelatonIsoBib
24
24
  # @param item_hash [Hash]
25
25
  # @return [RelatonIsoBib::IsoBibliographicItem]
26
26
  def bib_item(item_hash)
27
- IsoBibliographicItem.new item_hash
27
+ IsoBibliographicItem.new **item_hash
28
28
  end
29
29
 
30
30
  # @param ext [Nokogiri::XML::Element]
@@ -26,12 +26,12 @@ Gem::Specification.new do |spec|
26
26
  spec.require_paths = ["lib"]
27
27
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
28
28
 
29
- spec.add_development_dependency "debase"
29
+ # spec.add_development_dependency "debase"
30
30
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
31
31
  spec.add_development_dependency "pry-byebug"
32
32
  spec.add_development_dependency "rake", "~> 10.0"
33
33
  spec.add_development_dependency "rspec", "~> 3.0"
34
- spec.add_development_dependency "ruby-debug-ide"
34
+ # spec.add_development_dependency "ruby-debug-ide"
35
35
  spec.add_development_dependency "ruby-jing"
36
36
  spec.add_development_dependency "simplecov"
37
37
 
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iso-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.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: 2020-11-27 00:00:00.000000000 Z
11
+ date: 2021-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: debase
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: equivalent-xml
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +66,6 @@ dependencies:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
68
  version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: ruby-debug-ide
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
69
  - !ruby/object:Gem::Dependency
98
70
  name: ruby-jing
99
71
  requirement: !ruby/object:Gem::Requirement
@@ -157,9 +129,7 @@ executables: []
157
129
  extensions: []
158
130
  extra_rdoc_files: []
159
131
  files:
160
- - ".github/workflows/macos.yml"
161
- - ".github/workflows/ubuntu.yml"
162
- - ".github/workflows/windows.yml"
132
+ - ".github/workflows/rake.yml"
163
133
  - ".gitignore"
164
134
  - ".rspec"
165
135
  - ".rubocop.yml"
@@ -203,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
173
  - !ruby/object:Gem::Version
204
174
  version: '0'
205
175
  requirements: []
206
- rubygems_version: 3.0.6
176
+ rubygems_version: 3.2.3
207
177
  signing_key:
208
178
  specification_version: 4
209
179
  summary: 'RelatonIsoBib: Ruby ISOXMLDOC impementation.'
@@ -1,34 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: macos
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- branches: [ '**' ]
10
-
11
- jobs:
12
- test-macos:
13
- name: Test on Ruby ${{ matrix.ruby }} macOS
14
- runs-on: macos-latest
15
- strategy:
16
- fail-fast: false
17
- matrix:
18
- ruby: [ '2.6', '2.5', '2.4' ]
19
- steps:
20
- - uses: actions/checkout@master
21
- - name: Use Ruby
22
- uses: actions/setup-ruby@v1
23
- with:
24
- ruby-version: ${{ matrix.ruby }}
25
- architecture: 'x64'
26
- - name: Update gems
27
- run: |
28
- sudo gem install bundler --force
29
- ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
30
- ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
31
- bundle install --jobs 4 --retry 3
32
- - name: Run specs
33
- run: |
34
- bundle exec rake
@@ -1,33 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: ubuntu
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- branches: [ '**' ]
10
-
11
- jobs:
12
- test-linux:
13
- name: Test on Ruby ${{ matrix.ruby }} Ubuntu
14
- runs-on: ubuntu-latest
15
- strategy:
16
- fail-fast: false
17
- matrix:
18
- ruby: [ '2.6', '2.5', '2.4' ]
19
- steps:
20
- - uses: actions/checkout@master
21
- - name: Use Ruby
22
- uses: actions/setup-ruby@v1
23
- with:
24
- ruby-version: ${{ matrix.ruby }}
25
- architecture: 'x64'
26
- - name: Update gems
27
- run: |
28
- gem install bundler
29
- bundle install --jobs 4 --retry 3
30
- - name: Run specs
31
- run: |
32
- unset JAVA_TOOL_OPTIONS
33
- bundle exec rake
@@ -1,35 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: windows
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- branches: [ '**' ]
10
-
11
- jobs:
12
- test-windows:
13
- name: Test on Ruby ${{ matrix.ruby }} Windows
14
- runs-on: windows-latest
15
- strategy:
16
- fail-fast: false
17
- matrix:
18
- ruby: [ '2.6', '2.5', '2.4' ]
19
- steps:
20
- - uses: actions/checkout@master
21
- - name: Use Ruby
22
- uses: actions/setup-ruby@v1
23
- with:
24
- ruby-version: ${{ matrix.ruby }}
25
- architecture: 'x64'
26
- - name: Update gems
27
- shell: pwsh
28
- run: |
29
- gem install bundler
30
- bundle config --local path vendor/bundle
31
- bundle update
32
- bundle install --jobs 4 --retry 3
33
- - name: Run specs
34
- run: |
35
- bundle exec rake