From 67beb1dece91388789f6ac2c267c169a7d297ce8 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 27 Feb 2018 20:42:41 -0500 Subject: [PATCH] Hold a @config in Application --- lib/svi/application.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/svi/application.rb b/lib/svi/application.rb index 83af089..01c3d62 100644 --- a/lib/svi/application.rb +++ b/lib/svi/application.rb @@ -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