relaton-iso-bib 0.9.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path("../lib", __FILE__)
3
+ lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require "relaton_iso_bib/version"
6
6
 
@@ -16,8 +16,9 @@ Gem::Specification.new do |spec|
16
16
  spec.license = "BSD-2-Clause"
17
17
 
18
18
  # Specify which files should be added to the gem when it is released.
19
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
20
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
+ # The `git ls-files -z` loads the files in the RubyGem that have been added
20
+ # into git.
21
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
21
22
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
23
  end
23
24
  spec.bindir = "exe"
@@ -35,5 +36,5 @@ Gem::Specification.new do |spec|
35
36
  spec.add_development_dependency "simplecov"
36
37
 
37
38
  spec.add_dependency "isoics", "~> 0.1.6"
38
- spec.add_dependency "relaton-bib", "~> 0.9.0"
39
+ spec.add_dependency "relaton-bib", "~> 1.2.0"
39
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iso-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 1.2.0
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-04-19 00:00:00.000000000 Z
11
+ date: 2020-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.9.0
145
+ version: 1.2.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.9.0
152
+ version: 1.2.0
153
153
  description: 'RelatonIsoBib: Ruby ISOXMLDOC impementation.'
154
154
  email:
155
155
  - open.source@ribose.com
@@ -181,7 +181,6 @@ files:
181
181
  - lib/relaton_iso_bib/iso_bibliographic_item.rb
182
182
  - lib/relaton_iso_bib/iso_document_relation.rb
183
183
  - lib/relaton_iso_bib/structured_identifier.rb
184
- - lib/relaton_iso_bib/typed_title_string.rb
185
184
  - lib/relaton_iso_bib/version.rb
186
185
  - lib/relaton_iso_bib/xml_parser.rb
187
186
  - relaton_iso_bib.gemspec
@@ -1,32 +0,0 @@
1
- module RelatonIsoBib
2
- class TypedTitleString < RelatonBib::TypedTitleString
3
- # TITLE_TYPES = %w[title-main title-intro title-part main].freeze
4
-
5
- # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
6
-
7
- # @param type [String]
8
- # @param title [RelatonBib::FormattedString, Hash]
9
- # @param content [String]
10
- # @param language [String]
11
- # @param script [String]
12
- def initialize(**args)
13
- # if args[:type] && !TITLE_TYPES.include?(args[:type])
14
- # raise ArgumentError, %{The type #{args[:type]} is invalid.}
15
- # end
16
-
17
- unless args[:title] || args[:content]
18
- raise ArgumentError, %{Keyword "title" or "content" should be passed.}
19
- end
20
-
21
- @type = args[:type]
22
-
23
- if args[:title]
24
- @title = args[:title]
25
- else
26
- fsargs = args.select { |k, _v| %i[content language script format].include? k }
27
- @title = RelatonBib::FormattedString.new(fsargs)
28
- end
29
- end
30
- # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
31
- end
32
- end