From 5117e12d24a81c0d1b7ab0b61fdd7594ab4e55d6 Mon Sep 17 00:00:00 2001 From: Jeff McCune Date: Sun, 8 Apr 2012 21:21:35 -0500 Subject: [PATCH] (maint) Ensure every file has a trailing newlines Without this patch some files exist in the tree that don't have trailing newlines. This is annoying because perl -pli.bak -e will automatically add a newline to every file it modifies in place. The files that actually have modifications by the global search and replace need to be separated from the files that only have newlines added. This patch simply adds newlines to everything if they don't exist on the last line. Yes, the PNG's are perfectly fine with a trailing newline as well. --- autotest/images/fail.png | Bin 19978 -> 19979 bytes autotest/images/pass.png | Bin 21763 -> 21764 bytes autotest/images/pending.png | Bin 19745 -> 19746 bytes conf/osx/preflight | 2 +- lib/puppet/indirector/facts/network_device.rb | 2 +- lib/puppet/type/vlan.rb | 2 +- .../util/instrumentation/indirection_probe.rb | 2 +- .../util/instrumentation/instrumentable.rb | 2 +- .../util/instrumentation/listeners/log.rb | 2 +- .../instrumentation/listeners/performance.rb | 2 +- lib/puppet/util/network_device/base.rb | 2 +- lib/puppet/util/network_device/cisco.rb | 2 +- lib/puppet/util/network_device/cisco/facts.rb | 2 +- .../util/network_device/cisco/interface.rb | 2 +- lib/puppet/util/network_device/config.rb | 2 +- lib/puppet/util/network_device/ipcalc.rb | 2 +- lib/puppet/util/network_device/transport.rb | 2 +- .../util/network_device/transport/base.rb | 2 +- .../util/network_device/transport/ssh.rb | 2 +- .../releases/jamtur01-apache/metadata.json | 2 +- .../parser/lexer/arithmetic_expression.pp | 2 +- spec/fixtures/yaml/report0.25.x.yaml | 2 +- spec/fixtures/yaml/report2.6.x.yaml | 2 +- .../network/rest_authconfig_spec.rb | 2 +- spec/unit/util/instrumentation/data_spec.rb | 2 +- .../instrumentation/indirection_probe_spec.rb | 2 +- .../instrumentation/instrumentable_spec.rb | 2 +- .../util/instrumentation/listener_spec.rb | 2 +- .../instrumentation/listeners/log_spec.rb | 2 +- .../listeners/performance_spec.rb | 2 +- spec/unit/util/instrumentation_spec.rb | 2 +- spec/unit/util/reference_spec.rb | 2 +- tasks/rake/manpages.rake | 2 +- test/data/snippets/arithmetic_expression.pp | 2 +- 34 files changed, 31 insertions(+), 31 deletions(-) diff --git a/autotest/images/fail.png b/autotest/images/fail.png index 2d55394427fe179b9e098929b1ef46113a12bd5a..41f49055aecf83f7572e3a88f7a3fd86f2478e13 100644 GIT binary patch delta 11 ScmeC0!`MBCaRZkhBNqS}N&{m6 delta 9 QcmeC4!`L;4aRZkh01}Y{SO5S3 diff --git a/autotest/images/pass.png b/autotest/images/pass.png index cbe537186994719664ce51837fdec79ff98e7985..7167a61d4531ad4bb2aa3842b4064087c2d8289e 100644 GIT binary patch delta 11 ScmZo(#n`fnaRYNGBNqS}tOIcX delta 9 QcmZo!#n`-xaRYNG020>&W&i*H diff --git a/autotest/images/pending.png b/autotest/images/pending.png index b8cf9a391effc673f2a5c3c7aa6694c7e77c82e8..7c412e6fb9fee513b996a758b31c1e64b6c0ef69 100644 GIT binary patch delta 11 ScmZ2Di*eB`#tn+Tj9dU4HUpyo delta 9 QcmZ29i*eyB#tn+T02BQKm;e9( diff --git a/conf/osx/preflight b/conf/osx/preflight index 8220d02a39d..39dc3d3eb55 100755 --- a/conf/osx/preflight +++ b/conf/osx/preflight @@ -21,4 +21,4 @@ /bin/rm -Rf "${3}{BINDIR}/puppetd" /bin/rm -Rf "${3}{BINDIR}/puppetmasterd" /bin/rm -Rf "${3}{BINDIR}/puppetqd" -/bin/rm -Rf "${3}{BINDIR}/puppetrun" \ No newline at end of file +/bin/rm -Rf "${3}{BINDIR}/puppetrun" diff --git a/lib/puppet/indirector/facts/network_device.rb b/lib/puppet/indirector/facts/network_device.rb index c9bac803ed1..a84b4615779 100644 --- a/lib/puppet/indirector/facts/network_device.rb +++ b/lib/puppet/indirector/facts/network_device.rb @@ -22,4 +22,4 @@ def destroy(facts) def save(facts) raise Puppet::DevError, "You cannot save facts to the code store; it is only used for getting facts from a remote device" end -end \ No newline at end of file +end diff --git a/lib/puppet/type/vlan.rb b/lib/puppet/type/vlan.rb index 01fe6efe8b5..dc33ea2e0fb 100644 --- a/lib/puppet/type/vlan.rb +++ b/lib/puppet/type/vlan.rb @@ -23,4 +23,4 @@ newparam(:device_url) do desc "The URL of the router or switch maintaining this VLAN." end -end \ No newline at end of file +end diff --git a/lib/puppet/util/instrumentation/indirection_probe.rb b/lib/puppet/util/instrumentation/indirection_probe.rb index 66e5f92ab38..ad9323a38af 100644 --- a/lib/puppet/util/instrumentation/indirection_probe.rb +++ b/lib/puppet/util/instrumentation/indirection_probe.rb @@ -26,4 +26,4 @@ def to_pson(*args) def self.from_pson(data) self.new(data["name"]) end -end \ No newline at end of file +end diff --git a/lib/puppet/util/instrumentation/instrumentable.rb b/lib/puppet/util/instrumentation/instrumentable.rb index 5789dcbe27c..1ce18a777f3 100644 --- a/lib/puppet/util/instrumentation/instrumentable.rb +++ b/lib/puppet/util/instrumentation/instrumentable.rb @@ -140,4 +140,4 @@ def self.each_probe } nil # do not leak our probes to the exterior world end -end \ No newline at end of file +end diff --git a/lib/puppet/util/instrumentation/listeners/log.rb b/lib/puppet/util/instrumentation/listeners/log.rb index 59e9daff914..fcff1462142 100644 --- a/lib/puppet/util/instrumentation/listeners/log.rb +++ b/lib/puppet/util/instrumentation/listeners/log.rb @@ -26,4 +26,4 @@ def data @last_logs.dup } end -end \ No newline at end of file +end diff --git a/lib/puppet/util/instrumentation/listeners/performance.rb b/lib/puppet/util/instrumentation/listeners/performance.rb index b3175a0a288..3ad51b7dea5 100644 --- a/lib/puppet/util/instrumentation/listeners/performance.rb +++ b/lib/puppet/util/instrumentation/listeners/performance.rb @@ -27,4 +27,4 @@ def data @samples.dup end end -end \ No newline at end of file +end diff --git a/lib/puppet/util/network_device/base.rb b/lib/puppet/util/network_device/base.rb index 7d6c3fc4417..d2fbfccb2d9 100644 --- a/lib/puppet/util/network_device/base.rb +++ b/lib/puppet/util/network_device/base.rb @@ -24,4 +24,4 @@ def initialize(url) @transport.password = @url.password end end -end \ No newline at end of file +end diff --git a/lib/puppet/util/network_device/cisco.rb b/lib/puppet/util/network_device/cisco.rb index c03a001042f..8d180208299 100644 --- a/lib/puppet/util/network_device/cisco.rb +++ b/lib/puppet/util/network_device/cisco.rb @@ -1,4 +1,4 @@ module Puppet::Util::NetworkDevice::Cisco -end \ No newline at end of file +end diff --git a/lib/puppet/util/network_device/cisco/facts.rb b/lib/puppet/util/network_device/cisco/facts.rb index 8bba02ba0a1..658c0abd05e 100644 --- a/lib/puppet/util/network_device/cisco/facts.rb +++ b/lib/puppet/util/network_device/cisco/facts.rb @@ -69,4 +69,4 @@ def uptime_to_seconds(uptime) end end -end \ No newline at end of file +end diff --git a/lib/puppet/util/network_device/cisco/interface.rb b/lib/puppet/util/network_device/cisco/interface.rb index 63d5492a7e9..d184b9c3cc8 100644 --- a/lib/puppet/util/network_device/cisco/interface.rb +++ b/lib/puppet/util/network_device/cisco/interface.rb @@ -79,4 +79,4 @@ def command(command) Puppet.err "Error while executing #{command}, device returned #{out}" if out =~ /^%/mo end end -end \ No newline at end of file +end diff --git a/lib/puppet/util/network_device/config.rb b/lib/puppet/util/network_device/config.rb index afb9a150ba5..029b0d13752 100644 --- a/lib/puppet/util/network_device/config.rb +++ b/lib/puppet/util/network_device/config.rb @@ -89,4 +89,4 @@ def parse_directive(device, var, value, count) end end -end \ No newline at end of file +end diff --git a/lib/puppet/util/network_device/ipcalc.rb b/lib/puppet/util/network_device/ipcalc.rb index 2b4f360b7f8..b2e3aa67317 100644 --- a/lib/puppet/util/network_device/ipcalc.rb +++ b/lib/puppet/util/network_device/ipcalc.rb @@ -65,4 +65,4 @@ def prefix_length(netmask) def linklocal?(ip) end -end \ No newline at end of file +end diff --git a/lib/puppet/util/network_device/transport.rb b/lib/puppet/util/network_device/transport.rb index cef8f38597e..59762b19b16 100644 --- a/lib/puppet/util/network_device/transport.rb +++ b/lib/puppet/util/network_device/transport.rb @@ -1,3 +1,3 @@ # stub module Puppet::Util::NetworkDevice::Transport -end \ No newline at end of file +end diff --git a/lib/puppet/util/network_device/transport/base.rb b/lib/puppet/util/network_device/transport/base.rb index 1d62209cb6c..4cee0dd3abd 100644 --- a/lib/puppet/util/network_device/transport/base.rb +++ b/lib/puppet/util/network_device/transport/base.rb @@ -23,4 +23,4 @@ def command(cmd, options = {}) end end -end \ No newline at end of file +end diff --git a/lib/puppet/util/network_device/transport/ssh.rb b/lib/puppet/util/network_device/transport/ssh.rb index 3d7976543cd..dca5600bd87 100644 --- a/lib/puppet/util/network_device/transport/ssh.rb +++ b/lib/puppet/util/network_device/transport/ssh.rb @@ -118,4 +118,4 @@ def process_ssh end end end -end \ No newline at end of file +end diff --git a/spec/fixtures/releases/jamtur01-apache/metadata.json b/spec/fixtures/releases/jamtur01-apache/metadata.json index 7fb6c08680f..346da9b25b1 100644 --- a/spec/fixtures/releases/jamtur01-apache/metadata.json +++ b/spec/fixtures/releases/jamtur01-apache/metadata.json @@ -1 +1 @@ -{"dependencies":[],"types":[{"providers":[{"name":"a2mod","doc":"Manage Apache 2 modules on Debian and Ubuntu Required binaries: ``a2enmod``, ``a2dismod``. Default for ``operatingsystem`` == ``debianubuntu``. "}],"parameters":[{"name":"name","doc":"The name of the module to be managed"}],"properties":[{"name":"ensure","doc":"The basic property that the resource should be in. Valid values are ``present``, ``absent``."}],"name":"a2mod","doc":"Manage Apache 2 modules on Debian and Ubuntu"}],"checksums":{"manifests/params.pp":"71734796921dbdbfd58f503622527616","tests/ssl.pp":"191912535199531fd631f911c6329e56","tests/vhost.pp":"1b91e03c8ef89a7ecb6793831ac18399","manifests/php.pp":"b78cc593f1c4cd800c906e0891c9b11f","files/httpd":"295f5e924afe6f752d29327e73fe6d0a","tests/php.pp":"ce7bb9eef69d32b42a32ce32d9653625","lib/puppet/provider/a2mod/a2mod.rb":"18c5bb180b75a2375e95e07f88a94257","files/test.vhost":"0602022c19a7b6b289f218c7b93c1aea","manifests/ssl.pp":"b4334a161a2ba5fa8a62cf7b38f352c8","manifests/dev.pp":"510813942246cc9a7786d8f2d8874a35","manifests/vhost.pp":"cbc4657b0cce5cd432057393d5f6b0c2","tests/init.pp":"4eac4a7ef68499854c54a78879e25535","lib/puppet/type/a2mod.rb":"0e1b4843431413a10320ac1f6a055d15","tests/apache.pp":"4eac4a7ef68499854c54a78879e25535","tests/dev.pp":"4cf15c1fecea3ca86009f182b402c7ab","templates/vhost-default.conf.erb":"9055aed946e1111c30ab81fedac2c8b0","manifests/init.pp":"dc503e26e8021351078813b541c4bd3d","Modulefile":"d43334b4072cd1744121b3b25cd9ed15"},"version":"0.0.1","name":"jamtur01-apache"} \ No newline at end of file +{"dependencies":[],"types":[{"providers":[{"name":"a2mod","doc":"Manage Apache 2 modules on Debian and Ubuntu Required binaries: ``a2enmod``, ``a2dismod``. Default for ``operatingsystem`` == ``debianubuntu``. "}],"parameters":[{"name":"name","doc":"The name of the module to be managed"}],"properties":[{"name":"ensure","doc":"The basic property that the resource should be in. Valid values are ``present``, ``absent``."}],"name":"a2mod","doc":"Manage Apache 2 modules on Debian and Ubuntu"}],"checksums":{"manifests/params.pp":"71734796921dbdbfd58f503622527616","tests/ssl.pp":"191912535199531fd631f911c6329e56","tests/vhost.pp":"1b91e03c8ef89a7ecb6793831ac18399","manifests/php.pp":"b78cc593f1c4cd800c906e0891c9b11f","files/httpd":"295f5e924afe6f752d29327e73fe6d0a","tests/php.pp":"ce7bb9eef69d32b42a32ce32d9653625","lib/puppet/provider/a2mod/a2mod.rb":"18c5bb180b75a2375e95e07f88a94257","files/test.vhost":"0602022c19a7b6b289f218c7b93c1aea","manifests/ssl.pp":"b4334a161a2ba5fa8a62cf7b38f352c8","manifests/dev.pp":"510813942246cc9a7786d8f2d8874a35","manifests/vhost.pp":"cbc4657b0cce5cd432057393d5f6b0c2","tests/init.pp":"4eac4a7ef68499854c54a78879e25535","lib/puppet/type/a2mod.rb":"0e1b4843431413a10320ac1f6a055d15","tests/apache.pp":"4eac4a7ef68499854c54a78879e25535","tests/dev.pp":"4cf15c1fecea3ca86009f182b402c7ab","templates/vhost-default.conf.erb":"9055aed946e1111c30ab81fedac2c8b0","manifests/init.pp":"dc503e26e8021351078813b541c4bd3d","Modulefile":"d43334b4072cd1744121b3b25cd9ed15"},"version":"0.0.1","name":"jamtur01-apache"} diff --git a/spec/fixtures/unit/parser/lexer/arithmetic_expression.pp b/spec/fixtures/unit/parser/lexer/arithmetic_expression.pp index aae98a4dba7..2d27d7d5fd4 100644 --- a/spec/fixtures/unit/parser/lexer/arithmetic_expression.pp +++ b/spec/fixtures/unit/parser/lexer/arithmetic_expression.pp @@ -5,4 +5,4 @@ $result = ((( $two + 2) / $one) + 4 * 5.45) - (6 << 7) + (0x800 + -9) -notice("result is $result == 1295.87692307692") \ No newline at end of file +notice("result is $result == 1295.87692307692") diff --git a/spec/fixtures/yaml/report0.25.x.yaml b/spec/fixtures/yaml/report0.25.x.yaml index ce6a642862f..b6e4a73d65b 100644 --- a/spec/fixtures/yaml/report0.25.x.yaml +++ b/spec/fixtures/yaml/report0.25.x.yaml @@ -61,4 +61,4 @@ - Total - 0 records: {} - time: 2010-09-23 16:17:26.987789 -07:00 \ No newline at end of file + time: 2010-09-23 16:17:26.987789 -07:00 diff --git a/spec/fixtures/yaml/report2.6.x.yaml b/spec/fixtures/yaml/report2.6.x.yaml index dd4c3814e8b..0eee633b2bc 100644 --- a/spec/fixtures/yaml/report2.6.x.yaml +++ b/spec/fixtures/yaml/report2.6.x.yaml @@ -187,4 +187,4 @@ - hourly time: 2010-09-23 15:44:06.432185 -07:00 version: 1285281846 - time: 2010-09-23 15:44:05.894401 -07:00 \ No newline at end of file + time: 2010-09-23 15:44:05.894401 -07:00 diff --git a/spec/integration/network/rest_authconfig_spec.rb b/spec/integration/network/rest_authconfig_spec.rb index d2f539cd431..fb21abddd98 100644 --- a/spec/integration/network/rest_authconfig_spec.rb +++ b/spec/integration/network/rest_authconfig_spec.rb @@ -142,4 +142,4 @@ def request(args = {}) @auth.should_not allow(request) end -end \ No newline at end of file +end diff --git a/spec/unit/util/instrumentation/data_spec.rb b/spec/unit/util/instrumentation/data_spec.rb index c2465f62229..4a5fd9508ff 100755 --- a/spec/unit/util/instrumentation/data_spec.rb +++ b/spec/unit/util/instrumentation/data_spec.rb @@ -41,4 +41,4 @@ it "should return a hash containing data when unserializing from pson" do Puppet::Util::Instrumentation::Data.from_pson({:name => "name"}).should == {:name => "name"} end -end \ No newline at end of file +end diff --git a/spec/unit/util/instrumentation/indirection_probe_spec.rb b/spec/unit/util/instrumentation/indirection_probe_spec.rb index 654825c9a29..5f4e82866bc 100644 --- a/spec/unit/util/instrumentation/indirection_probe_spec.rb +++ b/spec/unit/util/instrumentation/indirection_probe_spec.rb @@ -16,4 +16,4 @@ probe = Puppet::Util::Instrumentation::IndirectionProbe.new("probe") probe.should set_json_attribute('name').to("probe") end -end \ No newline at end of file +end diff --git a/spec/unit/util/instrumentation/instrumentable_spec.rb b/spec/unit/util/instrumentation/instrumentable_spec.rb index dd2ad308471..82f481dfde1 100755 --- a/spec/unit/util/instrumentation/instrumentable_spec.rb +++ b/spec/unit/util/instrumentation/instrumentable_spec.rb @@ -183,4 +183,4 @@ def mymethod(arg1,arg2,arg3) Puppet::Util::Instrumentation::Instrumentable.enable_probes ProbeTest2.new.should respond_to(:instrumented_mymethod) end -end \ No newline at end of file +end diff --git a/spec/unit/util/instrumentation/listener_spec.rb b/spec/unit/util/instrumentation/listener_spec.rb index bc49d265ca4..bc7ffcf685f 100755 --- a/spec/unit/util/instrumentation/listener_spec.rb +++ b/spec/unit/util/instrumentation/listener_spec.rb @@ -97,4 +97,4 @@ Puppet::Util::Instrumentation::Listener.from_pson({"name" => "listener", "enabled" => true}) end end -end \ No newline at end of file +end diff --git a/spec/unit/util/instrumentation/listeners/log_spec.rb b/spec/unit/util/instrumentation/listeners/log_spec.rb index 8359625a12e..1274acd1d98 100755 --- a/spec/unit/util/instrumentation/listeners/log_spec.rb +++ b/spec/unit/util/instrumentation/listeners/log_spec.rb @@ -31,4 +31,4 @@ 25.times { @log.notify(:test, :stop, { :started => Time.at(123456789), :finished => Time.at(123456790)}) } @log.data[:test].size.should == 20 end -end \ No newline at end of file +end diff --git a/spec/unit/util/instrumentation/listeners/performance_spec.rb b/spec/unit/util/instrumentation/listeners/performance_spec.rb index 4cecbe3f65f..519de5e9030 100755 --- a/spec/unit/util/instrumentation/listeners/performance_spec.rb +++ b/spec/unit/util/instrumentation/listeners/performance_spec.rb @@ -33,4 +33,4 @@ @performance.notify(:test, :start, { :started => Time.at(123456789)}) @performance.data.should be_empty end -end \ No newline at end of file +end diff --git a/spec/unit/util/instrumentation_spec.rb b/spec/unit/util/instrumentation_spec.rb index 0d19ee03cb5..ce6c324075c 100755 --- a/spec/unit/util/instrumentation_spec.rb +++ b/spec/unit/util/instrumentation_spec.rb @@ -178,4 +178,4 @@ end end end -end \ No newline at end of file +end diff --git a/spec/unit/util/reference_spec.rb b/spec/unit/util/reference_spec.rb index aa16299c7cd..60aa4eee112 100644 --- a/spec/unit/util/reference_spec.rb +++ b/spec/unit/util/reference_spec.rb @@ -36,4 +36,4 @@ EOT end -end \ No newline at end of file +end diff --git a/tasks/rake/manpages.rake b/tasks/rake/manpages.rake index a2dc850c823..3fb48da7361 100644 --- a/tasks/rake/manpages.rake +++ b/tasks/rake/manpages.rake @@ -66,4 +66,4 @@ task :gen_manpages do %x{#{ronn} #{ronn_args} ./man/man8/puppet-resource.8.ronn} FileUtils.rm("./man/man8/puppet-resource.8.ronn") -end \ No newline at end of file +end diff --git a/test/data/snippets/arithmetic_expression.pp b/test/data/snippets/arithmetic_expression.pp index aae98a4dba7..2d27d7d5fd4 100644 --- a/test/data/snippets/arithmetic_expression.pp +++ b/test/data/snippets/arithmetic_expression.pp @@ -5,4 +5,4 @@ $result = ((( $two + 2) / $one) + 4 * 5.45) - (6 << 7) + (0x800 + -9) -notice("result is $result == 1295.87692307692") \ No newline at end of file +notice("result is $result == 1295.87692307692")