{"action":"created","comment":{"url":"https://api.github.com/repos/kumocast/kumocast_cli/pulls/comments/39637801","id":39637801,"diff_hunk":"@@ -0,0 +1,49 @@\n+module KumocastCli\n+  class Post\n+    attr_accessor :file_name, :number, :title, :guests, :topics\n+\n+    DIR_PATH = File.expand_path('./_posts')\n+    TEMPLATE_PATH = File.expand_path('../templates/post.md.erb', __FILE__)\n+\n+    def initialize\n+      yield self if block_given?\n+    end\n+\n+    def save\n+      f = open(file_path, \"w\")\n+\n+      f.puts content\n+      f.close\n+    end\n+\n+    def content\n+      erbf = ERB.new(File.read(TEMPLATE_PATH))\n+      erbf.result(binding)\n+    end","path":"lib/kumocast_cli/post.rb","position":22,"original_position":22,"commit_id":"7b5e65d741d427ddb75595dc8a2f62c5b7d82300","original_commit_id":"7b5e65d741d427ddb75595dc8a2f62c5b7d82300","user":{"login":"karur4n","id":6816398,"avatar_url":"https://avatars.githubusercontent.com/u/6816398?v=3","gravatar_id":"","url":"https://api.github.com/users/karur4n","html_url":"https://github.com/karur4n","followers_url":"https://api.github.com/users/karur4n/followers","following_url":"https://api.github.com/users/karur4n/following{/other_user}","gists_url":"https://api.github.com/users/karur4n/gists{/gist_id}","starred_url":"https://api.github.com/users/karur4n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karur4n/subscriptions","organizations_url":"https://api.github.com/users/karur4n/orgs","repos_url":"https://api.github.com/users/karur4n/repos","events_url":"https://api.github.com/users/karur4n/events{/privacy}","received_events_url":"https://api.github.com/users/karur4n/received_events","type":"User","site_admin":false},"body":"変数名が適当に erb の file だから ``erbf`` でいいや、って決めたままになってる","created_at":"2015-09-16T14:40:41Z","updated_at":"2015-09-16T14:40:41Z","html_url":"https://github.com/kumocast/kumocast_cli/pull/1#discussion_r39637801","pull_request_url":"https://api.github.com/repos/kumocast/kumocast_cli/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/kumocast/kumocast_cli/pulls/comments/39637801"},"html":{"href":"https://github.com/kumocast/kumocast_cli/pull/1#discussion_r39637801"},"pull_request":{"href":"https://api.github.com/repos/kumocast/kumocast_cli/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/kumocast/kumocast_cli/pulls/1","id":45178186,"html_url":"https://github.com/kumocast/kumocast_cli/pull/1","diff_url":"https://github.com/kumocast/kumocast_cli/pull/1.diff","patch_url":"https://github.com/kumocast/kumocast_cli/pull/1.patch","issue_url":"https://api.github.com/repos/kumocast/kumocast_cli/issues/1","number":1,"state":"open","locked":false,"title":"v 0.0.1","user":{"login":"karur4n","id":6816398,"avatar_url":"https://avatars.githubusercontent.com/u/6816398?v=3","gravatar_id":"","url":"https://api.github.com/users/karur4n","html_url":"https://github.com/karur4n","followers_url":"https://api.github.com/users/karur4n/followers","following_url":"https://api.github.com/users/karur4n/following{/other_user}","gists_url":"https://api.github.com/users/karur4n/gists{/gist_id}","starred_url":"https://api.github.com/users/karur4n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karur4n/subscriptions","organizations_url":"https://api.github.com/users/karur4n/orgs","repos_url":"https://api.github.com/users/karur4n/repos","events_url":"https://api.github.com/users/karur4n/events{/privacy}","received_events_url":"https://api.github.com/users/karur4n/received_events","type":"User","site_admin":false},"body":"```\r\n$ kumocast add post\r\n```\r\n\r\nのみできます","created_at":"2015-09-16T14:27:42Z","updated_at":"2015-09-16T14:40:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36a06a39f3ec7c225c6b7f87889d8b5d0c9aefa8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kumocast/kumocast_cli/pulls/1/commits","review_comments_url":"https://api.github.com/repos/kumocast/kumocast_cli/pulls/1/comments","review_comment_url":"https://api.github.com/repos/kumocast/kumocast_cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kumocast/kumocast_cli/issues/1/comments","statuses_url":"https://api.github.com/repos/kumocast/kumocast_cli/statuses/7b5e65d741d427ddb75595dc8a2f62c5b7d82300","head":{"label":"kumocast:develop","ref":"develop","sha":"7b5e65d741d427ddb75595dc8a2f62c5b7d82300","user":{"login":"kumocast","id":11924318,"avatar_url":"https://avatars.githubusercontent.com/u/11924318?v=3","gravatar_id":"","url":"https://api.github.com/users/kumocast","html_url":"https://github.com/kumocast","followers_url":"https://api.github.com/users/kumocast/followers","following_url":"https://api.github.com/users/kumocast/following{/other_user}","gists_url":"https://api.github.com/users/kumocast/gists{/gist_id}","starred_url":"https://api.github.com/users/kumocast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumocast/subscriptions","organizations_url":"https://api.github.com/users/kumocast/orgs","repos_url":"https://api.github.com/users/kumocast/repos","events_url":"https://api.github.com/users/kumocast/events{/privacy}","received_events_url":"https://api.github.com/users/kumocast/received_events","type":"Organization","site_admin":false},"repo":{"id":42358546,"name":"kumocast_cli","full_name":"kumocast/kumocast_cli","owner":{"login":"kumocast","id":11924318,"avatar_url":"https://avatars.githubusercontent.com/u/11924318?v=3","gravatar_id":"","url":"https://api.github.com/users/kumocast","html_url":"https://github.com/kumocast","followers_url":"https://api.github.com/users/kumocast/followers","following_url":"https://api.github.com/users/kumocast/following{/other_user}","gists_url":"https://api.github.com/users/kumocast/gists{/gist_id}","starred_url":"https://api.github.com/users/kumocast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumocast/subscriptions","organizations_url":"https://api.github.com/users/kumocast/orgs","repos_url":"https://api.github.com/users/kumocast/repos","events_url":"https://api.github.com/users/kumocast/events{/privacy}","received_events_url":"https://api.github.com/users/kumocast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kumocast/kumocast_cli","description":"cli for kumocast","fork":false,"url":"https://api.github.com/repos/kumocast/kumocast_cli","forks_url":"https://api.github.com/repos/kumocast/kumocast_cli/forks","keys_url":"https://api.github.com/repos/kumocast/kumocast_cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kumocast/kumocast_cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kumocast/kumocast_cli/teams","hooks_url":"https://api.github.com/repos/kumocast/kumocast_cli/hooks","issue_events_url":"https://api.github.com/repos/kumocast/kumocast_cli/issues/events{/number}","events_url":"https://api.github.com/repos/kumocast/kumocast_cli/events","assignees_url":"https://api.github.com/repos/kumocast/kumocast_cli/assignees{/user}","branches_url":"https://api.github.com/repos/kumocast/kumocast_cli/branches{/branch}","tags_url":"https://api.github.com/repos/kumocast/kumocast_cli/tags","blobs_url":"https://api.github.com/repos/kumocast/kumocast_cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kumocast/kumocast_cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kumocast/kumocast_cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/kumocast/kumocast_cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kumocast/kumocast_cli/statuses/{sha}","languages_url":"https://api.github.com/repos/kumocast/kumocast_cli/languages","stargazers_url":"https://api.github.com/repos/kumocast/kumocast_cli/stargazers","contributors_url":"https://api.github.com/repos/kumocast/kumocast_cli/contributors","subscribers_url":"https://api.github.com/repos/kumocast/kumocast_cli/subscribers","subscription_url":"https://api.github.com/repos/kumocast/kumocast_cli/subscription","commits_url":"https://api.github.com/repos/kumocast/kumocast_cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/kumocast/kumocast_cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/kumocast/kumocast_cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/kumocast/kumocast_cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/kumocast/kumocast_cli/contents/{+path}","compare_url":"https://api.github.com/repos/kumocast/kumocast_cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kumocast/kumocast_cli/merges","archive_url":"https://api.github.com/repos/kumocast/kumocast_cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kumocast/kumocast_cli/downloads","issues_url":"https://api.github.com/repos/kumocast/kumocast_cli/issues{/number}","pulls_url":"https://api.github.com/repos/kumocast/kumocast_cli/pulls{/number}","milestones_url":"https://api.github.com/repos/kumocast/kumocast_cli/milestones{/number}","notifications_url":"https://api.github.com/repos/kumocast/kumocast_cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kumocast/kumocast_cli/labels{/name}","releases_url":"https://api.github.com/repos/kumocast/kumocast_cli/releases{/id}","created_at":"2015-09-12T13:48:43Z","updated_at":"2015-09-12T15:24:47Z","pushed_at":"2015-09-16T14:27:42Z","git_url":"git://github.com/kumocast/kumocast_cli.git","ssh_url":"git@github.com:kumocast/kumocast_cli.git","clone_url":"https://github.com/kumocast/kumocast_cli.git","svn_url":"https://github.com/kumocast/kumocast_cli","homepage":null,"size":0,"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"}},"base":{"label":"kumocast:master","ref":"master","sha":"637f4d445cd5862fc3a43edf8ba8f780b0fe0c64","user":{"login":"kumocast","id":11924318,"avatar_url":"https://avatars.githubusercontent.com/u/11924318?v=3","gravatar_id":"","url":"https://api.github.com/users/kumocast","html_url":"https://github.com/kumocast","followers_url":"https://api.github.com/users/kumocast/followers","following_url":"https://api.github.com/users/kumocast/following{/other_user}","gists_url":"https://api.github.com/users/kumocast/gists{/gist_id}","starred_url":"https://api.github.com/users/kumocast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumocast/subscriptions","organizations_url":"https://api.github.com/users/kumocast/orgs","repos_url":"https://api.github.com/users/kumocast/repos","events_url":"https://api.github.com/users/kumocast/events{/privacy}","received_events_url":"https://api.github.com/users/kumocast/received_events","type":"Organization","site_admin":false},"repo":{"id":42358546,"name":"kumocast_cli","full_name":"kumocast/kumocast_cli","owner":{"login":"kumocast","id":11924318,"avatar_url":"https://avatars.githubusercontent.com/u/11924318?v=3","gravatar_id":"","url":"https://api.github.com/users/kumocast","html_url":"https://github.com/kumocast","followers_url":"https://api.github.com/users/kumocast/followers","following_url":"https://api.github.com/users/kumocast/following{/other_user}","gists_url":"https://api.github.com/users/kumocast/gists{/gist_id}","starred_url":"https://api.github.com/users/kumocast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumocast/subscriptions","organizations_url":"https://api.github.com/users/kumocast/orgs","repos_url":"https://api.github.com/users/kumocast/repos","events_url":"https://api.github.com/users/kumocast/events{/privacy}","received_events_url":"https://api.github.com/users/kumocast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kumocast/kumocast_cli","description":"cli for kumocast","fork":false,"url":"https://api.github.com/repos/kumocast/kumocast_cli","forks_url":"https://api.github.com/repos/kumocast/kumocast_cli/forks","keys_url":"https://api.github.com/repos/kumocast/kumocast_cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kumocast/kumocast_cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kumocast/kumocast_cli/teams","hooks_url":"https://api.github.com/repos/kumocast/kumocast_cli/hooks","issue_events_url":"https://api.github.com/repos/kumocast/kumocast_cli/issues/events{/number}","events_url":"https://api.github.com/repos/kumocast/kumocast_cli/events","assignees_url":"https://api.github.com/repos/kumocast/kumocast_cli/assignees{/user}","branches_url":"https://api.github.com/repos/kumocast/kumocast_cli/branches{/branch}","tags_url":"https://api.github.com/repos/kumocast/kumocast_cli/tags","blobs_url":"https://api.github.com/repos/kumocast/kumocast_cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kumocast/kumocast_cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kumocast/kumocast_cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/kumocast/kumocast_cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kumocast/kumocast_cli/statuses/{sha}","languages_url":"https://api.github.com/repos/kumocast/kumocast_cli/languages","stargazers_url":"https://api.github.com/repos/kumocast/kumocast_cli/stargazers","contributors_url":"https://api.github.com/repos/kumocast/kumocast_cli/contributors","subscribers_url":"https://api.github.com/repos/kumocast/kumocast_cli/subscribers","subscription_url":"https://api.github.com/repos/kumocast/kumocast_cli/subscription","commits_url":"https://api.github.com/repos/kumocast/kumocast_cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/kumocast/kumocast_cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/kumocast/kumocast_cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/kumocast/kumocast_cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/kumocast/kumocast_cli/contents/{+path}","compare_url":"https://api.github.com/repos/kumocast/kumocast_cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kumocast/kumocast_cli/merges","archive_url":"https://api.github.com/repos/kumocast/kumocast_cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kumocast/kumocast_cli/downloads","issues_url":"https://api.github.com/repos/kumocast/kumocast_cli/issues{/number}","pulls_url":"https://api.github.com/repos/kumocast/kumocast_cli/pulls{/number}","milestones_url":"https://api.github.com/repos/kumocast/kumocast_cli/milestones{/number}","notifications_url":"https://api.github.com/repos/kumocast/kumocast_cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kumocast/kumocast_cli/labels{/name}","releases_url":"https://api.github.com/repos/kumocast/kumocast_cli/releases{/id}","created_at":"2015-09-12T13:48:43Z","updated_at":"2015-09-12T15:24:47Z","pushed_at":"2015-09-16T14:27:42Z","git_url":"git://github.com/kumocast/kumocast_cli.git","ssh_url":"git@github.com:kumocast/kumocast_cli.git","clone_url":"https://github.com/kumocast/kumocast_cli.git","svn_url":"https://github.com/kumocast/kumocast_cli","homepage":null,"size":0,"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/kumocast/kumocast_cli/pulls/1"},"html":{"href":"https://github.com/kumocast/kumocast_cli/pull/1"},"issue":{"href":"https://api.github.com/repos/kumocast/kumocast_cli/issues/1"},"comments":{"href":"https://api.github.com/repos/kumocast/kumocast_cli/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/kumocast/kumocast_cli/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/kumocast/kumocast_cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kumocast/kumocast_cli/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/kumocast/kumocast_cli/statuses/7b5e65d741d427ddb75595dc8a2f62c5b7d82300"}}}}