loc_mods 0.2.5 → 0.2.6

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: a2a4762188e137e5ea3515cbff8dcbfa6e2749c7eb1ca4921d230e20c2c066db
4
- data.tar.gz: a510dd995107ef4b33dabcc0c8e9658948e3c4d7474d50fd2cbd8d2eaf1b7e31
3
+ metadata.gz: 5613f1f712d8203015a0fb3e47fd3741086837e9d428867aab27b572719b2747
4
+ data.tar.gz: 021aa87a31a69b90abbd870de1ca2a5e6bdfb2379a5e42db002b7fefd1ac8466
5
5
  SHA512:
6
- metadata.gz: 410d05bac6bde6ad26693359a2331c7b93ba4abcdabed33ad51f3f25dd9c08491be258ff0c9c2f4752f9b323cfd9b60102193af4535d30e92b7297679892439a
7
- data.tar.gz: a70f2deb4dff1d8fd8f119e2d78b40330444caffa5f3d47fc6939ba51241a47fcbaf47eda8a64f35b002d7c7660c7f9c97debceda0c9019e2d8c7a13870785e2
6
+ metadata.gz: 4a5960d07721a5de9a030c3137c1a66072f5399ea96b897eceb98a81dd273967073de1e48f8237209dc66ca28514230f42bc9c8bc596db11d777545eca71159c
7
+ data.tar.gz: 44f4ec3fd0969b5a45458917ef386556901e9ec032affcce994d34456ebeb9d15d2bb55f9d8554e6767cc17335a7ff19d0523df93c21591124c909fab242912a
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
 
@@ -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.6"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
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.6
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
@@ -214,7 +214,7 @@ metadata:
214
214
  homepage_uri: https://github.com/relaton/loc_mods
215
215
  source_code_uri: https://github.com/relaton/loc_mods
216
216
  changelog_uri: https://github.com/relaton/loc_mods
217
- post_install_message:
217
+ post_install_message:
218
218
  rdoc_options: []
219
219
  require_paths:
220
220
  - lib
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  version: '0'
231
231
  requirements: []
232
232
  rubygems_version: 3.3.27
233
- signing_key:
233
+ signing_key:
234
234
  specification_version: 4
235
235
  summary: Library of Congress MODS / MADS parser
236
236
  test_files: []