From 7d7c8941c88ea71dbd774c96cfa2306470a83f30 Mon Sep 17 00:00:00 2001 From: Daniel Parks Date: Mon, 10 Oct 2022 05:29:27 -0700 Subject: [PATCH] Switch entirely to require from require_relative (readability). --- lib/puppet/provider/rustup_internal/default.rb | 4 ++-- lib/puppet/type/rustup_internal.rb | 4 ++-- lib/puppet_x/rustup/property/set.rb | 2 +- lib/puppet_x/rustup/property/subresources.rb | 2 +- lib/puppet_x/rustup/util.rb | 2 +- spec/unit/puppet_x/rustup/property/set_spec.rb | 2 +- spec/unit/puppet_x/rustup/property/subresources_spec.rb | 2 +- spec/unit/puppet_x/rustup/util_spec.rb | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/puppet/provider/rustup_internal/default.rb b/lib/puppet/provider/rustup_internal/default.rb index 994b712..a0ca67e 100644 --- a/lib/puppet/provider/rustup_internal/default.rb +++ b/lib/puppet/provider/rustup_internal/default.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -require_relative '../rustup_exec' -require_relative '../../../puppet_x/rustup/util' +require 'puppet/provider/rustup_exec' +require 'puppet_x/rustup/util' Puppet::Type.type(:rustup_internal).provide( :default, parent: Puppet::Provider::RustupExec diff --git a/lib/puppet/type/rustup_internal.rb b/lib/puppet/type/rustup_internal.rb index a270abd..63345ff 100644 --- a/lib/puppet/type/rustup_internal.rb +++ b/lib/puppet/type/rustup_internal.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true require 'puppet/parameter/boolean' -require_relative '../../puppet_x/rustup/util' -require_relative '../../puppet_x/rustup/property/subresources' +require 'puppet_x/rustup/util' +require 'puppet_x/rustup/property/subresources' Puppet::Type.newtype(:rustup_internal) do @doc = <<~'END' diff --git a/lib/puppet_x/rustup/property/set.rb b/lib/puppet_x/rustup/property/set.rb index 80ec90b..a4ea396 100644 --- a/lib/puppet_x/rustup/property/set.rb +++ b/lib/puppet_x/rustup/property/set.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../../rustup' +require 'puppet_x/rustup' # Property classes for rustup module PuppetX::Rustup::Property diff --git a/lib/puppet_x/rustup/property/subresources.rb b/lib/puppet_x/rustup/property/subresources.rb index ffea344..488eb16 100644 --- a/lib/puppet_x/rustup/property/subresources.rb +++ b/lib/puppet_x/rustup/property/subresources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative 'set' +require 'puppet_x/rustup/property/set' # Property classes for rustup module PuppetX::Rustup::Property diff --git a/lib/puppet_x/rustup/util.rb b/lib/puppet_x/rustup/util.rb index b6c5893..a2d0939 100644 --- a/lib/puppet_x/rustup/util.rb +++ b/lib/puppet_x/rustup/util.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../rustup' +require 'puppet_x/rustup' # Utility functions for rustup module PuppetX::Rustup::Util diff --git a/spec/unit/puppet_x/rustup/property/set_spec.rb b/spec/unit/puppet_x/rustup/property/set_spec.rb index a3e6e4d..383bf9e 100644 --- a/spec/unit/puppet_x/rustup/property/set_spec.rb +++ b/spec/unit/puppet_x/rustup/property/set_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -require_relative '../../../../../lib/puppet_x/rustup/property/set' +require 'puppet_x/rustup/property/set' RSpec.describe PuppetX::Rustup::Property::Set do before(:each) do diff --git a/spec/unit/puppet_x/rustup/property/subresources_spec.rb b/spec/unit/puppet_x/rustup/property/subresources_spec.rb index 0874351..5520b08 100644 --- a/spec/unit/puppet_x/rustup/property/subresources_spec.rb +++ b/spec/unit/puppet_x/rustup/property/subresources_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -require_relative '../../../../../lib/puppet_x/rustup/property/subresources' +require 'puppet_x/rustup/property/subresources' RSpec.describe PuppetX::Rustup::Property::Subresources do before(:each) do diff --git a/spec/unit/puppet_x/rustup/util_spec.rb b/spec/unit/puppet_x/rustup/util_spec.rb index db8ab62..e627f41 100644 --- a/spec/unit/puppet_x/rustup/util_spec.rb +++ b/spec/unit/puppet_x/rustup/util_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -require_relative '../../../../lib/puppet_x/rustup/util' +require 'puppet_x/rustup/util' RSpec.describe PuppetX::Rustup::Util do context 'remove_file_line' do