Hold a @config in Application

This commit is contained in:
Josh Holtrop 2018-02-27 20:42:41 -05:00
parent 090daf39a0
commit 67beb1dece

View File

@ -1,6 +1,10 @@
module Svi
class Application
def initialize
@config = Config.new
end
def checkout(url)
checkout_directory = []
if url =~ %r{/([^/]+)/trunk$}
@ -53,11 +57,10 @@ module Svi
end
def status
config = Config.new
SvnRunner.run_svn("status", []) do |line|
if line =~ %r{^([ACDIMRX\?!~ ])[CM ][L ][\+ ][SX ][KOTB ]..(.+)$}
action, path = $1, $2
if action == "?" and Util.is_path_ignored?(path, config)
if action == "?" and Util.is_path_ignored?(path, @config)
# Path is ignored
else
puts line