Please review pull request #169: (#9555) removing trailing whitespace opened by (ghoneycutt)

Description:

suggest adding these lines to your vimrc

highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
match ExtraWhitespace /\s+$/

  • Opened: Sat Feb 11 00:41:25 UTC 2012
  • Based on: puppetlabs:master (4c00d5e5eb294c379cb7efbe84373c830bca331b)
  • Requested merge: ghoneycutt:tickets/master/9555 (4c722f60873ad741ad6f47cacb40ab4364762e6d)

Diff follows:

diff --git a/lib/facter/blockdevices.rb b/lib/facter/blockdevices.rb
index 875718e..e0ddc48 100644
--- a/lib/facter/blockdevices.rb
+++ b/lib/facter/blockdevices.rb
@@ -58,22 +58,22 @@
 
   blockdevices = []
 
-  # This should prevent any non-2.6 kernels or odd machines without sysfs support from being investigated further  
+  # This should prevent any non-2.6 kernels or odd machines without sysfs support from being investigated further
   if File.exist?(sysfs_block_directory)
 
-    # Iterate over each file in the /sys/block/ directory and skip ones that do not have a device subdirectory  
+    # Iterate over each file in the /sys/block/ directory and skip ones that do not have a device subdirectory
     Dir.entries(sysfs_block_directory).each do |device|
       sysfs_device_directory = sysfs_block_directory + device + "/device"
       next unless File.exist?(sysfs_device_directory)
 
-      # Add the device to the blockdevices list, which is returned as it's own fact later on            
+      # Add the device to the blockdevices list, which is returned as it's own fact later on
       blockdevices << device
 
       sizefile = sysfs_block_directory + device + "/size"
       vendorfile = sysfs_device_directory + "/vendor"
       modelfile = sysfs_device_directory + "/model"
 
-      if File.exist?(sizefile) 
+      if File.exist?(sizefile)
         Facter.add("blockdevice_#{device}_size".to_sym) do
           setcode { IO.read(sizefile).strip.to_i * 512 }
         end
@@ -99,7 +99,7 @@
   unless blockdevices.empty?
     Facter.add(:blockdevices) do
       setcode { blockdevices.sort.join(',') }
-    end 
+    end
   end
 
 end
diff --git a/lib/facter/ec2.rb b/lib/facter/ec2.rb
index 98c957f..392c549 100644
--- a/lib/facter/ec2.rb
+++ b/lib/facter/ec2.rb
@@ -24,7 +24,7 @@ def userdata()
   end
 end
 
-if (Facter::Util::EC2.has_euca_mac? || Facter::Util::EC2.has_openstack_mac? || 
+if (Facter::Util::EC2.has_euca_mac? || Facter::Util::EC2.has_openstack_mac? ||
     Facter::Util::EC2.has_ec2_arp?) && Facter::Util::EC2.can_connect?
 
   metadata
diff --git a/lib/facter/operatingsystemrelease.rb b/lib/facter/operatingsystemrelease.rb
index 4d411aa..a0db2ba 100644
--- a/lib/facter/operatingsystemrelease.rb
+++ b/lib/facter/operatingsystemrelease.rb
@@ -11,7 +11,7 @@
 #   On Slackware, parses '/etc/slackware-version'.
 #   On Amazon Linux, returns the 'lsbdistrelease' value.
 #   On Mageia, parses '/etc/mageia-release' for the release version.
-#   
+#
 #   On all remaining systems, returns the 'kernelrelease' value.
 #
 # Caveats:
diff --git a/lib/facter/util/ec2.rb b/lib/facter/util/ec2.rb
index 2ed6517..bcfda60 100644
--- a/lib/facter/util/ec2.rb
+++ b/lib/facter/util/ec2.rb
@@ -26,7 +26,7 @@ def has_euca_mac?
       !!(Facter.value(:macaddress) =~ %r{^[dD]0:0[dD]:})
     end
 
-    # Test if this host has a mac address used by OpenStack, which 
+    # Test if this host has a mac address used by OpenStack, which
     # normally starts with 02:16:3E
     def has_openstack_mac?
       !!(Facter.value(:macaddress) =~ %r{^02:16:3[eE]})
diff --git a/spec/unit/architecture_spec.rb b/spec/unit/architecture_spec.rb
index 5dadd84..e0ba2f8 100755
--- a/spec/unit/architecture_spec.rb
+++ b/spec/unit/architecture_spec.rb
@@ -30,7 +30,7 @@
     "i686" => "i386",
     "pentium" => "i386",
   }
