Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Leen-Meyer:puppet
rubygem-facter
facter-File-exists-removed.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File facter-File-exists-removed.patch of Package rubygem-facter
diff -ru a/Gemfile b/Gemfile --- a/Gemfile 2023-06-13 09:37:29.093392783 +0200 +++ b/Gemfile 2023-06-13 09:37:29.125393684 +0200 @@ -62,7 +62,7 @@ gem 'facter', ">= 1.0.0", :path => File.expand_path("..", __FILE__) -if File.exists? "#{__FILE__}.local" +if File.exist? "#{__FILE__}.local" eval(File.read("#{__FILE__}.local"), binding) end diff -ru a/install.rb b/install.rb --- a/install.rb 2023-06-13 09:37:29.093392783 +0200 +++ b/install.rb 2023-06-13 09:37:29.129393796 +0200 @@ -329,12 +329,12 @@ if is_windows? installed_wrapper = false - if File.exists?("#{from}.bat") + if File.exist?("#{from}.bat") FileUtils.install("#{from}.bat", File.join(target, "#{op_file}.bat"), :mode => 0755, :preserve => true, :verbose => true) installed_wrapper = true end - if File.exists?("#{from}.cmd") + if File.exist?("#{from}.cmd") FileUtils.install("#{from}.cmd", File.join(target, "#{op_file}.cmd"), :mode => 0755, :preserve => true, :verbose => true) installed_wrapper = true end diff -ru a/lib/facter/processors/os.rb b/lib/facter/processors/os.rb --- a/lib/facter/processors/os.rb 2023-06-13 09:37:29.097392896 +0200 +++ b/lib/facter/processors/os.rb 2023-06-13 09:37:29.129393796 +0200 @@ -64,7 +64,7 @@ def count_cpu_from_sysfs sysfs_cpu_directory = "/sys/devices/system/cpu" - if File.exists?(sysfs_cpu_directory) + if File.exist?(sysfs_cpu_directory) lookup_pattern = "#{sysfs_cpu_directory}" + "/cpu[0-9]*" Dir.glob(lookup_pattern).length end @@ -84,7 +84,7 @@ def count_physical_cpu_from_sysfs sysfs_cpu_directory = "/sys/devices/system/cpu" - if File.exists?(sysfs_cpu_directory) + if File.exist?(sysfs_cpu_directory) lookup_pattern = "#{sysfs_cpu_directory}" + "/cpu*/topology/physical_package_id" Dir.glob(lookup_pattern).collect { |f| Facter::Core::Execution.exec("cat #{f}")}.uniq.size else diff -ru a/lib/facter/util/ip.rb b/lib/facter/util/ip.rb --- a/lib/facter/util/ip.rb 2023-06-13 09:37:29.097392896 +0200 +++ b/lib/facter/util/ip.rb 2023-06-13 09:37:29.129393796 +0200 @@ -149,9 +149,9 @@ end def self.get_infiniband_macaddress(interface) - if File.exists?("/sys/class/net/#{interface}/address") then + if File.exist?("/sys/class/net/#{interface}/address") then ib_mac_address = `cat /sys/class/net/#{interface}/address`.chomp - elsif File.exists?("/sbin/ip") then + elsif File.exist?("/sbin/ip") then ip_output = %x{/sbin/ip link show '#{interface}'} ib_mac_address = ip_output.scan(%r{infiniband\s+((\w{1,2}:){5,}\w{1,2})}) else @@ -332,7 +332,7 @@ # # @return [String] modeling the raw file read def self.read_proc_net_bonding(path) - File.read(path) if File.exists?(path) + File.read(path) if File.exist?(path) end private_class_method :read_proc_net_bonding diff -ru a/lib/facter/util/parser.rb b/lib/facter/util/parser.rb --- a/lib/facter/util/parser.rb 2023-06-13 09:37:29.097392896 +0200 +++ b/lib/facter/util/parser.rb 2023-06-13 09:37:29.129393796 +0200 @@ -140,9 +140,9 @@ # Returns a hash of facts from powershell output def parse_results powershell = - if File.exists?("#{ENV['SYSTEMROOT']}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe") + if File.exist?("#{ENV['SYSTEMROOT']}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe") "#{ENV['SYSTEMROOT']}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe" - elsif File.exists?("#{ENV['SYSTEMROOT']}\\system32\\WindowsPowershell\\v1.0\\powershell.exe") + elsif File.exist?("#{ENV['SYSTEMROOT']}\\system32\\WindowsPowershell\\v1.0\\powershell.exe") "#{ENV['SYSTEMROOT']}\\system32\\WindowsPowershell\\v1.0\\powershell.exe" else 'powershell.exe' diff -ru a/lib/facter/util/plist/parser.rb b/lib/facter/util/plist/parser.rb --- a/lib/facter/util/plist/parser.rb 2023-06-13 09:37:29.097392896 +0200 +++ b/lib/facter/util/plist/parser.rb 2023-06-13 09:37:29.129393796 +0200 @@ -78,7 +78,7 @@ require 'strscan' contents = ( - if (File.exists? @filename_or_xml) + if (File.exist? @filename_or_xml) File.open(@filename_or_xml) {|f| f.read} else @filename_or_xml diff -ru a/lib/facter/util/processor.rb b/lib/facter/util/processor.rb --- a/lib/facter/util/processor.rb 2023-06-13 09:37:29.097392896 +0200 +++ b/lib/facter/util/processor.rb 2023-06-13 09:37:29.129393796 +0200 @@ -156,11 +156,11 @@ # @return [Array] of strings containing the lines of the file or nil if the # sched.models file could not be located. def self.read_sched_models - path = if File.exists?("/usr/lib/sched.models") + path = if File.exist?("/usr/lib/sched.models") "/usr/lib/sched.models" - elsif File.exists?("/usr/sam/lib/mo/sched.models") + elsif File.exist?("/usr/sam/lib/mo/sched.models") "/usr/sam/lib/mo/sched.models" - elsif File.exists?("/opt/langtools/lib/sched.models") + elsif File.exist?("/opt/langtools/lib/sched.models") "/opt/langtools/lib/sched.models" end @@ -174,7 +174,7 @@ # read_unistd_h is intended to be stubbed instead of File.readlines # @return [Array] of Strings or nil if the file does not exist. def self.read_unistd_h(path) - if File.exists?(path) then + if File.exist?(path) then File.readlines(path) end end @@ -216,7 +216,7 @@ processor_list = [] cpuinfo = "/proc/cpuinfo" - if File.exists?(cpuinfo) + if File.exist?(cpuinfo) model = Facter.value(:architecture) case model when "x86_64", "amd64", "i386", "x86", /parisc/, "hppa", "ia64" diff -ru a/lib/facter/version.rb b/lib/facter/version.rb --- a/lib/facter/version.rb 2023-06-13 09:37:29.097392896 +0200 +++ b/lib/facter/version.rb 2023-06-13 09:37:29.129393796 +0200 @@ -78,7 +78,7 @@ # @return [String] the version -- for example: "1.6.14-6-gea42046" or nil if the VERSION # file does not exist. def self.read_version_file(path) - if File.exists?(path) + if File.exist?(path) File.read(path).chomp end end diff -ru a/spec/unit/util/uptime_spec.rb b/spec/unit/util/uptime_spec.rb --- a/spec/unit/util/uptime_spec.rb 2023-06-13 09:37:29.109393234 +0200 +++ b/spec/unit/util/uptime_spec.rb 2023-06-13 09:37:29.129393796 +0200 @@ -22,7 +22,7 @@ describe "when /proc/uptime is not available" do before :each do @nonexistent_file = '/non/existent/file' - File.exists?(@nonexistent_file).should == false + File.exist?(@nonexistent_file).should == false Facter::Util::Uptime.stubs(:uptime_file).returns(@nonexistent_file) end
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor