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

Development tools #12

Merged
merged 5 commits into from Jul 10, 2014
Merged

Development tools #12

merged 5 commits into from Jul 10, 2014

Conversation

rmalecky
Copy link

@rmalecky rmalecky commented Jul 5, 2014

I wrote a few method to customize the behavior of Pony in my development and staging environments.

  • Pony.override_options - works similarly to Pony.options, but the options override other inputs
  • Pony.subject_prefix('prefix') - prepends a string to every subject line
  • Pony.append_inputs - Appends the inputs from Pony.mail to the body of the email

Pony.mail(:to => 'foo@bar')
end

it "should use an overide instead of a passed in value" do
Copy link
Owner

Choose a reason for hiding this comment

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

spelling

@benprew
Copy link
Owner

benprew commented Jul 5, 2014

This looks good, although can you tell me what you're using override_options for? Is it only for testing? It seems like it could be a source of unexpected issues. Is this solved by default_options?

Thanks

@rmalecky
Copy link
Author

rmalecky commented Jul 5, 2014

I'm using the override_options on our staging server. My app cc's given departments for given actions (ie when a customers payment fails cc finanace@my_company.com). With the override_options I make sure that only the developers get spammed, but we still test that the email system works.

I'm using rails and set all of these options from the environment specific config file.

@benprew
Copy link
Owner

benprew commented Jul 10, 2014

@rmalecky Ok, thanks, these changes look good.

benprew added a commit that referenced this pull request Jul 10, 2014
@benprew benprew merged commit bba9d08 into benprew:master Jul 10, 2014
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.

None yet

2 participants