add_text <<'EOC'
foo
bar
EOC
...
not_if { `cat #{path}`.match('^' + Regexp.escape(add_text)) }
...
grep, diff, awk -v RS="", .include?など色々試しましたが、上の様になりました。
(.include?の場合、最初の行の先頭のチェックが難しい。)
More than 5 years have passed since last update.
add_text <<'EOC'
foo
bar
EOC
...
not_if { `cat #{path}`.match('^' + Regexp.escape(add_text)) }
...
grep, diff, awk -v RS="", .include?など色々試しましたが、上の様になりました。
(.include?の場合、最初の行の先頭のチェックが難しい。)
Register as a new user and use Qiita more conveniently