-  
+
   os_archs.each do |pair, result|
     it "should be #{result} if os is #{pair[0]} and hardwaremodel is #{pair[1]}" do
      Facter.fact(:operatingsystem).stubs(:value).returns(pair[0])
diff --git a/spec/unit/blockdevices_spec.rb b/spec/unit/blockdevices_spec.rb
index 7fdcc9e..5c33172 100644
--- a/spec/unit/blockdevices_spec.rb
+++ b/spec/unit/blockdevices_spec.rb
@@ -54,20 +54,20 @@
           %w{ . .. hda }.each do |device|
             Facter.fact("blockdevice_#{device}_size".to_sym).should == nil
             Facter.fact("blockdevice_#{device}_vendor".to_sym).should == nil
-            Facter.fact("blockdevice_#{device}_model".to_sym).should == nil          
+            Facter.fact("blockdevice_#{device}_model".to_sym).should == nil
           end
 
           # handle facts that should exist
           %w{ sda sdb }.each do |device|
             Facter.fact("blockdevice_#{device}_size".to_sym).should_not == nil
             Facter.fact("blockdevice_#{device}_vendor".to_sym).should_not == nil
-            Facter.fact("blockdevice_#{device}_model".to_sym).should_not == nil          
+            Facter.fact("blockdevice_#{device}_model".to_sym).should_not == nil
           end
 
           Facter.fact(:blockdevice_sda_model).value.should == "WDC WD5000AAKS-0"
           Facter.fact(:blockdevice_sda_vendor).value.should == "ATA"
           Facter.fact(:blockdevice_sda_size).value.should == 500107862016
-          
+
           Facter.fact(:blockdevice_sdb_model).value.should == "PERC H700"
           Facter.fact(:blockdevice_sdb_vendor).value.should == "DELL"
           Facter.fact(:blockdevice_sdb_size).value.should == 4499246678016
diff --git a/spec/unit/ssh_spec.rb b/spec/unit/ssh_spec.rb
index 79dc025..de368ff 100755
--- a/spec/unit/ssh_spec.rb
+++ b/spec/unit/ssh_spec.rb
@@ -11,7 +11,7 @@
    # different name, so load the file explicitly.
    Facter.collection.loader.load(:ssh)
   end
