Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor AnnotateRoutes.routes_file_exist? #716

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'develop' into feature/refactor_annotate_routes/routes_f…
…ile_exist
nard-tech committed Jan 17, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit f1998b50aa960e0f3761bd8ae15d8a79cbadfdda
3 changes: 2 additions & 1 deletion lib/annotate/annotate_routes.rb
Original file line number Diff line number Diff line change
@@ -43,7 +43,8 @@ def remove_annotations(_options={})
existing_text = File.read(routes_file)
content, header_position = strip_annotations(existing_text)
new_content = strip_on_removal(content, header_position)
if rewrite_contents(existing_text, new_content)
new_text = new_content.join("\n")
if rewrite_contents(existing_text, new_text)
puts "Removed annotations from #{routes_file}."
end
else
You are viewing a condensed version of this merge commit. You can view the full changes here.