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
base: master
from

Conversation

Projects
None yet
@rhulse
Contributor

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 some commits Feb 6, 2012

Merge pull request #4912 from guilleiguaran/fix-edge-gemfile
Add branch to sass-rails and coffee-rails for apps generated with --dev or --edge (3-2-stable)
Fixed force_ssl redirects to include original query params
`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.
Merge pull request #4920 from guilleiguaran/revert-gemfile-edge
In Rails 3.2.x --edge generate apps with rails 3-2-stable
Added unit test to cover changes to RouteSet.url_for
ActionDispatch::Routing::RouteSet.url_for now handles passing params through to
ActionDispatch::Http::Url.url_for
Merge pull request #4916 from rmm5t/fix_force_ssl_redirect_with_params
Fixed force_ssl redirects to include original query params
Fix attribute_before_type_cast for serialized attributes. Fixes #4837.
Conflicts:

	activerecord/lib/active_record/core.rb
Handle nil in add_index :length option in MySQL
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>
Merge pull request #4941 from rafaelfranca/fix-build
Use real table and columns for index test
Merge pull request #4988 from kennyj/fix_4720-3
Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
Fix that failed tests should exit with a nonzero error code.
Partially reverts 14c89e7.

Hat tip to @tenderlove for paring down the TestTask!
Merge pull request #5038 from carlosantoniodasilva/fix-db-migrate-redo
Always reenable _dump task in AR databases rake. Closes #5030
Rack body respond to each and not to join
This fixes undef `to_str' for Rack::Chunked::Body when using
caches_action + streaming on an action

Closes #5027
Merge pull request #5049 from fabioyamate/master
Fix sanitize_for_mass_assigment when role is nil
Merge pull request #5073 from asanghi/4918_backport
Backporting #4918 with one added test for googlebot accept header as I saw it
Fix ActionDispatch::Static to serve files with unencoded PCHAR
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

arturopie and others added some commits Mar 27, 2012

refactor instantiate method in base, so we remove nesting if's which …
…make the code harder to read. Minor changes to contain_all_columns in IdentityMap.

Conflicts:

	activerecord/lib/active_record/base.rb
Fix #5667. Preloading should ignore scoping.
Conflicts:

	activerecord/test/cases/associations/eager_test.rb
@hkarthik

This comment has been minimized.

Show comment
Hide comment
@hkarthik

hkarthik Mar 30, 2012

+1 to this. This is also problematic on old tables that were designed for HABTM relationships.

hkarthik commented on bbe7dac Mar 30, 2012

+1 to this. This is also problematic on old tables that were designed for HABTM relationships.

spastorino and others added some commits Mar 30, 2012

Merge pull request #5662 from arturopie/3-2_fixing_IM_when_using_find…
…_select

Fixing Identity Map when using find select in rails 3.2
Usage file in generators shouldn't be fetched only based on source_root
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`.
@parndt

This comment has been minimized.

Show comment
Hide comment
@parndt

parndt Apr 2, 2012

Contributor

Possible regression in resolve/refinerycms-blog#216 ?

Contributor

parndt commented on a7a422e Apr 2, 2012

Possible regression in resolve/refinerycms-blog#216 ?

This comment has been minimized.

Show comment
Hide comment
@jcoleman

jcoleman Apr 2, 2012

Contributor

Commented on refinery cms issue.

Contributor

jcoleman replied Apr 2, 2012

Commented on refinery cms issue.

tpope and others added some commits Apr 3, 2012

Merge pull request #5727 from hone/ar_database_url_logging
ActiveRecord configuration logging
Merge pull request #5188 from jlxw/patch-1
logger.silence is deprecated
Merge pull request #5737 from rafaelfranca/3-2-stable
Fix tests of benchmark with silence equals to true
Merge pull request #5765 from anildigital/3-2-stable
Update getting started guide to change Rails version to Rails 3.2
Richard Hulse
Add task to clean only outdated assets
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

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca Apr 9, 2012

Member

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

Member

rafaelfranca commented Apr 9, 2012

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

@rhulse

This comment has been minimized.

Show comment
Hide comment
@rhulse

rhulse Apr 9, 2012

Contributor

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?

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca Apr 9, 2012

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@rhulse

rhulse Apr 9, 2012

Contributor

OK, thanks!

Contributor

rhulse commented Apr 9, 2012

OK, thanks!

@rhulse rhulse closed this Apr 9, 2012

@tiegz

This comment has been minimized.

Show comment
Hide comment
@tiegz

tiegz May 2, 2012

Contributor

@tenderlove this is prob a dumb question, but just wanted to make sure that shift is intended for binds and not *binds? I noticed just now that this to_sql method will alter the binds param for anything that uses binds after this is called.

@tenderlove this is prob a dumb question, but just wanted to make sure that shift is intended for binds and not *binds? I noticed just now that this to_sql method will alter the binds param for anything that uses binds after this is called.

This comment has been minimized.

Show comment
Hide comment
@tenderlove

tenderlove May 2, 2012

Member

yes, the shift is indented for binds. Binds is a list of tuples, so the * is for expanding the tuple for the quote method.

Member

tenderlove replied May 2, 2012

yes, the shift is indented for binds. Binds is a list of tuples, so the * is for expanding the tuple for the quote method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment