Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substitute require for require_relative #305

Merged
merged 1 commit into from
Dec 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/mixlib/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
require "mixlib/versioning"
require "mixlib/shellout"

require "mixlib/install/backend"
require "mixlib/install/options"
require "mixlib/install/generator"
require "mixlib/install/generator/bourne"
require "mixlib/install/generator/powershell"
require_relative "install/backend"
require_relative "install/options"
require_relative "install/generator"
require_relative "install/generator/bourne"
require_relative "install/generator/powershell"

module Mixlib
class Install
Expand Down
2 changes: 1 addition & 1 deletion lib/mixlib/install/backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.
#

require "mixlib/install/backend/package_router"
require_relative "backend/package_router"

module Mixlib
class Install
Expand Down
2 changes: 1 addition & 1 deletion lib/mixlib/install/backend/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.
#

require "mixlib/install/util"
require_relative "../util"

module Mixlib
class Install
Expand Down
12 changes: 6 additions & 6 deletions lib/mixlib/install/backend/package_router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#

require "json"
require "mixlib/install/artifact_info"
require "mixlib/install/backend/base"
require "mixlib/install/product"
require "mixlib/install/product_matrix"
require "mixlib/install/util"
require "mixlib/install/dist"
require_relative "../artifact_info"
require_relative "base"
require_relative "../product"
require_relative "../product_matrix"
require_relative "../util"
require_relative "../dist"
require "mixlib/versioning"
require "net/http"

Expand Down
4 changes: 2 additions & 2 deletions lib/mixlib/install/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# limitations under the License.
#

require "mixlib/install"
require_relative "../install"
require "thor"

module Mixlib
Expand All @@ -22,7 +22,7 @@ class Cli < Thor

desc "version", "print mixlib-install version"
def version
require "mixlib/install/version"
require_relative "version"
say Mixlib::Install::VERSION
end

Expand Down
4 changes: 2 additions & 2 deletions lib/mixlib/install/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# limitations under the License.
#

require "mixlib/install/generator/bourne"
require "mixlib/install/generator/powershell"
require_relative "generator/bourne"
require_relative "generator/powershell"

module Mixlib
class Install
Expand Down
4 changes: 2 additions & 2 deletions lib/mixlib/install/generator/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

require "erb"
require "ostruct"
require "mixlib/install/util"
require "mixlib/install/dist"
require_relative "../util"
require_relative "../dist"

module Mixlib
class Install
Expand Down
2 changes: 1 addition & 1 deletion lib/mixlib/install/generator/bourne.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

require "mixlib/install/generator/base"
require_relative "base"

module Mixlib
class Install
Expand Down
2 changes: 1 addition & 1 deletion lib/mixlib/install/generator/powershell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

require "mixlib/install/generator/base"
require_relative "base"

module Mixlib
class Install
Expand Down
6 changes: 3 additions & 3 deletions lib/mixlib/install/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
# limitations under the License.
#

require "mixlib/install/product"
require "mixlib/install/product_matrix"
require "mixlib/install/util"
require_relative "product"
require_relative "product_matrix"
require_relative "util"
require "mixlib/versioning"

module Mixlib
Expand Down
2 changes: 1 addition & 1 deletion lib/mixlib/install/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

require "mixlib/versioning"
require "mixlib/install/dist"
require_relative "dist"

module Mixlib
class Install
Expand Down
2 changes: 1 addition & 1 deletion lib/mixlib/install/product_matrix.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "mixlib/install/product"
require_relative "product"

#
# If you are making a change to PRODUCT_MATRIX, please make sure
Expand Down
4 changes: 2 additions & 2 deletions lib/mixlib/install/script_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# limitations under the License.
#

require "mixlib/install/util"
require "mixlib/install/generator/powershell"
require_relative "util"
require_relative "generator/powershell"
require "cgi"

module Mixlib
Expand Down
2 changes: 1 addition & 1 deletion lib/mixlib/install/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def wrap_command(cmd)
# @param name [Array] headers
# @return [String] generated user-agent string
def user_agent_string(headers)
require "mixlib/install/version"
require_relative "version"
user_agents = %W{mixlib-install/#{Mixlib::Install::VERSION}}
user_agents << headers
# Ensure that if the default user agent is aleady set it doesn't get duplicated
Expand Down