assembly-objectfile 1.8.2 → 1.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +30 -0
- data/.github/pull_request_template.md +12 -0
- data/.rubocop.yml +121 -6
- data/.rubocop_todo.yml +85 -55
- data/.travis.yml +3 -3
- data/Gemfile +2 -0
- data/README.md +2 -1
- data/Rakefile +2 -3
- data/assembly-objectfile.gemspec +9 -3
- data/config/boot.rb +4 -2
- data/lib/assembly-objectfile.rb +4 -21
- data/lib/assembly-objectfile/content_metadata.rb +53 -176
- data/lib/assembly-objectfile/content_metadata/config.rb +24 -0
- data/lib/assembly-objectfile/content_metadata/file.rb +63 -0
- data/lib/assembly-objectfile/content_metadata/file_set.rb +73 -0
- data/lib/assembly-objectfile/content_metadata/file_set_builder.rb +65 -0
- data/lib/assembly-objectfile/content_metadata/nokogiri_builder.rb +55 -0
- data/lib/assembly-objectfile/object_file.rb +5 -3
- data/lib/assembly-objectfile/object_fileable.rb +43 -19
- data/lib/assembly-objectfile/version.rb +3 -1
- data/spec/content_metadata_spec.rb +734 -568
- data/spec/object_file_spec.rb +14 -0
- data/spec/spec_helper.rb +6 -4
- metadata +75 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfe0d362cd776d4099d57530dc6c502e8760eb49953dfa93d755016b98c54d6a
|
4
|
+
data.tar.gz: c1f0da284aa258aa89375b6d7b92dd7847b3e87b27712c2802e29157b86b6d9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfce4baa7f4d0cd52944195661ba94b6af1010fce66d714eb7c7b54778681fd5041d92d5f2fb82561c20048f76e4c313050afd880d7eb8b0c6eafb0fd6aedb67
|
7
|
+
data.tar.gz: c936f71be1c89887f76a9e3c66a37b690730f40a4bcc01605dcd2610d961f85d44eb110b91f40754346ef46482ad481a1aa6a76a2d9e866de42782cb344115b3
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: File a bug report
|
4
|
+
title: ''
|
5
|
+
labels: bug
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe the bug**
|
11
|
+
A clear and concise description of what the bug is.
|
12
|
+
|
13
|
+
**User Impact**
|
14
|
+
A description of the impact of this bug on an end-user (or your own work).
|
15
|
+
|
16
|
+
**To Reproduce**
|
17
|
+
Steps to reproduce the behavior:
|
18
|
+
1. Go to '...'
|
19
|
+
2. Click on '....'
|
20
|
+
3. Scroll down to '....'
|
21
|
+
4. See error
|
22
|
+
|
23
|
+
**Expected behavior**
|
24
|
+
A clear and concise description of what you expected to happen.
|
25
|
+
|
26
|
+
**Screenshots**
|
27
|
+
If applicable, add screenshots to help explain your problem.
|
28
|
+
|
29
|
+
**Additional context**
|
30
|
+
Add any other context about the problem here.
|
data/.rubocop.yml
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
2
|
require: rubocop-rspec
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
Max: 200
|
4
|
+
AllCops:
|
5
|
+
TargetRubyVersion: 2.5
|
7
6
|
|
8
7
|
RSpec/ContextWording:
|
9
8
|
Enabled: false # too dogmatic
|
@@ -15,8 +14,124 @@ RSpec/ExampleLength:
|
|
15
14
|
RSpec/MessageSpies:
|
16
15
|
Enabled: false
|
17
16
|
|
18
|
-
RSpec/MultipleExpectations:
|
19
|
-
Max: 5
|
20
|
-
|
21
17
|
RSpec/NestedGroups:
|
22
18
|
Max: 4 # default: 3
|
19
|
+
|
20
|
+
Metrics/BlockLength:
|
21
|
+
Exclude:
|
22
|
+
- 'spec/**/*.rb'
|
23
|
+
- '**/*.gemspec'
|
24
|
+
|
25
|
+
Gemspec/DateAssignment: # (new in 1.10)
|
26
|
+
Enabled: true
|
27
|
+
|
28
|
+
Layout/SpaceAroundMethodCallOperator:
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
32
|
+
Enabled: true
|
33
|
+
|
34
|
+
Layout/SpaceBeforeBrackets: # (new in 1.7)
|
35
|
+
Enabled: true
|
36
|
+
|
37
|
+
Lint/AmbiguousAssignment: # (new in 1.7)
|
38
|
+
Enabled: true
|
39
|
+
|
40
|
+
Lint/DeprecatedConstants: # (new in 1.8)
|
41
|
+
Enabled: true
|
42
|
+
|
43
|
+
Lint/DuplicateBranch: # (new in 1.3)
|
44
|
+
Enabled: true
|
45
|
+
|
46
|
+
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
|
47
|
+
Enabled: true
|
48
|
+
|
49
|
+
Lint/EmptyBlock: # (new in 1.1)
|
50
|
+
Enabled: true
|
51
|
+
|
52
|
+
Lint/EmptyClass: # (new in 1.3)
|
53
|
+
Enabled: true
|
54
|
+
|
55
|
+
Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
|
56
|
+
Enabled: true
|
57
|
+
|
58
|
+
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
|
59
|
+
Enabled: true
|
60
|
+
|
61
|
+
Lint/NumberedParameterAssignment: # (new in 1.9)
|
62
|
+
Enabled: true
|
63
|
+
|
64
|
+
Lint/OrAssignmentToConstant: # (new in 1.9)
|
65
|
+
Enabled: true
|
66
|
+
|
67
|
+
Lint/RedundantDirGlobSort: # (new in 1.8)
|
68
|
+
Enabled: true
|
69
|
+
|
70
|
+
Lint/SymbolConversion: # (new in 1.9)
|
71
|
+
Enabled: true
|
72
|
+
|
73
|
+
Lint/ToEnumArguments: # (new in 1.1)
|
74
|
+
Enabled: true
|
75
|
+
|
76
|
+
Lint/TripleQuotes: # (new in 1.9)
|
77
|
+
Enabled: true
|
78
|
+
|
79
|
+
Lint/UnexpectedBlockArity: # (new in 1.5)
|
80
|
+
Enabled: true
|
81
|
+
|
82
|
+
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
|
83
|
+
Enabled: true
|
84
|
+
|
85
|
+
Lint/RaiseException:
|
86
|
+
Enabled: true
|
87
|
+
|
88
|
+
Lint/StructNewOverride:
|
89
|
+
Enabled: true
|
90
|
+
|
91
|
+
Style/ExponentialNotation:
|
92
|
+
Enabled: true
|
93
|
+
|
94
|
+
Style/HashEachMethods:
|
95
|
+
Enabled: true
|
96
|
+
|
97
|
+
Style/HashTransformKeys:
|
98
|
+
Enabled: true
|
99
|
+
|
100
|
+
Style/HashTransformValues:
|
101
|
+
Enabled: true
|
102
|
+
|
103
|
+
Style/SlicingWithRange:
|
104
|
+
Enabled: true
|
105
|
+
|
106
|
+
Style/ArgumentsForwarding: # (new in 1.1)
|
107
|
+
Enabled: true
|
108
|
+
|
109
|
+
Style/CollectionCompact: # (new in 1.2)
|
110
|
+
Enabled: true
|
111
|
+
|
112
|
+
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
|
113
|
+
Enabled: true
|
114
|
+
|
115
|
+
Style/EndlessMethod: # (new in 1.8)
|
116
|
+
Enabled: true
|
117
|
+
|
118
|
+
Style/HashConversion: # (new in 1.10)
|
119
|
+
Enabled: true
|
120
|
+
|
121
|
+
Style/HashExcept: # (new in 1.7)
|
122
|
+
Enabled: true
|
123
|
+
|
124
|
+
Style/IfWithBooleanLiteralBranches: # (new in 1.9)
|
125
|
+
Enabled: true
|
126
|
+
|
127
|
+
Style/NegatedIfElseCondition: # (new in 1.2)
|
128
|
+
Enabled: true
|
129
|
+
|
130
|
+
Style/NilLambda: # (new in 1.3)
|
131
|
+
Enabled: true
|
132
|
+
|
133
|
+
Style/RedundantArgument: # (new in 1.4)
|
134
|
+
Enabled: true
|
135
|
+
|
136
|
+
Style/SwapValues: # (new in 1.1)
|
137
|
+
Enabled: true
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2021-01-08 23:41:37 UTC using RuboCop version 1.8.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
|
@@ -8,80 +8,83 @@
|
|
8
8
|
|
9
9
|
# Offense count: 1
|
10
10
|
# Cop supports --auto-correct.
|
11
|
-
# Configuration parameters: EnforcedStyleAlignWith,
|
12
|
-
# SupportedStylesAlignWith:
|
13
|
-
Layout/
|
11
|
+
# Configuration parameters: EnforcedStyleAlignWith, Severity.
|
12
|
+
# SupportedStylesAlignWith: start_of_line, begin
|
13
|
+
Layout/BeginEndAlignment:
|
14
14
|
Exclude:
|
15
|
-
- 'lib/assembly-objectfile/
|
15
|
+
- 'lib/assembly-objectfile/object_fileable.rb'
|
16
16
|
|
17
17
|
# Offense count: 1
|
18
|
-
|
18
|
+
# Cop supports --auto-correct.
|
19
|
+
# Configuration parameters: AllowAliasSyntax, AllowedMethods.
|
20
|
+
# AllowedMethods: alias_method, public, protected, private
|
21
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
19
22
|
Exclude:
|
20
|
-
- '
|
23
|
+
- 'lib/assembly-objectfile/object_fileable.rb'
|
21
24
|
|
22
|
-
# Offense count:
|
23
|
-
#
|
24
|
-
|
25
|
+
# Offense count: 1
|
26
|
+
# Cop supports --auto-correct.
|
27
|
+
Layout/RescueEnsureAlignment:
|
25
28
|
Exclude:
|
26
|
-
- '
|
29
|
+
- 'lib/assembly-objectfile/object_fileable.rb'
|
30
|
+
|
31
|
+
# Offense count: 1
|
32
|
+
Lint/UselessAssignment:
|
33
|
+
Exclude:
|
34
|
+
- 'config/boot.rb'
|
27
35
|
|
28
36
|
# Offense count: 3
|
37
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
29
38
|
Metrics/AbcSize:
|
30
|
-
Max:
|
31
|
-
|
32
|
-
# Offense count: 15
|
33
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
34
|
-
# ExcludedMethods: refine
|
35
|
-
Metrics/BlockLength:
|
36
|
-
Max: 549
|
39
|
+
Max: 52
|
37
40
|
|
38
41
|
# Offense count: 1
|
39
|
-
# Configuration parameters: CountComments.
|
40
|
-
|
41
|
-
|
42
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
43
|
+
# IgnoredMethods: refine
|
44
|
+
Metrics/BlockLength:
|
45
|
+
Max: 26
|
42
46
|
|
43
|
-
# Offense count:
|
47
|
+
# Offense count: 2
|
48
|
+
# Configuration parameters: IgnoredMethods.
|
44
49
|
Metrics/CyclomaticComplexity:
|
45
|
-
Max:
|
46
|
-
|
47
|
-
# Offense count: 26
|
48
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
49
|
-
# URISchemes: http, https
|
50
|
-
Metrics/LineLength:
|
51
|
-
Max: 304
|
50
|
+
Max: 13
|
52
51
|
|
53
|
-
# Offense count:
|
54
|
-
# Configuration parameters: CountComments.
|
52
|
+
# Offense count: 4
|
53
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
55
54
|
Metrics/MethodLength:
|
56
|
-
Max:
|
55
|
+
Max: 30
|
57
56
|
|
58
57
|
# Offense count: 1
|
59
|
-
# Configuration parameters: CountComments.
|
58
|
+
# Configuration parameters: CountComments, CountAsOne.
|
60
59
|
Metrics/ModuleLength:
|
61
|
-
Max:
|
60
|
+
Max: 117
|
62
61
|
|
63
62
|
# Offense count: 1
|
64
|
-
|
65
|
-
|
63
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
64
|
+
Metrics/ParameterLists:
|
65
|
+
Max: 11
|
66
66
|
|
67
67
|
# Offense count: 2
|
68
|
-
# Configuration parameters:
|
68
|
+
# Configuration parameters: IgnoredMethods.
|
69
|
+
Metrics/PerceivedComplexity:
|
70
|
+
Max: 14
|
71
|
+
|
72
|
+
# Offense count: 1
|
73
|
+
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
69
74
|
# 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
|
70
75
|
Naming/FileName:
|
71
76
|
Exclude:
|
72
|
-
- 'assembly-objectfile.gemspec'
|
73
77
|
- 'lib/assembly-objectfile.rb'
|
74
78
|
|
75
|
-
# Offense count:
|
76
|
-
# Configuration parameters: NamePrefix,
|
79
|
+
# Offense count: 1
|
80
|
+
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
|
77
81
|
# NamePrefix: is_, has_, have_
|
78
|
-
#
|
79
|
-
#
|
82
|
+
# ForbiddenPrefixes: is_, has_, have_
|
83
|
+
# AllowedMethods: is_a?
|
80
84
|
# MethodDefinitionMacros: define_method, define_singleton_method
|
81
85
|
Naming/PredicateName:
|
82
86
|
Exclude:
|
83
87
|
- 'spec/**/*'
|
84
|
-
- 'lib/assembly-objectfile/content_metadata.rb'
|
85
88
|
- 'lib/assembly-objectfile/object_fileable.rb'
|
86
89
|
|
87
90
|
# Offense count: 8
|
@@ -91,20 +94,20 @@ RSpec/ExampleLength:
|
|
91
94
|
- 'spec/content_metadata_spec.rb'
|
92
95
|
|
93
96
|
# Offense count: 2
|
94
|
-
# Configuration parameters: CustomTransform, IgnoreMethods.
|
97
|
+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
98
|
+
# Include: **/*_spec*rb*, **/spec/**/*
|
95
99
|
RSpec/FilePath:
|
96
100
|
Exclude:
|
97
101
|
- 'spec/content_metadata_spec.rb'
|
98
102
|
- 'spec/object_file_spec.rb'
|
99
103
|
|
100
|
-
# Offense count:
|
104
|
+
# Offense count: 71
|
101
105
|
# Configuration parameters: AssignmentOnly.
|
102
106
|
RSpec/InstanceVariable:
|
103
107
|
Exclude:
|
104
108
|
- 'spec/object_file_spec.rb'
|
105
109
|
|
106
|
-
# Offense count:
|
107
|
-
# Configuration parameters: AggregateFailuresByDefault.
|
110
|
+
# Offense count: 38
|
108
111
|
RSpec/MultipleExpectations:
|
109
112
|
Max: 29
|
110
113
|
|
@@ -113,20 +116,47 @@ RSpec/RepeatedDescription:
|
|
113
116
|
Exclude:
|
114
117
|
- 'spec/object_file_spec.rb'
|
115
118
|
|
116
|
-
# Offense count:
|
119
|
+
# Offense count: 2
|
120
|
+
RSpec/RepeatedExample:
|
121
|
+
Exclude:
|
122
|
+
- 'spec/object_file_spec.rb'
|
123
|
+
|
124
|
+
# Offense count: 8
|
125
|
+
RSpec/RepeatedExampleGroupDescription:
|
126
|
+
Exclude:
|
127
|
+
- 'spec/content_metadata_spec.rb'
|
128
|
+
|
129
|
+
# Offense count: 2
|
130
|
+
# Cop supports --auto-correct.
|
117
131
|
Style/CommentedKeyword:
|
118
132
|
Exclude:
|
119
133
|
- 'lib/assembly-objectfile/content_metadata.rb'
|
120
134
|
|
121
|
-
# Offense count:
|
122
|
-
|
135
|
+
# Offense count: 2
|
136
|
+
# Cop supports --auto-correct.
|
137
|
+
Style/KeywordParametersOrder:
|
123
138
|
Exclude:
|
124
|
-
- '
|
125
|
-
- '
|
126
|
-
- 'lib/assembly-objectfile.rb'
|
139
|
+
- 'lib/assembly-objectfile/content_metadata/file.rb'
|
140
|
+
- 'lib/assembly-objectfile/content_metadata/file_set.rb'
|
127
141
|
|
128
142
|
# Offense count: 1
|
129
|
-
#
|
130
|
-
Style/
|
143
|
+
# Cop supports --auto-correct.
|
144
|
+
Style/RedundantAssignment:
|
145
|
+
Exclude:
|
146
|
+
- 'lib/assembly-objectfile/content_metadata.rb'
|
147
|
+
|
148
|
+
# Offense count: 5
|
149
|
+
# Cop supports --auto-correct.
|
150
|
+
Style/StringConcatenation:
|
131
151
|
Exclude:
|
152
|
+
- 'config/boot.rb'
|
153
|
+
- 'lib/assembly-objectfile.rb'
|
132
154
|
- 'lib/assembly-objectfile/object_file.rb'
|
155
|
+
- 'spec/spec_helper.rb'
|
156
|
+
|
157
|
+
# Offense count: 113
|
158
|
+
# Cop supports --auto-correct.
|
159
|
+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
160
|
+
# URISchemes: http, https
|
161
|
+
Layout/LineLength:
|
162
|
+
Max: 277
|
data/.travis.yml
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
|
2
1
|
language: ruby
|
3
2
|
rvm:
|
4
|
-
- 2.
|
5
|
-
- 2.
|
3
|
+
- 2.5.7
|
4
|
+
- 2.6.5
|
6
5
|
addons:
|
7
6
|
apt:
|
8
7
|
packages:
|
@@ -12,6 +11,7 @@ before_script:
|
|
12
11
|
- chmod +x ./cc-test-reporter
|
13
12
|
- ./cc-test-reporter before-build
|
14
13
|
script:
|
14
|
+
- bundle exec rubocop
|
15
15
|
- bundle exec rake
|
16
16
|
after_script:
|
17
17
|
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
[![Build Status](https://travis-ci.
|
1
|
+
[![Build Status](https://travis-ci.com/sul-dlss/assembly-objectfile.svg?branch=main)](https://travis-ci.com/sul-dlss/assembly-objectfile)
|
2
2
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/2310962acce78d78e76c/test_coverage)](https://codeclimate.com/github/sul-dlss/assembly-objectfile/test_coverage)
|
3
3
|
[![Maintainability](https://api.codeclimate.com/v1/badges/2310962acce78d78e76c/maintainability)](https://codeclimate.com/github/sul-dlss/assembly-objectfile/maintainability)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/assembly-objectfile.svg)](https://badge.fury.io/rb/assembly-objectfile)
|
4
5
|
|
5
6
|
# Assembly-ObjectFile Gem
|
6
7
|
|