Skip to content

Commit

Permalink
Fix: make .strip_heredoc private (thoughtbot#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez authored Sep 23, 2024
1 parent a075b0a commit 436e460
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/appraisal/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ def help(shell, subcommand = false)
def exit_on_failure?
true
end

private

def strip_heredoc(string)
indent = string.scan(/^[ \t]*(?=\S)/).min.size || 0
string.gsub(/^[ \t]{#{indent}}/, "")
end
end

desc "install", "Resolve and install dependencies for each appraisal"
Expand Down Expand Up @@ -111,10 +118,5 @@ def method_missing(name, *args, &block)
end
end
end

def self.strip_heredoc(string)
indent = string.scan(/^[ \t]*(?=\S)/).min.size || 0
string.gsub(/^[ \t]{#{indent}}/, "")
end
end
end

0 comments on commit 436e460

Please sign in to comment.