Merge pull request #7376 from dmitriy-kiriyenko/fix-double-callback-in-same-statement

Prevent callback from being set twice.

Conflicts:
	activesupport/CHANGELOG.md
Updated security guide to reference secret_key_base instead of secret_token, with a little information about the change from CookieStore to EncryptedCookieStore.
Merge pull request #8584 from garysweaver/security_guide_update

Updated security guide to reference secret_key_base instead of secret_token
Merge pull request #8267 from marcandre/reversible_drop_table_etc

Reversible commands
Fix calling quote column name in interpolated string
Remove duplicated methods in command recorder and duplicated test name
Revert "Make sure that RAILS_ENV is set when accessing Rails.env"

This reverts commit b3125c89f42968bec6ee0b92ab93e36dbc36d5c3.

* It is not desirable to set `ENV['RAILS_ENV']`; otherwise, it will leak
  through to rake tasks such as `rake test` or `rake spec`. See #7175
  for more details.
Correctly shows RAILS_ENV=development even when ENV['RAILS_ENV'] is not set (e.g., in Pow)

* Fixes #8025
Merge pull request #7312 from krainboltgreene/http-token-parser-bug

Http token parser bug
Merge pull request #8574 from alindeman/rails_env

Correctly shows RAILS_ENV=development even when ENV['RAILS_ENV'] is not set (e.g., in Pow)
Refactor Hash.from_xml.

Three basic refactors in this PR:

* We extracted the logic into a method object. We now don't define a tone of extraneous methods on Hash, even if they were private.
* Extracted blocks of the case statement into methods that do the work. This makes the logic more clear.
* Extracted complicated if clauses into their own query methods. They often have two or three terms, this makes it much easier to see what they _do_.

We took care not to refactor too much as to not break anything, and put comments where we suspect tests are missing.

We think ActiveSupport::XMLMini might be a good candidate to move to a plugin in the future.
Merge pull request #8471 from kytrinyx/refactor-xml-to-hash

WIP Refactor xml conversion to hash
Move background jobs to the 'jobs' branch until fully baked. Not shipping with Rails 4.0.
Digestor explicit dependency should not contain trailing whitespace

test for rails/rails#8586
Merge pull request #8586 from balexand/cache_digests_regex

Digestor explicit dependency should not contain trailing whitespace
return Mime::NullType if format is unknown

If a request has an unknown format, the methods html?, xml?, json? ...etc
not raise an Exception.

This patch add a class Mime::NullType, that is returned when  request.format is unknown
and it responds false to the methods that ends with '?' and true to 'nil?'.

It refers to #7837, this issue is considered a improvement not a bug.
Merge pull request #8085 from acapilleri/format_never_nil

if format is unknown NullMimeTypeObject is returned
Install binstubs by default
Detect rbenv and update the shebang
Add --no-html to scaffold generator