assembly-objectfile 1.8.3 → 1.10.2

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: 9fe45aaa147dfaac9e82820d38af8de6247116031979ff68f711954af0ff9bc8
4
- data.tar.gz: 4dca70b7bf315d8520b523cfd516d78211201c5092dd36b44d8cf855ccf6247f
3
+ metadata.gz: 925ceb88bbc6d965b3ab9be3695e7ec318c65a11716cb5cdb2d1178af1a08174
4
+ data.tar.gz: bbc6282d8d375dd0cf49a55519563abff44429f012221dfc1b4cf0219de47aa9
5
5
  SHA512:
6
- metadata.gz: 4573713a41500722359af8a99e4972fcd6e7e566a864ddbc277bfecf6228bae9b2ea7194550ce43278189b13480e0e380ee72c1d7690305367f497442c87bf02
7
- data.tar.gz: 5c09f8e544d3479c87caf0793bb632389bcb01a8b7c22ce369344ad99f43bd0f1f78f0b055dfe121a1f63c430c3ba8b82f1793c006e8a7d8306bb89306add142
6
+ metadata.gz: 997b90f28dd603f11cabc20d2dc598eaf60a5f3c1b3b168b770748f6ce48377e15e8665824976a4838be52e35a54bafb508c42aca6ddaa3c6f8e31c3f627b1b2
7
+ data.tar.gz: 1033e903f01344e8944ed681e61debb128603b3b3d898269cad582d7a1a0b674fd837e4114a81033b2cbfff97da6c9d9ee17a27cfad606622eacf768436c22fc
@@ -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.
@@ -0,0 +1,12 @@
1
+ ## Why was this change made?
2
+
3
+
4
+
5
+ ## How was this change tested?
6
+
7
+
8
+
9
+ ## Which documentation and/or configurations were updated?
10
+
11
+
12
+
data/.rubocop.yml CHANGED
@@ -1,9 +1,8 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
  require: rubocop-rspec
3
3
 
4
- # Configuration parameters: AllowURI, URISchemes.
5
- Metrics/LineLength:
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,110 +1,91 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-09-13 12:44:21 -0700 using RuboCop version 0.59.0.
3
+ # on 2021-03-16 21:16:42 UTC using RuboCop version 1.11.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
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 1
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
12
- # SupportedStylesAlignWith: keyword, variable, start_of_line
13
- Layout/EndAlignment:
14
- Exclude:
15
- - 'lib/assembly-objectfile/content_metadata.rb'
16
-
17
9
  # Offense count: 1
18
10
  Lint/UselessAssignment:
19
11
  Exclude:
20
12
  - 'config/boot.rb'
21
13
 
22
- # Offense count: 5
23
- # Configuration parameters: CheckForMethodsWithNoSideEffects.
24
- Lint/Void:
25
- Exclude:
26
- - 'spec/content_metadata_spec.rb'
27
-
28
14
  # Offense count: 3
15
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
29
16
  Metrics/AbcSize:
30
- Max: 170
31
-
32
- # Offense count: 15
33
- # Configuration parameters: CountComments, ExcludedMethods.
34
- # ExcludedMethods: refine
35
- Metrics/BlockLength:
36
- Max: 549
17
+ Max: 56
37
18
 
38
19
  # Offense count: 1
39
- # Configuration parameters: CountComments.
40
- Metrics/ClassLength:
41
- Max: 137
20
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
21
+ # IgnoredMethods: refine
22
+ Metrics/BlockLength:
23
+ Max: 27
42
24
 
43
- # Offense count: 1
25
+ # Offense count: 2
26
+ # Configuration parameters: IgnoredMethods.
44
27
  Metrics/CyclomaticComplexity:
45
- Max: 63
28
+ Max: 14
46
29
 
47
- # Offense count: 26
48
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
49
- # URISchemes: http, https
50
- Metrics/LineLength:
51
- Max: 304
52
-
53
- # Offense count: 1
54
- # Configuration parameters: CountComments.
30
+ # Offense count: 4
31
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
55
32
  Metrics/MethodLength:
56
- Max: 131
33
+ Max: 31
57
34
 
58
35
  # Offense count: 1
59
- # Configuration parameters: CountComments.
36
+ # Configuration parameters: CountComments, CountAsOne.
60
37
  Metrics/ModuleLength:
61
- Max: 106
38
+ Max: 117
62
39
 
63
40
  # Offense count: 1
64
- Metrics/PerceivedComplexity:
65
- Max: 59
41
+ # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
42
+ Metrics/ParameterLists:
43
+ Max: 13
66
44
 
67
45
  # Offense count: 2
68
- # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
46
+ # Configuration parameters: IgnoredMethods.
47
+ Metrics/PerceivedComplexity:
48
+ Max: 15
49
+
50
+ # Offense count: 1
51
+ # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms.
69
52
  # 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
53
  Naming/FileName:
71
54
  Exclude:
72
- - 'assembly-objectfile.gemspec'
73
55
  - 'lib/assembly-objectfile.rb'
74
56
 
75
- # Offense count: 2
76
- # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
57
+ # Offense count: 1
58
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
77
59
  # NamePrefix: is_, has_, have_
78
- # NamePrefixBlacklist: is_, has_, have_
79
- # NameWhitelist: is_a?
60
+ # ForbiddenPrefixes: is_, has_, have_
61
+ # AllowedMethods: is_a?
80
62
  # MethodDefinitionMacros: define_method, define_singleton_method
81
63
  Naming/PredicateName:
