GitHub PullRequestReviewCommentEvent at 2014-05-05 13:27:44
Repository: ec2-security-czar
Actor: anfleene
Payload: {"comment":{"url":"https://api.github.com/repos/sportngin/ec2-security-czar/pulls/comments/12278244","id":12278244,"diff_hunk":"@@ -5,10 +5,18 @@ module Ec2SecurityCzar\n   class Base\n     attr_accessor :ec2\n \n-    def initialize\n+    def initialize(mfa_token=nil)\n       keys = YAML.load_file('config/aws_keys.yml')\n       AWS.config(access_key_id: keys[:access_key], secret_access_key: keys[:secret_key], region: \"us-east-1\")\n-      @ec2 = AWS.ec2\n+      if keys[:mfa_serial_number]\n+        @ec2 = mfa_auth(keys, mfa_token)\n+      else\n+        @ec2 = AWS.ec2\n+      end\n+    rescue StandardError => e\n+      puts e.class\n+      puts e.message","path":"lib/ec2-security-czar/base.rb","position":16,"original_position":16,"commit_id":"46602c255964bd40ecb557e32687c69ce64a5355","original_commit_id":"46602c255964bd40ecb557e32687c69ce64a5355","user":{"login":"anfleene","id":47750,"avatar_url":"https://avatars.githubusercontent.com/u/47750?","gravatar_id":"c2f4585135c0d731c95797805ff35adf","url":"https://api.github.com/users/anfleene","html_url":"https://github.com/anfleene","followers_url":"https://api.github.com/users/anfleene/followers","following_url":"https://api.github.com/users/anfleene/following{/other_user}","gists_url":"https://api.github.com/users/anfleene/gists{/gist_id}","starred_url":"https://api.github.com/users/anfleene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anfleene/subscriptions","organizations_url":"https://api.github.com/users/anfleene/orgs","repos_url":"https://api.github.com/users/anfleene/repos","events_url":"https://api.github.com/users/anfleene/events{/privacy}","received_events_url":"https://api.github.com/users/anfleene/received_events","type":"User","site_admin":false},"body":"is this error message useful when you don't have mfa configured? Otherwise I'd rather catch it before we even try.","created_at":"2014-05-05T13:27:44Z","updated_at":"2014-05-05T13:27:44Z","html_url":"https://github.com/sportngin/ec2-security-czar/pull/1#discussion_r12278244","pull_request_url":"https://api.github.com/repos/sportngin/ec2-security-czar/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/sportngin/ec2-security-czar/pulls/comments/12278244"},"html":{"href":"https://github.com/sportngin/ec2-security-czar/pull/1#discussion_r12278244"},"pull_request":{"href":"https://api.github.com/repos/sportngin/ec2-security-czar/pulls/1"}}}}