ieee-idams 0.2.13 → 0.3.0

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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +16 -7
  3. data/.rubocop_todo.yml +101 -16
  4. data/lib/ieee/idams/address.rb +1 -1
  5. data/lib/ieee/idams/affiliation.rb +1 -3
  6. data/lib/ieee/idams/affiliation_address.rb +1 -1
  7. data/lib/ieee/idams/affiliation_group.rb +2 -4
  8. data/lib/ieee/idams/article.rb +1 -3
  9. data/lib/ieee/idams/article_abstract.rb +1 -1
  10. data/lib/ieee/idams/article_copyright.rb +1 -1
  11. data/lib/ieee/idams/article_date.rb +1 -1
  12. data/lib/ieee/idams/article_filename.rb +1 -1
  13. data/lib/ieee/idams/article_info.rb +6 -13
  14. data/lib/ieee/idams/article_page_nums.rb +5 -3
  15. data/lib/ieee/idams/author.rb +1 -3
  16. data/lib/ieee/idams/author_group.rb +2 -4
  17. data/lib/ieee/idams/conf_group.rb +3 -2
  18. data/lib/ieee/idams/copyright.rb +1 -3
  19. data/lib/ieee/idams/copyright_group.rb +2 -4
  20. data/lib/ieee/idams/ics_code_term.rb +1 -1
  21. data/lib/ieee/idams/ics_codes.rb +3 -4
  22. data/lib/ieee/idams/isbn.rb +1 -1
  23. data/lib/ieee/idams/keyword.rb +1 -1
  24. data/lib/ieee/idams/keyword_set.rb +2 -4
  25. data/lib/ieee/idams/multimedia.rb +1 -4
  26. data/lib/ieee/idams/multimedia_component.rb +1 -1
  27. data/lib/ieee/idams/multimedia_compressed.rb +1 -1
  28. data/lib/ieee/idams/package_member_set.rb +3 -2
  29. data/lib/ieee/idams/product_number.rb +1 -1
  30. data/lib/ieee/idams/pub_model.rb +13 -5
  31. data/lib/ieee/idams/pub_sponsor.rb +2 -2
  32. data/lib/ieee/idams/pub_sponsoring_committee_set.rb +5 -3
  33. data/lib/ieee/idams/pub_topical_browse_set.rb +3 -3
  34. data/lib/ieee/idams/publication.rb +1 -5
  35. data/lib/ieee/idams/publication_acronym.rb +1 -1
  36. data/lib/ieee/idams/publication_info.rb +4 -20
  37. data/lib/ieee/idams/publisher.rb +1 -3
  38. data/lib/ieee/idams/standard_bundle.rb +3 -2
  39. data/lib/ieee/idams/standard_modifier_set.rb +1 -1
  40. data/lib/ieee/idams/standard_package_set.rb +3 -2
  41. data/lib/ieee/idams/standard_relationship.rb +5 -3
  42. data/lib/ieee/idams/version.rb +1 -1
  43. data/lib/ieee/idams/volume.rb +1 -4
  44. data/lib/ieee/idams/volume_info.rb +1 -4
  45. data/lib/ieee/idams/volume_info_issue.rb +1 -1
  46. data/lib/ieee/idams/volume_note_group.rb +2 -2
  47. data/lib/ieee/idams.rb +49 -8
  48. data/lib/ieee-idams.rb +0 -12
  49. metadata +10 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fc6c2e9191188cb4e6bfe11fc00f6dcc3bb374b6d29c675d556c58769a4c28d
4
- data.tar.gz: de779616b5afdceb5a772ac5f9be58a5db34877330aceb47ad38824c9a068e43
3
+ metadata.gz: 7913dd892a8ce1f43a5213254a025b4329a25a69a5024cf8190b60e5f627abbd
4
+ data.tar.gz: e3658aaf3f445731b3675f77b4e7e566a2c430ee8b63a2c56e9246101fe2a2c8
5
5
  SHA512:
6
- metadata.gz: f176888d5291ebcf3e0610a47fbf354a27bdf842aa7d99b4e3baa81f39184bac841c67ed1a950bff8c7becd221168f956c4c608d05f010e792830138690999dd
7
- data.tar.gz: 02e8c3de1ec61d2b6426d6e082e872cd4458b663639c93ca7cec1b5a58fcfdaec778a5f2bd1897b675b33fde1e987d4327ae9986cc9ca4cfcd586a620bb1c052
6
+ metadata.gz: 7d7ca7fa71b308ff6e7bb258ed23db67a7483db1282c337c104e246226d80615f527169bc6ac2dcc4b2636d0dd212d068cf5445f56ee535a97a0e5f475852372
7
+ data.tar.gz: 3eeb38fdd979c1fc98e29ce24a911dad0673a60732839f0d816a35eae2d84629de7e1366ac542e0de7014596fac9feb550e73c4bb2ff8773eca0d3c998fd4521
data/.rubocop.yml CHANGED
@@ -1,10 +1,19 @@
1
- inherit_from: .rubocop_todo.yml
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ inherit_from:
4
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
5
+ - .rubocop_todo.yml
2
6
 
