Fix a few more syntax-related rubocop issues manually
This commit is contained in:
@@ -251,7 +251,7 @@ class Homesick < Thor
|
||||
|
||||
desc 'open CASTLE', 'Open your default editor in the root of the given castle'
|
||||
def open(castle = DEFAULT_CASTLE_NAME)
|
||||
if !ENV['EDITOR']
|
||||
unless ENV['EDITOR']
|
||||
say_status :error, 'The $EDITOR environment variable must be set to use this command', :red
|
||||
|
||||
exit(1)
|
||||
@@ -427,7 +427,7 @@ class Homesick < Thor
|
||||
home_path = home_dir.join(relative_dir).join(path)
|
||||
|
||||
yield(absolute_path, home_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Homesick
|
||||
module Actions
|
||||
# TODO move this to be more like thor's template, empty_directory, etc
|
||||
# TODO: move this to be more like thor's template, empty_directory, etc
|
||||
def git_clone(repo, config = {})
|
||||
config ||= {}
|
||||
destination = config[:destination] || File.basename(repo, '.git')
|
||||
|
||||
@@ -2,15 +2,9 @@
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offences are removed from the code base.
|
||||
|
||||
BlockAlignment:
|
||||
Enabled: false
|
||||
|
||||
ClassLength:
|
||||
Max: 350
|
||||
|
||||
CommentAnnotation:
|
||||
Enabled: false
|
||||
|
||||
CyclomaticComplexity:
|
||||
Max: 16
|
||||
|
||||
@@ -20,17 +14,8 @@ Documentation:
|
||||
Eval:
|
||||
Enabled: false
|
||||
|
||||
FavorUnlessOverNegatedIf:
|
||||
Enabled: false
|
||||
|
||||
IndentationWidth:
|
||||
Enabled: false
|
||||
|
||||
LineLength:
|
||||
Max: 174
|
||||
|
||||
MethodLength:
|
||||
Max: 31
|
||||
|
||||
RegexpLiteral:
|
||||
Enabled: false
|
||||
|
||||
@@ -584,7 +584,7 @@ describe 'homesick' do
|
||||
end
|
||||
|
||||
it 'returns an error message when the given castle does not exist' do
|
||||
homesick.should_receive('say_status').once.with(:error, /Could not cd castle_repo, expected \/tmp\/construct_container.* exist and contain dotfiles/, :red)
|
||||
homesick.should_receive('say_status').once.with(:error, %r{Could not cd castle_repo, expected /tmp/construct_container.* exist and contain dotfiles}, :red)
|
||||
expect { homesick.cd 'castle_repo' }.to raise_error(SystemExit)
|
||||
end
|
||||
end
|
||||
@@ -607,7 +607,7 @@ describe 'homesick' do
|
||||
|
||||
it 'returns an error message when the given castle does not exist' do
|
||||
ENV.stub(:[]).with('EDITOR').and_return('vim') # Set a default just in case none is set
|
||||
homesick.should_receive('say_status').once.with(:error, /Could not open castle_repo, expected \/tmp\/construct_container.* exist and contain dotfiles/, :red)
|
||||
homesick.should_receive('say_status').once.with(:error, %r{Could not open castle_repo, expected /tmp/construct_container.* exist and contain dotfiles}, :red)
|
||||
expect { homesick.open 'castle_repo' }.to raise_error(SystemExit)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user