{"action":"created","comment":{"url":"https://api.github.com/repos/rails/webpacker/pulls/comments/115352342","pull_request_review_id":36884464,"id":115352342,"diff_hunk":"@@ -0,0 +1,25 @@\n+require \"rake\"\n+require \"webpacker\"\n+\n+module Webpacker::TestHelper\n+  extend ActiveSupport::Concern\n+\n+  included do\n+    setup :compile_webpack_assets\n+  end\n+\n+  def compile_webpack_assets\n+    Rails.cache.fetch([\"webpacker\", \"manifest\", checksum]) do","path":"lib/webpacker/test_helper.rb","position":12,"original_position":12,"commit_id":"bb2e30c24712afc1037bd88cb3cae76ef78ea04a","original_commit_id":"bb2e30c24712afc1037bd88cb3cae76ef78ea04a","user":{"login":"javan","id":5355,"avatar_url":"https://avatars0.githubusercontent.com/u/5355?v=3","gravatar_id":"","url":"https://api.github.com/users/javan","html_url":"https://github.com/javan","followers_url":"https://api.github.com/users/javan/followers","following_url":"https://api.github.com/users/javan/following{/other_user}","gists_url":"https://api.github.com/users/javan/gists{/gist_id}","starred_url":"https://api.github.com/users/javan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javan/subscriptions","organizations_url":"https://api.github.com/users/javan/orgs","repos_url":"https://api.github.com/users/javan/repos","events_url":"https://api.github.com/users/javan/events{/privacy}","received_events_url":"https://api.github.com/users/javan/received_events","type":"User","site_admin":false},"body":"This cache key will only be invalidated when *your* files change, right? What if, for example, you bump the version of a dependency in package.json? I think it'd be best to avoid caching unless we can use the same digests provided by webpack.","created_at":"2017-05-08T21:01:39Z","updated_at":"2017-05-08T21:01:39Z","html_url":"https://github.com/rails/webpacker/pull/341#discussion_r115352342","pull_request_url":"https://api.github.com/repos/rails/webpacker/pulls/341","_links":{"self":{"href":"https://api.github.com/repos/rails/webpacker/pulls/comments/115352342"},"html":{"href":"https://github.com/rails/webpacker/pull/341#discussion_r115352342"},"pull_request":{"href":"https://api.github.com/repos/rails/webpacker/pulls/341"}}},"pull_request":{"url":"https://api.github.com/repos/rails/webpacker/pulls/341","id":119346448,"html_url":"https://github.com/rails/webpacker/pull/341","diff_url":"https://github.com/rails/webpacker/pull/341.diff","patch_url":"https://github.com/rails/webpacker/pull/341.patch","issue_url":"https://api.github.com/repos/rails/webpacker/issues/341","number":341,"state":"open","locked":false,"title":"Add a test helper","user":{"login":"gauravtiwari","id":771039,"avatar_url":"https://avatars1.githubusercontent.com/u/771039?v=3","gravatar_id":"","url":"https://api.github.com/users/gauravtiwari","html_url":"https://github.com/gauravtiwari","followers_url":"https://api.github.com/users/gauravtiwari/followers","following_url":"https://api.github.com/users/gauravtiwari/following{/other_user}","gists_url":"https://api.github.com/users/gauravtiwari/gists{/gist_id}","starred_url":"https://api.github.com/users/gauravtiwari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauravtiwari/subscriptions","organizations_url":"https://api.github.com/users/gauravtiwari/orgs","repos_url":"https://api.github.com/users/gauravtiwari/repos","events_url":"https://api.github.com/users/gauravtiwari/events{/privacy}","received_events_url":"https://api.github.com/users/gauravtiwari/received_events","type":"User","site_admin":false},"body":"@dhh As we discussed the other day this addresses compiling assets in tests based on @javan's idea. Also removed the rake task enhancements because it's compiling twice and could also lead to confusion, this way it's more clear. What do you think?\r\n\r\nWe will need to merge the reload PR #292 first because that will make sure that manifest change has been picked up whenever it changes. ","created_at":"2017-05-07T17:15:03Z","updated_at":"2017-05-08T21:01:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf6e60212b970ff4ce20d6262d0ff7394b93f23c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rails/webpacker/pulls/341/commits","review_comments_url":"https://api.github.com/repos/rails/webpacker/pulls/341/comments","review_comment_url":"https://api.github.com/repos/rails/webpacker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/webpacker/issues/341/comments","statuses_url":"https://api.github.com/repos/rails/webpacker/statuses/bb2e30c24712afc1037bd88cb3cae76ef78ea04a","head":{"label":"gauravtiwari:add-test-helper","ref":"add-test-helper","sha":"bb2e30c24712afc1037bd88cb3cae76ef78ea04a","user":{"login":"gauravtiwari","id":771039,"avatar_url":"https://avatars1.githubusercontent.com/u/771039?v=3","gravatar_id":"","url":"https://api.github.com/users/gauravtiwari","html_url":"https://github.com/gauravtiwari","followers_url":"https://api.github.com/users/gauravtiwari/followers","following_url":"https://api.github.com/users/gauravtiwari/following{/other_user}","gists_url":"https://api.github.com/users/gauravtiwari/gists{/gist_id}","starred_url":"https://api.github.com/users/gauravtiwari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauravtiwari/subscriptions","organizations_url":"https://api.github.com/users/gauravtiwari/orgs","repos_url":"https://api.github.com/users/gauravtiwari/repos","events_url":"https://api.github.com/users/gauravtiwari/events{/privacy}","received_events_url":"https://api.github.com/users/gauravtiwari/received_events","type":"User","site_admin":false},"repo":{"id":76973936,"name":"webpacker","full_name":"gauravtiwari/webpacker","owner":{"login":"gauravtiwari","id":771039,"avatar_url":"https://avatars1.githubusercontent.com/u/771039?v=3","gravatar_id":"","url":"https://api.github.com/users/gauravtiwari","html_url":"https://github.com/gauravtiwari","followers_url":"https://api.github.com/users/gauravtiwari/followers","following_url":"https://api.github.com/users/gauravtiwari/following{/other_user}","gists_url":"https://api.github.com/users/gauravtiwari/gists{/gist_id}","starred_url":"https://api.github.com/users/gauravtiwari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauravtiwari/subscriptions","organizations_url":"https://api.github.com/users/gauravtiwari/orgs","repos_url":"https://api.github.com/users/gauravtiwari/repos","events_url":"https://api.github.com/users/gauravtiwari/events{/privacy}","received_events_url":"https://api.github.com/users/gauravtiwari/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gauravtiwari/webpacker","description":"Use Webpack to manage app-like JavaScript modules in Rails","fork":true,"url":"https://api.github.com/repos/gauravtiwari/webpacker","forks_url":"https://api.github.com/repos/gauravtiwari/webpacker/forks","keys_url":"https://api.github.com/repos/gauravtiwari/webpacker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gauravtiwari/webpacker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gauravtiwari/webpacker/teams","hooks_url":"https://api.github.com/repos/gauravtiwari/webpacker/hooks","issue_events_url":"https://api.github.com/repos/gauravtiwari/webpacker/issues/events{/number}","events_url":"https://api.github.com/repos/gauravtiwari/webpacker/events","assignees_url":"https://api.github.com/repos/gauravtiwari/webpacker/assignees{/user}","branches_url":"https://api.github.com/repos/gauravtiwari/webpacker/branches{/branch}","tags_url":"https://api.github.com/repos/gauravtiwari/webpacker/tags","blobs_url":"https://api.github.com/repos/gauravtiwari/webpacker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gauravtiwari/webpacker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gauravtiwari/webpacker/git/refs{/sha}","trees_url":"https://api.github.com/repos/gauravtiwari/webpacker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gauravtiwari/webpacker/statuses/{sha}","languages_url":"https://api.github.com/repos/gauravtiwari/webpacker/languages","stargazers_url":"https://api.github.com/repos/gauravtiwari/webpacker/stargazers","contributors_url":"https://api.github.com/repos/gauravtiwari/webpacker/contributors","subscribers_url":"https://api.github.com/repos/gauravtiwari/webpacker/subscribers","subscription_url":"https://api.github.com/repos/gauravtiwari/webpacker/subscription","commits_url":"https://api.github.com/repos/gauravtiwari/webpacker/commits{/sha}","git_commits_url":"https://api.github.com/repos/gauravtiwari/webpacker/git/commits{/sha}","comments_url":"https://api.github.com/repos/gauravtiwari/webpacker/comments{/number}","issue_comment_url":"https://api.github.com/repos/gauravtiwari/webpacker/issues/comments{/number}","contents_url":"https://api.github.com/repos/gauravtiwari/webpacker/contents/{+path}","compare_url":"https://api.github.com/repos/gauravtiwari/webpacker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gauravtiwari/webpacker/merges","archive_url":"https://api.github.com/repos/gauravtiwari/webpacker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gauravtiwari/webpacker/downloads","issues_url":"https://api.github.com/repos/gauravtiwari/webpacker/issues{/number}","pulls_url":"https://api.github.com/repos/gauravtiwari/webpacker/pulls{/number}","milestones_url":"https://api.github.com/repos/gauravtiwari/webpacker/milestones{/number}","notifications_url":"https://api.github.com/repos/gauravtiwari/webpacker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gauravtiwari/webpacker/labels{/name}","releases_url":"https://api.github.com/repos/gauravtiwari/webpacker/releases{/id}","deployments_url":"https://api.github.com/repos/gauravtiwari/webpacker/deployments","created_at":"2016-12-20T16:42:39Z","updated_at":"2016-12-20T16:42:41Z","pushed_at":"2017-05-08T20:28:49Z","git_url":"git://github.com/gauravtiwari/webpacker.git","ssh_url":"git@github.com:gauravtiwari/webpacker.git","clone_url":"https://github.com/gauravtiwari/webpacker.git","svn_url":"https://github.com/gauravtiwari/webpacker","homepage":null,"size":318,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"c49e6155402669e6f0b1d013fbb9ab05aafaf5c7","user":{"login":"rails","id":4223,"avatar_url":"https://avatars2.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":75785147,"name":"webpacker","full_name":"rails/webpacker","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars2.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/webpacker","description":"Use Webpack to manage app-like JavaScript modules in Rails","fork":false,"url":"https://api.github.com/repos/rails/webpacker","forks_url":"https://api.github.com/repos/rails/webpacker/forks","keys_url":"https://api.github.com/repos/rails/webpacker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/webpacker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/webpacker/teams","hooks_url":"https://api.github.com/repos/rails/webpacker/hooks","issue_events_url":"https://api.github.com/repos/rails/webpacker/issues/events{/number}","events_url":"https://api.github.com/repos/rails/webpacker/events","assignees_url":"https://api.github.com/repos/rails/webpacker/assignees{/user}","branches_url":"https://api.github.com/repos/rails/webpacker/branches{/branch}","tags_url":"https://api.github.com/repos/rails/webpacker/tags","blobs_url":"https://api.github.com/repos/rails/webpacker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/webpacker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/webpacker/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/webpacker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/webpacker/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/webpacker/languages","stargazers_url":"https://api.github.com/repos/rails/webpacker/stargazers","contributors_url":"https://api.github.com/repos/rails/webpacker/contributors","subscribers_url":"https://api.github.com/repos/rails/webpacker/subscribers","subscription_url":"https://api.github.com/repos/rails/webpacker/subscription","commits_url":"https://api.github.com/repos/rails/webpacker/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/webpacker/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/webpacker/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/webpacker/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/webpacker/contents/{+path}","compare_url":"https://api.github.com/repos/rails/webpacker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/webpacker/merges","archive_url":"https://api.github.com/repos/rails/webpacker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/webpacker/downloads","issues_url":"https://api.github.com/repos/rails/webpacker/issues{/number}","pulls_url":"https://api.github.com/repos/rails/webpacker/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/webpacker/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/webpacker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/webpacker/labels{/name}","releases_url":"https://api.github.com/repos/rails/webpacker/releases{/id}","deployments_url":"https://api.github.com/repos/rails/webpacker/deployments","created_at":"2016-12-07T00:55:03Z","updated_at":"2017-05-08T15:39:49Z","pushed_at":"2017-05-08T20:28:50Z","git_url":"git://github.com/rails/webpacker.git","ssh_url":"git@github.com:rails/webpacker.git","clone_url":"https://github.com/rails/webpacker.git","svn_url":"https://github.com/rails/webpacker","homepage":null,"size":237,"stargazers_count":1511,"watchers_count":1511,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":161,"mirror_url":null,"open_issues_count":32,"forks":161,"open_issues":32,"watchers":1511,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/webpacker/pulls/341"},"html":{"href":"https://github.com/rails/webpacker/pull/341"},"issue":{"href":"https://api.github.com/repos/rails/webpacker/issues/341"},"comments":{"href":"https://api.github.com/repos/rails/webpacker/issues/341/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/webpacker/pulls/341/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/webpacker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/webpacker/pulls/341/commits"},"statuses":{"href":"https://api.github.com/repos/rails/webpacker/statuses/bb2e30c24712afc1037bd88cb3cae76ef78ea04a"}}}}
{"actor":{"display_login":"javan"}}