Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Remove configuration for to, from, and cc #150

Merged
merged 1 commit into from
Jun 19, 2014

Conversation

calebhearth
Copy link
Contributor

Remove all configuration of addresses

Previously users could configure the format in which they would receive
addresses in to, from, and cc fields of Griddler::Email objects. The
options were :token, :full, :email, :name, or :hash, which was a hash of
all other options.

Configuring :token was previously deprecated, and :hash has been the
default for :from and :cc for a while now. All of these values are
pretty easy to get back with Hash#[], so we're simply removing the
configuration logic and always returning the hash, which is the most
generally useful option.

@calebhearth calebhearth added this to the 1.0.0 milestone Jun 2, 2014
@gabebw
Copy link
Contributor

gabebw commented Jun 19, 2014

The commit message is weirdly indented.

@calebhearth
Copy link
Contributor Author

It's actually just that I copied it in from the terminal rather than using
git-pull-request, so it has the indentation from the log. I'll fix the PR
description later.

On Wed, Jun 18, 2014 at 06:52:37PM -0700, Gabe Berke-Williams wrote:

The commit message is weirdly indented.


Reply to this email directly or view it on GitHub:
#150 (comment)

@@ -468,28 +462,30 @@ def header_from_email(header)
it 'handles normal e-mail address' do
email = Griddler::Email.new(text: 'hi', to: [@hash[:email]], from: @address).process
email.to.should eq [@hash.merge(full: @hash[:email], name: nil)]
email.from.should eq @hash[:email]
email.from.should eq @hash
Copy link

Choose a reason for hiding this comment

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

I'm not a huge fan of the use of @hash here. The name is quite generic and it is a mystery guest. Is it a hash of default settings to use for the test? Could it be set in a private method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This spec has a lot of problems with it: let, before, mystery guests like @hash...

Unfortunately I don't think it's likely that we'll get around to a major refactor of the tests that this change would lead to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Griddler's my black sheep ><

Copy link

Choose a reason for hiding this comment

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

Could we at least give @hash a meaningful name? @default_config, @email_headers, @test_values or something along those lines? I'm still not sure what @hash is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@JoelQ
Copy link

JoelQ commented Jun 19, 2014

👍

Previously users could configure the format in which they would receive
addresses in to, from, and cc fields of Griddler::Email objects. The
options were :token, :full, :email, :name, or :hash, which was a hash of
all other options.

Configuring :token was previously deprecated, and :hash has been the
default for :from and :cc for a while now. All of these values are
pretty easy to get back with Hash#[], so we're simply removing the
configuration logic and always returning the hash, which is the most
generally useful option.
@calebhearth calebhearth merged commit 85bda42 into master Jun 19, 2014
@calebhearth calebhearth deleted the ct-remove-address-configuration branch June 19, 2014 19:53
calebhearth added a commit that referenced this pull request Jun 19, 2014
Griddler is now feature-frozen for 1.0.0. Any further changes will only
be bug/security fixes.

Please use v1.0.0-beta.1 in your apps and let us know about any problems
by creating an issue on GitHub.

Since 1.0.0-alpha.2
-------------------

There are a few more breaking changes since the last alpha:

* Remove the options to configure the address formats for to, from, and
  cc. All of these will now return all of the components in a Hash,
  which was the default for to and cc and an corresponds to the previous
  :hash configuration option.

  It is trivially simple as a Griddler consumer to map these addresses
  to the interesting part of the address, but decidedly non-trivial to
  support the configuration options.

  This is a breaking change, as you will no longer be able to configure
  these options and the value of from is no longer what was previously
  the default (:full).

  #150