-   
+
     # fingerprints extracted from ssh-keygen -r '' -f /etc/ssh/ssh_host_dsa_key.pub
   { 'SSHRSAKey' => [ '/usr/local/etc/ssh_host_rsa_key.pub' , "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDrs+KtR8hjasELsyCiiBplUeIi77hEHzTSQt1ALG7N4IgtMg27ZAcq0tl2/O9ZarQuClc903pgionbM9Q98CtAIoqgJwdtsor7ETRmzwrcY/mvI7ne51UzQy4Eh9WrplfpNyg+EVO0FUC7mBcay6JY30QKasePp+g4MkwK5cuTzOCzd9up9KELonlH7tTm2L0YI4HhZugwVoTFulCAZvPICxSk1B/fEKyGSZVfY/UxZNqg9g2Wyvq5u40xQ5eO882UwhB3w4IbmRnPKcyotAcqOJxA7hToMKtEmFct+vjHE8T37w8axE/1X9mdvy8IZbkEBL1cupqqb8a8vU1QTg1z", "SSHFP 1 1 1e4f163a1747d0d1a08a29972c9b5d94ee5705d0\nSSHFP 1 2 4e834c91e423d6085ed6dfb880a59e2f1b04f17c1dc17da07708af67c5ab6045" ],
     'SSHDSAKey' => [ '/etc/ssh/ssh_host_dsa_key.pub' , "ssh-dss AAAAB3NzaC1kc3MAAACBAKjmRez14aZT6OKhHrsw19s7u30AdghwHFQbtC+L781YjJ3UV0/WQoZ8NaDL4ovuvW23RuO49tsqSNcVHg+PtRiN2iTVAS2h55TFhaPKhTs+i0NH3p3Ze8LNSYuz8uK7a+nTxysz47GYTHiE1ke8KXe5wGKDO1TO/MUgpDbwx72LAAAAFQD9yMJCnZMiKzA7J1RNkwvgCyBKSQAAAIAtWBAsuRM0F2fdCe+F/JmgyryQmRIT5vP8E1ww3t3ywdLHklN7UMkaEKBW/TN/jj1JOGXtZ2v5XI+0VNoNKD/7dnCGzNViRT/jjfyVi6l5UMg4Q52Gv0RXJoBJpxNqFOU2niSsy8hioyE39W6LJYWJtQozGpH/KKgkCSvxBn5hlAAAAIB1yo/YD0kQICOO0KE+UMMaKtV7FwyedFJsxsWYwZfHXGwWskf0d2+lPhd9qwdbmSvySE8Qrlvu+W+X8AipwGkItSnj16ORF8kO3lfABa+7L4BLDtumt7ybjBPcHOy3n28dd07TmMtyWvLjOb0mcxPo+TwDLtHd3L/3C1Dh41jRPg==\n", "SSHFP 2 1 f63dfe8da99f50ffbcfa40a61161cee29d109f70\nSSHFP 2 2 5f57aa6be9baddd71b6049ed5d8639664a7ddf92ce293e3887f16ad0f2d459d9"  ],
diff --git a/spec/unit/util/macosx_spec.rb b/spec/unit/util/macosx_spec.rb
index dc7bb9b..688cfdb 100755
--- a/spec/unit/util/macosx_spec.rb
+++ b/spec/unit/util/macosx_spec.rb
@@ -43,19 +43,19 @@
     Facter::Util::Macosx.expects(:profiler_data).with("SPSoftwareDataType").returns "eh"
     Facter::Util::Macosx.os_overview.should == "eh"
   end
-  
+
   describe "when working out software version" do
-    
+
     before do
       Facter::Util::Resolution.expects(:exec).with("/usr/bin/sw_vers -productName").returns "Mac OS X"
       Facter::Util::Resolution.expects(:exec).with("/usr/bin/sw_vers -buildVersion").returns "9J62"
     end
-    
+
     it "should have called sw_vers three times when determining software version" do
       Facter::Util::Resolution.expects(:exec).with("/usr/bin/sw_vers -productVersion").returns "10.5.7"
       Facter::Util::Macosx.sw_vers
     end
-  
+
     it "should return a hash with the correct keys when determining software version" do
       Facter::Util::Resolution.expects(:exec).with("/usr/bin/sw_vers -productVersion").returns "10.5.7"
       Facter::Util::Macosx.sw_vers.keys.sort.should == ["macosx_productName",
@@ -64,14 +64,14 @@
                                                         "macosx_productversion_major",
                                                         "macosx_productVersion"].sort
     end
-  
+
     it "should split a product version of 'x.y.z' into separate hash entries correctly" do
       Facter::Util::Resolution.expects(:exec).with("/usr/bin/sw_vers -productVersion").returns "1.2.3"
       sw_vers = Facter::Util::Macosx.sw_vers
       sw_vers["macosx_productversion_major"].should == "1.2"
       sw_vers["macosx_productversion_minor"].should == "3"
     end
-  
+
     it "should treat a product version of 'x.y' as 'x.y.0" do
       Facter::Util::Resolution.expects(:exec).with("/usr/bin/sw_vers -productVersion").returns "2.3"
       Facter::Util::Macosx.sw_vers["macosx_productversion_minor"].should == "0"
diff --git a/spec/unit/util/processor_spec.rb b/spec/unit/util/processor_spec.rb
index 9867f53..def8b21 100755
--- a/spec/unit/util/processor_spec.rb
+++ b/spec/unit/util/processor_spec.rb
@@ -43,7 +43,7 @@ def cpuinfo_fixture(filename)
     Facter.fact(:architecture).stubs(:value).returns("amd64")
     File.stubs(:exists?).with("/proc/cpuinfo").returns(true)
     File.stubs(:readlines).with("/proc/cpuinfo").returns(cpuinfo_fixture("amd64quad"))
-    
+
     Facter::Util::Processor.enum_cpuinfo[0].should == "Quad-Core AMD Opteron(tm) Processor 2374 HE"
     Facter::Util::Processor.enum_cpuinfo[1].should == "Quad-Core AMD Opteron(tm) Processor 2374 HE"
     Facter::Util::Processor.enum_cpuinfo[2].should == "Quad-Core AMD Opteron(tm) Processor 2374 HE"

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to