lib/rvc/modules/core.rb in rvc-1.6.0 vs lib/rvc/modules/core.rb in rvc-1.7.0

- old
+ new

@@ -16,10 +16,12 @@ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. +require 'rvc/vim' + opts :quit do summary "Exit RVC" end rvc_alias :quit @@ -40,24 +42,10 @@ def reload opts old_verbose = $VERBOSE $VERBOSE = nil unless opts[:verbose] - RVC.reload_modules opts[:verbose] - - typenames = Set.new(VIM.loader.typenames.select { |x| VIM.const_defined? x }) - dirs = VIM.extension_dirs - dirs.each do |path| - Dir.open(path) do |dir| - dir.each do |file| - next unless file =~ /\.rb$/ - next unless typenames.member? $` - file_path = File.join(dir, file) - puts "loading #{$`} extensions from #{file_path}" if opts[:verbose] - load file_path - end - end - end - + shell.reload_modules opts[:verbose] + RbVmomi::VIM.reload_extensions ensure $VERBOSE = old_verbose end