Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Use require_relative instead of require to speed up requires #175

Merged
merged 1 commit into from
Jul 31, 2020
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Gemfile.lock
/pkg/
/vendor/bundle/
/vmodl/
*.gem
8 changes: 4 additions & 4 deletions lib/rbvmomi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def self.connect(opts)
end
end

require 'rbvmomi/connection'
require 'rbvmomi/sso'
require 'rbvmomi/version'
require 'rbvmomi/vim'
require_relative 'rbvmomi/connection'
require_relative 'rbvmomi/sso'
require_relative 'rbvmomi/version'
require_relative 'rbvmomi/vim'
10 changes: 5 additions & 5 deletions lib/rbvmomi/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

require 'time'
require 'date'
require 'rbvmomi/trivial_soap'
require 'rbvmomi/basic_types'
require 'rbvmomi/fault'
require 'rbvmomi/type_loader'
require 'rbvmomi/deserialization'
require_relative 'trivial_soap'
require_relative 'basic_types'
require_relative 'fault'
require_relative 'type_loader'
require_relative 'deserialization'

module RbVmomi

Expand Down
2 changes: 1 addition & 1 deletion lib/rbvmomi/pbm.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2012-2017 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: MIT

require 'rbvmomi'
require_relative '../rbvmomi'

module RbVmomi

Expand Down
2 changes: 1 addition & 1 deletion lib/rbvmomi/sms.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2013-2017 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: MIT

require 'rbvmomi'
require_relative '../rbvmomi'
module RbVmomi

# A connection to one vSphere SMS endpoint.
Expand Down
2 changes: 1 addition & 1 deletion lib/rbvmomi/utils/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

require 'open-uri'
require 'nokogiri'
require 'rbvmomi'
require_relative '../../rbvmomi'

# The cached ovf deployer is an optimization on top of regular OVF deployment
# as it is offered by the VIM::OVFManager. Creating a VM becomes a multi-stage
Expand Down