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

Add task to clean only outdated assets #5782

Closed
wants to merge 580 commits into from
Closed

Add task to clean only outdated assets #5782

wants to merge 580 commits into from

Conversation

rhulse
Copy link

@rhulse rhulse commented Apr 8, 2012

This covers the use-case where pages on the site have cache headers of (say) 5 minutes, and as a result remote clients still have references to assets from the most recent deploy.

In cases were the remote client has a cached copy of the page, but does not have a cached copy of the associated assets, the page will render with no CSS or JS after a deploy where the current clean task was used.

This new task keeps files from the most recent deploy (those in the manifest), and you precompile on top of those.

See #2962

guilleiguaran and others added 30 commits Feb 6, 2012
Add branch to sass-rails and coffee-rails for apps generated with --dev or --edge (3-2-stable)
`ActionController.force_ssl` redirects http URLs to their https equivalent;
however, when a URL contains a query string, the resulting redirect lacked the
original query string.
In Rails 3.2.x --edge generate apps with rails 3-2-stable
ActionDispatch::Routing::RouteSet.url_for now handles passing params through to
ActionDispatch::Http::Url.url_for
Fixed force_ssl redirects to include original query params
Conflicts:

	activerecord/lib/active_record/core.rb
Our schema.rb is being generated with an `add_index` line similar to this:

    add_index "foo", ["foo", "bar"], :name => "xxx", :length => {"foo"=>8, "bar=>nil}

This is the same as it was on Rails 3.1.3, however, now when that
schema.rb is evaluated, its generating bad SQL in MySQL:

    Mysql::Error: You have an error in your SQL syntax; check the manual
    that corresponds to your MySQL server version for the right syntax
    to use near '))' at line 1: CREATE UNIQUE INDEX
    `xxx` ON `foo` (`foo`(8), `bar`())

This commit adds a check for nil on the length attribute to prevent the
empty parens from being output.

Conflicts:

	activerecord/test/cases/migration/index_test.rb

Signed-off-by: José Valim <jose.valim@gmail.com>
Use real table and columns for index test
Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
Partially reverts 14c89e7.

Hat tip to @tenderlove for paring down the TestTask!
Always reenable _dump task in AR databases rake. Closes #5030
This fixes undef `to_str' for Rack::Chunked::Body when using
caches_action + streaming on an action

Closes #5027
Fix sanitize_for_mass_assigment when role is nil
Backporting #4918 with one added test for googlebot accept header as I saw it
RFC 3986[1] allows sub-delim characters in path segments unencoded,
however Rack::File requires them to be encoded so we use URI's
unescape method to leave them alone and then escape them again.

Also since the path gets passed to Dir[] we need to escape any glob
characters in the path.

[1]: http://www.ietf.org/rfc/rfc3986.txt
spastorino and others added 24 commits Mar 29, 2012
…or all the columns, so we don't get 'MissingAttributeError' later when trying to access other fields of the same record.
…make the code harder to read. Minor changes to contain_all_columns in IdentityMap.

Conflicts:

	activerecord/lib/active_record/base.rb
Conflicts:

	activerecord/test/cases/associations/eager_test.rb
…_select

Fixing Identity Map when using find select in rails 3.2
In case `source_roout` is not set, `default_source_root` is used,
which includes also `templates` directory. If there is no `templates`
directory, `default_source_root` is not available and USAGE will not
be displayed. USAGE should be also checked based on default
directory excluding `templates`.
ActiveRecord configuration logging
logger.silence is deprecated
Fix tests of benchmark with silence equals to true
Update getting started guide to change Rails version to Rails 3.2
This covers the use-case where pages on the site have cache headers of (say) 5 minutes, and as a result remote clients stil have references to assets from the most recent deploy. This keeps files from the most recent deploy.
@rafaelfranca
Copy link
Member

rafaelfranca commented Apr 9, 2012

Sorry, but this pull request need to be rebased with master.

@rhulse
Copy link
Author

rhulse commented Apr 9, 2012

I did it against the 3.2 branch because the Sprockets integration has been extracted into a gem on master. Should I perhaps do a pull request against the gem instead?

@rafaelfranca
Copy link
Member

rafaelfranca commented Apr 9, 2012

I see. You need to open a pull request in the gem. If the Core team agree that this patch should be applied in 3-2-stable they will ask you to open another pull request for that branch.

@rhulse
Copy link
Author

rhulse commented Apr 9, 2012

OK, thanks!

@rhulse rhulse closed this Apr 9, 2012
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