Fix several rubocop issues with "rubocop -a"

This commit is contained in:
Nicolas McCurdy
2014-01-04 21:57:14 -05:00
parent f03e7670cf
commit fc2bbb1d6e
5 changed files with 50 additions and 82 deletions

View File

@@ -9,7 +9,7 @@ class Homesick
destination = Pathname.new(destination) unless destination.kind_of?(Pathname)
FileUtils.mkdir_p destination.dirname
if ! destination.directory?
if !destination.directory?
say_status 'git clone', "#{repo} to #{destination.expand_path}", :green unless options[:quiet]
system "git clone -q --config push.default=upstream --recursive #{repo} #{destination}" unless options[:pretend]
else
@@ -78,12 +78,12 @@ class Homesick
def git_status(config = {})
say_status 'git status', '', :green unless options[:quiet]
system "git status" unless options[:pretend]
system 'git status' unless options[:pretend]
end
def git_diff(config = {})
say_status 'git diff', '', :green unless options[:quiet]
system "git diff" unless options[:pretend]
system 'git diff' unless options[:pretend]
end
def mv(source, destination, config = {})

View File

@@ -1,7 +1,6 @@
class Homesick
# Hack in support for diffing symlinks
class Shell < Thor::Shell::Color
def show_diff(destination, content)
destination = Pathname.new(destination)
@@ -12,6 +11,5 @@ class Homesick
super
end
end
end
end