{"action":"created","comment":{"url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/comments/148742548","pull_request_review_id":74032389,"id":148742548,"diff_hunk":"@@ -0,0 +1,78 @@\n+require 'C:\\Users\\Maham.Nazir\\RubymineProjects\\Bookstore\\bookstore'\n+\n+# Singleton instance\n+@book_store = Bookstore.instance\n+\n+# Extract any data present in the file\n+@book_store.extract_data_from_file\n+\n+# The code has been separated into functions to enable unit testing\n+def add_book_init\n+  print \"\\nEnter Book Name: \"\n+  book_name = gets.chomp\n+  if (book_name == '')\n+    puts 'Invalid Book Name!'\n+    return\n+  end\n+  if !@book_store.check_key(book_name)\n+    print 'Enter Book Rating: '\n+    rating = gets.chomp\n+    rating = rating.to_f\n+    if @book_store.add_book(book_name, rating)\n+      puts \"'#{book_name}' Has Been Added Successfully!\"\n+    else\n+      puts \"'#{book_name}' Could Not Be Added!\"\n+    end\n+  else\n+    puts \"\\nThis Book Name Already Exists!\"\n+  end\n+end\n+\n+def delete_book_init\n+  print \"\\nEnter Book Name: \"\n+  book_name = gets.chomp\n+  if (@book_store.check_key(book_name) == true)\n+    if @book_store.delete_book(book_name)\n+      puts \"''#{book_name} Has Been Deleted Successfully!\"\n+    else\n+      puts \"'#{book_name}' Could Not Be Deleted!\"\n+    end\n+  else\n+    puts \"\\nThis Book Does Not Exist!\"\n+  end\n+end\n+\n+def search_books_init\n+  print \"\\nEnter Book Name: \"\n+  book_name = gets.chomp\n+  @book_store.search_books(book_name)\n+end\n+\n+def display_books_init\n+  @book_store.display_books\n+end\n+\n+while true do","path":"BookstoreV5/bookstore_v2.rb","position":55,"original_position":55,"commit_id":"3778a0f1f1e2ff55aa174d7528a1cca40bee3af6","original_commit_id":"3778a0f1f1e2ff55aa174d7528a1cca40bee3af6","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":"Use Kernel#loop for infinite loops.<br>Literal true appeared as a condition.<br>Do not use do with multi-line while.","created_at":"2017-11-03T09:59:23Z","updated_at":"2017-11-03T09:59:24Z","html_url":"https://github.com/maham-nazir-confiz/Bookstore/pull/5#discussion_r148742548","pull_request_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/comments/148742548"},"html":{"href":"https://github.com/maham-nazir-confiz/Bookstore/pull/5#discussion_r148742548"},"pull_request":{"href":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/5","id":150488644,"html_url":"https://github.com/maham-nazir-confiz/Bookstore/pull/5","diff_url":"https://github.com/maham-nazir-confiz/Bookstore/pull/5.diff","patch_url":"https://github.com/maham-nazir-confiz/Bookstore/pull/5.patch","issue_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/issues/5","number":5,"state":"open","locked":false,"title":"Development","user":{"login":"maham-nazir-confiz","id":30528870,"avatar_url":"https://avatars0.githubusercontent.com/u/30528870?v=4","gravatar_id":"","url":"https://api.github.com/users/maham-nazir-confiz","html_url":"https://github.com/maham-nazir-confiz","followers_url":"https://api.github.com/users/maham-nazir-confiz/followers","following_url":"https://api.github.com/users/maham-nazir-confiz/following{/other_user}","gists_url":"https://api.github.com/users/maham-nazir-confiz/gists{/gist_id}","starred_url":"https://api.github.com/users/maham-nazir-confiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maham-nazir-confiz/subscriptions","organizations_url":"https://api.github.com/users/maham-nazir-confiz/orgs","repos_url":"https://api.github.com/users/maham-nazir-confiz/repos","events_url":"https://api.github.com/users/maham-nazir-confiz/events{/privacy}","received_events_url":"https://api.github.com/users/maham-nazir-confiz/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-03T09:59:16Z","updated_at":"2017-11-03T09:59:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7c50043aa1f1332933bb93af0c709c4aefa5154","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/5/commits","review_comments_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/5/comments","review_comment_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/issues/5/comments","statuses_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/statuses/3778a0f1f1e2ff55aa174d7528a1cca40bee3af6","head":{"label":"maham-nazir-confiz:Development","ref":"Development","sha":"3778a0f1f1e2ff55aa174d7528a1cca40bee3af6","user":{"login":"maham-nazir-confiz","id":30528870,"avatar_url":"https://avatars0.githubusercontent.com/u/30528870?v=4","gravatar_id":"","url":"https://api.github.com/users/maham-nazir-confiz","html_url":"https://github.com/maham-nazir-confiz","followers_url":"https://api.github.com/users/maham-nazir-confiz/followers","following_url":"https://api.github.com/users/maham-nazir-confiz/following{/other_user}","gists_url":"https://api.github.com/users/maham-nazir-confiz/gists{/gist_id}","starred_url":"https://api.github.com/users/maham-nazir-confiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maham-nazir-confiz/subscriptions","organizations_url":"https://api.github.com/users/maham-nazir-confiz/orgs","repos_url":"https://api.github.com/users/maham-nazir-confiz/repos","events_url":"https://api.github.com/users/maham-nazir-confiz/events{/privacy}","received_events_url":"https://api.github.com/users/maham-nazir-confiz/received_events","type":"User","site_admin":false},"repo":{"id":99786565,"name":"Bookstore","full_name":"maham-nazir-confiz/Bookstore","owner":{"login":"maham-nazir-confiz","id":30528870,"avatar_url":"https://avatars0.githubusercontent.com/u/30528870?v=4","gravatar_id":"","url":"https://api.github.com/users/maham-nazir-confiz","html_url":"https://github.com/maham-nazir-confiz","followers_url":"https://api.github.com/users/maham-nazir-confiz/followers","following_url":"https://api.github.com/users/maham-nazir-confiz/following{/other_user}","gists_url":"https://api.github.com/users/maham-nazir-confiz/gists{/gist_id}","starred_url":"https://api.github.com/users/maham-nazir-confiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maham-nazir-confiz/subscriptions","organizations_url":"https://api.github.com/users/maham-nazir-confiz/orgs","repos_url":"https://api.github.com/users/maham-nazir-confiz/repos","events_url":"https://api.github.com/users/maham-nazir-confiz/events{/privacy}","received_events_url":"https://api.github.com/users/maham-nazir-confiz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maham-nazir-confiz/Bookstore","description":null,"fork":false,"url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore","forks_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/forks","keys_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/teams","hooks_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/hooks","issue_events_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/issues/events{/number}","events_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/events","assignees_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/assignees{/user}","branches_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/branches{/branch}","tags_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/tags","blobs_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/statuses/{sha}","languages_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/languages","stargazers_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/stargazers","contributors_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/contributors","subscribers_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/subscribers","subscription_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/subscription","commits_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/issues/comments{/number}","contents_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/contents/{+path}","compare_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/merges","archive_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/downloads","issues_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/issues{/number}","pulls_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls{/number}","milestones_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/milestones{/number}","notifications_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/labels{/name}","releases_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/releases{/id}","deployments_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/deployments","created_at":"2017-08-09T08:54:17Z","updated_at":"2017-08-09T08:54:17Z","pushed_at":"2017-11-03T09:59:16Z","git_url":"git://github.com/maham-nazir-confiz/Bookstore.git","ssh_url":"git@github.com:maham-nazir-confiz/Bookstore.git","clone_url":"https://github.com/maham-nazir-confiz/Bookstore.git","svn_url":"https://github.com/maham-nazir-confiz/Bookstore","homepage":null,"size":14,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"maham-nazir-confiz:master","ref":"master","sha":"087d0bdfede9608eaec3dcdd974d18df88650992","user":{"login":"maham-nazir-confiz","id":30528870,"avatar_url":"https://avatars0.githubusercontent.com/u/30528870?v=4","gravatar_id":"","url":"https://api.github.com/users/maham-nazir-confiz","html_url":"https://github.com/maham-nazir-confiz","followers_url":"https://api.github.com/users/maham-nazir-confiz/followers","following_url":"https://api.github.com/users/maham-nazir-confiz/following{/other_user}","gists_url":"https://api.github.com/users/maham-nazir-confiz/gists{/gist_id}","starred_url":"https://api.github.com/users/maham-nazir-confiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maham-nazir-confiz/subscriptions","organizations_url":"https://api.github.com/users/maham-nazir-confiz/orgs","repos_url":"https://api.github.com/users/maham-nazir-confiz/repos","events_url":"https://api.github.com/users/maham-nazir-confiz/events{/privacy}","received_events_url":"https://api.github.com/users/maham-nazir-confiz/received_events","type":"User","site_admin":false},"repo":{"id":99786565,"name":"Bookstore","full_name":"maham-nazir-confiz/Bookstore","owner":{"login":"maham-nazir-confiz","id":30528870,"avatar_url":"https://avatars0.githubusercontent.com/u/30528870?v=4","gravatar_id":"","url":"https://api.github.com/users/maham-nazir-confiz","html_url":"https://github.com/maham-nazir-confiz","followers_url":"https://api.github.com/users/maham-nazir-confiz/followers","following_url":"https://api.github.com/users/maham-nazir-confiz/following{/other_user}","gists_url":"https://api.github.com/users/maham-nazir-confiz/gists{/gist_id}","starred_url":"https://api.github.com/users/maham-nazir-confiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maham-nazir-confiz/subscriptions","organizations_url":"https://api.github.com/users/maham-nazir-confiz/orgs","repos_url":"https://api.github.com/users/maham-nazir-confiz/repos","events_url":"https://api.github.com/users/maham-nazir-confiz/events{/privacy}","received_events_url":"https://api.github.com/users/maham-nazir-confiz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maham-nazir-confiz/Bookstore","description":null,"fork":false,"url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore","forks_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/forks","keys_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/teams","hooks_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/hooks","issue_events_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/issues/events{/number}","events_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/events","assignees_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/assignees{/user}","branches_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/branches{/branch}","tags_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/tags","blobs_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/statuses/{sha}","languages_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/languages","stargazers_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/stargazers","contributors_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/contributors","subscribers_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/subscribers","subscription_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/subscription","commits_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/issues/comments{/number}","contents_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/contents/{+path}","compare_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/merges","archive_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/downloads","issues_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/issues{/number}","pulls_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls{/number}","milestones_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/milestones{/number}","notifications_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/labels{/name}","releases_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/releases{/id}","deployments_url":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/deployments","created_at":"2017-08-09T08:54:17Z","updated_at":"2017-08-09T08:54:17Z","pushed_at":"2017-11-03T09:59:16Z","git_url":"git://github.com/maham-nazir-confiz/Bookstore.git","ssh_url":"git@github.com:maham-nazir-confiz/Bookstore.git","clone_url":"https://github.com/maham-nazir-confiz/Bookstore.git","svn_url":"https://github.com/maham-nazir-confiz/Bookstore","homepage":null,"size":14,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/5"},"html":{"href":"https://github.com/maham-nazir-confiz/Bookstore/pull/5"},"issue":{"href":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/issues/5"},"comments":{"href":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/maham-nazir-confiz/Bookstore/statuses/3778a0f1f1e2ff55aa174d7528a1cca40bee3af6"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}