mdsol / dice_bag

DiceBag is a library of rake tasks for configuring web apps in the style of The Twelve-Factor App.
MIT License
19 stars 4 forks source link

Add missing new line in ruby warning message #85

Closed piao-mdsol closed 6 years ago

piao-mdsol commented 6 years ago

When removing trailing space from the warning message in #84, I accidentally removed a new line from the final output, causing problems for generated message.

Before (v 1.2.2)

Given

<%= warning.as_ruby_comment %>
secret_key: 123
secret_id: id

When I run rake config Then the generated file contents were like:

# WARNING! Do not modify this file directly. It was generated from the
# 'secret_token.rb.dice' template file.
#
# Use the rake config task to reconfigure. See the template file for
# further guidance.secret_key: 123
secret_id: id

Note that the first line of the configuration (secret_key...) was concatenated with the warning message. Unfortunately the original spec failed to capture this change.

After this PR

# WARNING! Do not modify this file directly. It was generated from the
# 'secret_token.rb.dice' template file.
#
# Use the rake config task to reconfigure. See the template file for
# further guidance.
secret_key: 123
secret_id: id

@mdsol/team-10