loc_mods 0.2.5 → 0.2.7

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: a2a4762188e137e5ea3515cbff8dcbfa6e2749c7eb1ca4921d230e20c2c066db
4
- data.tar.gz: a510dd995107ef4b33dabcc0c8e9658948e3c4d7474d50fd2cbd8d2eaf1b7e31
3
+ metadata.gz: 024d52ee3ab202df40aacd38b5e6a9cf91a199a64fe7021d38c09dd1054e7321
4
+ data.tar.gz: 29d07b4f6b1f1fb00491610033047039079e814316136286e880662bab2c94e0
5
5
  SHA512:
6
- metadata.gz: 410d05bac6bde6ad26693359a2331c7b93ba4abcdabed33ad51f3f25dd9c08491be258ff0c9c2f4752f9b323cfd9b60102193af4535d30e92b7297679892439a
7
- data.tar.gz: a70f2deb4dff1d8fd8f119e2d78b40330444caffa5f3d47fc6939ba51241a47fcbaf47eda8a64f35b002d7c7660c7f9c97debceda0c9019e2d8c7a13870785e2
6
+ metadata.gz: 17fe60875e1e45382111972d8ace84fee39b86ff0326c4f08617de5dbcd66ffd12f65c674ebf513062df891019bac012248a0d41e9dac8804f3d25ca1e0c80fb
7
+ data.tar.gz: ceb304d8b6124c4982c1492b2c4b7d1af4d862379ae5b5f3c240b68701f6aee086c46713215884aa9953f50ebe87be7c287ea9aa3eb3466d2e8d9a299a82ca60
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2024-08-15 09:25:52 UTC using RuboCop version 1.65.1.
3
+ # on 2025-01-14 08:30:09 UTC using RuboCop version 1.70.0.
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
@@ -13,43 +13,38 @@ Gemspec/RequiredRubyVersion:
13
13
  Exclude:
14
14
  - 'loc_mods.gemspec'
15
15
 
16
- # Offense count: 4
16
+ # Offense count: 1
17
17
  # Configuration parameters: AllowedMethods.
18
18
  # AllowedMethods: enums
19
19
  Lint/ConstantDefinitionInBlock:
20
20
  Exclude:
21
21
  - 'spec/loc_mods/collection_spec.rb'
22
22
 
23
- # Offense count: 8
23
+ # Offense count: 1
24
24
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
25
25
  Metrics/AbcSize:
26
26
  Max: 50
27
27
 
28
- # Offense count: 2
28
+ # Offense count: 1
29
29
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
30
30
  # AllowedMethods: refine
31
31
  Metrics/BlockLength:
32
- Max: 66
32
+ Max: 32
33
33
 
34
- # Offense count: 1
35
- # Configuration parameters: CountComments, CountAsOne.
36
- Metrics/ClassLength:
37
- Max: 253
38
-
39
- # Offense count: 6
34
+ # Offense count: 2
40
35
  # Configuration parameters: AllowedMethods, AllowedPatterns.
41
36
  Metrics/CyclomaticComplexity:
42
37
  Max: 15
43
38
 
44
- # Offense count: 10
39
+ # Offense count: 3
45
40
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
46
41
  Metrics/MethodLength:
47
42
  Max: 43
48
43
 
49
- # Offense count: 5
44
+ # Offense count: 2
50
45
  # Configuration parameters: AllowedMethods, AllowedPatterns.
51
46
  Metrics/PerceivedComplexity:
52
- Max: 17
47
+ Max: 16
53
48
 
54
49
  # Offense count: 1
55
50
  # Configuration parameters: ForbiddenDelimiters.
@@ -63,21 +58,30 @@ Security/Open:
63
58
  Exclude:
64
59
  - 'bin/update-nist-mods'
65
60
 
66
- # Offense count: 65
61
+ # Offense count: 63
67
62
  # Configuration parameters: AllowedConstants.
68
63
  Style/Documentation:
69
64
  Enabled: false
70
65
 
71
66
  # Offense count: 1
72
- # Configuration parameters: AllowedMethods.
73
- # AllowedMethods: respond_to_missing?
74
- Style/OptionalBooleanParameter:
67
+ # This cop supports safe autocorrection (--autocorrect).
68
+ # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
69
+ Style/NumericLiterals:
70
+ MinDigits: 6
71
+
72
+ # Offense count: 2
73
+ # This cop supports safe autocorrection (--autocorrect).
74
+ # Configuration parameters: EnforcedStyleForMultiline.
75
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
76
+ Style/TrailingCommaInArguments:
75
77
  Exclude:
76
- - 'lib/loc_mods/comparable_mapper.rb'
78
+ - 'lib/loc_mods/cli.rb'
79
+ - 'spec/loc_mods/collection_spec.rb'
77
80
 
78
81
  # Offense count: 1
79
82
  # This cop supports safe autocorrection (--autocorrect).
80
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
81
- # URISchemes: http, https
82
- Layout/LineLength:
83
- Max: 126
83
+ # Configuration parameters: EnforcedStyleForMultiline.
84
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
85
+ Style/TrailingCommaInArrayLiteral:
86
+ Exclude:
87
+ - 'spec/loc_mods/collection_spec.rb'
@@ -5,6 +5,7 @@ require "lutaml/model"
5
5
  module LocMods