* We now initialize the processor class (i.e., EmailProcessor) with
  Griddler::Email object and then call the processor method
  (i.e., #process) on the resulting object. In some cases, this won't be
  a big deal as it was common to have the class-level methods do exactly
  this, but now you can get rid of that class method.

  #153

And more minor changes and improvements:

* Move be_normalized_to matcher to Griddler::Testing so that it can be
  used for adapter gems.
* Remove Postmark and CloudMailin adapters.
* Remove all references to adapter gems in code.
* Update body parser regex to allow for new lines.
* Add pry to help debugging during development.
* Add NEWS with changes since 0.6.4. Future contributors should keep
  this up to date for changes that an average Griddler user would be
  interested in (i.e., new features but not an implementation detail
  change)

For 1.0.0:
----------

1.0.0 includes several breaking changes, including:

* Remove generated email_processor route. Griddler now requires that you
  either create your own route pointing to the
  Griddler::EmailsController or that you use the mount_griddler helper
  in your config/routes.rb. 4a1fb50
  #149

* Griddler previously introduced the concept of adapters as a means of
  supporting different services. While this allowed Griddler's user base
  to grow, these adapters were prone to errors and became a maintenance
  burden. Rather than dropping support for these services, all adapters
  (including SendGrid) have been extracted from Griddler and will be
  maintained by people who have more experience in their use. Griddler
  now requires the use of an adapter to function, so you will need to
  add both griddler and an adapter to your Gemfile. Adapters are
  outlined in the README.
  #124

* Change the supported Ruby version to the latest in the 2.0.* and
  2.1.* ranges and Rails version to the stable versions of 4.0 and 4.1.
  We run tests against the master version of Rails and are try to make
  sure than any failures are on the Rails side and not Griddler's, but
  those are a lower priority. These versions basically match the
  supported versions of Ruby and Rails.
  #125

1.0.0 also includes a slew of bug fixes and minor improvements:

* Better handle `to` from Mailgun.
* Better error for missing EmailProcessor.
* Remove Rails warning messages in specs.
* Exit if bundler is not installed.
* Make README friendlier.
* Remove 0.5.0 upgrade note from README.md regarding mount_griddler.
* Update to RSpec 3.0.
* Link to new version of Giant Robots blog.
* Replace mailgun adapter with gem
calebhearth added a commit that referenced this pull request Jun 25, 2014
Griddler is now feature-frozen for 1.0.0. Any further changes will only
be bug/security fixes.

Please use v1.0.0-beta.2 in your apps and let us know about any problems
by creating an issue on GitHub.

Since 1.0.0-beta.1
-------------------

* Bring README up-to-date with functionality.
* Add link to postmark-griddler to README.
* Convert specs to RSpec 3.0.2 syntax with Transpec.

For 1.0.0:
----------

1.0.0 includes several breaking changes, including:

* Remove the options to configure the address formats for to, from, and
  cc. All of these will now return all of the components in a Hash,
  which was the default for to and cc and an corresponds to the previous
  :hash configuration option.

  It is trivially simple as a Griddler consumer to map these addresses
  to the interesting part of the address, but decidedly non-trivial to
  support the configuration options.

  This is a breaking change, as you will no longer be able to configure
  these options and the value of from is no longer what was previously
  the default (:full). #150

* We now initialize the processor class (i.e., EmailProcessor) with
  Griddler::Email object and then call the processor method
  (i.e., #process) on the resulting object. In some cases, this won't be
  a big deal as it was common to have the class-level methods do exactly
  this, but now you can get rid of that class method.
  #153

* Remove generated email_processor route. Griddler now requires that you
  either create your own route pointing to the
  Griddler::EmailsController or that you use the mount_griddler helper
  in your config/routes.rb. 4a1fb50
  #149

* Griddler previously introduced the concept of adapters as a means of
  supporting different services. While this allowed Griddler's user base
  to grow, these adapters were prone to errors and became a maintenance
  burden. Rather than dropping support for these services, all adapters
  (including SendGrid) have been extracted from Griddler and will be
  maintained by people who have more experience in their use. Griddler
  now requires the use of an adapter to function, so you will need to
  add both griddler and an adapter to your Gemfile. Adapters are
  outlined in the README.
  #124

* Change the supported Ruby version to the latest in the 2.0.* and
  2.1.* ranges and Rails version to the stable versions of 4.0 and 4.1.
  We run tests against the master version of Rails and are try to make
  sure than any failures are on the Rails side and not Griddler's, but
  those are a lower priority. These versions basically match the
  supported versions of Ruby and Rails.
  #125

1.0.0 also includes a slew of bug fixes and minor improvements:

* Move be_normalized_to matcher to Griddler::Testing so that it can be
  used for adapter gems.
* Remove Postmark and CloudMailin adapters.
* Remove all references to adapter gems in code.
* Update body parser regex to allow for new lines.
* Add pry to help debugging during development.
* Add NEWS with changes since 0.6.4. Future contributors should keep
  this up to date for changes that an average Griddler user would be
  interested in (i.e., new features but not an implementation detail
  change)
* Better handle `to` from Mailgun.
* Better error for missing EmailProcessor.
* Remove Rails warning messages in specs.
* Exit if bundler is not installed.
* Make README friendlier.
* Remove 0.5.0 upgrade note from README.md regarding mount_griddler.
* Update to RSpec 3.0.
* Link to new version of Giant Robots blog.
* Replace mailgun adapter with gem
calebhearth added a commit that referenced this pull request Jun 30, 2014
1.0.0 includes several breaking changes, including:

* Remove the options to configure the address formats for to, from, and
  cc. All of these will now return all of the components in a Hash,
  which was the default for to and cc and an corresponds to the previous
  :hash configuration option.

  It is trivially simple as a Griddler consumer to map these addresses
  to the interesting part of the address, but decidedly non-trivial to
  support the configuration options.

  This is a breaking change, as you will no longer be able to configure
  these options and the value of from is no longer what was previously
  the default (:full). #150

* We now initialize the processor class (i.e., EmailProcessor) with
  Griddler::Email object and then call the processor method
  (i.e., #process) on the resulting object. In some cases, this won't be
  a big deal as it was common to have the class-level methods do exactly
  this, but now you can get rid of that class method.
  #153

* Remove generated email_processor route. Griddler now requires that you
  either create your own route pointing to the
  Griddler::EmailsController or that you use the mount_griddler helper
  in your config/routes.rb. 4a1fb50
  #149

* Griddler previously introduced the concept of adapters as a means of
  supporting different services. While this allowed Griddler's user base
  to grow, these adapters were prone to errors and became a maintenance
  burden. Rather than dropping support for these services, all adapters
  (including SendGrid) have been extracted from Griddler and will be
  maintained by people who have more experience in their use. Griddler
  now requires the use of an adapter to function, so you will need to
  add both griddler and an adapter to your Gemfile. Adapters are
  outlined in the README.
  #124

* Change the supported Ruby version to the latest in the 2.0.* and
  2.1.* ranges and Rails version to the stable versions of 4.0 and 4.1.
  We run tests against the master version of Rails and are try to make
  sure than any failures are on the Rails side and not Griddler's, but
  those are a lower priority. These versions basically match the
  supported versions of Ruby and Rails.
  #125

1.0.0 also includes a slew of bug fixes and minor improvements:

* Move be_normalized_to matcher to Griddler::Testing so that it can be
  used for adapter gems.
* Remove Postmark and CloudMailin adapters.
* Remove all references to adapter gems in code.
* Update body parser regex to allow for new lines.
* Add pry to help debugging during development.
* Add NEWS with changes since 0.6.4. Future contributors should keep
  this up to date for changes that an average Griddler user would be
  interested in (i.e., new features but not an implementation detail
  change).
* Better handle `to` from Mailgun.
* Better error for missing EmailProcessor.
* Remove Rails warning messages in specs.
* Exit if bundler is not installed.
* Make README friendlier.
* Remove 0.5.0 upgrade note from README regarding mount_griddler.
* Update to RSpec 3.0.
* Link to new URL of Giant Robots blog.
* Convert specs to RSpec 3.0.2 syntax with Transpec.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants