{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/76836031","id":76836031,"diff_hunk":"@@ -282,8 +285,11 @@ def image_alt(src)\n       #   video_tag([\"trailer.ogg\", \"trailer.flv\"], size: \"160x120\")\n       #   # => <video height=\"120\" width=\"160\"><source src=\"/videos/trailer.ogg\" /><source src=\"/videos/trailer.flv\" /></video>\n       def video_tag(*sources)","path":"actionview/lib/action_view/helpers/asset_tag_helper.rb","position":58,"original_position":58,"commit_id":"3ee9d0061fa042a9fcffa864ffa1492a00d0d179","original_commit_id":"3ee9d0061fa042a9fcffa864ffa1492a00d0d179","user":{"login":"kaspth","id":350807,"avatar_url":"https://avatars.githubusercontent.com/u/350807?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspth","html_url":"https://github.com/kaspth","followers_url":"https://api.github.com/users/kaspth/followers","following_url":"https://api.github.com/users/kaspth/following{/other_user}","gists_url":"https://api.github.com/users/kaspth/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspth/subscriptions","organizations_url":"https://api.github.com/users/kaspth/orgs","repos_url":"https://api.github.com/users/kaspth/repos","events_url":"https://api.github.com/users/kaspth/events{/privacy}","received_events_url":"https://api.github.com/users/kaspth/received_events","type":"User","site_admin":false},"body":"We could remove the options wrangling with a keyword argument:\r\n\r\n```ruby\r\ndef video_tag(*sources, skip_pipeline_on_poster: nil)\r\n  multiple_sources_tag_builder(\"video\", sources) do |options|\r\n    options[:poster] = path_to_image(options[:poster], skip_pipeline: skip_pipeline_on_poster) if options[:poster]\r\n    options[:width], options[:height] = extract_dimensions(options.delete(:size)) if options[:size]\r\n  end\r\nend\r\n```\r\n\r\nI think that would also save us a block argument shadowing local variable warning from `options`. 😁","created_at":"2016-08-30T16:59:53Z","updated_at":"2016-08-30T16:59:53Z","html_url":"https://github.com/rails/rails/pull/26226#discussion_r76836031","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/26226","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/76836031"},"html":{"href":"https://github.com/rails/rails/pull/26226#discussion_r76836031"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/26226"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/26226","id":82019795,"html_url":"https://github.com/rails/rails/pull/26226","diff_url":"https://github.com/rails/rails/pull/26226.diff","patch_url":"https://github.com/rails/rails/pull/26226.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/26226","number":26226,"state":"open","locked":false,"title":"Make public asset use explicit","user":{"login":"schneems","id":59744,"avatar_url":"https://avatars.githubusercontent.com/u/59744?v=3","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false},"body":"Currently when an asset isn't found the behavior is to pass the string through. For example a valid asset will return a url from pipeline\r\n\r\n```ruby\r\nasset_path(\"application.js\")\r\n# => assets/application-123098udasvi0mnafd.js\r\n```\r\n\r\nWhile if you make a typo, you won't get an error or anything, it just falls through:\r\n\r\n```ruby\r\nasset_path(\"app1icati0n.js\")\r\n# => \"app1icati0n.js\"\r\n```\r\n\r\nThis is bad. No exceptions are raised, the error goes undetected.\r\n\r\nThis PR makes adds an explicit api for when you want to use an asset that is not in the asset pipeline. If you want an asset from the \"public\" directory you can now explicitly say so by using `public_folder: true`\r\n\r\n```ruby\r\nasset_path(\"app1icati0n.js\", public_folder: true)\r\n# => \"app1icati0n.js\"\r\n```\r\n\r\nNow there is no confusion by sprockets-rails about the intent of the method call. Likewise in rails/sprockets-rails#375 we are adding a flag `unknown_asset_fallback`. When it is set to `true` then the current fallback behavior will happen, but a deprecation will be emitted. When it is set to false an exception will be raised so you know immediately that the asset was not found.\r\n\r\nWe are defaulting it to `false` for all new apps.\r\n\r\n\r\n```ruby\r\n# Unknown asset fallback will return the path passed in when the given\r\n# asset is not present in the asset pipeline.\r\nRails.application.config.assets.unknown_asset_fallback = false\r\n```\r\n\r\nWhile this patch is intended to go along with the sprockets-rails patch, it should still function with older sprockets-rails versions, however no deprecations or exceptions will be raised.\r\n","created_at":"2016-08-19T17:54:56Z","updated_at":"2016-08-30T16:59:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66cb6beb39811baa1eb73815b2ea250fe0b60d79","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/26226/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/26226/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/26226/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/3ee9d0061fa042a9fcffa864ffa1492a00d0d179","head":{"label":"schneems:schneems/explicit-public-urls","ref":"schneems/explicit-public-urls","sha":"3ee9d0061fa042a9fcffa864ffa1492a00d0d179","user":{"login":"schneems","id":59744,"avatar_url":"https://avatars.githubusercontent.com/u/59744?v=3","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false},"repo":{"id":2873136,"name":"rails","full_name":"schneems/rails","owner":{"login":"schneems","id":59744,"avatar_url":"https://avatars.githubusercontent.com/u/59744?v=3","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/schneems/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/schneems/rails","forks_url":"https://api.github.com/repos/schneems/rails/forks","keys_url":"https://api.github.com/repos/schneems/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schneems/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schneems/rails/teams","hooks_url":"https://api.github.com/repos/schneems/rails/hooks","issue_events_url":"https://api.github.com/repos/schneems/rails/issues/events{/number}","events_url":"https://api.github.com/repos/schneems/rails/events","assignees_url":"https://api.github.com/repos/schneems/rails/assignees{/user}","branches_url":"https://api.github.com/repos/schneems/rails/branches{/branch}","tags_url":"https://api.github.com/repos/schneems/rails/tags","blobs_url":"https://api.github.com/repos/schneems/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schneems/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schneems/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/schneems/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schneems/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/schneems/rails/languages","stargazers_url":"https://api.github.com/repos/schneems/rails/stargazers","contributors_url":"https://api.github.com/repos/schneems/rails/contributors","subscribers_url":"https://api.github.com/repos/schneems/rails/subscribers","subscription_url":"https://api.github.com/repos/schneems/rails/subscription","commits_url":"https://api.github.com/repos/schneems/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/schneems/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/schneems/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/schneems/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/schneems/rails/contents/{+path}","compare_url":"https://api.github.com/repos/schneems/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schneems/rails/merges","archive_url":"https://api.github.com/repos/schneems/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schneems/rails/downloads","issues_url":"https://api.github.com/repos/schneems/rails/issues{/number}","pulls_url":"https://api.github.com/repos/schneems/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/schneems/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/schneems/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schneems/rails/labels{/name}","releases_url":"https://api.github.com/repos/schneems/rails/releases{/id}","deployments_url":"https://api.github.com/repos/schneems/rails/deployments","created_at":"2011-11-29T06:48:49Z","updated_at":"2015-01-08T18:17:54Z","pushed_at":"2016-08-30T15:26:27Z","git_url":"git://github.com/schneems/rails.git","ssh_url":"git@github.com:schneems/rails.git","clone_url":"https://github.com/schneems/rails.git","svn_url":"https://github.com/schneems/rails","homepage":"http://rubyonrails.org","size":128609,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"3fc414a019526e5584867b032a188adf15c71eac","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.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":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.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/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","deployments_url":"https://api.github.com/repos/rails/rails/deployments","created_at":"2008-04-11T02:19:47Z","updated_at":"2016-08-30T15:28:04Z","pushed_at":"2016-08-30T16:43:05Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":344567,"stargazers_count":32611,"watchers_count":32611,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13263,"mirror_url":null,"open_issues_count":1130,"forks":13263,"open_issues":1130,"watchers":32611,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/26226"},"html":{"href":"https://github.com/rails/rails/pull/26226"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/26226"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/26226/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/26226/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/26226/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/3ee9d0061fa042a9fcffa864ffa1492a00d0d179"}}}}
{"actor":{"display_login":"kaspth"}}