6
6
  class Classification < Lutaml::Model::Serializable
7
7
  attribute :content, :string
8
+ attribute :authority, :string
8
9
  attribute :edition, :string
9
10
  attribute :display_label, :string
10
11
  attribute :alt_rep_group, :string
@@ -16,6 +17,7 @@ module LocMods
16
17
  namespace "http://www.loc.gov/mods/v3", nil
17
18
 
18
19
  map_content to: :content
20
+ map_attribute "authority", to: :authority
19
21
  map_attribute "edition", to: :edition
20
22
  map_attribute "displayLabel", to: :display_label
21
23
  map_attribute "altRepGroup", to: :alt_rep_group
data/lib/loc_mods/cli.rb CHANGED
@@ -78,7 +78,7 @@ module LocMods
78
78
  show_unchanged: show_unchanged,
79
79
  highlight_diff: highlight_diff,
80
80
  use_colors: use_colors,
81
- indent: " ",
81
+ indent: " "
82
82
  )
83
83
  similarity_percentage = (1 - diff_score) * 100
84
84
 
@@ -7,16 +7,11 @@ require_relative "record"
7
7
  module LocMods
8
8
  class Collection < Lutaml::Model::Serializable
9
9
  attribute :mods, Record, collection: true
10
- attribute :schema_location, :string
11
10
 
12
11
  xml do
13
12
  root "modsCollection"
14
13
  namespace "http://www.loc.gov/mods/v3", nil
15
14
 
16
- map_attribute "schemaLocation", to: :schema_location,
17
- namespace: "http://www.w3.org/2001/XMLSchema-instance",
18
- prefix: "xsi"
19
-
20
15
  map_element "mods", to: :mods
21
16
  end
22
17
  end
@@ -30,7 +30,7 @@ module LocMods
30
30
  attribute :frequency, :string, collection: true
31
31
 
32
32
  xml do
33
- root "originInfo"
33
+ root "originInfo", ordered: true
34
34
  namespace "http://www.loc.gov/mods/v3", nil
35
35
 
36
36
  map_attribute "lang", to: :lang
@@ -21,7 +21,7 @@ module LocMods
21
21
  attribute :note, PhysicalDescriptionNote, collection: true
22
22
 
23
23
  xml do
24
- root "physicalDescription"
24
+ root "physicalDescription", ordered: true
25
25
  namespace "http://www.loc.gov/mods/v3", nil
26
26
 
27
27
  map_attribute "lang", to: :lang
@@ -49,7 +49,7 @@ module LocMods
49
49
  attribute :type_of_resource, TypeOfResource, collection: true
50
50
 
51
51
  xml do
52
- root "mods"
52
+ root "mods", ordered: true
53
53
  namespace "http://www.loc.gov/mods/v3", nil
54
54
 
55
55
  map_attribute "ID", to: :id
@@ -36,7 +36,7 @@ module LocMods
36
36
  attribute :href, :string
37
37
 
38
38
  xml do
39
- root "subject"
39
+ root "subject", ordered: true
40
40
  namespace "http://www.loc.gov/mods/v3", nil
41
41
 
42
42
  map_attribute "href", to: :href,
@@ -5,6 +5,7 @@ require "lutaml/model"
5
5
  module LocMods
6
6
  class TargetAudience < Lutaml::Model::Serializable
7
7
  attribute :content, :string
8
+ attribute :authority, :string
8
9
  attribute :display_label, :string
9
10
  attribute :alt_rep_group, :string
10
11
 
@@ -13,6 +14,7 @@ module LocMods
13
14
  namespace "http://www.loc.gov/mods/v3", nil
14
15
 
15
16
  map_content to: :content
17
+ map_attribute "authority", to: :authority
16
18
  map_attribute "displayLabel", to: :display_label
17
19
  map_attribute "altRepGroup", to: :alt_rep_group
18
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LocMods
4
- VERSION = "0.2.5"
4
+ VERSION = "0.2.7"
5
5
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loc_mods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-16 00:00:00.000000000 Z
11
+ date: 2025-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '0.5'
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'
26
+ version: '0.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,76 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop
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
- - !ruby/object:Gem::Dependency
98
- name: rubocop-performance
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: xml-c14n
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
55
  description: Library of Congress MODS / MADS parser
126
56
  email:
127
57
  - open.source@ribose.com
@@ -214,7 +144,7 @@ metadata:
214
144
  homepage_uri: https://github.com/relaton/loc_mods
215
145
  source_code_uri: https://github.com/relaton/loc_mods
216
146
  changelog_uri: https://github.com/relaton/loc_mods
217
- post_install_message:
147
+ post_install_message:
218
148
  rdoc_options: []
219
149
  require_paths:
220
150
  - lib
@@ -230,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
160
  version: '0'
231
161
  requirements: []
232
162
  rubygems_version: 3.3.27
233
- signing_key:
163
+ signing_key:
234
164
  specification_version: 4
235
165
  summary: Library of Congress MODS / MADS parser
236
166
  test_files: []