{"action":"created","comment":{"url":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/comments/42625828","id":42625828,"diff_hunk":"@@ -48,7 +48,7 @@ def color(code, &block)\n       %w!debug info warn error fatal unknown!.each do |level|\n         module_eval(<<-EOC, __FILE__, __LINE__ + 1)\n           def #{level}(msg)\n-            super(\"  \" * indent_depth + msg)\n+            super(format(\"%s%s\", \"  \" * indent_depth, msg))","path":"lib/itamae/logger.rb","position":5,"original_position":5,"commit_id":"a320c233094e1ee6c84e74fb257117a6c3879409","original_commit_id":"a320c233094e1ee6c84e74fb257117a6c3879409","user":{"login":"tk-hamaguchi","id":1704960,"avatar_url":"https://avatars.githubusercontent.com/u/1704960?v=3","gravatar_id":"","url":"https://api.github.com/users/tk-hamaguchi","html_url":"https://github.com/tk-hamaguchi","followers_url":"https://api.github.com/users/tk-hamaguchi/followers","following_url":"https://api.github.com/users/tk-hamaguchi/following{/other_user}","gists_url":"https://api.github.com/users/tk-hamaguchi/gists{/gist_id}","starred_url":"https://api.github.com/users/tk-hamaguchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tk-hamaguchi/subscriptions","organizations_url":"https://api.github.com/users/tk-hamaguchi/orgs","repos_url":"https://api.github.com/users/tk-hamaguchi/repos","events_url":"https://api.github.com/users/tk-hamaguchi/events{/privacy}","received_events_url":"https://api.github.com/users/tk-hamaguchi/received_events","type":"User","site_admin":false},"body":"If I keep original code, `itamae docker .... -l debug` is failed.  Because, Docker::Connection#log_request is call logger with Array.\r\n#=> https://github.com/swipely/docker-api/blob/5dee4c3cadce8ff52922515749aa37e742936470/lib/docker/connection.rb#L58\r\n\r\nOr, Isn't there a good method for that?","created_at":"2015-10-21T13:56:15Z","updated_at":"2015-10-21T13:56:15Z","html_url":"https://github.com/itamae-kitchen/itamae/pull/168#discussion_r42625828","pull_request_url":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/168","_links":{"self":{"href":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/comments/42625828"},"html":{"href":"https://github.com/itamae-kitchen/itamae/pull/168#discussion_r42625828"},"pull_request":{"href":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/168"}}},"pull_request":{"url":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/168","id":46707555,"html_url":"https://github.com/itamae-kitchen/itamae/pull/168","diff_url":"https://github.com/itamae-kitchen/itamae/pull/168.diff","patch_url":"https://github.com/itamae-kitchen/itamae/pull/168.patch","issue_url":"https://api.github.com/repos/itamae-kitchen/itamae/issues/168","number":168,"state":"open","locked":false,"title":"Added backend docker configs","user":{"login":"tk-hamaguchi","id":1704960,"avatar_url":"https://avatars.githubusercontent.com/u/1704960?v=3","gravatar_id":"","url":"https://api.github.com/users/tk-hamaguchi","html_url":"https://github.com/tk-hamaguchi","followers_url":"https://api.github.com/users/tk-hamaguchi/followers","following_url":"https://api.github.com/users/tk-hamaguchi/following{/other_user}","gists_url":"https://api.github.com/users/tk-hamaguchi/gists{/gist_id}","starred_url":"https://api.github.com/users/tk-hamaguchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tk-hamaguchi/subscriptions","organizations_url":"https://api.github.com/users/tk-hamaguchi/orgs","repos_url":"https://api.github.com/users/tk-hamaguchi/repos","events_url":"https://api.github.com/users/tk-hamaguchi/events{/privacy}","received_events_url":"https://api.github.com/users/tk-hamaguchi/received_events","type":"User","site_admin":false},"body":"* Added tty: true to execute commands with docker.\r\n* Modified log format with docker results.\r\n\r\n```\r\nrequire 'docker'\r\nrequire 'itamae'\r\n\r\n@backend = Itamae::Backend.create(:docker, image: 'centos:7')\r\n# => TypeError: no implicit conversion of Array into String\r\n# Because Docker.logger.debug call with Array in  Docker::Connection#log_request.\r\n# And set Itamae.logger to ::Docker.logger at Itamae::Backend::Docker#create_specinfra_backend.\r\n\r\n@backend.run_command('yum install -y sudo')\r\n@backend.run_command('sudo -H -u root -- /bin/sh -c cd /tmp/ && ls -l')\r\n# => sudo: sorry, you must have a tty to run sudo\r\n# Because Specinfra::Backend::Docker#run_command was not call with { tty: true}.\r\n```","created_at":"2015-10-03T15:39:45Z","updated_at":"2015-10-21T13:56:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9999557ec24cf580f4eda7b099e02e41457452a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/168/commits","review_comments_url":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/168/comments","review_comment_url":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/comments{/number}","comments_url":"https://api.github.com/repos/itamae-kitchen/itamae/issues/168/comments","statuses_url":"https://api.github.com/repos/itamae-kitchen/itamae/statuses/a320c233094e1ee6c84e74fb257117a6c3879409","head":{"label":"tk-hamaguchi:add_backend_docker_configs","ref":"add_backend_docker_configs","sha":"a320c233094e1ee6c84e74fb257117a6c3879409","user":{"login":"tk-hamaguchi","id":1704960,"avatar_url":"https://avatars.githubusercontent.com/u/1704960?v=3","gravatar_id":"","url":"https://api.github.com/users/tk-hamaguchi","html_url":"https://github.com/tk-hamaguchi","followers_url":"https://api.github.com/users/tk-hamaguchi/followers","following_url":"https://api.github.com/users/tk-hamaguchi/following{/other_user}","gists_url":"https://api.github.com/users/tk-hamaguchi/gists{/gist_id}","starred_url":"https://api.github.com/users/tk-hamaguchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tk-hamaguchi/subscriptions","organizations_url":"https://api.github.com/users/tk-hamaguchi/orgs","repos_url":"https://api.github.com/users/tk-hamaguchi/repos","events_url":"https://api.github.com/users/tk-hamaguchi/events{/privacy}","received_events_url":"https://api.github.com/users/tk-hamaguchi/received_events","type":"User","site_admin":false},"repo":{"id":43590243,"name":"itamae","full_name":"tk-hamaguchi/itamae","owner":{"login":"tk-hamaguchi","id":1704960,"avatar_url":"https://avatars.githubusercontent.com/u/1704960?v=3","gravatar_id":"","url":"https://api.github.com/users/tk-hamaguchi","html_url":"https://github.com/tk-hamaguchi","followers_url":"https://api.github.com/users/tk-hamaguchi/followers","following_url":"https://api.github.com/users/tk-hamaguchi/following{/other_user}","gists_url":"https://api.github.com/users/tk-hamaguchi/gists{/gist_id}","starred_url":"https://api.github.com/users/tk-hamaguchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tk-hamaguchi/subscriptions","organizations_url":"https://api.github.com/users/tk-hamaguchi/orgs","repos_url":"https://api.github.com/users/tk-hamaguchi/repos","events_url":"https://api.github.com/users/tk-hamaguchi/events{/privacy}","received_events_url":"https://api.github.com/users/tk-hamaguchi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tk-hamaguchi/itamae","description":"Configuration management tool inspired by Chef, but simpler and lightweight. Formerly known as Lightchef.","fork":true,"url":"https://api.github.com/repos/tk-hamaguchi/itamae","forks_url":"https://api.github.com/repos/tk-hamaguchi/itamae/forks","keys_url":"https://api.github.com/repos/tk-hamaguchi/itamae/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tk-hamaguchi/itamae/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tk-hamaguchi/itamae/teams","hooks_url":"https://api.github.com/repos/tk-hamaguchi/itamae/hooks","issue_events_url":"https://api.github.com/repos/tk-hamaguchi/itamae/issues/events{/number}","events_url":"https://api.github.com/repos/tk-hamaguchi/itamae/events","assignees_url":"https://api.github.com/repos/tk-hamaguchi/itamae/assignees{/user}","branches_url":"https://api.github.com/repos/tk-hamaguchi/itamae/branches{/branch}","tags_url":"https://api.github.com/repos/tk-hamaguchi/itamae/tags","blobs_url":"https://api.github.com/repos/tk-hamaguchi/itamae/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tk-hamaguchi/itamae/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tk-hamaguchi/itamae/git/refs{/sha}","trees_url":"https://api.github.com/repos/tk-hamaguchi/itamae/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tk-hamaguchi/itamae/statuses/{sha}","languages_url":"https://api.github.com/repos/tk-hamaguchi/itamae/languages","stargazers_url":"https://api.github.com/repos/tk-hamaguchi/itamae/stargazers","contributors_url":"https://api.github.com/repos/tk-hamaguchi/itamae/contributors","subscribers_url":"https://api.github.com/repos/tk-hamaguchi/itamae/subscribers","subscription_url":"https://api.github.com/repos/tk-hamaguchi/itamae/subscription","commits_url":"https://api.github.com/repos/tk-hamaguchi/itamae/commits{/sha}","git_commits_url":"https://api.github.com/repos/tk-hamaguchi/itamae/git/commits{/sha}","comments_url":"https://api.github.com/repos/tk-hamaguchi/itamae/comments{/number}","issue_comment_url":"https://api.github.com/repos/tk-hamaguchi/itamae/issues/comments{/number}","contents_url":"https://api.github.com/repos/tk-hamaguchi/itamae/contents/{+path}","compare_url":"https://api.github.com/repos/tk-hamaguchi/itamae/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tk-hamaguchi/itamae/merges","archive_url":"https://api.github.com/repos/tk-hamaguchi/itamae/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tk-hamaguchi/itamae/downloads","issues_url":"https://api.github.com/repos/tk-hamaguchi/itamae/issues{/number}","pulls_url":"https://api.github.com/repos/tk-hamaguchi/itamae/pulls{/number}","milestones_url":"https://api.github.com/repos/tk-hamaguchi/itamae/milestones{/number}","notifications_url":"https://api.github.com/repos/tk-hamaguchi/itamae/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tk-hamaguchi/itamae/labels{/name}","releases_url":"https://api.github.com/repos/tk-hamaguchi/itamae/releases{/id}","created_at":"2015-10-03T06:32:51Z","updated_at":"2015-10-03T06:32:51Z","pushed_at":"2015-10-03T15:36:52Z","git_url":"git://github.com/tk-hamaguchi/itamae.git","ssh_url":"git@github.com:tk-hamaguchi/itamae.git","clone_url":"https://github.com/tk-hamaguchi/itamae.git","svn_url":"https://github.com/tk-hamaguchi/itamae","homepage":"http://itamae.kitchen/","size":628,"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":"itamae-kitchen:master","ref":"master","sha":"5ce8c19c8358211fbceacba10659bd657bc775b7","user":{"login":"itamae-kitchen","id":10345441,"avatar_url":"https://avatars.githubusercontent.com/u/10345441?v=3","gravatar_id":"","url":"https://api.github.com/users/itamae-kitchen","html_url":"https://github.com/itamae-kitchen","followers_url":"https://api.github.com/users/itamae-kitchen/followers","following_url":"https://api.github.com/users/itamae-kitchen/following{/other_user}","gists_url":"https://api.github.com/users/itamae-kitchen/gists{/gist_id}","starred_url":"https://api.github.com/users/itamae-kitchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itamae-kitchen/subscriptions","organizations_url":"https://api.github.com/users/itamae-kitchen/orgs","repos_url":"https://api.github.com/users/itamae-kitchen/repos","events_url":"https://api.github.com/users/itamae-kitchen/events{/privacy}","received_events_url":"https://api.github.com/users/itamae-kitchen/received_events","type":"Organization","site_admin":false},"repo":{"id":15393024,"name":"itamae","full_name":"itamae-kitchen/itamae","owner":{"login":"itamae-kitchen","id":10345441,"avatar_url":"https://avatars.githubusercontent.com/u/10345441?v=3","gravatar_id":"","url":"https://api.github.com/users/itamae-kitchen","html_url":"https://github.com/itamae-kitchen","followers_url":"https://api.github.com/users/itamae-kitchen/followers","following_url":"https://api.github.com/users/itamae-kitchen/following{/other_user}","gists_url":"https://api.github.com/users/itamae-kitchen/gists{/gist_id}","starred_url":"https://api.github.com/users/itamae-kitchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itamae-kitchen/subscriptions","organizations_url":"https://api.github.com/users/itamae-kitchen/orgs","repos_url":"https://api.github.com/users/itamae-kitchen/repos","events_url":"https://api.github.com/users/itamae-kitchen/events{/privacy}","received_events_url":"https://api.github.com/users/itamae-kitchen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/itamae-kitchen/itamae","description":"Configuration management tool inspired by Chef, but simpler and lightweight. Formerly known as Lightchef.","fork":false,"url":"https://api.github.com/repos/itamae-kitchen/itamae","forks_url":"https://api.github.com/repos/itamae-kitchen/itamae/forks","keys_url":"https://api.github.com/repos/itamae-kitchen/itamae/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itamae-kitchen/itamae/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itamae-kitchen/itamae/teams","hooks_url":"https://api.github.com/repos/itamae-kitchen/itamae/hooks","issue_events_url":"https://api.github.com/repos/itamae-kitchen/itamae/issues/events{/number}","events_url":"https://api.github.com/repos/itamae-kitchen/itamae/events","assignees_url":"https://api.github.com/repos/itamae-kitchen/itamae/assignees{/user}","branches_url":"https://api.github.com/repos/itamae-kitchen/itamae/branches{/branch}","tags_url":"https://api.github.com/repos/itamae-kitchen/itamae/tags","blobs_url":"https://api.github.com/repos/itamae-kitchen/itamae/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itamae-kitchen/itamae/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itamae-kitchen/itamae/git/refs{/sha}","trees_url":"https://api.github.com/repos/itamae-kitchen/itamae/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itamae-kitchen/itamae/statuses/{sha}","languages_url":"https://api.github.com/repos/itamae-kitchen/itamae/languages","stargazers_url":"https://api.github.com/repos/itamae-kitchen/itamae/stargazers","contributors_url":"https://api.github.com/repos/itamae-kitchen/itamae/contributors","subscribers_url":"https://api.github.com/repos/itamae-kitchen/itamae/subscribers","subscription_url":"https://api.github.com/repos/itamae-kitchen/itamae/subscription","commits_url":"https://api.github.com/repos/itamae-kitchen/itamae/commits{/sha}","git_commits_url":"https://api.github.com/repos/itamae-kitchen/itamae/git/commits{/sha}","comments_url":"https://api.github.com/repos/itamae-kitchen/itamae/comments{/number}","issue_comment_url":"https://api.github.com/repos/itamae-kitchen/itamae/issues/comments{/number}","contents_url":"https://api.github.com/repos/itamae-kitchen/itamae/contents/{+path}","compare_url":"https://api.github.com/repos/itamae-kitchen/itamae/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itamae-kitchen/itamae/merges","archive_url":"https://api.github.com/repos/itamae-kitchen/itamae/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itamae-kitchen/itamae/downloads","issues_url":"https://api.github.com/repos/itamae-kitchen/itamae/issues{/number}","pulls_url":"https://api.github.com/repos/itamae-kitchen/itamae/pulls{/number}","milestones_url":"https://api.github.com/repos/itamae-kitchen/itamae/milestones{/number}","notifications_url":"https://api.github.com/repos/itamae-kitchen/itamae/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itamae-kitchen/itamae/labels{/name}","releases_url":"https://api.github.com/repos/itamae-kitchen/itamae/releases{/id}","created_at":"2013-12-23T10:30:26Z","updated_at":"2015-10-20T14:33:14Z","pushed_at":"2015-10-21T00:52:38Z","git_url":"git://github.com/itamae-kitchen/itamae.git","ssh_url":"git@github.com:itamae-kitchen/itamae.git","clone_url":"https://github.com/itamae-kitchen/itamae.git","svn_url":"https://github.com/itamae-kitchen/itamae","homepage":"http://itamae.kitchen/","size":2767,"stargazers_count":474,"watchers_count":474,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":23,"forks":54,"open_issues":23,"watchers":474,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/168"},"html":{"href":"https://github.com/itamae-kitchen/itamae/pull/168"},"issue":{"href":"https://api.github.com/repos/itamae-kitchen/itamae/issues/168"},"comments":{"href":"https://api.github.com/repos/itamae-kitchen/itamae/issues/168/comments"},"review_comments":{"href":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/168/comments"},"review_comment":{"href":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/itamae-kitchen/itamae/pulls/168/commits"},"statuses":{"href":"https://api.github.com/repos/itamae-kitchen/itamae/statuses/a320c233094e1ee6c84e74fb257117a6c3879409"}}}}