3
- AllCops:
4
- TargetRubyVersion: 3.0
7
+ inherit_mode:
8
+ merge:
9
+ - Exclude
5
10
 
6
- Style/StringLiterals:
7
- EnforcedStyle: double_quotes
11
+ # local repo-specific modifications
12
+ # ...
13
+ plugins:
14
+ - rubocop-rspec
15
+ - rubocop-performance
16
+ - rubocop-rake
8
17
 
9
- Style/StringLiteralsInInterpolation:
10
- EnforcedStyle: double_quotes
18
+ AllCops:
19
+ TargetRubyVersion: 3.0
data/.rubocop_todo.yml CHANGED
@@ -1,36 +1,121 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2024-11-13 07:13:09 UTC using RuboCop version 1.68.0.
3
+ # on 2026-03-22 09:23:44 UTC using RuboCop version 1.85.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 5
10
+ # Configuration parameters: EnforcedStyle, AllowedGems.
11
+ # SupportedStyles: Gemfile, gems.rb, gemspec
12
+ Gemspec/DevelopmentDependencies:
13
+ Exclude:
14
+ - 'ieee-idams.gemspec'
15
+
9
16
  # Offense count: 1
10
- # Configuration parameters: Severity, Include.
11
- # Include: **/*.gemspec
12
17
  Gemspec/RequiredRubyVersion:
13
18
  Exclude:
14
19
  - 'ieee-idams.gemspec'
15
20
 
21
+ # Offense count: 1
22
+ # This cop supports safe autocorrection (--autocorrect).
23
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
24
+ # SupportedStyles: with_first_argument, with_fixed_indentation
25
+ Layout/ArgumentAlignment:
26
+ Exclude:
27
+ - 'lib/ieee/idams.rb'
28
+
29
+ # Offense count: 15
30
+ # This cop supports safe autocorrection (--autocorrect).
31
+ Layout/EmptyLines:
32
+ Exclude:
33
+ - 'lib/ieee/idams/affiliation.rb'
34
+ - 'lib/ieee/idams/affiliation_group.rb'
35
+ - 'lib/ieee/idams/article.rb'
36
+ - 'lib/ieee/idams/article_info.rb'
37
+ - 'lib/ieee/idams/author.rb'
38
+ - 'lib/ieee/idams/author_group.rb'
39
+ - 'lib/ieee/idams/copyright_group.rb'
40
+ - 'lib/ieee/idams/ics_codes.rb'
41
+ - 'lib/ieee/idams/keyword_set.rb'
42
+ - 'lib/ieee/idams/multimedia.rb'
43
+ - 'lib/ieee/idams/publication.rb'
44
+ - 'lib/ieee/idams/publication_info.rb'
45
+ - 'lib/ieee/idams/publisher.rb'
46
+ - 'lib/ieee/idams/volume.rb'
47
+ - 'lib/ieee/idams/volume_info.rb'
48
+
49
+ # Offense count: 16
50
+ # This cop supports safe autocorrection (--autocorrect).
51
+ # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
52
+ # URISchemes: http, https
53
+ Layout/LineLength:
54
+ Exclude:
55
+ - 'ieee-idams.gemspec'
56
+ - 'lib/ieee/idams.rb'
57
+ - 'lib/ieee/idams/multimedia.rb'
58
+ - 'lib/ieee/idams/multimedia_compressed.rb'
59
+ - 'lib/ieee/idams/pub_model.rb'
60
+ - 'lib/ieee/idams/pub_topical_browse_set.rb'
61
+ - 'lib/ieee/idams/publication_info.rb'
62
+ - 'lib/ieee/idams/standard_bundle.rb'
63
+ - 'spec/ieee/idams/pub_model_spec.rb'
64
+
65
+ # Offense count: 1
66
+ # This cop supports safe autocorrection (--autocorrect).
67
+ # Configuration parameters: EnforcedStyle.
68
+ # SupportedStyles: final_newline, final_blank_line
69
+ Layout/TrailingEmptyLines:
70
+ Exclude:
71
+ - 'lib/ieee/idams.rb'
72
+
73
+ # Offense count: 1
74
+ # This cop supports safe autocorrection (--autocorrect).
75
+ # Configuration parameters: AllowInHeredoc.
76
+ Layout/TrailingWhitespace:
77
+ Exclude:
78
+ - 'lib/ieee/idams.rb'
79
+
16
80
  # Offense count: 2
17
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
81
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
18
82
  # AllowedMethods: refine
19
83
  Metrics/BlockLength:
20
84
  Max: 32
21
85
 
22
86
  # Offense count: 1
23
- # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
24
- # CheckDefinitionPathHierarchyRoots: lib, spec, test, src
25
- # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
26
- Naming/FileName:
87
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
88
+ Metrics/PerceivedComplexity:
27
89
  Exclude:
28
- - 'Rakefile.rb'
29
- - 'lib/ieee-idams.rb'
90
+ - 'lib/ieee/idams/pub_model.rb'
30
91
 
