spree/spree — pull request #3813 by jhawthorn (2013-10-02 20:15:08+00:00)
Title: Fix redirect loop with Spree::Config[:redirect_https_to_http]

force_non_ssl_redirect was testing if the actions was included in ssl_{required,allowed}_actions, but didn't consider the case that it was empty (which should mean all actions). This caused an infinite redirect loop on admin and checkout pages with the option enabled.

This fixes the issue and simplifies the code by combining the lists of allowed and required ssl actions. Also added some specs.

While on the topic of the SSL helper, I believe bb43c7a30ddbf6693cb7340f3ec492be7a321cf9 from @huoxito can be backported to the `2-0-stable` branch, as rails 3.2 uses Rack::SSL as well.
https://github.com/rails/rails/blob/3-2-stable/railties/lib/rails/application.rb#L253