82
64
  Exclude:
83
65
  - 'spec/**/*'
84
- - 'lib/assembly-objectfile/content_metadata.rb'
85
66
  - 'lib/assembly-objectfile/object_fileable.rb'
86
67
 
87
- # Offense count: 8
68
+ # Offense count: 9
88
69
  # Configuration parameters: Max.
89
70
  RSpec/ExampleLength:
90
71
  Exclude:
91
72
  - 'spec/content_metadata_spec.rb'
92
73
 
93
74
  # Offense count: 2
94
- # Configuration parameters: CustomTransform, IgnoreMethods.
75
+ # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
76
+ # Include: **/*_spec*rb*, **/spec/**/*
95
77
  RSpec/FilePath:
96
78
  Exclude:
97
79
  - 'spec/content_metadata_spec.rb'
98
80
  - 'spec/object_file_spec.rb'
99
81
 
100
- # Offense count: 60
82
+ # Offense count: 71
101
83
  # Configuration parameters: AssignmentOnly.
102
84
  RSpec/InstanceVariable:
103
85
  Exclude:
104
86
  - 'spec/object_file_spec.rb'
105
87
 
106
- # Offense count: 28
107
- # Configuration parameters: AggregateFailuresByDefault.
88
+ # Offense count: 39
108
89
  RSpec/MultipleExpectations:
109
90
  Max: 29
110
91
 
@@ -113,20 +94,25 @@ RSpec/RepeatedDescription:
113
94
  Exclude:
114
95
  - 'spec/object_file_spec.rb'
115
96
 
116
- # Offense count: 6
117
- Style/CommentedKeyword:
97
+ # Offense count: 2
98
+ RSpec/RepeatedExample:
118
99
  Exclude:
119
- - 'lib/assembly-objectfile/content_metadata.rb'
100
+ - 'spec/object_file_spec.rb'
120
101
 
121
- # Offense count: 1
122
- Style/Documentation:
102
+ # Offense count: 8
103
+ RSpec/RepeatedExampleGroupDescription:
123
104
  Exclude:
124
- - 'spec/**/*'
125
- - 'test/**/*'
126
- - 'lib/assembly-objectfile.rb'
105
+ - 'spec/content_metadata_spec.rb'
127
106
 
128
- # Offense count: 1
129
- # Configuration parameters: MinBodyLength.
130
- Style/GuardClause:
107
+ # Offense count: 2
108
+ # Cop supports --auto-correct.
109
+ Style/CommentedKeyword:
131
110
  Exclude:
132
- - 'lib/assembly-objectfile/object_file.rb'
111
+ - 'lib/assembly-objectfile/content_metadata.rb'
112
+
113
+ # Offense count: 116
114
+ # Cop supports --auto-correct.
115
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
116
+ # URISchemes: http, https
117
+ Layout/LineLength:
118
+ Max: 277
data/.travis.yml CHANGED
@@ -1,9 +1,7 @@
1
-
2
1
  language: ruby
3
2
  rvm:
4
- - 2.2.5
5
- - 2.3.1
6
- - 2.5.3
3
+ - 2.5.7
4
+ - 2.6.5
7
5
  addons:
8
6
  apt:
9
7
  packages:
@@ -13,6 +11,7 @@ before_script:
13
11
  - chmod +x ./cc-test-reporter
14
12
  - ./cc-test-reporter before-build
15
13
  script:
14
+ - bundle exec rubocop
16
15
  - bundle exec rake
17
16
  after_script:
18
17
  - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'http://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in .gemspec
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/sul-dlss/assembly-objectfile.svg?branch=master)](https://travis-ci.org/sul-dlss/assembly-objectfile)
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
4
  [![Gem Version](https://badge.fury.io/rb/assembly-objectfile.svg)](https://badge.fury.io/rb/assembly-objectfile)
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
 
3
5
  desc 'Run console with irb (default), pry, etc.'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  $LOAD_PATH.push File.expand_path('lib', __dir__)
2
4
  require 'assembly-objectfile/version'
3
5
 
@@ -12,14 +14,18 @@ Gem::Specification.new do |s|
12
14
  s.description = 'Get exif data, file sizes and more.'
13
15
  s.license = 'ALv2'
14
16
 
15
- s.rubyforge_project = 'assembly-objectfile'
16
-
17
17
  s.files = `git ls-files`.split("\n")
18
18
  s.test_files = `git ls-files -- spec/*`.split("\n")
19
19
  s.bindir = 'exe'
20
20
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  s.require_paths = ['lib']
22
22
 
23
+ s.required_ruby_version = '~> 2.5'
24
+
25
+ s.add_dependency 'activesupport', '>= 5.2.0'
26
+ s.add_dependency 'deprecation'
27
+ s.add_dependency 'dry-struct', '~> 1.0'
28
+ s.add_dependency 'dry-types', '~> 1.1'
23
29
  s.add_dependency 'mime-types', '> 3'
24
30
  s.add_dependency 'mini_exiftool'
25
31
  s.add_dependency 'nokogiri'
@@ -29,5 +35,5 @@ Gem::Specification.new do |s|
29
35
  s.add_development_dependency 'rspec', '~> 3.0'
30
36
  s.add_development_dependency 'rubocop'
31
37
  s.add_development_dependency 'rubocop-rspec'
32
- s.add_development_dependency 'simplecov'
38
+ s.add_development_dependency 'simplecov', '~> 0.17.0' # CodeClimate cannot use SimpleCov >= 0.18.0 for generating test coverage
33
39
  end