{"action":"created","comment":{"url":"https://api.github.com/repos/Coursemology/polyglot/pulls/comments/49928668","id":49928668,"diff_hunk":"@@ -4,4 +4,26 @@\n # This is deliberately defined so that consumers of this library can inject methods into all\n # concrete languages' classes.\n module Coursemology::Polyglot::ConcreteLanguage::ClassMethods\n+  # The default algorithm for translating a language to a corresponding Docker image name.\n+  #\n+  # This will:\n+  #  1. Strip the +Coursemology::Polyglot::Language+ prefix.\n+  #  2. Underscore the name.\n+  #  3. Replace *n*Point*n* strings with dots (e.g. Python2Point7 to Python2.7).\n+  #  4. Replace slashes with dashes.\n+  def docker_image\n+    # Remove the Coursemology::Polyglot::Language prefix\n+    class_name = name\n+    class_name = class_name[34..-1] if class_name.start_with?(Coursemology::Polyglot::Language.name)","path":"lib/coursemology/polyglot/concrete_language/class_methods.rb","position":14,"original_position":14,"commit_id":"f912122619032150ec13fae7c684dd76042547ff","original_commit_id":"f912122619032150ec13fae7c684dd76042547ff","user":{"login":"allenwq","id":4983239,"avatar_url":"https://avatars.githubusercontent.com/u/4983239?v=3","gravatar_id":"","url":"https://api.github.com/users/allenwq","html_url":"https://github.com/allenwq","followers_url":"https://api.github.com/users/allenwq/followers","following_url":"https://api.github.com/users/allenwq/following{/other_user}","gists_url":"https://api.github.com/users/allenwq/gists{/gist_id}","starred_url":"https://api.github.com/users/allenwq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenwq/subscriptions","organizations_url":"https://api.github.com/users/allenwq/orgs","repos_url":"https://api.github.com/users/allenwq/repos","events_url":"https://api.github.com/users/allenwq/events{/privacy}","received_events_url":"https://api.github.com/users/allenwq/received_events","type":"User","site_admin":false},"body":"This is very hard to understand leh, can we just `sub` ? ","created_at":"2016-01-16T07:28:08Z","updated_at":"2016-01-16T07:28:08Z","html_url":"https://github.com/Coursemology/polyglot/pull/3#discussion_r49928668","pull_request_url":"https://api.github.com/repos/Coursemology/polyglot/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/Coursemology/polyglot/pulls/comments/49928668"},"html":{"href":"https://github.com/Coursemology/polyglot/pull/3#discussion_r49928668"},"pull_request":{"href":"https://api.github.com/repos/Coursemology/polyglot/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/Coursemology/polyglot/pulls/3","id":56247624,"html_url":"https://github.com/Coursemology/polyglot/pull/3","diff_url":"https://github.com/Coursemology/polyglot/pull/3.diff","patch_url":"https://github.com/Coursemology/polyglot/pull/3.patch","issue_url":"https://api.github.com/repos/Coursemology/polyglot/issues/3","number":3,"state":"open","locked":false,"title":"Implement algorithmic generation of Docker image names given a programming language name.","user":{"login":"lowjoel","id":2505070,"avatar_url":"https://avatars.githubusercontent.com/u/2505070?v=3","gravatar_id":"","url":"https://api.github.com/users/lowjoel","html_url":"https://github.com/lowjoel","followers_url":"https://api.github.com/users/lowjoel/followers","following_url":"https://api.github.com/users/lowjoel/following{/other_user}","gists_url":"https://api.github.com/users/lowjoel/gists{/gist_id}","starred_url":"https://api.github.com/users/lowjoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowjoel/subscriptions","organizations_url":"https://api.github.com/users/lowjoel/orgs","repos_url":"https://api.github.com/users/lowjoel/repos","events_url":"https://api.github.com/users/lowjoel/events{/privacy}","received_events_url":"https://api.github.com/users/lowjoel/received_events","type":"User","site_admin":false},"body":"This is needed to map a language to a suitable Docker image to use to run programs in that language.","created_at":"2016-01-16T06:48:08Z","updated_at":"2016-01-16T07:28:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75bc8e50550ef58964cf9103843474a720c49a7b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Coursemology/polyglot/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Coursemology/polyglot/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Coursemology/polyglot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Coursemology/polyglot/issues/3/comments","statuses_url":"https://api.github.com/repos/Coursemology/polyglot/statuses/f912122619032150ec13fae7c684dd76042547ff","head":{"label":"lowjoel:generate-docker-image-names","ref":"generate-docker-image-names","sha":"f912122619032150ec13fae7c684dd76042547ff","user":{"login":"lowjoel","id":2505070,"avatar_url":"https://avatars.githubusercontent.com/u/2505070?v=3","gravatar_id":"","url":"https://api.github.com/users/lowjoel","html_url":"https://github.com/lowjoel","followers_url":"https://api.github.com/users/lowjoel/followers","following_url":"https://api.github.com/users/lowjoel/following{/other_user}","gists_url":"https://api.github.com/users/lowjoel/gists{/gist_id}","starred_url":"https://api.github.com/users/lowjoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowjoel/subscriptions","organizations_url":"https://api.github.com/users/lowjoel/orgs","repos_url":"https://api.github.com/users/lowjoel/repos","events_url":"https://api.github.com/users/lowjoel/events{/privacy}","received_events_url":"https://api.github.com/users/lowjoel/received_events","type":"User","site_admin":false},"repo":{"id":49559067,"name":"coursemology-polyglot","full_name":"lowjoel/coursemology-polyglot","owner":{"login":"lowjoel","id":2505070,"avatar_url":"https://avatars.githubusercontent.com/u/2505070?v=3","gravatar_id":"","url":"https://api.github.com/users/lowjoel","html_url":"https://github.com/lowjoel","followers_url":"https://api.github.com/users/lowjoel/followers","following_url":"https://api.github.com/users/lowjoel/following{/other_user}","gists_url":"https://api.github.com/users/lowjoel/gists{/gist_id}","starred_url":"https://api.github.com/users/lowjoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowjoel/subscriptions","organizations_url":"https://api.github.com/users/lowjoel/orgs","repos_url":"https://api.github.com/users/lowjoel/repos","events_url":"https://api.github.com/users/lowjoel/events{/privacy}","received_events_url":"https://api.github.com/users/lowjoel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lowjoel/coursemology-polyglot","description":"","fork":true,"url":"https://api.github.com/repos/lowjoel/coursemology-polyglot","forks_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/forks","keys_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/teams","hooks_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/hooks","issue_events_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/issues/events{/number}","events_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/events","assignees_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/assignees{/user}","branches_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/branches{/branch}","tags_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/tags","blobs_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/git/refs{/sha}","trees_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/statuses/{sha}","languages_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/languages","stargazers_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/stargazers","contributors_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/contributors","subscribers_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/subscribers","subscription_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/subscription","commits_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/commits{/sha}","git_commits_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/git/commits{/sha}","comments_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/comments{/number}","issue_comment_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/issues/comments{/number}","contents_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/contents/{+path}","compare_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/merges","archive_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/downloads","issues_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/issues{/number}","pulls_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/pulls{/number}","milestones_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/milestones{/number}","notifications_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/labels{/name}","releases_url":"https://api.github.com/repos/lowjoel/coursemology-polyglot/releases{/id}","created_at":"2016-01-13T08:02:44Z","updated_at":"2016-01-13T08:02:57Z","pushed_at":"2016-01-16T06:49:49Z","git_url":"git://github.com/lowjoel/coursemology-polyglot.git","ssh_url":"git@github.com:lowjoel/coursemology-polyglot.git","clone_url":"https://github.com/lowjoel/coursemology-polyglot.git","svn_url":"https://github.com/lowjoel/coursemology-polyglot","homepage":null,"size":19,"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":"Coursemology:master","ref":"master","sha":"265232b56547a67afcc66477620330429b794eca","user":{"login":"Coursemology","id":4427741,"avatar_url":"https://avatars.githubusercontent.com/u/4427741?v=3","gravatar_id":"","url":"https://api.github.com/users/Coursemology","html_url":"https://github.com/Coursemology","followers_url":"https://api.github.com/users/Coursemology/followers","following_url":"https://api.github.com/users/Coursemology/following{/other_user}","gists_url":"https://api.github.com/users/Coursemology/gists{/gist_id}","starred_url":"https://api.github.com/users/Coursemology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coursemology/subscriptions","organizations_url":"https://api.github.com/users/Coursemology/orgs","repos_url":"https://api.github.com/users/Coursemology/repos","events_url":"https://api.github.com/users/Coursemology/events{/privacy}","received_events_url":"https://api.github.com/users/Coursemology/received_events","type":"Organization","site_admin":false},"repo":{"id":49556296,"name":"polyglot","full_name":"Coursemology/polyglot","owner":{"login":"Coursemology","id":4427741,"avatar_url":"https://avatars.githubusercontent.com/u/4427741?v=3","gravatar_id":"","url":"https://api.github.com/users/Coursemology","html_url":"https://github.com/Coursemology","followers_url":"https://api.github.com/users/Coursemology/followers","following_url":"https://api.github.com/users/Coursemology/following{/other_user}","gists_url":"https://api.github.com/users/Coursemology/gists{/gist_id}","starred_url":"https://api.github.com/users/Coursemology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coursemology/subscriptions","organizations_url":"https://api.github.com/users/Coursemology/orgs","repos_url":"https://api.github.com/users/Coursemology/repos","events_url":"https://api.github.com/users/Coursemology/events{/privacy}","received_events_url":"https://api.github.com/users/Coursemology/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Coursemology/polyglot","description":"Polyglot support for Coursemology's Programming Questions","fork":false,"url":"https://api.github.com/repos/Coursemology/polyglot","forks_url":"https://api.github.com/repos/Coursemology/polyglot/forks","keys_url":"https://api.github.com/repos/Coursemology/polyglot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Coursemology/polyglot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Coursemology/polyglot/teams","hooks_url":"https://api.github.com/repos/Coursemology/polyglot/hooks","issue_events_url":"https://api.github.com/repos/Coursemology/polyglot/issues/events{/number}","events_url":"https://api.github.com/repos/Coursemology/polyglot/events","assignees_url":"https://api.github.com/repos/Coursemology/polyglot/assignees{/user}","branches_url":"https://api.github.com/repos/Coursemology/polyglot/branches{/branch}","tags_url":"https://api.github.com/repos/Coursemology/polyglot/tags","blobs_url":"https://api.github.com/repos/Coursemology/polyglot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Coursemology/polyglot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Coursemology/polyglot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Coursemology/polyglot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Coursemology/polyglot/statuses/{sha}","languages_url":"https://api.github.com/repos/Coursemology/polyglot/languages","stargazers_url":"https://api.github.com/repos/Coursemology/polyglot/stargazers","contributors_url":"https://api.github.com/repos/Coursemology/polyglot/contributors","subscribers_url":"https://api.github.com/repos/Coursemology/polyglot/subscribers","subscription_url":"https://api.github.com/repos/Coursemology/polyglot/subscription","commits_url":"https://api.github.com/repos/Coursemology/polyglot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Coursemology/polyglot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Coursemology/polyglot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Coursemology/polyglot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Coursemology/polyglot/contents/{+path}","compare_url":"https://api.github.com/repos/Coursemology/polyglot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Coursemology/polyglot/merges","archive_url":"https://api.github.com/repos/Coursemology/polyglot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Coursemology/polyglot/downloads","issues_url":"https://api.github.com/repos/Coursemology/polyglot/issues{/number}","pulls_url":"https://api.github.com/repos/Coursemology/polyglot/pulls{/number}","milestones_url":"https://api.github.com/repos/Coursemology/polyglot/milestones{/number}","notifications_url":"https://api.github.com/repos/Coursemology/polyglot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Coursemology/polyglot/labels{/name}","releases_url":"https://api.github.com/repos/Coursemology/polyglot/releases{/id}","created_at":"2016-01-13T07:07:58Z","updated_at":"2016-01-13T10:47:13Z","pushed_at":"2016-01-16T06:49:49Z","git_url":"git://github.com/Coursemology/polyglot.git","ssh_url":"git@github.com:Coursemology/polyglot.git","clone_url":"https://github.com/Coursemology/polyglot.git","svn_url":"https://github.com/Coursemology/polyglot","homepage":"","size":16,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Coursemology/polyglot/pulls/3"},"html":{"href":"https://github.com/Coursemology/polyglot/pull/3"},"issue":{"href":"https://api.github.com/repos/Coursemology/polyglot/issues/3"},"comments":{"href":"https://api.github.com/repos/Coursemology/polyglot/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Coursemology/polyglot/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Coursemology/polyglot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Coursemology/polyglot/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Coursemology/polyglot/statuses/f912122619032150ec13fae7c684dd76042547ff"}}}}