{"action":"opened","number":402,"pull_request":{"url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/pulls/402","id":41078444,"html_url":"https://github.com/heroku/heroku-buildpack-ruby/pull/402","diff_url":"https://github.com/heroku/heroku-buildpack-ruby/pull/402.diff","patch_url":"https://github.com/heroku/heroku-buildpack-ruby/pull/402.patch","issue_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/issues/402","number":402,"state":"open","locked":false,"title":"[Rails 4] Don't overwrite public/assets files when loading cache","user":{"login":"orlando","id":849872,"avatar_url":"https://avatars.githubusercontent.com/u/849872?v=3","gravatar_id":"","url":"https://api.github.com/users/orlando","html_url":"https://github.com/orlando","followers_url":"https://api.github.com/users/orlando/followers","following_url":"https://api.github.com/users/orlando/following{/other_user}","gists_url":"https://api.github.com/users/orlando/gists{/gist_id}","starred_url":"https://api.github.com/users/orlando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orlando/subscriptions","organizations_url":"https://api.github.com/users/orlando/orgs","repos_url":"https://api.github.com/users/orlando/repos","events_url":"https://api.github.com/users/orlando/events{/privacy}","received_events_url":"https://api.github.com/users/orlando/received_events","type":"User","site_admin":false},"body":"# Background\r\n\r\nI'm using a gulp based assets pipeline along with Sprockets. I'm only using Sprockets because I have gems that require it (rails-admin for example).  gulp-rev generates digests and appends those to the filename of the assets (pretty much like sprockets does), and this is done before running the ruby-buildpack.\r\n\r\nThe problem comes when we cache `public/assets`, and the load it, since this will overwrite the manifest created by `gulp-rev` with an old version of it. Right now the only way to workaround this is using `heroku repo` plugin, and clear the cache before every deploy.\r\n\r\n# Related\r\n\r\n* https://github.com/vigetlabs/gulp-rails-pipeline/issues/6\r\n\r\n# Description\r\n\r\nThis PR changes how `public/assets` cache is loaded, instead of overwriting all the files, we only copy the ones that are missing.\r\n\r\n# Question\r\n\r\nI cannot think a way that this will cause problems with normal Rails apps, since `public/assets` should be only populated by `rails assets:precompile`, and if it's run on Heroku, there should not be any files before running this process, but of course, let me know if you see issues happening by merging this PR.","created_at":"2015-07-29T01:15:35Z","updated_at":"2015-07-29T01:15:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/pulls/402/commits","review_comments_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/pulls/402/comments","review_comment_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/issues/402/comments","statuses_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/statuses/75bfe331b3649dff33034a70f22fa88a3d1e1d3a","head":{"label":"orlando:master","ref":"master","sha":"75bfe331b3649dff33034a70f22fa88a3d1e1d3a","user":{"login":"orlando","id":849872,"avatar_url":"https://avatars.githubusercontent.com/u/849872?v=3","gravatar_id":"","url":"https://api.github.com/users/orlando","html_url":"https://github.com/orlando","followers_url":"https://api.github.com/users/orlando/followers","following_url":"https://api.github.com/users/orlando/following{/other_user}","gists_url":"https://api.github.com/users/orlando/gists{/gist_id}","starred_url":"https://api.github.com/users/orlando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orlando/subscriptions","organizations_url":"https://api.github.com/users/orlando/orgs","repos_url":"https://api.github.com/users/orlando/repos","events_url":"https://api.github.com/users/orlando/events{/privacy}","received_events_url":"https://api.github.com/users/orlando/received_events","type":"User","site_admin":false},"repo":{"id":39862801,"name":"heroku-buildpack-ruby","full_name":"orlando/heroku-buildpack-ruby","owner":{"login":"orlando","id":849872,"avatar_url":"https://avatars.githubusercontent.com/u/849872?v=3","gravatar_id":"","url":"https://api.github.com/users/orlando","html_url":"https://github.com/orlando","followers_url":"https://api.github.com/users/orlando/followers","following_url":"https://api.github.com/users/orlando/following{/other_user}","gists_url":"https://api.github.com/users/orlando/gists{/gist_id}","starred_url":"https://api.github.com/users/orlando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orlando/subscriptions","organizations_url":"https://api.github.com/users/orlando/orgs","repos_url":"https://api.github.com/users/orlando/repos","events_url":"https://api.github.com/users/orlando/events{/privacy}","received_events_url":"https://api.github.com/users/orlando/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/orlando/heroku-buildpack-ruby","description":"Heroku's Ruby Buildpack for Cedar","fork":true,"url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby","forks_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/forks","keys_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/teams","hooks_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/hooks","issue_events_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/events","assignees_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/tags","blobs_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/languages","stargazers_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/stargazers","contributors_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/contributors","subscribers_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/subscribers","subscription_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/subscription","commits_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/merges","archive_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/downloads","issues_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/labels{/name}","releases_url":"https://api.github.com/repos/orlando/heroku-buildpack-ruby/releases{/id}","created_at":"2015-07-28T23:31:02Z","updated_at":"2015-07-28T23:31:04Z","pushed_at":"2015-07-29T00:39:46Z","git_url":"git://github.com/orlando/heroku-buildpack-ruby.git","ssh_url":"git@github.com:orlando/heroku-buildpack-ruby.git","clone_url":"https://github.com/orlando/heroku-buildpack-ruby.git","svn_url":"https://github.com/orlando/heroku-buildpack-ruby","homepage":"","size":12212,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"heroku:master","ref":"master","sha":"4bf2811456e0856833feaf739b3d1d680964edb4","user":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"repo":{"id":1794012,"name":"heroku-buildpack-ruby","full_name":"heroku/heroku-buildpack-ruby","owner":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/heroku/heroku-buildpack-ruby","description":"Heroku's Ruby Buildpack for Cedar","fork":false,"url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby","forks_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/forks","keys_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/teams","hooks_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/hooks","issue_events_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/events","assignees_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/tags","blobs_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/languages","stargazers_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/stargazers","contributors_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/contributors","subscribers_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/subscribers","subscription_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/subscription","commits_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/merges","archive_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/downloads","issues_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/labels{/name}","releases_url":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/releases{/id}","created_at":"2011-05-24T15:14:41Z","updated_at":"2015-07-28T07:43:29Z","pushed_at":"2015-07-28T23:59:01Z","git_url":"git://github.com/heroku/heroku-buildpack-ruby.git","ssh_url":"git@github.com:heroku/heroku-buildpack-ruby.git","clone_url":"https://github.com/heroku/heroku-buildpack-ruby.git","svn_url":"https://github.com/heroku/heroku-buildpack-ruby","homepage":"","size":12212,"stargazers_count":420,"watchers_count":420,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1220,"mirror_url":null,"open_issues_count":24,"forks":1220,"open_issues":24,"watchers":420,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/pulls/402"},"html":{"href":"https://github.com/heroku/heroku-buildpack-ruby/pull/402"},"issue":{"href":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/issues/402"},"comments":{"href":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/issues/402/comments"},"review_comments":{"href":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/pulls/402/comments"},"review_comment":{"href":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/pulls/402/commits"},"statuses":{"href":"https://api.github.com/repos/heroku/heroku-buildpack-ruby/statuses/75bfe331b3649dff33034a70f22fa88a3d1e1d3a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":9,"deletions":3,"changed_files":3}}