31
- # Offense count: 2
32
- # This cop supports safe autocorrection (--autocorrect).
33
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
34
- # URISchemes: http, https
35
- Layout/LineLength:
36
- Max: 252
92
+ # Offense count: 4
93
+ # Configuration parameters: Prefixes, AllowedPatterns.
94
+ # Prefixes: when, with, without
95
+ RSpec/ContextWording:
96
+ Exclude:
97
+ - 'spec/ieee/idams/pub_model_spec.rb'
98
+
99
+ # Offense count: 1
100
+ # Configuration parameters: CountAsOne.
101
+ RSpec/ExampleLength:
102
+ Max: 10
103
+
104
+ # Offense count: 1
105
+ RSpec/LeakyLocalVariable:
106
+ Exclude:
107
+ - 'spec/ieee/idams/publication_spec.rb'
108
+
109
+ # Offense count: 13
110
+ # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
111
+ # SupportedStyles: always, named_only
112
+ RSpec/NamedSubject:
113
+ Exclude:
114
+ - 'spec/ieee/idams/pub_model_spec.rb'
115
+
116
+ # Offense count: 1
117
+ # Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
118
+ # SupportedInflectors: default, active_support
119
+ RSpec/SpecFilePathFormat:
120
+ Exclude:
121
+ - 'spec/ieee_idams_spec.rb'
@@ -21,7 +21,7 @@ module Ieee
21
21
  attribute :postcode, :string
22
22
 
23
23
  xml do
24
- root "address"
24
+ element "address"
25
25
  map_element "street", to: :street # , cdata: true
26
26
  map_element "city", to: :city # , cdata: true
27
27
  map_element "country", to: :country # , cdata: true
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "affiliation_address"
4
-
5
3
  module Ieee
6
4
  module Idams
7
5
  # Represents an institutional affiliation
@@ -23,7 +21,7 @@ module Ieee
23
21
  attribute :address, AffiliationAddress
24
22
 
25
23
  xml do
26
- root "affn"
24
+ element "affn"
27
25
  map_element "amsid", to: :amsid
28
26
  map_element "orgname", to: :orgname, cdata: true
29
27
  map_element "orgdiv", to: :orgdiv
@@ -25,7 +25,7 @@ module Ieee
25
25
  attribute :postcode, :string
26
26
 
27
27
  xml do
28
- root "address"
28
+ element "address"
29
29
  map_element "street", to: :street, cdata: true
30
30
  map_element "city", to: :city, cdata: true
31
31
  map_element "state", to: :state, cdata: true
@@ -1,17 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "affiliation"
4
-
5
3
  module Ieee
6
4
  module Idams
7
5
  # Represents a group of institutional affiliations
8
6
  class AffiliationGroup < Lutaml::Model::Serializable
9
7
  # List of affiliations
10
8
  # @return [Array<Affiliation>] institutional affiliations
11
- attribute :affn, Affiliation, collection: true
9
+ attribute :affn, Affiliation, collection: true, initialize_empty: true
12
10
 
13
11
  xml do
14
- root "affgrp"
12
+ element "affgrp"
15
13
  map_element "affn", to: :affn
16
14
  end
17
15
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "article_info"
4
-
5
3
  module Ieee
6
4
  module Idams
7
5
  # Represents an article within a volume
@@ -15,7 +13,7 @@ module Ieee
15
13
  attribute :articleinfo, ArticleInfo
16
14
 
17
15
  xml do
18
- root "article"
16
+ element "article"
19
17
  map_element "title", to: :title, cdata: true
20
18
  map_element "articleinfo", to: :articleinfo
21
19
  end
@@ -13,7 +13,7 @@ module Ieee
13
13
  attribute :value, :string
14
14
 
15
15
  xml do
16
- root "abstract"
16
+ element "abstract"
17
17
  map_attribute "abstracttype", to: :abstract_type
18
18
  map_content to: :value, cdata: true
19
19
  end
@@ -10,7 +10,7 @@ module Ieee
10
10
  attribute :year, :integer
11
11
 
12
12
  xml do
13
- root "articlecopyright"
13
+ element "articlecopyright"
14
14
 
15
15
  map_attribute "holderisieee", to: :holder_is_ieee
16
16
  map_attribute "year", to: :year
@@ -21,7 +21,7 @@ module Ieee
21
21
  attribute :day, :string
22
22
 
23
23
  xml do
24
- root "date"
24
+ element "date"
25
25
 
26
26
  map_attribute "datetype", to: :datetype
27
27
  map_element "year", to: :year
@@ -11,7 +11,7 @@ module Ieee
11
11
  attribute :filename, :string
12
12
 
13
13
  xml do
14
- root "filename"
14
+ element "filename"
15
15
 
16
16
  map_attribute "docpartition", to: :docpartition
17
17
  map_attribute "filetype", to: :filetype
@@ -1,14 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "keyword_set"
4
- require_relative "multimedia"
5
- require_relative "author_group"
6
- require_relative "article_copyright"
7
- require_relative "article_date"
8
- require_relative "article_filename"
9
- require_relative "article_page_nums"
10
- require_relative "article_abstract"
11
-
12
3
  module Ieee
13
4
  module Idams
14
5
  # Contains detailed metadata about an article
@@ -71,7 +62,8 @@ module Ieee
71
62
 
72
63
  # Abstract
73
64
  # @return [String] article abstract
74
- attribute :abstract, ArticleAbstract, collection: true
65
+ attribute :abstract, ArticleAbstract, collection: true,
66
+ initialize_empty: true
75
67
 
76
68
  # Author information
77
69
  # @return [AuthorGroup] article authors
@@ -87,7 +79,7 @@ module Ieee
87
79
 
88
80
  # Dates
89
81
  # @return [String] publication dates
90
- attribute :date, ArticleDate, collection: true
82
+ attribute :date, ArticleDate, collection: true, initialize_empty: true
91
83
 
92
84
  # Article publication date
93
85
  # @return [String] publication date
@@ -119,10 +111,11 @@ module Ieee
119
111
 
120
112
  # Keywords
121
113
  # @return [Array<KeywordSet>] article keywords
122
- attribute :keywordset, KeywordSet, collection: true
114
+ attribute :keywordset, KeywordSet, collection: true,
115
+ initialize_empty: true
123
116
 
124
117
  xml do
125
- root "articleinfo"
118
+ element "articleinfo"
126
119
  map_element "articleseqnum", to: :articleseqnum
127
120
  map_element "articledoi", to: :articledoi
128
121
  map_element "idamsid", to: :idamsid
@@ -11,10 +11,12 @@ module Ieee
11
11
  attribute :formatted, :string
12
12
 
13
13
  xml do
14
- root "artpagenums"
14
+ element "artpagenums"
15
15
 
16
- map_attribute "endpage", to: :endpage, value_map: { to: { empty: :empty } }
17
- map_attribute "startpage", to: :startpage, value_map: { to: { empty: :empty } }
16
+ map_attribute "endpage", to: :endpage,
17
+ value_map: { to: { empty: :empty } }
18
+ map_attribute "startpage", to: :startpage,
19
+ value_map: { to: { empty: :empty } }
18
20
  map_content to: :formatted
19
21
  end
20
22
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "affiliation_group"
4
-
5
3
  module Ieee
6
4
  module Idams
7
5
  # Represents an individual author
@@ -47,7 +45,7 @@ module Ieee
47
45
  attribute :authortype, :string, values: %w[author editor]
48
46
 
49
47
  xml do
50
- root "author"
48
+ element "author"
51
49
  map_element "amsid", to: :amsid
52
50
  map_element "authororder", to: :authororder
53
51
  map_element "normname", to: :normname, cdata: true
@@ -1,17 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "author"
4
-
5
3
  module Ieee
6
4
  module Idams
7
5
  # Represents a group of authors
8
6
  class AuthorGroup < Lutaml::Model::Serializable
9
7
  # List of authors
10
8
  # @return [Array<Author>] authors of the work
11
- attribute :author, Author, collection: true
9
+ attribute :author, Author, collection: true, initialize_empty: true
12
10
 
13
11
  xml do
14
- root "authorgroup"
12
+ element "authorgroup"
15
13
  map_element "author", to: :author
16
14
  end
17
15
  end
@@ -8,10 +8,11 @@ module Ieee
8
8
  # <doi_permission>F</doi_permission>
9
9
  # </confgroup>
10
10
 
11
- attribute :doi_permission, :string, collection: true
11
+ attribute :doi_permission, :string, collection: true,
12
+ initialize_empty: true
12
13
 
13
14
  xml do
14
- root "confgroup"
15
+ element "confgroup"
15
16
  map_element "doi_permission", to: :doi_permission
16
17
  end
17
18
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "copyright"
4
-
5
3
  module Ieee
6
4
  module Idams
7
5
  # Represents a copyright entry
@@ -15,7 +13,7 @@ module Ieee
15
13
  attribute :holder, :string
16
14
 
17
15
  xml do
18
- root "copyright"
16
+ element "copyright"
19
17
  map_element "year", to: :year
20
18
  map_element "holder", to: :holder
21
19
  end
@@ -1,17 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "copyright"
4
-
5
3
  module Ieee
6
4
  module Idams
7
5
  # Represents a group of copyright information
8
6
  class CopyrightGroup < Lutaml::Model::Serializable
9
7
  # Copyright entries
10
8
  # @return [Array<Copyright>] copyright information
11
- attribute :copyright, Copyright, collection: true
9
+ attribute :copyright, Copyright, collection: true, initialize_empty: true
12
10
 
13
11
  xml do
14
- root "copyrightgroup"
12
+ element "copyrightgroup"
15
13
  map_element "copyright", to: :copyright
16
14
  end
17
15
  end
@@ -8,7 +8,7 @@ module Ieee
8
8
  attribute :name, :string
9
9
 
10
10
  xml do
11
- root "code_term"
11
+ element "code_term"
12
12
  map_attribute "codenum", to: :codenum
13
13
  map_content to: :name
14
14
  end
@@ -1,15 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "ics_code_term"
4
-
5
3
  module Ieee
6
4
  module Idams
7
5
  # ICS Codes
8
6
  class IcsCodes < Lutaml::Model::Serializable
9
- attribute :code_term, IcsCodeTerm, collection: true
7
+ attribute :code_term, IcsCodeTerm, collection: true,
8
+ initialize_empty: true
10
9
 
11
10
  xml do
12
- root "icscodes"
11
+ element "icscodes"
13
12
  map_element "code_term", to: :code_term
14
13
  end
15
14
  end
@@ -21,7 +21,7 @@ module Ieee
21
21
  attribute :mediatype, :string, values: %w[Paper CD Online Electronic]
22
22
 
23
23
  xml do
24
- root "isbn"
24
+ element "isbn"
25
25
  map_content to: :content
26
26
  map_attribute "isbnfiletype", to: :isbnfiletype
27
27
  map_attribute "isbntype", to: :isbntype
@@ -10,7 +10,7 @@ module Ieee
10
10
  attribute :keywordmodifier, :string
11
11
 
12
12
  xml do
13
- root "keyword"
13
+ element "keyword"
14
14
  map_element "keywordterm", to: :keywordterm, cdata: true
15
15
  map_element "keywordmodifier", to: :keywordmodifier
16
16
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "keyword"
4
-
5
3
  module Ieee
6
4
  module Idams
7
5
  # Represents a set of keywords
@@ -12,10 +10,10 @@ module Ieee
12
10
 
13
11
  # List of keywords
14
12
  # @return [Array<Keyword>] keywords
15
- attribute :keyword, Keyword, collection: true
13
+ attribute :keyword, Keyword, collection: true, initialize_empty: true
16
14
 
17
15
  xml do
18
- root "keywordset"
16
+ element "keywordset"
19
17
  map_attribute "keywordtype", to: :keywordtype
20
18
  map_element "keyword", to: :keyword
21
19
  end
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "multimedia_compressed"
4
- require_relative "multimedia_component"
5
-
6
3
  module Ieee
7
4
  module Idams
8
5
  # Multimedia
@@ -32,7 +29,7 @@ module Ieee
32
29
  attribute :component, MultimediaComponent
33
30
 
34
31
  xml do
35
- root "multimedia"
32
+ element "multimedia"
36
33
 
37
34
  map_element "summary", to: :summary
38
35
  map_element "compressed", to: :compressed
@@ -19,7 +19,7 @@ module Ieee
19
19
  attribute :doi, :string
20
20
 
21
21
  xml do
22
- root "component"
22
+ element "component"
23
23
 
24
24
  map_element "componentfilename", to: :filename, render_nil: true
25
25
  map_element "componentfilesize", to: :filesize, render_nil: true
@@ -19,7 +19,7 @@ module Ieee
19
19
  attribute :readme_file, :string
20
20
 
21
21
  xml do
22
- root "compressed"
22
+ element "compressed"
23
23
 
24
24
  map_element "compressedfilename", to: :filename
25
25
  map_element "compressedfilesize", to: :filesize
@@ -4,10 +4,11 @@ module Ieee
4
4
  module Idams
5
5
  # Represents a set of package members
6
6
  class PackageMemberSet < Lutaml::Model::Serializable
7
- attribute :package_member, :string, collection: true
7
+ attribute :package_member, :string, collection: true,
8
+ initialize_empty: true
8
9
 
9
10
  xml do
10
- root "packagememberset"
11
+ element "packagememberset"
11
12
  map_element "packagemember", to: :package_member
12
13
  end
13
14
  end
@@ -10,7 +10,7 @@ module Ieee
10
10
  attribute :value, :string
11
11
 
12
12
  xml do
13
- root "productnumber"
13
+ element "productnumber"
14
14
  map_attribute "pubtype", to: :pubtype
15
15
  map_content to: :value
16
16
  end
@@ -4,14 +4,19 @@ module Ieee
4
4
  module Idams
5
5
  # Represents an IEEE IDAMS publication record
6
6
  class PubModel
7
- DATETYPES = { "OriginalPub" => "created", "ePub" => "published", "LastInspecUpd" => "updated" }.freeze
7
+ DATETYPES = { "OriginalPub" => "created", "ePub" => "published",
8
+ "LastInspecUpd" => "updated" }.freeze
8
9
 
9
- attr_accessor :title, :normtitle, :standardsfamilytitle, :publicationinfo, :volume
10
+ attr_accessor :title, :normtitle, :standardsfamilytitle,
11
+ :publicationinfo, :volume
10
12
 
11
13
  def btitle
12
14
  t = []
13
15
  content = CGI.unescapeHTML volume.article.title
14
- t << { content: Regexp.last_match(1), type: "title-main" } if content =~ /\A(.+)\s[-\u2014]\sredline\z/i
16
+ if content =~ /\A(.+)\s[-\u2014]\sredline\z/i
17
+ t << { content: Regexp.last_match(1),
18
+ type: "title-main" }
19
+ end
15
20
  t << { content: content, type: "main" }
16
21
  end
17
22
 
@@ -51,7 +56,9 @@ module Ieee
51
56
  # @return [Array<String, Array>] publisher name and address
52
57
  #
53
58
  def contrib_name_addr
54
- addr = contrib_addres(publicationinfo.publisher.address).map { |a| block_given? ? yield(a) : a }
59
+ addr = contrib_addres(publicationinfo.publisher.address).map do |a|
60
+ block_given? ? yield(a) : a
61
+ end
55
62
  [publicationinfo.publisher.publishername, addr]
56
63
  end
57
64
 
@@ -67,7 +74,8 @@ module Ieee
67
74
  end
68
75
 
69
76
  def docstatus
70
- return unless %w[Draft Approved Superseded Withdrawn].include?(standard_modifier)
77
+ return unless %w[Draft Approved Superseded
78
+ Withdrawn].include?(standard_modifier)
71
79
 
72
80
  args = { stage: standard_modifier.downcase }
73
81
  block_given? ? yield(args) : args
@@ -6,10 +6,10 @@ module Ieee
6
6
  class PubSponsor < Lutaml::Model::Serializable
7
7
  # IEEE Society that sponsors the publication
8
8
  # @return [String] Society name that sponsors the publication
9
- attribute :society, :string, collection: true
9
+ attribute :society, :string, collection: true, initialize_empty: true
10
10
 
11
11
  xml do
12
- root "pubsponsor"
12
+ element "pubsponsor"
13
13
  map_element "society", to: :society
14
14
  end
15
15
  end
@@ -6,11 +6,13 @@ module Ieee
6
6
  class PubSponsoringCommitteeSet < Lutaml::Model::Serializable
7
7
  # List of committees
8
8
  # @return [Array<String>] sponsoring committees
9
- attribute :pubsponsoringcommittee, :string, collection: true
9
+ attribute :pubsponsoringcommittee, :string, collection: true,
10
+ initialize_empty: true
10
11
 
11
12
  xml do
12
- root "pubsponsoringcommitteeset"
13
- map_element "pubsponsoringcommittee", to: :pubsponsoringcommittee, cdata: true
13
+ element "pubsponsoringcommitteeset"
14
+ map_element "pubsponsoringcommittee", to: :pubsponsoringcommittee,
15
+ cdata: true
14
16
  end
15
17
  end
16
18
  end
@@ -21,16 +21,16 @@ module Ieee
21
21
  "Power, Industry and Industry Applications",
22
22
  "Robotics and Control Systems",
23
23
  "Signal Processing and Analysis",
24
- "Transportation"
24
+ "Transportation",
25
25
  ].freeze
26
26
 
27
27
  # List of topical categories
28
28
  # @return [Array<String>] subject classifications
29
29
  attribute :pubtopicalbrowse, :string, collection: true,
30
- values: VALID_CATEGORIES
30
+ values: VALID_CATEGORIES, initialize_empty: true
31
31
 
32
32
  xml do
33
- root "pubtopicalbrowseset"
33
+ element "pubtopicalbrowseset"
34
34
  map_element "pubtopicalbrowse", to: :pubtopicalbrowse
35
35
  end
36
36
 
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "publication_info"
4
- require_relative "volume"
5
- require_relative "pub_model"
6
-
7
3
  module Ieee
8
4
  module Idams
9
5
  # Represents an IEEE IDAMS publication record
@@ -31,7 +27,7 @@ module Ieee
31
27
  attribute :volume, Volume
32
28
 
33
29
  xml do
34
- root "publication"
30
+ element "publication"
35
31
  map_element "title", to: :title, cdata: true
36
32
  map_element "normtitle", to: :normtitle, cdata: true
37
33
  map_element "standardsfamilytitle", to: :standardsfamilytitle
@@ -13,7 +13,7 @@ module Ieee
13
13
  attribute :value, :string
14
14
 
15
15
  xml do
16
- root "acronym"
16
+ element "acronym"
17
17
  map_attribute "acronymtype", to: :type
18
18
  map_content to: :value
19
19
  end
@@ -1,22 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "publication_acronym"
4
- require_relative "isbn"
5
- require_relative "copyright_group"
6
- require_relative "publisher"
7
- require_relative "address"
8
- require_relative "pub_sponsoring_committee_set"
9
- require_relative "pub_topical_browse_set"
10
- require_relative "pub_sponsor"
11
- require_relative "standard_modifier_set"
12
- require_relative "standard_relationship"
13
- require_relative "standard_bundle"
14
- require_relative "package_member_set"
15
- require_relative "standard_package_set"
16
- require_relative "ics_codes"
17
- require_relative "product_number"
18
- require_relative "conf_group"
19
-
20
3
  module Ieee
21
4
  module Idams
22
5
  # Contains detailed metadata about an IEEE publication
@@ -75,7 +58,8 @@ module Ieee
75
58
 
76
59
  # Standard relationship
77
60
  # @return [String] standard relationship
78
- attribute :standard_relationship, StandardRelationship, collection: true
61
+ attribute :standard_relationship, StandardRelationship, collection: true,
62
+ initialize_empty: true
79
63
 
80
64
  # Standard modifier set
81
65
  # @return [StandardModifierSet] standard modifier details
@@ -91,7 +75,7 @@ module Ieee
91
75
 
92
76
  # ISBN information
93
77
  # @return [Isbn] ISBN details
94
- attribute :isbn, Isbn, collection: true
78
+ attribute :isbn, Isbn, collection: true, initialize_empty: true
95
79
 
96
80
  # ISBN information
97
81
  # @return [PubSponsor] sponsor details
@@ -146,7 +130,7 @@ module Ieee
146
130
  attribute :amsid, :string
147
131
 
148
132
  xml do
149
- root "publicationinfo"
133
+ element "publicationinfo"
150
134
  map_element "idamsid", to: :idamsid
151
135
  map_element "invpartnumber", to: :invpartnumber
152
136
  map_element "stdnumber", to: :stdnumber
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "address"
4
-
5
3
  module Ieee
6
4
  module Idams
7
5
  # Represents a publisher
@@ -19,7 +17,7 @@ module Ieee
19
17
  attribute :address, Address
20
18
 
21
19
  xml do
22
- root "publisher"
20
+ element "publisher"
23
21
  map_element "publishername", to: :publishername
24
22
  map_element "publisherloc", to: :publisherloc
25
23
  map_element "address", to: :address
@@ -32,10 +32,11 @@ module Ieee
32
32
  attribute :bundle_product_number, :string
33
33
 
34
34
  xml do
35
- root "standard_bundle"
35
+ element "standard_bundle"
36
36
  map_element "bundle_name", to: :bundle_name
37
37
  map_element "bundle_type", to: :bundle_type
38
- map_element "base_standard_product_number", to: :base_standard_product_number
38
+ map_element "base_standard_product_number",
39
+ to: :base_standard_product_number
39
40
  map_element "bundle_product_number", to: :bundle_product_number
40
41
  end
41
42
  end
@@ -7,7 +7,7 @@ module Ieee
7
7
  attribute :standard_modifier, :string
8
8
 
9
9
  xml do
10
- root "standardmodifierset"
10
+ element "standardmodifierset"
11
11
  map_element "standard_modifier", to: :standard_modifier
12
12
  end
13
13
  end
@@ -4,10 +4,11 @@ module Ieee
4
4
  module Idams
5
5
  # Represents a set of standard packages
6
6
  class StandardPackageSet < Lutaml::Model::Serializable
7
- attribute :standard_package, :string, collection: true
7
+ attribute :standard_package, :string, collection: true,
8
+ initialize_empty: true
8
9
 
9
10
  xml do
10
- root "standardpackageset"
11
+ element "standardpackageset"
11
12
  map_element "standard_package", to: :standard_package
12
13
  end
13
14
  end
@@ -25,9 +25,11 @@ module Ieee
25
25
  attribute :date_string, :string
26
26
 
27
27
  xml do
28
- root "standard_relationship"
29
- map_attribute "prodnum", to: :prodnum, value_map: { to: { empty: :empty } }
30
- map_attribute "relationship_date", to: :relationship_date, value_map: { to: { empty: :empty } }
28
+ element "standard_relationship"
29
+ map_attribute "prodnum", to: :prodnum,
30
+ value_map: { to: { empty: :empty } }
31
+ map_attribute "relationship_date", to: :relationship_date,
32
+ value_map: { to: { empty: :empty } }
31
33
  map_attribute "type", to: :type, value_map: { to: { empty: :empty } }
32
34
  map_content to: :date_string
33
35
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ieee
4
4
  module Idams
5
- VERSION = "0.2.13"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "volume_info"
4
- require_relative "article"
5
-
6
3
  module Ieee
7
4
  module Idams
8
5
  # Represents a volume containing articles
@@ -16,7 +13,7 @@ module Ieee
16
13
  attribute :article, Article
17
14
 
18
15
  xml do
19
- root "volume"
16
+ element "volume"
20
17
  map_element "volumeinfo", to: :volumeinfo
21
18
  map_element "article", to: :article
22
19
  end
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "volume_info_issue"
4
- require_relative "volume_note_group"
5
-
6
3
  module Ieee
7
4
  module Idams
8
5
  # Contains volume metadata
@@ -24,7 +21,7 @@ module Ieee
24
21
  attribute :issue, VolumeInfoIssue
25
22
 
26
23
  xml do
27
- root "volumeinfo"
24
+ element "volumeinfo"
28
25
  map_element "year", to: :year
29
26
  map_element "idamsid", to: :idamsid
30
27
  map_element "notegroup", to: :note_group
@@ -13,7 +13,7 @@ module Ieee
13
13
  attribute :issuestatus, :string
14
14
 
15
15
  xml do
16
- root "issue"
16
+ element "issue"
17
17
  map_element "amsid", to: :amsid
18
18
  map_element "issuestatus", to: :issuestatus
19
19
  end
@@ -6,10 +6,10 @@ module Ieee
6
6
  class VolumeNoteGroup < Lutaml::Model::Serializable
7
7
  # Textual note
8
8
  # @return [String] A textual note
9
- attribute :note, :string, collection: true
9
+ attribute :note, :string, collection: true, initialize_empty: true
10
10
 
11
11
  xml do
12
- root "notegroup"
12
+ element "notegroup"
13
13
  map_element "note", to: :note
14
14
  end
15
15
  end
