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

Update regex to match multiline config.action_mailer. #2055

Closed
wants to merge 2 commits into from

Conversation

ugisozols
Copy link
Member

#1979

Updated regex can now properly match config.action_mailer settings like:

config.action_mailer.raise_delivery_errors = false

and multiline:

config.action_mailer.raise_delivery_errors = false
config.action_mailer.smtp_settings = {
    address: "test.com",
    port: 123,
    domain: "example.com"
}

@parndt
Copy link
Member

parndt commented Nov 29, 2012

Man oh man we need tests for this. Then we would know straight away if it solves the problem.

ugisozols added a commit that referenced this pull request Nov 30, 2012
Dummy::Application.configure do
if config.respond_to?(:action_mailer)
config.action_mailer.test = true
config.action_mailer.check = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how to make generator indent this and subsequent lines.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I get it.

@ugisozols
Copy link
Member Author

@parndt ^

@@ -9,6 +9,37 @@ module Refinery

before do
prepare_destination

dir = "#{destination_root}/config/environments"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to create env files myself because generator spec will only create Refinery's files.

@ugisozols
Copy link
Member Author

@parndt is this good to merge? I'll squash commits if it is.

@parndt
Copy link
Member

parndt commented Dec 5, 2012

I'm having a play. Feel free to squash the commits though and I'll update my copy :) I'll merge soon if I can't fix the indentation!

Updated regex can now properly match config.action_mailer settings like:

config.action_mailer.raise_delivery_errors = false

and multiline:

config.action_mailer.raise_delivery_errors = false
config.action_mailer.smtp_settings = {
    address: "test.com",
    port: 123,
    domain: "example.com"
}
@ugisozols
Copy link
Member Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants