GitHub PullRequestReviewCommentEvent at 2014-10-20 22:26:44
Repository: bootstrap
Actor: bmock
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/janrain/bootstrap/pulls/comments/19118506","id":19118506,"diff_hunk":"@@ -0,0 +1,149 @@\n+ <?php\n+    /**\n+    * Make an Adobe Swatch Exchange file\n+    *\n+    * @param    array\n+    * @return   string\n+    * @see      http://www.colourlovers.com/web/blog/2007/11/08/color-palettes-in-adobe-swatch-exchange-ase\n+    * @author   Chris Williams - http://www.colourlovers.com\n+    * @version  2.0\n+\n+    * This script uses the Multibyte String extension: http://www.php.net/manual/en/book.mbstring.php\n+\n+    * MIT License\n+\n+    * Copyright (c) 2011 Chris Williams - http://www.colourlovers.com\n+\n+    * Permission is hereby granted, free of charge, to any person obtaining a copy\n+    * of this software and associated documentation files (the \"Software\"), to deal\n+    * in the Software without restriction, including without limitation the rights\n+    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+    * copies of the Software, and to permit persons to whom the Software is\n+    * furnished to do so, subject to the following conditions:\n+\n+    * The above copyright notice and this permission notice shall be included in\n+    * all copies or substantial portions of the Software.\n+\n+    * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+    * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+    * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+    * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+    * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+    * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+    * THE SOFTWARE.\n+    */\n+    function mkASE($palettes) {\n+        $internal_encoding = mb_internal_encoding();\n+        mb_internal_encoding(\"UTF-8\");\n+\n+        ob_start();\n+\n+        $totalColors = $numPalettes = 0;\n+\n+        foreach ($palettes as $palette) {\n+            $totalColors += count($palette[\"colors\"]);\n+            ++$numPalettes;\n+        }\n+\n+        echo \"ASEF\"; # File signature\n+        echo pack(\"n*\",1,0); # Version\n+        echo pack(\"N\",$totalColors + ($numPalettes * 2)); # Total number of blocks\n+\n+        foreach ($palettes as $palette) {\n+            echo pack(\"n\",0xC001); # Group start\n+\n+            # Length of this block - see below\n+\n+            $title  = (mb_convert_encoding($palette[\"title\"],\"UTF-16BE\",\"UTF-8\") . pack(\"n\",0));\n+            $buffer = pack(\"n\",(strlen($title) / 2)); # Length of the group title\n+            $buffer .= $title; # Group title\n+\n+            echo pack(\"N\",strlen($buffer)); # Length of this block\n+            echo $buffer;\n+\n+            foreach ($palette[\"colors\"] as $color) {\n+                echo pack(\"n\",1); # Color entry\n+\n+                # Length of this block - see below\n+\n+                $title  = (mb_convert_encoding($color[1],\"UTF-16BE\",\"UTF-8\") . pack(\"n\",0));\n+                $buffer = pack(\"n\",(strlen($title) / 2)); # Length of the title\n+                $buffer .= $title; # Title\n+\n+                # Colors\n+                list ($r,$g,$b) = array_map(\"intval\",sscanf($color[0],\"%2x%2x%2x\"));\n+                $r /= 255;\n+                $g /= 255;\n+                $b /= 255;\n+\n+                $buffer .= \"RGB \";\n+                $buffer .= strrev(pack(\"f\",$r));\n+                $buffer .= strrev(pack(\"f\",$g));\n+                $buffer .= strrev(pack(\"f\",$b));\n+                $buffer .= pack(\"n\",0); # Color type - 0x00 \"Global\"\n+\n+                echo pack(\"N\",strlen($buffer)); # Length of this block\n+                echo $buffer;\n+            }\n+            echo pack(\"n\",0xC002); # Group end\n+\n+            echo pack(\"N\",0); # Length of \"Group end\" block, which is 0\n+        }\n+\n+        $return = ob_get_contents();\n+        ob_end_clean();\n+\n+        mb_internal_encoding($internal_encoding);\n+\n+        return $return;\n+    }\n+\n+/*\n+    Colors taken from colordefs.yml\n+*/\n+\n+     $palettes = array (\n+         array (\n+             \"title\" => 'Basic colors',\n+             \"colors\" => array(\n+                 array( \"F4EFE6\", \"sky\" ),\n+                 array( \"22BBB8\", \"teal\" ),\n+                 array( \"1A757D\", \"turquoise\" ),\n+                 array( \"F05A27\", \"orange\" ),\n+             )\n+         ),\n+         array (\n+             \"title\" => 'Light color scheme',\n+             \"colors\" => array(\n+                 array( \"F6F5F2\", \"light-sky\" ),\n+                 array( \"6FD3D1\", \"light-teal\" ),\n+                 array( \"6AA5AA\", \"light-turquoise\" ),\n+                 array( \"F59472\", \"light-orange\" ),\n+             )\n+         ),\n+         array (\n+             \"title\" => 'Utility and Accent Colors',\n+             \"colors\" => array(\n+                 array( \"22BBB8\", \"action\" ),\n+                 array( \"346235\", \"success\" ),\n+                 array( \"FFB82E\", \"alert\" ),\n+                 array( \"CC3333\", \"warning\" ),\n+             )\n+         ),\n+         array (\n+             \"title\" => 'Grays',\n+             \"colors\" => array(\n+                 array( \"030302\", \"black\" ),\n+                 array( \"222222\", \"gray-darker\" ),\n+                 array( \"3D3A33\", \"gray-dark\" ),\n+                 array( \"59544A\", \"gray\" ),\n+                 array( \"999385\", \"gray-light\" ),\n+                 array( \"ECEBE9\", \"gray-lighter\" ),\n+                 array( \"F8F8F7\", \"gray-lightest\" ),\n+                 array( \"FFFFFF\", \"white\" ),\n+             )\n+         )\n+     );\n+\n+    $ase = mkASE($palettes);\n+    file_put_contents( '../docs/assets/brand/janrain-swatches.ase', $ase );","path":"tasks/ase.php","position":149,"original_position":149,"commit_id":"e9af9bc3a5ce7ed2d98c5740f117b864fbcd554e","original_commit_id":"e9af9bc3a5ce7ed2d98c5740f117b864fbcd554e","user":{"login":"bmock","id":2415477,"avatar_url":"https://avatars.githubusercontent.com/u/2415477?v=2","gravatar_id":"","url":"https://api.github.com/users/bmock","html_url":"https://github.com/bmock","followers_url":"https://api.github.com/users/bmock/followers","following_url":"https://api.github.com/users/bmock/following{/other_user}","gists_url":"https://api.github.com/users/bmock/gists{/gist_id}","starred_url":"https://api.github.com/users/bmock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmock/subscriptions","organizations_url":"https://api.github.com/users/bmock/orgs","repos_url":"https://api.github.com/users/bmock/repos","events_url":"https://api.github.com/users/bmock/events{/privacy}","received_events_url":"https://api.github.com/users/bmock/received_events","type":"User","site_admin":false},"body":"PHP?!","created_at":"2014-10-20T22:26:44Z","updated_at":"2014-10-20T22:26:44Z","html_url":"https://github.com/janrain/bootstrap/pull/19#discussion_r19118506","pull_request_url":"https://api.github.com/repos/janrain/bootstrap/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/janrain/bootstrap/pulls/comments/19118506"},"html":{"href":"https://github.com/janrain/bootstrap/pull/19#discussion_r19118506"},"pull_request":{"href":"https://api.github.com/repos/janrain/bootstrap/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/janrain/bootstrap/pulls/19","id":22894194,"html_url":"https://github.com/janrain/bootstrap/pull/19","diff_url":"https://github.com/janrain/bootstrap/pull/19.diff","patch_url":"https://github.com/janrain/bootstrap/pull/19.patch","issue_url":"https://api.github.com/repos/janrain/bootstrap/issues/19","number":19,"state":"open","locked":false,"title":"Updates vars for button colors; adds buttons section to docs","user":{"login":"thanj","id":1890887,"avatar_url":"https://avatars.githubusercontent.com/u/1890887?v=2","gravatar_id":"","url":"https://api.github.com/users/thanj","html_url":"https://github.com/thanj","followers_url":"https://api.github.com/users/thanj/followers","following_url":"https://api.github.com/users/thanj/following{/other_user}","gists_url":"https://api.github.com/users/thanj/gists{/gist_id}","starred_url":"https://api.github.com/users/thanj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thanj/subscriptions","organizations_url":"https://api.github.com/users/thanj/orgs","repos_url":"https://api.github.com/users/thanj/repos","events_url":"https://api.github.com/users/thanj/events{/privacy}","received_events_url":"https://api.github.com/users/thanj/received_events","type":"User","site_admin":false},"body":"Audited the color definitions in `_variables.scss`. Removed old unused color defs which were left in there from old branding. Defined button colors. Added descriptive text describing button usage and colors to documentation. \r\n\r\nIt'll be nice to standardize mockups and comps to follow the same rules.  I added an .ase swatch file which can be downloaded from this site and used in Photoshop, Illustrator, Fireworks, etc. This file is built by the tasks/ase.php file, which I included in the repository for historical purposes. But its ugly to require yet another language for the build environment, and to require hardcoded variables. It'd be much nicer if this step could be automated, maybe as a grunt task, which would read the colors from the variables.scss file... \r\n\r\nWarning: THIS DOES CHANGE A COUPLE OF THE COLOR DEFINITIONS. I think they are much more sensible defaults (\"success\" should always be a shade of green, not the turquoise that was before; and \"primary\" and \"secondary\" for buttons now refer to orange and teal like in our branding), but we should check them against the console to be sure. \r\n","created_at":"2014-10-16T23:20:29Z","updated_at":"2014-10-20T22:26:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a642a5803806c7d6a1313a0b678aa70eb4c953d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/janrain/bootstrap/pulls/19/commits","review_comments_url":"https://api.github.com/repos/janrain/bootstrap/pulls/19/comments","review_comment_url":"https://api.github.com/repos/janrain/bootstrap/pulls/comments/{number}","comments_url":"https://api.github.com/repos/janrain/bootstrap/issues/19/comments","statuses_url":"https://api.github.com/repos/janrain/bootstrap/statuses/e9af9bc3a5ce7ed2d98c5740f117b864fbcd554e","head":{"label":"janrain:thanj/buttons-documentation","ref":"thanj/buttons-documentation","sha":"e9af9bc3a5ce7ed2d98c5740f117b864fbcd554e","user":{"login":"janrain","id":237548,"avatar_url":"https://avatars.githubusercontent.com/u/237548?v=2","gravatar_id":"","url":"https://api.github.com/users/janrain","html_url":"https://github.com/janrain","followers_url":"https://api.github.com/users/janrain/followers","following_url":"https://api.github.com/users/janrain/following{/other_user}","gists_url":"https://api.github.com/users/janrain/gists{/gist_id}","starred_url":"https://api.github.com/users/janrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janrain/subscriptions","organizations_url":"https://api.github.com/users/janrain/orgs","repos_url":"https://api.github.com/users/janrain/repos","events_url":"https://api.github.com/users/janrain/events{/privacy}","received_events_url":"https://api.github.com/users/janrain/received_events","type":"Organization","site_admin":false},"repo":{"id":13778732,"name":"bootstrap","full_name":"janrain/bootstrap","owner":{"login":"janrain","id":237548,"avatar_url":"https://avatars.githubusercontent.com/u/237548?v=2","gravatar_id":"","url":"https://api.github.com/users/janrain","html_url":"https://github.com/janrain","followers_url":"https://api.github.com/users/janrain/followers","following_url":"https://api.github.com/users/janrain/following{/other_user}","gists_url":"https://api.github.com/users/janrain/gists{/gist_id}","starred_url":"https://api.github.com/users/janrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janrain/subscriptions","organizations_url":"https://api.github.com/users/janrain/orgs","repos_url":"https://api.github.com/users/janrain/repos","events_url":"https://api.github.com/users/janrain/events{/privacy}","received_events_url":"https://api.github.com/users/janrain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/janrain/bootstrap","description":"","fork":false,"url":"https://api.github.com/repos/janrain/bootstrap","forks_url":"https://api.github.com/repos/janrain/bootstrap/forks","keys_url":"https://api.github.com/repos/janrain/bootstrap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/janrain/bootstrap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/janrain/bootstrap/teams","hooks_url":"https://api.github.com/repos/janrain/bootstrap/hooks","issue_events_url":"https://api.github.com/repos/janrain/bootstrap/issues/events{/number}","events_url":"https://api.github.com/repos/janrain/bootstrap/events","assignees_url":"https://api.github.com/repos/janrain/bootstrap/assignees{/user}","branches_url":"https://api.github.com/repos/janrain/bootstrap/branches{/branch}","tags_url":"https://api.github.com/repos/janrain/bootstrap/tags","blobs_url":"https://api.github.com/repos/janrain/bootstrap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/janrain/bootstrap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/janrain/bootstrap/git/refs{/sha}","trees_url":"https://api.github.com/repos/janrain/bootstrap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/janrain/bootstrap/statuses/{sha}","languages_url":"https://api.github.com/repos/janrain/bootstrap/languages","stargazers_url":"https://api.github.com/repos/janrain/bootstrap/stargazers","contributors_url":"https://api.github.com/repos/janrain/bootstrap/contributors","subscribers_url":"https://api.github.com/repos/janrain/bootstrap/subscribers","subscription_url":"https://api.github.com/repos/janrain/bootstrap/subscription","commits_url":"https://api.github.com/repos/janrain/bootstrap/commits{/sha}","git_commits_url":"https://api.github.com/repos/janrain/bootstrap/git/commits{/sha}","comments_url":"https://api.github.com/repos/janrain/bootstrap/comments{/number}","issue_comment_url":"https://api.github.com/repos/janrain/bootstrap/issues/comments/{number}","contents_url":"https://api.github.com/repos/janrain/bootstrap/contents/{+path}","compare_url":"https://api.github.com/repos/janrain/bootstrap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/janrain/bootstrap/merges","archive_url":"https://api.github.com/repos/janrain/bootstrap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/janrain/bootstrap/downloads","issues_url":"https://api.github.com/repos/janrain/bootstrap/issues{/number}","pulls_url":"https://api.github.com/repos/janrain/bootstrap/pulls{/number}","milestones_url":"https://api.github.com/repos/janrain/bootstrap/milestones{/number}","notifications_url":"https://api.github.com/repos/janrain/bootstrap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/janrain/bootstrap/labels{/name}","releases_url":"https://api.github.com/repos/janrain/bootstrap/releases{/id}","created_at":"2013-10-22T16:14:32Z","updated_at":"2014-10-03T17:04:10Z","pushed_at":"2014-10-20T18:32:07Z","git_url":"git://github.com/janrain/bootstrap.git","ssh_url":"git@github.com:janrain/bootstrap.git","clone_url":"https://github.com/janrain/bootstrap.git","svn_url":"https://github.com/janrain/bootstrap","homepage":null,"size":10248,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"janrain:master","ref":"master","sha":"ed0c88cbd15dfa2a9ee53f08f22bb8809a2b829c","user":{"login":"janrain","id":237548,"avatar_url":"https://avatars.githubusercontent.com/u/237548?v=2","gravatar_id":"","url":"https://api.github.com/users/janrain","html_url":"https://github.com/janrain","followers_url":"https://api.github.com/users/janrain/followers","following_url":"https://api.github.com/users/janrain/following{/other_user}","gists_url":"https://api.github.com/users/janrain/gists{/gist_id}","starred_url":"https://api.github.com/users/janrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janrain/subscriptions","organizations_url":"https://api.github.com/users/janrain/orgs","repos_url":"https://api.github.com/users/janrain/repos","events_url":"https://api.github.com/users/janrain/events{/privacy}","received_events_url":"https://api.github.com/users/janrain/received_events","type":"Organization","site_admin":false},"repo":{"id":13778732,"name":"bootstrap","full_name":"janrain/bootstrap","owner":{"login":"janrain","id":237548,"avatar_url":"https://avatars.githubusercontent.com/u/237548?v=2","gravatar_id":"","url":"https://api.github.com/users/janrain","html_url":"https://github.com/janrain","followers_url":"https://api.github.com/users/janrain/followers","following_url":"https://api.github.com/users/janrain/following{/other_user}","gists_url":"https://api.github.com/users/janrain/gists{/gist_id}","starred_url":"https://api.github.com/users/janrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janrain/subscriptions","organizations_url":"https://api.github.com/users/janrain/orgs","repos_url":"https://api.github.com/users/janrain/repos","events_url":"https://api.github.com/users/janrain/events{/privacy}","received_events_url":"https://api.github.com/users/janrain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/janrain/bootstrap","description":"","fork":false,"url":"https://api.github.com/repos/janrain/bootstrap","forks_url":"https://api.github.com/repos/janrain/bootstrap/forks","keys_url":"https://api.github.com/repos/janrain/bootstrap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/janrain/bootstrap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/janrain/bootstrap/teams","hooks_url":"https://api.github.com/repos/janrain/bootstrap/hooks","issue_events_url":"https://api.github.com/repos/janrain/bootstrap/issues/events{/number}","events_url":"https://api.github.com/repos/janrain/bootstrap/events","assignees_url":"https://api.github.com/repos/janrain/bootstrap/assignees{/user}","branches_url":"https://api.github.com/repos/janrain/bootstrap/branches{/branch}","tags_url":"https://api.github.com/repos/janrain/bootstrap/tags","blobs_url":"https://api.github.com/repos/janrain/bootstrap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/janrain/bootstrap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/janrain/bootstrap/git/refs{/sha}","trees_url":"https://api.github.com/repos/janrain/bootstrap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/janrain/bootstrap/statuses/{sha}","languages_url":"https://api.github.com/repos/janrain/bootstrap/languages","stargazers_url":"https://api.github.com/repos/janrain/bootstrap/stargazers","contributors_url":"https://api.github.com/repos/janrain/bootstrap/contributors","subscribers_url":"https://api.github.com/repos/janrain/bootstrap/subscribers","subscription_url":"https://api.github.com/repos/janrain/bootstrap/subscription","commits_url":"https://api.github.com/repos/janrain/bootstrap/commits{/sha}","git_commits_url":"https://api.github.com/repos/janrain/bootstrap/git/commits{/sha}","comments_url":"https://api.github.com/repos/janrain/bootstrap/comments{/number}","issue_comment_url":"https://api.github.com/repos/janrain/bootstrap/issues/comments/{number}","contents_url":"https://api.github.com/repos/janrain/bootstrap/contents/{+path}","compare_url":"https://api.github.com/repos/janrain/bootstrap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/janrain/bootstrap/merges","archive_url":"https://api.github.com/repos/janrain/bootstrap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/janrain/bootstrap/downloads","issues_url":"https://api.github.com/repos/janrain/bootstrap/issues{/number}","pulls_url":"https://api.github.com/repos/janrain/bootstrap/pulls{/number}","milestones_url":"https://api.github.com/repos/janrain/bootstrap/milestones{/number}","notifications_url":"https://api.github.com/repos/janrain/bootstrap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/janrain/bootstrap/labels{/name}","releases_url":"https://api.github.com/repos/janrain/bootstrap/releases{/id}","created_at":"2013-10-22T16:14:32Z","updated_at":"2014-10-03T17:04:10Z","pushed_at":"2014-10-20T18:32:07Z","git_url":"git://github.com/janrain/bootstrap.git","ssh_url":"git@github.com:janrain/bootstrap.git","clone_url":"https://github.com/janrain/bootstrap.git","svn_url":"https://github.com/janrain/bootstrap","homepage":null,"size":10248,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/janrain/bootstrap/pulls/19"},"html":{"href":"https://github.com/janrain/bootstrap/pull/19"},"issue":{"href":"https://api.github.com/repos/janrain/bootstrap/issues/19"},"comments":{"href":"https://api.github.com/repos/janrain/bootstrap/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/janrain/bootstrap/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/janrain/bootstrap/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/janrain/bootstrap/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/janrain/bootstrap/statuses/e9af9bc3a5ce7ed2d98c5740f117b864fbcd554e"}}}}