data/lib/ieee/idams.rb CHANGED
@@ -1,10 +1,51 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "idams/version"
4
- require_relative "idams/publication_info"
5
- require_relative "idams/publication"
6
- require_relative "idams/isbn"
7
- require_relative "idams/pub_sponsoring_committee_set"
8
- require_relative "idams/pub_topical_browse_set"
9
- require_relative "idams/author_group"
10
- require_relative "idams/copyright_group"
3
+ module Ieee
4
+ module Idams
5
+ class Error < StandardError; end
6
+
7
+ autoload :Address, "ieee/idams/address.rb"
8
+ autoload :Affiliation, "ieee/idams/affiliation.rb"
9
+ autoload :AffiliationAddress, "ieee/idams/affiliation_address.rb"
10
+ autoload :AffiliationGroup, "ieee/idams/affiliation_group.rb"
11
+ autoload :Article, "ieee/idams/article.rb"
12
+ autoload :ArticleAbstract, "ieee/idams/article_abstract.rb"
13
+ autoload :ArticleCopyright, "ieee/idams/article_copyright.rb"
14
+ autoload :ArticleDate, "ieee/idams/article_date.rb"
15
+ autoload :ArticleFilename, "ieee/idams/article_filename.rb"
16
+ autoload :ArticleInfo, "ieee/idams/article_info.rb"
17
+ autoload :ArticlePageNums, "ieee/idams/article_page_nums.rb"
18
+ autoload :Author, "ieee/idams/author.rb"
19
+ autoload :AuthorGroup, "ieee/idams/author_group.rb"
20
+ autoload :ConfGroup, "ieee/idams/conf_group.rb"
21
+ autoload :Copyright, "ieee/idams/copyright.rb"
22
+ autoload :CopyrightGroup, "ieee/idams/copyright_group.rb"
23
+ autoload :IcsCodeTerm, "ieee/idams/ics_code_term.rb"
24
+ autoload :IcsCodes, "ieee/idams/ics_codes.rb"
25
+ autoload :Isbn, "ieee/idams/isbn.rb"
26
+ autoload :Keyword, "ieee/idams/keyword.rb"
27
+ autoload :KeywordSet, "ieee/idams/keyword_set.rb"
28
+ autoload :Multimedia, "ieee/idams/multimedia.rb"
29
+ autoload :MultimediaComponent, "ieee/idams/multimedia_component.rb"
30
+ autoload :MultimediaCompressed, "ieee/idams/multimedia_compressed.rb"
31
+ autoload :PackageMemberSet, "ieee/idams/package_member_set.rb"
32
+ autoload :ProductNumber, "ieee/idams/product_number.rb"
33
+ autoload :PubModel, "ieee/idams/pub_model.rb"
34
+ autoload :PubSponsor, "ieee/idams/pub_sponsor.rb"
35
+ autoload :PubSponsoringCommitteeSet,
36
+ "ieee/idams/pub_sponsoring_committee_set.rb"
37
+ autoload :PubTopicalBrowseSet, "ieee/idams/pub_topical_browse_set.rb"
38
+ autoload :Publication, "ieee/idams/publication.rb"
39
+ autoload :PublicationAcronym, "ieee/idams/publication_acronym.rb"
40
+ autoload :PublicationInfo, "ieee/idams/publication_info.rb"
41
+ autoload :Publisher, "ieee/idams/publisher.rb"
42
+ autoload :StandardBundle, "ieee/idams/standard_bundle.rb"
43
+ autoload :StandardModifierSet, "ieee/idams/standard_modifier_set.rb"
44
+ autoload :StandardPackageSet, "ieee/idams/standard_package_set.rb"
45
+ autoload :StandardRelationship, "ieee/idams/standard_relationship.rb"
46
+ autoload :Volume, "ieee/idams/volume.rb"
47
+ autoload :VolumeInfo, "ieee/idams/volume_info.rb"
48
+ autoload :VolumeInfoIssue, "ieee/idams/volume_info_issue.rb"
49
+ autoload :VolumeNoteGroup, "ieee/idams/volume_note_group.rb"
50
+ end
51
+ end
data/lib/ieee-idams.rb CHANGED
@@ -1,16 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
-
5
- Lutaml::Model::Config.configure do |config|
6
- require "lutaml/model/xml_adapter/nokogiri_adapter"
7
- config.xml_adapter = Lutaml::Model::XmlAdapter::NokogiriAdapter
8
- end
9
-
10
- module Ieee
11
- module Idams
12
- class Error < StandardError; end
13
- end
14
- end
15
-
16
4
  require_relative "ieee/idams"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ieee-idams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.3.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: 2025-03-19 00:00:00.000000000 Z
11
+ date: 2026-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: 0.8.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.7'
26
+ version: 0.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rake
56
+ name: canon
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rspec
70
+ name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rubocop
84
+ name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rubocop-performance
98
+ name: rubocop
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: xml-c14n
112
+ name: rubocop-performance
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -188,6 +188,7 @@ metadata:
188
188
  homepage_uri: https://github.com/relaton/ieee-idams
189
189
  source_code_uri: https://github.com/relaton/ieee-idams
190
190
  changelog_uri: https://github.com/relaton/ieee-idams
191
+ rubygems_mfa_required: 'true'
191
192
  post_install_message:
192
193
  rdoc_options: []
193
194
  require_paths: