From b9af74e445aaa1a98f798958ae2c746bd995e9cc Mon Sep 17 00:00:00 2001 From: Steven Harman Date: Fri, 30 Oct 2020 13:29:26 -0400 Subject: [PATCH] Only inline GitTracker's files We don't want to try inlining something from stdlib, for example. --- lib/git_tracker/standalone.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/git_tracker/standalone.rb b/lib/git_tracker/standalone.rb index 2eddb24..452b458 100644 --- a/lib/git_tracker/standalone.rb +++ b/lib/git_tracker/standalone.rb @@ -41,8 +41,8 @@ def save(filename, path: ".") def each_source_file GIT_TRACKER_ROOT.join("lib/git_tracker.rb").open("r") do |main| main.each_line do |req| - if req =~ /^require\s+["'](.+)["']/ - yield GIT_TRACKER_ROOT.join("lib/#{$1}.rb").to_path + if req =~ /^require\s+["']git_tracker\/(.+)["']/ + yield GIT_TRACKER_ROOT.join("lib/git_tracker/#{$1}.rb").to_path end end end