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

Allow flexibility of from_address and send_statuses #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aaronblythe
Copy link

I have a need to post just failures to a message board that is selective of who can post.

mail_handler = MailHandler.new({:to_address => "message-board@example.com",
                                 :from_address => "trusted-svc-acct@example.com",
                                 :send_statuses => ["Failed"]})

This slight modification is passive and allows the flexibility to meet these needs.

@trobrock
Copy link

trobrock commented Dec 4, 2012

👍

@kisoku
Copy link
Owner

kisoku commented Dec 6, 2012

what does this offer that setting a separate exception handler in your chef config doesn't ?

@trobrock
Copy link

trobrock commented Dec 6, 2012

This offers the ability to only send email on failures, unless I am missing that configuration option.

@aaronblythe
Copy link
Author

This change is passive and should not break existing users of this gem. It provides the ability to make more use of pony by allowing the from_address to be configurable. It also provides the ability flex only to only email on failures or successes or both. For early development I like the ability to get both successes and failures, however for my more established code our community only needs to know about failures.

The chef documentation points to this gem as the Community Based Email Handler: http://wiki.opscode.com/display/chef/Exception+and+Report+Handlers So I thought that providing a pull request was the recommended mechanism to contribute. Forgive me if I am misunderstanding, are you suggesting that I "roll my own"? If I were to do that I would have to fork this change the name and host in my own private gem repo. I am not opposed to this, it just doesn't seem that community-like.

@trobrock
Copy link

@aaronblythe I have forked this gem to https://github.com/trobrock/chef-handler-mail and the chef-mail gem if you would like to move your PR there.

@aaronblythe
Copy link
Author

@trobrock Will do. However it looks like https://github.com/drax68/chef-handler-mail is connected to https://rubygems.org/gems/chef-handler-mail-extended should we move there? What I am most concerned about is contributing to something I can access at rubygems.org. I am maintaining a fork within my company's gem repo at this point.

@trobrock
Copy link

I created the chef-mail gem on rubygems that is based off my fork
On Feb 17, 2013 8:20 PM, "Aaron Blythe" notifications@github.com wrote:

@trobrock https://github.com/trobrock Will do. However it looks like
https://github.com/drax68/chef-handler-mail is connected to
https://rubygems.org/gems/chef-handler-mail-extended should we move
there? What I am most concerned about is contributing to something I can
access at rubygems.org. I am maintaining a fork within my company's gem
repo at this point.


Reply to this email directly or view it on GitHubhttps://github.com//pull/3#issuecomment-13706001.

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.

3 participants