Remove unnecessary @pushing_directory bool in QA::Factory::Repository::Push

This commit is contained in:
Dylan Griffith 2018-06-06 10:56:15 +02:00
parent ef04bd4e4b
commit 8a7a3f92a4

View file

@ -18,7 +18,6 @@ module QA
@commit_message = "This is a test commit" @commit_message = "This is a test commit"
@branch_name = 'master' @branch_name = 'master'
@new_branch = true @new_branch = true
@pushing_directory = false
end end
def remote_branch def remote_branch
@ -29,7 +28,6 @@ module QA
raise "Must set directory as a Pathname" unless dir.is_a?(Pathname) raise "Must set directory as a Pathname" unless dir.is_a?(Pathname)
@directory = dir @directory = dir
@pushing_directory = true
end end
def fabricate! def fabricate!
@ -51,7 +49,7 @@ module QA
repository.checkout(branch_name) repository.checkout(branch_name)
end end
if @pushing_directory if @directory
@directory.each_child do |f| @directory.each_child do |f|
repository.add_file(f.basename, f.read) if f.file? repository.add_file(f.basename, f.read) if f.file?
end end