diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f1c21cf2a6..4a9ed1bcea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -311,6 +311,11 @@ If your application and homebrew-cask do not work well together, feel free to [file an issue](https://github.com/phinze/homebrew-cask/issues) after checking out open issues. +## Indenting + +All Casks and code in the homebrew-cask project should be indented using two +spaces (never tabs). + ## Submitting Your Changes Hop into your Tap and check to make sure your new Cask is there: diff --git a/Casks/crosspack-avr.rb b/Casks/crosspack-avr.rb index d5bbe6fad6..f41e07d3f6 100644 --- a/Casks/crosspack-avr.rb +++ b/Casks/crosspack-avr.rb @@ -5,12 +5,12 @@ class CrosspackAvr < Cask sha1 'd255e7822e961c002691fbb0d19a564a819c7386' install 'CrossPack-AVR.pkg' after_uninstall do - IO.popen('yes | sudo -E /usr/local/CrossPack-AVR/uninstall && sudo pkgutil --forget at.obdev.CrossPack-AVR', 'r+') do |pipe| - pipe.close_write - while line = pipe.gets - puts line - end - end + IO.popen('yes | sudo -E /usr/local/CrossPack-AVR/uninstall && sudo pkgutil --forget at.obdev.CrossPack-AVR', 'r+') do |pipe| + pipe.close_write + while line = pipe.gets + puts line + end + end end caveats do diff --git a/Casks/mailfollowup.rb b/Casks/mailfollowup.rb index d454e72d84..b55bbeb510 100644 --- a/Casks/mailfollowup.rb +++ b/Casks/mailfollowup.rb @@ -5,10 +5,10 @@ class Mailfollowup < Cask sha1 '538c0441786be4a89a68ce168de2087fa9304c95' nested_container 'MailFollowUp_1.6.2.dmg' install 'Install MailFollowUp.pkg' - + uninstall( - :quit => 'com.apple.mail', + :quit => 'com.apple.mail', :files => '~/Library/Mail/Bundles/MailFollowUp.mailbundle/' ) - + end diff --git a/Casks/prolific-usb-serial-driver.rb b/Casks/prolific-usb-serial-driver.rb index 0088a520b0..c043f97462 100644 --- a/Casks/prolific-usb-serial-driver.rb +++ b/Casks/prolific-usb-serial-driver.rb @@ -5,5 +5,5 @@ class ProlificUsbSerialDriver < Cask sha1 '2e30c876b159f6be76f5a9d58a0cd512fb2a5478' install 'md_PL2303_MacOSX-10_6up_v1_5_1/PL2303_MacOSX_v1.5.1.pkg' uninstall :pkgutil => 'com.prolific.prolificUsbserialCableDriverV151.ProlificUsbSerial.pkg', - :kext => 'com.prolific.driver.PL2303' + :kext => 'com.prolific.driver.PL2303' end diff --git a/lib/cask/cli/search.rb b/lib/cask/cli/search.rb index 1b803f7f0d..0912ac7b5d 100644 --- a/lib/cask/cli/search.rb +++ b/lib/cask/cli/search.rb @@ -12,9 +12,9 @@ class Cask::CLI::Search cask_names = simplified_titles.grep(/#{simplified_search_term}/i) { |t| all_titles[simplified_titles.index(t)] } end unless cask_names.empty? - puts_columns Cask::CLI.nice_listing cask_names + puts_columns Cask::CLI.nice_listing cask_names else - puts "No cask found for \"#{search_term}\"." + puts "No cask found for \"#{search_term}\"." end end diff --git a/lib/cask/options.rb b/lib/cask/options.rb index f7da8ee850..d1d0b52fd2 100644 --- a/lib/cask/options.rb +++ b/lib/cask/options.rb @@ -1,15 +1,15 @@ module Cask::Options - def self.included(base) - base.extend(ClassMethods) - end + def self.included(base) + base.extend(ClassMethods) + end - module ClassMethods - def no_binaries - @no_binaries ||= false - end + module ClassMethods + def no_binaries + @no_binaries ||= false + end - def no_binaries=(_no_binaries) - @no_binaries = _no_binaries - end - end -end \ No newline at end of file + def no_binaries=(_no_binaries) + @no_binaries = _no_binaries + end + end +end diff --git a/test/cask/artifact/binary_test.rb b/test/cask/artifact/binary_test.rb index 3534e08b42..b50467c09e 100644 --- a/test/cask/artifact/binary_test.rb +++ b/test/cask/artifact/binary_test.rb @@ -1,52 +1,52 @@ require 'test_helper' describe Cask::Artifact::App do - let(:cask) { - Cask.load('with-binary').tap do |cask| - TestHelper.install_without_artifacts(cask) - end - } - let(:expected_path) { - Cask.binarydir/'binary' - } + let(:cask) { + Cask.load('with-binary').tap do |cask| + TestHelper.install_without_artifacts(cask) + end + } + let(:expected_path) { + Cask.binarydir/'binary' + } - it "links the binary to the proper directory" do - shutup do - Cask::Artifact::Binary.new(cask).install - end + it "links the binary to the proper directory" do + shutup do + Cask::Artifact::Binary.new(cask).install + end - TestHelper.valid_alias?(expected_path).must_equal true - end + TestHelper.valid_alias?(expected_path).must_equal true + end - it "avoids clobbering an existing binary by linking over it" do - FileUtils.touch expected_path - - shutup do - Cask::Artifact::Binary.new(cask).install - end + it "avoids clobbering an existing binary by linking over it" do + FileUtils.touch expected_path - expected_path.wont_be :symlink? - end + shutup do + Cask::Artifact::Binary.new(cask).install + end - it "clobbers an existing symlink" do - expected_path.make_symlink('/tmp') + expected_path.wont_be :symlink? + end - shutup do - Cask::Artifact::Binary.new(cask).install - end + it "clobbers an existing symlink" do + expected_path.make_symlink('/tmp') - File.readlink(expected_path).wont_equal '/tmp' - end + shutup do + Cask::Artifact::Binary.new(cask).install + end - it "respects --no-binaries flag" do - Cask.no_binaries = true + File.readlink(expected_path).wont_equal '/tmp' + end - shutup do - Cask::Artifact::Binary.new(cask).install - end + it "respects --no-binaries flag" do + Cask.no_binaries = true - expected_path.exist?.must_equal false + shutup do + Cask::Artifact::Binary.new(cask).install + end - Cask.no_binaries = false - end -end \ No newline at end of file + expected_path.exist?.must_equal false + + Cask.no_binaries = false + end +end diff --git a/test/cask/cli/search_test.rb b/test/cask/cli/search_test.rb index 67a4236235..b960c5ced4 100644 --- a/test/cask/cli/search_test.rb +++ b/test/cask/cli/search_test.rb @@ -11,8 +11,8 @@ describe Cask::CLI::Search do end it "shows that there are no casks matching a search term that did not result in anything" do - lambda { - Cask::CLI::Search.run('foo-bar-baz') - }.must_output("No cask found for \"foo-bar-baz\".\n") + lambda { + Cask::CLI::Search.run('foo-bar-baz') + }.must_output("No cask found for \"foo-bar-baz\".\n") end end