diff --git a/.rubocop.yml b/.rubocop.yml index 70eee9b8..70f17dc9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ inherit_from: .rubocop_todo.yml AllCops: - TargetRubyVersion: 2.3 + TargetRubyVersion: 2.7 MethodLength: Description: 'Avoid methods longer than 30 lines of code.' @@ -47,10 +47,7 @@ RescueModifier: AssignmentInCondition: Enabled: false -AlignParameters: - Enabled: false # don't care if parameters are not aligned - -AlignParameters: +ParameterAlignment: Enabled: false # don't care if parameters are not aligned WhileUntilModifier: @@ -80,9 +77,6 @@ FormatString: Style/Alias: Enabled: false -Style/IndentArray: - EnforcedStyle: consistent - Style/MultilineMethodCallBraceLayout: Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index fbaa4af1..ff184d50 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,18 +1,470 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2016-05-12 11:20:45 -0400 using RuboCop version 0.39.0. +# on 2024-05-10 13:40:03 UTC using RuboCop version 1.63.5. # 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 # versions of RuboCop, may require this file to be generated again. +# Offense count: 75 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: with_first_argument, with_fixed_indentation +Layout/ArgumentAlignment: + Enabled: false + +# Offense count: 29 +# This cop supports safe autocorrection (--autocorrect). +Layout/ClosingParenthesisIndentation: + Exclude: + - 'lib/hammer_cli_katello.rb' + - 'test/functional/repository/update_test.rb' + - 'test/functional/repository/upload_test.rb' + +# Offense count: 10 +# This cop supports safe autocorrection (--autocorrect). +Layout/EmptyLineAfterGuardClause: + Exclude: + - 'lib/hammer_cli_katello/command_extensions/kickstart_repository.rb' + - 'lib/hammer_cli_katello/content_export_helper.rb' + - 'lib/hammer_cli_katello/content_view_component.rb' + - 'lib/hammer_cli_katello/content_view_purge.rb' + - 'lib/hammer_cli_katello/id_resolver.rb' + - 'lib/hammer_cli_katello/local_helper.rb' + - 'test/functional/product/product_helpers.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Layout/EmptyLineAfterMagicComment: + Exclude: + - 'hammer_cli_katello.gemspec' + # Offense count: 7 -Metrics/AbcSize: - Max: 39 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment. +Layout/ExtraSpacing: + Exclude: + - 'test/functional/acs/info_test.rb' + - 'test/functional/activation_key/info_test.rb' + - 'test/functional/host/extensions/info_test.rb' + - 'test/functional/hostgroup/info_test.rb' + - 'test/functional/repository/info_test.rb' + +# Offense count: 13 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_brackets +Layout/FirstArrayElementIndentation: + EnforcedStyle: consistent + +# Offense count: 25 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. +# SupportedHashRocketStyles: key, separator, table +# SupportedColonStyles: key, separator, table +# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit +Layout/HashAlignment: + Exclude: + - 'lib/hammer_cli_katello/id_resolver.rb' + - 'test/functional/content_export/complete/version_test.rb' + - 'test/functional/content_view/component/add_test.rb' + - 'test/functional/content_view/component/remove_test.rb' + - 'test/functional/content_view/component/update_test.rb' + +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +Layout/HeredocIndentation: + Exclude: + - 'test/functional/activation_key/product_content_test.rb' + - 'test/functional/host/subscription/product_content_test.rb' + - 'test/functional/product/list_test.rb' # Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: IndentationWidth, EnforcedStyle. +# SupportedStyles: spaces, tabs +Layout/IndentationStyle: + Exclude: + - 'lib/hammer_cli_katello/activation_key.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +Layout/LeadingEmptyLines: + Exclude: + - 'lib/hammer_cli_katello/exception_handler.rb' + - 'test/functional/repository/types_test.rb' + +# Offense count: 4 +# Configuration parameters: AllowedMethods. +# AllowedMethods: enums +Lint/ConstantDefinitionInBlock: + Exclude: + - 'test/functional/apipie_helper_test.rb' + - 'test/functional/capsule/content/cancel_synchronization_test.rb' + - 'test/functional/local_helper_test.rb' + +# Offense count: 1 +# Configuration parameters: DebuggerMethods, DebuggerRequires. +Lint/Debugger: + Exclude: + - 'test/functional/content_view/filter/create_test.rb' + +# Offense count: 1 +# Configuration parameters: AllowComments. +Lint/EmptyFile: + Exclude: + - 'lib/hammer_cli_katello/module_stream_profile.rb' + +# Offense count: 7 +# Configuration parameters: MaximumRangeSize. +Lint/MissingCopEnableDirective: + Exclude: + - 'lib/hammer_cli_katello/content_export_helper.rb' + - 'test/functional/content_view/component/add_test.rb' + - 'test/functional/content_view/component/update_test.rb' + - 'test/functional/erratum/erratum_helpers.rb' + - 'test/functional/host/extensions/info_test.rb' + - 'test/functional/hostgroup/info_test.rb' + - 'test/functional/package/list_test.rb' + +# Offense count: 4 +# Configuration parameters: AllowedParentClasses. +Lint/MissingSuper: + Exclude: + - 'lib/hammer_cli_katello/content_view.rb' + - 'lib/hammer_cli_katello/content_view_name_resolvable.rb' + - 'lib/hammer_cli_katello/content_view_purge.rb' + - 'lib/hammer_cli_katello/option_sources/lifecycle_environment_params.rb' + +# Offense count: 7 +# This cop supports safe autocorrection (--autocorrect). +Lint/RedundantCopDisableDirective: + Exclude: + - 'lib/hammer_cli_katello/id_resolver.rb' + - 'test/functional/acs/info_test.rb' + - 'test/functional/host/extensions/info_test.rb' + - 'test/functional/hostgroup/info_test.rb' + - 'test/functional/repository/info_test.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +Lint/RedundantCopEnableDirective: + Exclude: + - 'lib/hammer_cli_katello/id_resolver.rb' + - 'test/functional/repository/update_test.rb' + +# Offense count: 29 +# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. +Metrics/AbcSize: + Max: 37 + +# Offense count: 182 +# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. +# AllowedMethods: refine +Metrics/BlockLength: + Max: 264 + +# Offense count: 5 +# Configuration parameters: AllowedMethods, AllowedPatterns. +Metrics/CyclomaticComplexity: + Max: 10 + +# Offense count: 2 +# Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/PerceivedComplexity: - Max: 8 + Max: 11 + +# Offense count: 51 +# This cop supports safe autocorrection (--autocorrect). +Migration/DepartmentName: + Exclude: + - 'lib/hammer_cli_katello.rb' + - 'lib/hammer_cli_katello/command_extensions/kickstart_repository.rb' + - 'lib/hammer_cli_katello/content_export_helper.rb' + - 'lib/hammer_cli_katello/id_resolver.rb' + - 'lib/hammer_cli_katello/repository.rb' + - 'test/functional/content_export/list_test.rb' + - 'test/functional/content_import/list_test.rb' + - 'test/functional/content_units/list_test.rb' + - 'test/functional/erratum/erratum_helpers.rb' + - 'test/functional/file/info_test.rb' + - 'test/functional/package/list_test.rb' + - 'test/functional/repository/update_test.rb' + - 'test/functional/repository/upload_test.rb' + +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: lowercase, uppercase +Naming/HeredocDelimiterCase: + Exclude: + - 'test/functional/activation_key/product_content_test.rb' + - 'test/functional/host/subscription/product_content_test.rb' + - 'test/functional/product/list_test.rb' + +# Offense count: 7 +# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. +# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to +Naming/MethodParameterName: + Exclude: + - 'lib/hammer_cli_katello/content_view_component.rb' + - 'lib/hammer_cli_katello/content_view_purge.rb' + - 'lib/hammer_cli_katello/exception_handler.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: PreferredName. +Naming/RescuedExceptionsVariableName: + Exclude: + - 'Rakefile' + +# Offense count: 3 +Security/Open: + Exclude: + - 'lib/hammer_cli_katello/content_import.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle, AllowModifiersOnSymbols. +# SupportedStyles: inline, group +Style/AccessModifierDeclarations: + Exclude: + - 'lib/hammer_cli_katello/content_view_purge.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: MinBranchesCount. +Style/CaseLikeIf: + Exclude: + - 'lib/hammer_cli_katello/content_export_helper.rb' + +# Offense count: 9 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/CommentedKeyword: + Exclude: + - 'lib/hammer_cli_katello/ping.rb' + - 'lib/hammer_cli_katello/search_options_creators.rb' + - 'test/unit/search_options_creators_test.rb' +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. +# SupportedStyles: assign_to_condition, assign_inside_condition +Style/ConditionalAssignment: + Exclude: + - 'test/functional/erratum/erratum_helpers.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/EmptyLiteral: + Exclude: + - 'test/unit/search_options_creators_test.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AutoCorrect, EnforcedStyle. +# SupportedStyles: compact, expanded +Style/EmptyMethod: + Exclude: + - 'test/unit/search_options_creators_test.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/ExpandPathArguments: + Exclude: + - 'hammer_cli_katello.gemspec' + +# Offense count: 46 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns. +# SupportedStyles: annotated, template, unannotated +Style/FormatStringToken: + Exclude: + - 'lib/hammer_cli_katello/acs.rb' + - 'lib/hammer_cli_katello/activation_key.rb' + - 'lib/hammer_cli_katello/capsule.rb' + - 'lib/hammer_cli_katello/command_extensions/kickstart_repository.rb' + - 'lib/hammer_cli_katello/content_export_helper.rb' + - 'lib/hammer_cli_katello/content_import.rb' + - 'lib/hammer_cli_katello/content_view.rb' + - 'lib/hammer_cli_katello/content_view_purge.rb' + - 'lib/hammer_cli_katello/content_view_version.rb' + - 'lib/hammer_cli_katello/host_traces.rb' + - 'lib/hammer_cli_katello/output/formatters.rb' + - 'lib/hammer_cli_katello/product.rb' + - 'lib/hammer_cli_katello/repository.rb' + - 'lib/hammer_cli_katello/subscription.rb' + +# Offense count: 258 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: always, always_true, never Style/FrozenStringLiteralComment: - Enabled: False + Enabled: false + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/GlobalStdStream: + Exclude: + - 'hammer_cli_katello.gemspec' + +# Offense count: 5 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals. +Style/GuardClause: + Exclude: + - 'lib/hammer_cli_katello/content_export_helper.rb' + - 'lib/hammer_cli_katello/id_resolver.rb' + - 'lib/hammer_cli_katello/option_sources/lifecycle_environment_params.rb' + - 'test/functional/test_helper.rb' + +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowedReceivers. +# AllowedReceivers: Thread.current +Style/HashEachMethods: + Exclude: + - 'lib/hammer_cli_katello/capsule.rb' + - 'lib/hammer_cli_katello/command_extensions/ping.rb' + - 'lib/hammer_cli_katello/ping.rb' + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: InverseMethods, InverseBlocks. +Style/InverseMethods: + Exclude: + - 'test/functional/ping_test.rb' + +# Offense count: 5 +Style/MixinUsage: + Exclude: + - 'test/functional/test_helper.rb' + - 'test/unit/messages_test.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/MultilineIfModifier: + Exclude: + - 'lib/hammer_cli_katello/content_export_helper.rb' + +# Offense count: 4 +# Configuration parameters: AllowedMethods. +# AllowedMethods: respond_to_missing? +Style/OptionalBooleanParameter: + Exclude: + - 'lib/hammer_cli_katello/content_view.rb' + - 'test/functional/erratum/erratum_helpers.rb' + +# Offense count: 496 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: PreferredDelimiters. +Style/PercentLiteralDelimiters: + Enabled: false + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantAssignment: + Exclude: + - 'lib/hammer_cli_katello/repository.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantBegin: + Exclude: + - 'lib/hammer_cli_katello/command_extensions/content_source.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantCondition: + Exclude: + - 'lib/hammer_cli_katello/repository.rb' + +# Offense count: 4 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantFileExtensionInRequire: + Exclude: + - 'test/functional/content_units/info_test.rb' + - 'test/functional/content_units/list_test.rb' + - 'test/functional/file/info_test.rb' + - 'test/functional/file/list_test.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantParentheses: + Exclude: + - 'lib/hammer_cli_katello/content_view_component.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/RedundantSort: + Exclude: + - 'lib/hammer_cli_katello/id_resolver.rb' + +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: implicit, explicit +Style/RescueStandardError: + Exclude: + - 'Rakefile' + - 'hammer_cli_katello.gemspec' + - 'lib/hammer_cli_katello/repository.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength. +# AllowedMethods: present?, blank?, presence, try, try! +Style/SafeNavigation: + Exclude: + - 'lib/hammer_cli_katello/content_view.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/SingleArgumentDig: + Exclude: + - 'lib/hammer_cli_katello/capsule.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +Style/StderrPuts: + Exclude: + - 'hammer_cli_katello.gemspec' + +# Offense count: 20 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Mode. +Style/StringConcatenation: + Exclude: + - 'lib/hammer_cli_katello/content_export.rb' + - 'lib/hammer_cli_katello/content_export_helper.rb' + - 'test/functional/content_export/complete/library_test.rb' + - 'test/functional/content_export/complete/repository_test.rb' + - 'test/functional/content_export/complete/version_test.rb' + - 'test/functional/content_export/generate_listing_test.rb' + - 'test/functional/content_export/generate_metadata_test.rb' + - 'test/functional/content_export/incremental/library_test.rb' + - 'test/functional/content_export/incremental/repository_test.rb' + - 'test/functional/content_export/incremental/version_test.rb' + - 'test/test_helper.rb' + +# Offense count: 42 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: . +# SupportedStyles: percent, brackets +Style/SymbolArray: + EnforcedStyle: percent + MinSize: 6 + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: WordRegex. +# SupportedStyles: percent, brackets +Style/WordArray: + EnforcedStyle: percent + MinSize: 4 + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/ZeroLengthPredicate: + Exclude: + - 'lib/hammer_cli_katello/repository.rb' diff --git a/Gemfile b/Gemfile index 4a91e895..b97f5c88 100644 --- a/Gemfile +++ b/Gemfile @@ -11,11 +11,11 @@ end gem 'gettext', '>= 3.1.3', '< 4.0.0' group :test do - gem 'ci_reporter_minitest', :require => false + gem 'ci_reporter_minitest', '~> 1.0.0', :require => false gem 'minitest', '~> 5.18' gem 'minitest-spec-context', '~> 0.0.5' gem 'mocha', '~> 2.0' - gem 'rake', '~> 10.0' - gem 'rubocop', '0.42' - gem 'thor', '~> 1.0' + gem 'rake' + gem 'rubocop' + gem 'thor' end diff --git a/Rakefile b/Rakefile index bdc54481..ba84ae8c 100644 --- a/Rakefile +++ b/Rakefile @@ -1,10 +1,12 @@ require 'rake/testtask' require 'bundler/gem_tasks' +require 'ci/reporter/rake/minitest' Rake::TestTask.new do |t| t.libs << "lib" t.test_files = Dir.glob('test/**/*_test.rb') t.verbose = true + t.warning = false end begin diff --git a/lib/hammer_cli_katello/repository.rb b/lib/hammer_cli_katello/repository.rb index 97e1573a..dc740571 100644 --- a/lib/hammer_cli_katello/repository.rb +++ b/lib/hammer_cli_katello/repository.rb @@ -578,7 +578,6 @@ def task_progress(task_or_id) load_task(task_id) end - # rubocop:disable CyclomaticComplexity # rubocop:disable PerceivedComplexity def print_results(name, results, async) if !%w(error warning).include?(results) && !async # task successful && no async flag used @@ -603,7 +602,6 @@ def print_results(name, results, async) print_message _("Could not upload the content.") end end - # rubocop:enable CyclomaticComplexity # rubocop:enable PerceivedComplexity def silence_warnings diff --git a/test/functional/content_view/component/add_test.rb b/test/functional/content_view/component/add_test.rb index 0c7308a4..1b4ce931 100644 --- a/test/functional/content_view/component/add_test.rb +++ b/test/functional/content_view/component/add_test.rb @@ -5,11 +5,11 @@ module HammerCLIKatello describe ContentViewComponent::AddComponents do before do @cmd = %w(content-view component add) - @composite = OpenStruct.new(:id => 2, :name => "composite") - @component_version = OpenStruct.new(:id => 666, :version => "1.0") - @component = OpenStruct.new(:id => 6, :name => "component", + @composite = ::OpenStruct.new(:id => 2, :name => "composite") + @component_version = ::OpenStruct.new(:id => 666, :version => "1.0") + @component = ::OpenStruct.new(:id => 6, :name => "component", :content_view_version => @component_version) - @organization = OpenStruct.new(:id => 1, :name => "great", :label => "label") + @organization = ::OpenStruct.new(:id => 1, :name => "great", :label => "label") end def setup_org_expectations diff --git a/test/functional/content_view/component/remove_test.rb b/test/functional/content_view/component/remove_test.rb index 99bb71ce..3af50925 100644 --- a/test/functional/content_view/component/remove_test.rb +++ b/test/functional/content_view/component/remove_test.rb @@ -5,18 +5,18 @@ module HammerCLIKatello before do @cmd = %w(content-view component remove) - @component = OpenStruct.new(:id => 6, :name => "component") - @component2 = OpenStruct.new(:id => 7, :name => "component2") + @component = ::OpenStruct.new(:id => 6, :name => "component") + @component2 = ::OpenStruct.new(:id => 7, :name => "component2") - @content_view_component = OpenStruct.new(:id => 1444, + @content_view_component = ::OpenStruct.new(:id => 1444, :content_view => @component) - @content_view_component2 = OpenStruct.new(:id => 1445, + @content_view_component2 = ::OpenStruct.new(:id => 1445, :content_view => @component2) - @composite = OpenStruct.new(:id => 2, :name => "composite", + @composite = ::OpenStruct.new(:id => 2, :name => "composite", :content_view_components => [@content_view_component]) - @organization = OpenStruct.new(:id => 1, :name => "great", :label => "label") + @organization = ::OpenStruct.new(:id => 1, :name => "great", :label => "label") @content_view_components = [@content_view_component, @content_view_component2] end diff --git a/test/functional/content_view/component/update_test.rb b/test/functional/content_view/component/update_test.rb index 294130f5..7e822895 100644 --- a/test/functional/content_view/component/update_test.rb +++ b/test/functional/content_view/component/update_test.rb @@ -5,16 +5,16 @@ module HammerCLIKatello describe ContentViewComponent::UpdateCommand do before do @cmd = %w(content-view component update) - @component_version = OpenStruct.new(:id => 666, :version => "1.0") - @component = OpenStruct.new(:id => 6, :name => "component", + @component_version = ::OpenStruct.new(:id => 666, :version => "1.0") + @component = ::OpenStruct.new(:id => 6, :name => "component", :content_view_version => @component_version) - @content_view_component = OpenStruct.new(:id => 1444, + @content_view_component = ::OpenStruct.new(:id => 1444, :content_view => @component, :content_view_version => @component_version) - @composite = OpenStruct.new(:id => 2, :name => "composite", + @composite = ::OpenStruct.new(:id => 2, :name => "composite", :content_view_components => [@content_view_component]) - @organization = OpenStruct.new(:id => 1, :name => "great", :label => "label") + @organization = ::OpenStruct.new(:id => 1, :name => "great", :label => "label") end def setup_org_expectations diff --git a/test/test_helper.rb b/test/test_helper.rb index 83ce7dde..13b695bb 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -3,6 +3,7 @@ require 'minitest/spec' require 'mocha/minitest' require 'hammer_cli' +require 'ostruct' KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '4.10')