{"action":"created","comment":{"url":"https://api.github.com/repos/hanami/assets/pulls/comments/53186014","id":53186014,"diff_hunk":"@@ -125,9 +153,23 @@ def self.included(base)\n       #   <%= javascript 'application' %>\n       #\n       #   # <script src=\"https://assets.bookshelf.org/assets/application-28a6b886de2372ee3922fcaf3f78f2d8.js\" type=\"text/javascript\"></script>\n-      def javascript(*sources)\n+      def javascript(*sources, **options)\n         _safe_tags(*sources) do |source|\n-          html.script(src: _typed_asset_path(source, JAVASCRIPT_EXT), type: JAVASCRIPT_MIME_TYPE).to_s\n+          tag_options = options.merge({\n+            src: _typed_asset_path(source, JAVASCRIPT_EXT),\n+            type: JAVASCRIPT_MIME_TYPE\n+          })\n+\n+          if _sri? || tag_options.include?(:integrity)\n+            tag_options[:integrity] ||= _sri_value(source, JAVASCRIPT_EXT)\n+            tag_options[:crossorigin] ||= CROSSORIGIN_ANONYMOUS\n+          end\n+\n+          html.script(\n+            src: tag_options.delete(:src),","path":"lib/hanami/assets/helpers.rb","position":61,"original_position":61,"commit_id":"739e73cdf81f3417cfef85bd5442b16340e5ff47","original_commit_id":"739e73cdf81f3417cfef85bd5442b16340e5ff47","user":{"login":"accuser","id":85733,"avatar_url":"https://avatars.githubusercontent.com/u/85733?v=3","gravatar_id":"","url":"https://api.github.com/users/accuser","html_url":"https://github.com/accuser","followers_url":"https://api.github.com/users/accuser/followers","following_url":"https://api.github.com/users/accuser/following{/other_user}","gists_url":"https://api.github.com/users/accuser/gists{/gist_id}","starred_url":"https://api.github.com/users/accuser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/accuser/subscriptions","organizations_url":"https://api.github.com/users/accuser/orgs","repos_url":"https://api.github.com/users/accuser/repos","events_url":"https://api.github.com/users/accuser/events{/privacy}","received_events_url":"https://api.github.com/users/accuser/received_events","type":"User","site_admin":false},"body":"I've done this to maintain the order of attributes, and not break the existing tests.","created_at":"2016-02-17T16:05:12Z","updated_at":"2016-02-17T16:05:12Z","html_url":"https://github.com/hanami/assets/pull/46#discussion_r53186014","pull_request_url":"https://api.github.com/repos/hanami/assets/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/hanami/assets/pulls/comments/53186014"},"html":{"href":"https://github.com/hanami/assets/pull/46#discussion_r53186014"},"pull_request":{"href":"https://api.github.com/repos/hanami/assets/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/hanami/assets/pulls/46","id":59289932,"html_url":"https://github.com/hanami/assets/pull/46","diff_url":"https://github.com/hanami/assets/pull/46.diff","patch_url":"https://github.com/hanami/assets/pull/46.patch","issue_url":"https://api.github.com/repos/hanami/assets/issues/46","number":46,"state":"open","locked":false,"title":"Add options to javascript and stylesheet helpers, including support for Subresource Integrity (SRI)","user":{"login":"accuser","id":85733,"avatar_url":"https://avatars.githubusercontent.com/u/85733?v=3","gravatar_id":"","url":"https://api.github.com/users/accuser","html_url":"https://github.com/accuser","followers_url":"https://api.github.com/users/accuser/followers","following_url":"https://api.github.com/users/accuser/following{/other_user}","gists_url":"https://api.github.com/users/accuser/gists{/gist_id}","starred_url":"https://api.github.com/users/accuser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/accuser/subscriptions","organizations_url":"https://api.github.com/users/accuser/orgs","repos_url":"https://api.github.com/users/accuser/repos","events_url":"https://api.github.com/users/accuser/events{/privacy}","received_events_url":"https://api.github.com/users/accuser/received_events","type":"User","site_admin":false},"body":"This PR adds an optional HTML5 `async` attribute to the `#javascript` asset helper. If specified, the resulting HTML output will include the `async` attribute.","created_at":"2016-02-14T08:06:27Z","updated_at":"2016-02-17T16:05:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc2ca744fd5a187eacd4afb97eccec6ac562d324","assignee":{"login":"joneslee85","id":135605,"avatar_url":"https://avatars.githubusercontent.com/u/135605?v=3","gravatar_id":"","url":"https://api.github.com/users/joneslee85","html_url":"https://github.com/joneslee85","followers_url":"https://api.github.com/users/joneslee85/followers","following_url":"https://api.github.com/users/joneslee85/following{/other_user}","gists_url":"https://api.github.com/users/joneslee85/gists{/gist_id}","starred_url":"https://api.github.com/users/joneslee85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joneslee85/subscriptions","organizations_url":"https://api.github.com/users/joneslee85/orgs","repos_url":"https://api.github.com/users/joneslee85/repos","events_url":"https://api.github.com/users/joneslee85/events{/privacy}","received_events_url":"https://api.github.com/users/joneslee85/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hanami/assets/milestones/4","html_url":"https://github.com/hanami/assets/milestones/v0.3.0","labels_url":"https://api.github.com/repos/hanami/assets/milestones/4/labels","id":1566927,"number":4,"title":"v0.3.0","description":"","creator":{"login":"joneslee85","id":135605,"avatar_url":"https://avatars.githubusercontent.com/u/135605?v=3","gravatar_id":"","url":"https://api.github.com/users/joneslee85","html_url":"https://github.com/joneslee85","followers_url":"https://api.github.com/users/joneslee85/followers","following_url":"https://api.github.com/users/joneslee85/following{/other_user}","gists_url":"https://api.github.com/users/joneslee85/gists{/gist_id}","starred_url":"https://api.github.com/users/joneslee85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joneslee85/subscriptions","organizations_url":"https://api.github.com/users/joneslee85/orgs","repos_url":"https://api.github.com/users/joneslee85/repos","events_url":"https://api.github.com/users/joneslee85/events{/privacy}","received_events_url":"https://api.github.com/users/joneslee85/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-02-05T19:37:16Z","updated_at":"2016-02-14T22:01:54Z","due_on":"2016-04-22T14:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/hanami/assets/pulls/46/commits","review_comments_url":"https://api.github.com/repos/hanami/assets/pulls/46/comments","review_comment_url":"https://api.github.com/repos/hanami/assets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hanami/assets/issues/46/comments","statuses_url":"https://api.github.com/repos/hanami/assets/statuses/739e73cdf81f3417cfef85bd5442b16340e5ff47","head":{"label":"accuser:add-options-to-javascript-helper","ref":"add-options-to-javascript-helper","sha":"739e73cdf81f3417cfef85bd5442b16340e5ff47","user":{"login":"accuser","id":85733,"avatar_url":"https://avatars.githubusercontent.com/u/85733?v=3","gravatar_id":"","url":"https://api.github.com/users/accuser","html_url":"https://github.com/accuser","followers_url":"https://api.github.com/users/accuser/followers","following_url":"https://api.github.com/users/accuser/following{/other_user}","gists_url":"https://api.github.com/users/accuser/gists{/gist_id}","starred_url":"https://api.github.com/users/accuser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/accuser/subscriptions","organizations_url":"https://api.github.com/users/accuser/orgs","repos_url":"https://api.github.com/users/accuser/repos","events_url":"https://api.github.com/users/accuser/events{/privacy}","received_events_url":"https://api.github.com/users/accuser/received_events","type":"User","site_admin":false},"repo":{"id":50835154,"name":"assets","full_name":"accuser/assets","owner":{"login":"accuser","id":85733,"avatar_url":"https://avatars.githubusercontent.com/u/85733?v=3","gravatar_id":"","url":"https://api.github.com/users/accuser","html_url":"https://github.com/accuser","followers_url":"https://api.github.com/users/accuser/followers","following_url":"https://api.github.com/users/accuser/following{/other_user}","gists_url":"https://api.github.com/users/accuser/gists{/gist_id}","starred_url":"https://api.github.com/users/accuser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/accuser/subscriptions","organizations_url":"https://api.github.com/users/accuser/orgs","repos_url":"https://api.github.com/users/accuser/repos","events_url":"https://api.github.com/users/accuser/events{/privacy}","received_events_url":"https://api.github.com/users/accuser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/accuser/assets","description":"Assets management for Ruby web applications","fork":true,"url":"https://api.github.com/repos/accuser/assets","forks_url":"https://api.github.com/repos/accuser/assets/forks","keys_url":"https://api.github.com/repos/accuser/assets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/accuser/assets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/accuser/assets/teams","hooks_url":"https://api.github.com/repos/accuser/assets/hooks","issue_events_url":"https://api.github.com/repos/accuser/assets/issues/events{/number}","events_url":"https://api.github.com/repos/accuser/assets/events","assignees_url":"https://api.github.com/repos/accuser/assets/assignees{/user}","branches_url":"https://api.github.com/repos/accuser/assets/branches{/branch}","tags_url":"https://api.github.com/repos/accuser/assets/tags","blobs_url":"https://api.github.com/repos/accuser/assets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/accuser/assets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/accuser/assets/git/refs{/sha}","trees_url":"https://api.github.com/repos/accuser/assets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/accuser/assets/statuses/{sha}","languages_url":"https://api.github.com/repos/accuser/assets/languages","stargazers_url":"https://api.github.com/repos/accuser/assets/stargazers","contributors_url":"https://api.github.com/repos/accuser/assets/contributors","subscribers_url":"https://api.github.com/repos/accuser/assets/subscribers","subscription_url":"https://api.github.com/repos/accuser/assets/subscription","commits_url":"https://api.github.com/repos/accuser/assets/commits{/sha}","git_commits_url":"https://api.github.com/repos/accuser/assets/git/commits{/sha}","comments_url":"https://api.github.com/repos/accuser/assets/comments{/number}","issue_comment_url":"https://api.github.com/repos/accuser/assets/issues/comments{/number}","contents_url":"https://api.github.com/repos/accuser/assets/contents/{+path}","compare_url":"https://api.github.com/repos/accuser/assets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/accuser/assets/merges","archive_url":"https://api.github.com/repos/accuser/assets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/accuser/assets/downloads","issues_url":"https://api.github.com/repos/accuser/assets/issues{/number}","pulls_url":"https://api.github.com/repos/accuser/assets/pulls{/number}","milestones_url":"https://api.github.com/repos/accuser/assets/milestones{/number}","notifications_url":"https://api.github.com/repos/accuser/assets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/accuser/assets/labels{/name}","releases_url":"https://api.github.com/repos/accuser/assets/releases{/id}","deployments_url":"https://api.github.com/repos/accuser/assets/deployments","created_at":"2016-02-01T11:29:05Z","updated_at":"2016-02-01T11:29:06Z","pushed_at":"2016-02-17T15:50:16Z","git_url":"git://github.com/accuser/assets.git","ssh_url":"git@github.com:accuser/assets.git","clone_url":"https://github.com/accuser/assets.git","svn_url":"https://github.com/accuser/assets","homepage":"http://lotusrb.org","size":588,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"hanami:master","ref":"master","sha":"e24d28e7c2d72d80c9f34216f230e1fb6b769e99","user":{"login":"hanami","id":3210273,"avatar_url":"https://avatars.githubusercontent.com/u/3210273?v=3","gravatar_id":"","url":"https://api.github.com/users/hanami","html_url":"https://github.com/hanami","followers_url":"https://api.github.com/users/hanami/followers","following_url":"https://api.github.com/users/hanami/following{/other_user}","gists_url":"https://api.github.com/users/hanami/gists{/gist_id}","starred_url":"https://api.github.com/users/hanami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanami/subscriptions","organizations_url":"https://api.github.com/users/hanami/orgs","repos_url":"https://api.github.com/users/hanami/repos","events_url":"https://api.github.com/users/hanami/events{/privacy}","received_events_url":"https://api.github.com/users/hanami/received_events","type":"Organization","site_admin":false},"repo":{"id":19746778,"name":"assets","full_name":"hanami/assets","owner":{"login":"hanami","id":3210273,"avatar_url":"https://avatars.githubusercontent.com/u/3210273?v=3","gravatar_id":"","url":"https://api.github.com/users/hanami","html_url":"https://github.com/hanami","followers_url":"https://api.github.com/users/hanami/followers","following_url":"https://api.github.com/users/hanami/following{/other_user}","gists_url":"https://api.github.com/users/hanami/gists{/gist_id}","starred_url":"https://api.github.com/users/hanami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanami/subscriptions","organizations_url":"https://api.github.com/users/hanami/orgs","repos_url":"https://api.github.com/users/hanami/repos","events_url":"https://api.github.com/users/hanami/events{/privacy}","received_events_url":"https://api.github.com/users/hanami/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hanami/assets","description":"Assets management for Ruby web applications","fork":false,"url":"https://api.github.com/repos/hanami/assets","forks_url":"https://api.github.com/repos/hanami/assets/forks","keys_url":"https://api.github.com/repos/hanami/assets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hanami/assets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hanami/assets/teams","hooks_url":"https://api.github.com/repos/hanami/assets/hooks","issue_events_url":"https://api.github.com/repos/hanami/assets/issues/events{/number}","events_url":"https://api.github.com/repos/hanami/assets/events","assignees_url":"https://api.github.com/repos/hanami/assets/assignees{/user}","branches_url":"https://api.github.com/repos/hanami/assets/branches{/branch}","tags_url":"https://api.github.com/repos/hanami/assets/tags","blobs_url":"https://api.github.com/repos/hanami/assets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hanami/assets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hanami/assets/git/refs{/sha}","trees_url":"https://api.github.com/repos/hanami/assets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hanami/assets/statuses/{sha}","languages_url":"https://api.github.com/repos/hanami/assets/languages","stargazers_url":"https://api.github.com/repos/hanami/assets/stargazers","contributors_url":"https://api.github.com/repos/hanami/assets/contributors","subscribers_url":"https://api.github.com/repos/hanami/assets/subscribers","subscription_url":"https://api.github.com/repos/hanami/assets/subscription","commits_url":"https://api.github.com/repos/hanami/assets/commits{/sha}","git_commits_url":"https://api.github.com/repos/hanami/assets/git/commits{/sha}","comments_url":"https://api.github.com/repos/hanami/assets/comments{/number}","issue_comment_url":"https://api.github.com/repos/hanami/assets/issues/comments{/number}","contents_url":"https://api.github.com/repos/hanami/assets/contents/{+path}","compare_url":"https://api.github.com/repos/hanami/assets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hanami/assets/merges","archive_url":"https://api.github.com/repos/hanami/assets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hanami/assets/downloads","issues_url":"https://api.github.com/repos/hanami/assets/issues{/number}","pulls_url":"https://api.github.com/repos/hanami/assets/pulls{/number}","milestones_url":"https://api.github.com/repos/hanami/assets/milestones{/number}","notifications_url":"https://api.github.com/repos/hanami/assets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hanami/assets/labels{/name}","releases_url":"https://api.github.com/repos/hanami/assets/releases{/id}","deployments_url":"https://api.github.com/repos/hanami/assets/deployments","created_at":"2014-05-13T16:28:38Z","updated_at":"2016-02-10T09:14:57Z","pushed_at":"2016-02-17T15:50:16Z","git_url":"git://github.com/hanami/assets.git","ssh_url":"git@github.com:hanami/assets.git","clone_url":"https://github.com/hanami/assets.git","svn_url":"https://github.com/hanami/assets","homepage":"http://hanamirb.org","size":658,"stargazers_count":20,"watchers_count":20,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":2,"forks":21,"open_issues":2,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hanami/assets/pulls/46"},"html":{"href":"https://github.com/hanami/assets/pull/46"},"issue":{"href":"https://api.github.com/repos/hanami/assets/issues/46"},"comments":{"href":"https://api.github.com/repos/hanami/assets/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/hanami/assets/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/hanami/assets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hanami/assets/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/hanami/assets/statuses/739e73cdf81f3417cfef85bd5442b16340e5ff47"}}}}