{"action":"created","comment":{"url":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/comments/187806294","pull_request_review_id":119659703,"id":187806294,"diff_hunk":"@@ -1,59 +1,77 @@\n require 'pry'\n gem 'minitest', '~> 5.2'\n-require 'minitest/autorun'\n-require 'minitest/pride'\n+require_relative 'test_helper'\n require './lib/enigma.rb'\n \n class EnigmaTest < Minitest::Test\n-\n   def test_it_exists\n-    e = Enigma.new\n+    e = Enigma.new(\"hello\", \"12345\", Date.new(2018, 5, 12))\n     assert_instance_of(Enigma, e)\n   end\n \n-  def test_generates_key\n-    e = Enigma.new\n-    assert_equal 5, e.generate_key.length\n-    assert_equal String, e.generate_key.class\n-  end\n-\n   def test_enigma_accepts_input_key\n-    e = Enigma.new(\"12345\")\n-    assert_equal 5, e.generate_key.length\n-    assert_equal String, e.generate_key.class\n+    e = Enigma.new(\"hello\", \"12345\", Date.new(2018, 5, 12))\n+    assert_equal 5, e.key.length\n+    assert_equal String, e.key.class\n+    assert_equal \"12345\", e.key\n   end\n \n-  def test_rotate_works_on_a_key\n-    e = Enigma.new\n-    assert_equal [[1,2],[2,3],[3, 4], [4, 5]], e.rotater(\"12345\")\n+  def test_char_map\n+    e = Enigma.new(\"theend\", \"12345\", Date.new(2018, 5, 12))\n+    assert_equal false, e.char_map.include?('!')\n+    assert_equal true, e.char_map.include?('8')\n+    assert_equal false, e.char_map.include?('arp')\n+    assert_equal 39, e.char_map.length\n   end\n \n-  def test_generate_offset\n-    e = Enigma.new\n-    assert_equal 4, e.time_used_for_offset.length\n-    assert_equal Array, e.time_used_for_offset.class\n+  def test_enigma_generates_key_if_no_user_input\n+    e = Enigma.new(\"theend\", \"12345\", Date.new(2018, 5, 12))\n+    assert_equal 5, e.key.length\n+    assert_equal String, e.key.class\n   end\n \n-  def test_generate_shift_array\n-    e = Enigma.new(\"12345\")\n-    e.rotater(\"12345\")\n-    assert_equal [15, 28, 36, 49], e.generate_shift_array\n+  def test_find_message_in_char_map\n+    e = Enigma.new(\"abcdef\")","path":"test/enigma_test.rb","position":58,"original_position":58,"commit_id":"3d448813201c5b27e39cdb86a2a1f5859d45336f","original_commit_id":"3d448813201c5b27e39cdb86a2a1f5859d45336f","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.","created_at":"2018-05-13T16:25:27Z","updated_at":"2018-05-13T16:25:28Z","html_url":"https://github.com/KeeganCorrigan/enigma/pull/2#discussion_r187806294","pull_request_url":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/comments/187806294"},"html":{"href":"https://github.com/KeeganCorrigan/enigma/pull/2#discussion_r187806294"},"pull_request":{"href":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/2","id":187678462,"html_url":"https://github.com/KeeganCorrigan/enigma/pull/2","diff_url":"https://github.com/KeeganCorrigan/enigma/pull/2.diff","patch_url":"https://github.com/KeeganCorrigan/enigma/pull/2.patch","issue_url":"https://api.github.com/repos/KeeganCorrigan/enigma/issues/2","number":2,"state":"open","locked":false,"title":"Refactor encryption","user":{"login":"KeeganCorrigan","id":8312280,"avatar_url":"https://avatars3.githubusercontent.com/u/8312280?v=4","gravatar_id":"","url":"https://api.github.com/users/KeeganCorrigan","html_url":"https://github.com/KeeganCorrigan","followers_url":"https://api.github.com/users/KeeganCorrigan/followers","following_url":"https://api.github.com/users/KeeganCorrigan/following{/other_user}","gists_url":"https://api.github.com/users/KeeganCorrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/KeeganCorrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeeganCorrigan/subscriptions","organizations_url":"https://api.github.com/users/KeeganCorrigan/orgs","repos_url":"https://api.github.com/users/KeeganCorrigan/repos","events_url":"https://api.github.com/users/KeeganCorrigan/events{/privacy}","received_events_url":"https://api.github.com/users/KeeganCorrigan/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-13T16:25:15Z","updated_at":"2018-05-13T16:25:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"222ec1a7b3a64eb9f545606c031a814eb270bb16","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/2/commits","review_comments_url":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/2/comments","review_comment_url":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KeeganCorrigan/enigma/issues/2/comments","statuses_url":"https://api.github.com/repos/KeeganCorrigan/enigma/statuses/3d448813201c5b27e39cdb86a2a1f5859d45336f","head":{"label":"KeeganCorrigan:refactor_encryption","ref":"refactor_encryption","sha":"3d448813201c5b27e39cdb86a2a1f5859d45336f","user":{"login":"KeeganCorrigan","id":8312280,"avatar_url":"https://avatars3.githubusercontent.com/u/8312280?v=4","gravatar_id":"","url":"https://api.github.com/users/KeeganCorrigan","html_url":"https://github.com/KeeganCorrigan","followers_url":"https://api.github.com/users/KeeganCorrigan/followers","following_url":"https://api.github.com/users/KeeganCorrigan/following{/other_user}","gists_url":"https://api.github.com/users/KeeganCorrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/KeeganCorrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeeganCorrigan/subscriptions","organizations_url":"https://api.github.com/users/KeeganCorrigan/orgs","repos_url":"https://api.github.com/users/KeeganCorrigan/repos","events_url":"https://api.github.com/users/KeeganCorrigan/events{/privacy}","received_events_url":"https://api.github.com/users/KeeganCorrigan/received_events","type":"User","site_admin":false},"repo":{"id":133070965,"name":"enigma","full_name":"KeeganCorrigan/enigma","owner":{"login":"KeeganCorrigan","id":8312280,"avatar_url":"https://avatars3.githubusercontent.com/u/8312280?v=4","gravatar_id":"","url":"https://api.github.com/users/KeeganCorrigan","html_url":"https://github.com/KeeganCorrigan","followers_url":"https://api.github.com/users/KeeganCorrigan/followers","following_url":"https://api.github.com/users/KeeganCorrigan/following{/other_user}","gists_url":"https://api.github.com/users/KeeganCorrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/KeeganCorrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeeganCorrigan/subscriptions","organizations_url":"https://api.github.com/users/KeeganCorrigan/orgs","repos_url":"https://api.github.com/users/KeeganCorrigan/repos","events_url":"https://api.github.com/users/KeeganCorrigan/events{/privacy}","received_events_url":"https://api.github.com/users/KeeganCorrigan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KeeganCorrigan/enigma","description":null,"fork":false,"url":"https://api.github.com/repos/KeeganCorrigan/enigma","forks_url":"https://api.github.com/repos/KeeganCorrigan/enigma/forks","keys_url":"https://api.github.com/repos/KeeganCorrigan/enigma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KeeganCorrigan/enigma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KeeganCorrigan/enigma/teams","hooks_url":"https://api.github.com/repos/KeeganCorrigan/enigma/hooks","issue_events_url":"https://api.github.com/repos/KeeganCorrigan/enigma/issues/events{/number}","events_url":"https://api.github.com/repos/KeeganCorrigan/enigma/events","assignees_url":"https://api.github.com/repos/KeeganCorrigan/enigma/assignees{/user}","branches_url":"https://api.github.com/repos/KeeganCorrigan/enigma/branches{/branch}","tags_url":"https://api.github.com/repos/KeeganCorrigan/enigma/tags","blobs_url":"https://api.github.com/repos/KeeganCorrigan/enigma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KeeganCorrigan/enigma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KeeganCorrigan/enigma/git/refs{/sha}","trees_url":"https://api.github.com/repos/KeeganCorrigan/enigma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KeeganCorrigan/enigma/statuses/{sha}","languages_url":"https://api.github.com/repos/KeeganCorrigan/enigma/languages","stargazers_url":"https://api.github.com/repos/KeeganCorrigan/enigma/stargazers","contributors_url":"https://api.github.com/repos/KeeganCorrigan/enigma/contributors","subscribers_url":"https://api.github.com/repos/KeeganCorrigan/enigma/subscribers","subscription_url":"https://api.github.com/repos/KeeganCorrigan/enigma/subscription","commits_url":"https://api.github.com/repos/KeeganCorrigan/enigma/commits{/sha}","git_commits_url":"https://api.github.com/repos/KeeganCorrigan/enigma/git/commits{/sha}","comments_url":"https://api.github.com/repos/KeeganCorrigan/enigma/comments{/number}","issue_comment_url":"https://api.github.com/repos/KeeganCorrigan/enigma/issues/comments{/number}","contents_url":"https://api.github.com/repos/KeeganCorrigan/enigma/contents/{+path}","compare_url":"https://api.github.com/repos/KeeganCorrigan/enigma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KeeganCorrigan/enigma/merges","archive_url":"https://api.github.com/repos/KeeganCorrigan/enigma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KeeganCorrigan/enigma/downloads","issues_url":"https://api.github.com/repos/KeeganCorrigan/enigma/issues{/number}","pulls_url":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls{/number}","milestones_url":"https://api.github.com/repos/KeeganCorrigan/enigma/milestones{/number}","notifications_url":"https://api.github.com/repos/KeeganCorrigan/enigma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KeeganCorrigan/enigma/labels{/name}","releases_url":"https://api.github.com/repos/KeeganCorrigan/enigma/releases{/id}","deployments_url":"https://api.github.com/repos/KeeganCorrigan/enigma/deployments","created_at":"2018-05-11T17:47:01Z","updated_at":"2018-05-12T18:22:43Z","pushed_at":"2018-05-13T16:25:16Z","git_url":"git://github.com/KeeganCorrigan/enigma.git","ssh_url":"git@github.com:KeeganCorrigan/enigma.git","clone_url":"https://github.com/KeeganCorrigan/enigma.git","svn_url":"https://github.com/KeeganCorrigan/enigma","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"keegan_work_branch"}},"base":{"label":"KeeganCorrigan:keegan_work_branch","ref":"keegan_work_branch","sha":"3ea5f45e961af764cfcebbd629bc1f6801dc6b16","user":{"login":"KeeganCorrigan","id":8312280,"avatar_url":"https://avatars3.githubusercontent.com/u/8312280?v=4","gravatar_id":"","url":"https://api.github.com/users/KeeganCorrigan","html_url":"https://github.com/KeeganCorrigan","followers_url":"https://api.github.com/users/KeeganCorrigan/followers","following_url":"https://api.github.com/users/KeeganCorrigan/following{/other_user}","gists_url":"https://api.github.com/users/KeeganCorrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/KeeganCorrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeeganCorrigan/subscriptions","organizations_url":"https://api.github.com/users/KeeganCorrigan/orgs","repos_url":"https://api.github.com/users/KeeganCorrigan/repos","events_url":"https://api.github.com/users/KeeganCorrigan/events{/privacy}","received_events_url":"https://api.github.com/users/KeeganCorrigan/received_events","type":"User","site_admin":false},"repo":{"id":133070965,"name":"enigma","full_name":"KeeganCorrigan/enigma","owner":{"login":"KeeganCorrigan","id":8312280,"avatar_url":"https://avatars3.githubusercontent.com/u/8312280?v=4","gravatar_id":"","url":"https://api.github.com/users/KeeganCorrigan","html_url":"https://github.com/KeeganCorrigan","followers_url":"https://api.github.com/users/KeeganCorrigan/followers","following_url":"https://api.github.com/users/KeeganCorrigan/following{/other_user}","gists_url":"https://api.github.com/users/KeeganCorrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/KeeganCorrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeeganCorrigan/subscriptions","organizations_url":"https://api.github.com/users/KeeganCorrigan/orgs","repos_url":"https://api.github.com/users/KeeganCorrigan/repos","events_url":"https://api.github.com/users/KeeganCorrigan/events{/privacy}","received_events_url":"https://api.github.com/users/KeeganCorrigan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KeeganCorrigan/enigma","description":null,"fork":false,"url":"https://api.github.com/repos/KeeganCorrigan/enigma","forks_url":"https://api.github.com/repos/KeeganCorrigan/enigma/forks","keys_url":"https://api.github.com/repos/KeeganCorrigan/enigma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KeeganCorrigan/enigma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KeeganCorrigan/enigma/teams","hooks_url":"https://api.github.com/repos/KeeganCorrigan/enigma/hooks","issue_events_url":"https://api.github.com/repos/KeeganCorrigan/enigma/issues/events{/number}","events_url":"https://api.github.com/repos/KeeganCorrigan/enigma/events","assignees_url":"https://api.github.com/repos/KeeganCorrigan/enigma/assignees{/user}","branches_url":"https://api.github.com/repos/KeeganCorrigan/enigma/branches{/branch}","tags_url":"https://api.github.com/repos/KeeganCorrigan/enigma/tags","blobs_url":"https://api.github.com/repos/KeeganCorrigan/enigma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KeeganCorrigan/enigma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KeeganCorrigan/enigma/git/refs{/sha}","trees_url":"https://api.github.com/repos/KeeganCorrigan/enigma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KeeganCorrigan/enigma/statuses/{sha}","languages_url":"https://api.github.com/repos/KeeganCorrigan/enigma/languages","stargazers_url":"https://api.github.com/repos/KeeganCorrigan/enigma/stargazers","contributors_url":"https://api.github.com/repos/KeeganCorrigan/enigma/contributors","subscribers_url":"https://api.github.com/repos/KeeganCorrigan/enigma/subscribers","subscription_url":"https://api.github.com/repos/KeeganCorrigan/enigma/subscription","commits_url":"https://api.github.com/repos/KeeganCorrigan/enigma/commits{/sha}","git_commits_url":"https://api.github.com/repos/KeeganCorrigan/enigma/git/commits{/sha}","comments_url":"https://api.github.com/repos/KeeganCorrigan/enigma/comments{/number}","issue_comment_url":"https://api.github.com/repos/KeeganCorrigan/enigma/issues/comments{/number}","contents_url":"https://api.github.com/repos/KeeganCorrigan/enigma/contents/{+path}","compare_url":"https://api.github.com/repos/KeeganCorrigan/enigma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KeeganCorrigan/enigma/merges","archive_url":"https://api.github.com/repos/KeeganCorrigan/enigma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KeeganCorrigan/enigma/downloads","issues_url":"https://api.github.com/repos/KeeganCorrigan/enigma/issues{/number}","pulls_url":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls{/number}","milestones_url":"https://api.github.com/repos/KeeganCorrigan/enigma/milestones{/number}","notifications_url":"https://api.github.com/repos/KeeganCorrigan/enigma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KeeganCorrigan/enigma/labels{/name}","releases_url":"https://api.github.com/repos/KeeganCorrigan/enigma/releases{/id}","deployments_url":"https://api.github.com/repos/KeeganCorrigan/enigma/deployments","created_at":"2018-05-11T17:47:01Z","updated_at":"2018-05-12T18:22:43Z","pushed_at":"2018-05-13T16:25:16Z","git_url":"git://github.com/KeeganCorrigan/enigma.git","ssh_url":"git@github.com:KeeganCorrigan/enigma.git","clone_url":"https://github.com/KeeganCorrigan/enigma.git","svn_url":"https://github.com/KeeganCorrigan/enigma","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"keegan_work_branch"}},"_links":{"self":{"href":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/2"},"html":{"href":"https://github.com/KeeganCorrigan/enigma/pull/2"},"issue":{"href":"https://api.github.com/repos/KeeganCorrigan/enigma/issues/2"},"comments":{"href":"https://api.github.com/repos/KeeganCorrigan/enigma/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KeeganCorrigan/enigma/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/KeeganCorrigan/enigma/statuses/3d448813201c5b27e39cdb86a2a1f5859d45336f"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}