diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a56e607..963a40c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-03-27 19:15:05 UTC using RuboCop version 1.48.1. +# on 2023-09-13 18:53:11 UTC using RuboCop version 1.56.3. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -12,6 +12,7 @@ Lint/RescueException: - 'spec/helpers.rb' # Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). Lint/UselessAssignment: Exclude: - 'spec/helpers.rb' @@ -32,17 +33,17 @@ Metrics/BlockLength: Metrics/ClassLength: Max: 152 -# Offense count: 4 +# Offense count: 5 # Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/CyclomaticComplexity: Max: 11 -# Offense count: 11 +# Offense count: 13 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. Metrics/MethodLength: Max: 21 -# Offense count: 1 +# Offense count: 2 # Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/PerceivedComplexity: Max: 11 @@ -66,13 +67,6 @@ RSpec/ExpectInHook: - 'spec/lib/geo_combine/geo_blacklight_harvester_spec.rb' - 'spec/lib/geo_combine/geoblacklight_spec.rb' -# Offense count: 1 -# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. -# Include: **/*_spec*rb*, **/spec/**/* -RSpec/FilePath: - Exclude: - - 'spec/lib/geo_combine_spec.rb' - # Offense count: 23 # Configuration parameters: EnforcedStyle. # SupportedStyles: have_received, receive @@ -110,16 +104,19 @@ RSpec/OverwritingSetup: Exclude: - 'spec/lib/geo_combine/geoblacklight_spec.rb' -# Offense count: 1 -RSpec/PendingWithoutReason: - Exclude: - - 'spec/lib/geo_combine/migrators/v1_aardvark_migrator_spec.rb' - # Offense count: 2 RSpec/RepeatedExampleGroupBody: Exclude: - 'spec/lib/geo_combine/iso19139_spec.rb' +# Offense count: 1 +# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. +# Include: **/*_spec.rb +RSpec/SpecFilePathFormat: + Exclude: + - '**/spec/routing/**/*' + - 'spec/lib/geo_combine_spec.rb' + # Offense count: 19 RSpec/StubbedMock: Exclude: @@ -145,7 +142,7 @@ Security/Open: Exclude: - 'lib/geo_combine/geoblacklight.rb' -# Offense count: 7 +# Offense count: 6 # Configuration parameters: AllowedConstants. Style/Documentation: Exclude: @@ -158,9 +155,9 @@ Style/Documentation: - 'lib/geo_combine/geometry_types.rb' - 'lib/geo_combine/iso19139.rb' -# Offense count: 8 +# Offense count: 12 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. # URISchemes: http, https Layout/LineLength: - Max: 159 + Max: 198 diff --git a/lib/geo_combine/ckan_metadata.rb b/lib/geo_combine/ckan_metadata.rb index c01bcef..f37fc9d 100644 --- a/lib/geo_combine/ckan_metadata.rb +++ b/lib/geo_combine/ckan_metadata.rb @@ -44,7 +44,8 @@ def organization def envelope return envelope_from_bbox unless envelope_from_bbox.nil? return envelope_from_spatial(',') unless envelope_from_spatial(',').nil? - return envelope_from_spatial(' ') unless envelope_from_spatial(' ').nil? + + envelope_from_spatial(' ') unless envelope_from_spatial(' ').nil? end def envelope_from_bbox @@ -55,7 +56,7 @@ def envelope_from_bbox north: extras('bbox-north-lat') ) begin - return bbox.to_envelope if bbox.valid? + bbox.to_envelope if bbox.valid? rescue GeoCombine::Exceptions::InvalidGeometry nil end @@ -67,7 +68,7 @@ def envelope_from_spatial(delimiter) delimiter: delimiter ) begin - return bbox.to_envelope if bbox.valid? + bbox.to_envelope if bbox.valid? rescue GeoCombine::Exceptions::InvalidGeometry nil end