mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Fixing Naming/PredicateName issues
This commit drops the `has_` prefix from several `?` style methods because that's against the ruby style guide and redundant for a method ending in `?`.
This commit is contained in:
parent
5193ff6a84
commit
61e9f56ed2
2 changed files with 4 additions and 4 deletions
|
|
@ -181,13 +181,13 @@ module Vmpooler
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return if has_mismatched_hostname?(vm, pool_name, provider)
|
return if mismatched_hostname?(vm, pool_name, provider)
|
||||||
|
|
||||||
vm_still_ready?(pool_name, vm, provider)
|
vm_still_ready?(pool_name, vm, provider)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_mismatched_hostname?(vm, pool_name, provider)
|
def mismatched_hostname?(vm, pool_name, provider)
|
||||||
pool_config = $config[:pools][$config[:pool_index][pool_name]]
|
pool_config = $config[:pools][$config[:pool_index][pool_name]]
|
||||||
check_hostname = pool_config['check_hostname_for_mismatch']
|
check_hostname = pool_config['check_hostname_for_mismatch']
|
||||||
check_hostname = $config[:config]['check_ready_vm_hostname_for_mismatch'] if check_hostname.nil?
|
check_hostname = $config[:config]['check_ready_vm_hostname_for_mismatch'] if check_hostname.nil?
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ module Vmpooler
|
||||||
# Returns an Array of Pathname objects.
|
# Returns an Array of Pathname objects.
|
||||||
def gem_directories
|
def gem_directories
|
||||||
dirs = []
|
dirs = []
|
||||||
if has_rubygems?
|
if rubygems?
|
||||||
dirs = gemspecs.map do |spec|
|
dirs = gemspecs.map do |spec|
|
||||||
lib_path = File.expand_path(File.join(spec.full_gem_path, provider_path))
|
lib_path = File.expand_path(File.join(spec.full_gem_path, provider_path))
|
||||||
lib_path if File.exist? lib_path
|
lib_path if File.exist? lib_path
|
||||||
|
|
@ -99,7 +99,7 @@ module Vmpooler
|
||||||
# Internal: Check if RubyGems is loaded and available.
|
# Internal: Check if RubyGems is loaded and available.
|
||||||
#
|
#
|
||||||
# Returns true if RubyGems is available, false if not.
|
# Returns true if RubyGems is available, false if not.
|
||||||
def has_rubygems?
|
def rubygems?
|
||||||
defined? ::Gem
|
defined? ::Gem
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue