lib/makit/dotnet.rb in makit-0.0.33 vs lib/makit/dotnet.rb in makit-0.0.34

- old
+ new

@@ -15,15 +15,15 @@ else "dotnet new #{template} --name #{name} --output #{output}".run end end - def find_project(project_hint) + def self.find_project(project_hint) matches = [] Dir.glob("**/*.csproj").each do |project_path| - project_name = File.basename(project_path, ".csproj") - if project_name.include?(project_hint) + #project_name = File.basename(project_path, ".csproj") + if project_path.include?(project_hint) matches << project_path end end if matches.length == 1 return matches.first @@ -33,10 +33,10 @@ raise "No project found matching #{project_hint}".colorize(:red) end def self.add_package(project_path, package_name) if(!File.exist?(project_path)) - actual_project_path = Makit::DotNet.find_project(project_path) + actual_project_path = Makit::DotNet::find_project(project_path) if(!File.exist?(actual_project_path)) raise "Project #{project_path} does not exist".colorize(:red) else project_path = actual_project_path end