{"action":"created","comment":{"url":"https://api.github.com/repos/cerner/cerner_splunk/pulls/comments/59091243","id":59091243,"diff_hunk":"@@ -0,0 +1,40 @@\n+# coding: UTF-8\n+#\n+# Cookbook Name:: cerner_splunk\n+# File Name:: unit_converter.rb\n+#\n+# Module contains different functions used to manipulate the units of file sizes.\n+#\n+module CernerSplunk\n+  SIZE_SCALE = %w(KB MB GB TB).freeze\n+  # Methods converts file sizes in KB, MB, GB and TB into Bytes.\n+  def self.convert_to_bytes(string)\n+    fail \"Unparsable size input: #{string}\" if string.match(/^\\d+\\w{2,3}$/).nil?\n+\n+    size = string.scan(/\\d+|\\w/)[0]\n+    size_unit = string.scan(/\\d+|\\w/)[1].upcase\n+\n+    case size_unit\n+    when 'K'\n+      size.to_i * 1024\n+    when 'M'\n+      size.to_i * 1024**2\n+    when 'G'\n+      size.to_i * 1024**3\n+    when 'T'\n+      size.to_i * 1024**4\n+    else\n+      fail \"#{string} :Please specify the size in KB, MB, GB or TB\"\n+    end\n+  end\n+\n+  # Function returns the size in a human readable format.\n+  def self.human_readable_size(filesize, level = 0)","path":"libraries/unit_converter.rb","position":36,"original_position":32,"commit_id":"8375951439f128f4d86134a8dd7491ce772cf81d","original_commit_id":"3f6e7f8b8c73fdabbeb08f54e347982a55ff7cdb","user":{"login":"acharlieh","id":413832,"avatar_url":"https://avatars.githubusercontent.com/u/413832?v=3","gravatar_id":"","url":"https://api.github.com/users/acharlieh","html_url":"https://github.com/acharlieh","followers_url":"https://api.github.com/users/acharlieh/followers","following_url":"https://api.github.com/users/acharlieh/following{/other_user}","gists_url":"https://api.github.com/users/acharlieh/gists{/gist_id}","starred_url":"https://api.github.com/users/acharlieh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acharlieh/subscriptions","organizations_url":"https://api.github.com/users/acharlieh/orgs","repos_url":"https://api.github.com/users/acharlieh/repos","events_url":"https://api.github.com/users/acharlieh/events{/privacy}","received_events_url":"https://api.github.com/users/acharlieh/received_events","type":"User","site_admin":false},"body":"With this function no longer being recursive, the level variable should be a method variable not an argument to the function?","created_at":"2016-04-08T21:23:02Z","updated_at":"2016-04-08T21:23:02Z","html_url":"https://github.com/cerner/cerner_splunk/pull/108#discussion_r59091243","pull_request_url":"https://api.github.com/repos/cerner/cerner_splunk/pulls/108","_links":{"self":{"href":"https://api.github.com/repos/cerner/cerner_splunk/pulls/comments/59091243"},"html":{"href":"https://github.com/cerner/cerner_splunk/pull/108#discussion_r59091243"},"pull_request":{"href":"https://api.github.com/repos/cerner/cerner_splunk/pulls/108"}}},"pull_request":{"url":"https://api.github.com/repos/cerner/cerner_splunk/pulls/108","id":63979819,"html_url":"https://github.com/cerner/cerner_splunk/pull/108","diff_url":"https://github.com/cerner/cerner_splunk/pull/108.diff","patch_url":"https://github.com/cerner/cerner_splunk/pull/108.patch","issue_url":"https://api.github.com/repos/cerner/cerner_splunk/issues/108","number":108,"state":"open","locked":false,"title":"Enable managing license pools","user":{"login":"nmattam","id":6389596,"avatar_url":"https://avatars.githubusercontent.com/u/6389596?v=3","gravatar_id":"","url":"https://api.github.com/users/nmattam","html_url":"https://github.com/nmattam","followers_url":"https://api.github.com/users/nmattam/followers","following_url":"https://api.github.com/users/nmattam/following{/other_user}","gists_url":"https://api.github.com/users/nmattam/gists{/gist_id}","starred_url":"https://api.github.com/users/nmattam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmattam/subscriptions","organizations_url":"https://api.github.com/users/nmattam/orgs","repos_url":"https://api.github.com/users/nmattam/repos","events_url":"https://api.github.com/users/nmattam/events{/privacy}","received_events_url":"https://api.github.com/users/nmattam/received_events","type":"User","site_admin":false},"body":"This enhancement allows better management of license pools. Earlier all the indexers went into the same pool(auto_generated_pool) which had the max quota. You will now be able to specify which indexer goes into which pools and set the license quota for each pool. ","created_at":"2016-03-24T01:55:35Z","updated_at":"2016-04-08T21:23:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5405322304f86b0a083d2288969a6e6389a1a23c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cerner/cerner_splunk/pulls/108/commits","review_comments_url":"https://api.github.com/repos/cerner/cerner_splunk/pulls/108/comments","review_comment_url":"https://api.github.com/repos/cerner/cerner_splunk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cerner/cerner_splunk/issues/108/comments","statuses_url":"https://api.github.com/repos/cerner/cerner_splunk/statuses/8375951439f128f4d86134a8dd7491ce772cf81d","head":{"label":"nmattam:enable-license-pools","ref":"enable-license-pools","sha":"8375951439f128f4d86134a8dd7491ce772cf81d","user":{"login":"nmattam","id":6389596,"avatar_url":"https://avatars.githubusercontent.com/u/6389596?v=3","gravatar_id":"","url":"https://api.github.com/users/nmattam","html_url":"https://github.com/nmattam","followers_url":"https://api.github.com/users/nmattam/followers","following_url":"https://api.github.com/users/nmattam/following{/other_user}","gists_url":"https://api.github.com/users/nmattam/gists{/gist_id}","starred_url":"https://api.github.com/users/nmattam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmattam/subscriptions","organizations_url":"https://api.github.com/users/nmattam/orgs","repos_url":"https://api.github.com/users/nmattam/repos","events_url":"https://api.github.com/users/nmattam/events{/privacy}","received_events_url":"https://api.github.com/users/nmattam/received_events","type":"User","site_admin":false},"repo":{"id":54595375,"name":"cerner_splunk","full_name":"nmattam/cerner_splunk","owner":{"login":"nmattam","id":6389596,"avatar_url":"https://avatars.githubusercontent.com/u/6389596?v=3","gravatar_id":"","url":"https://api.github.com/users/nmattam","html_url":"https://github.com/nmattam","followers_url":"https://api.github.com/users/nmattam/followers","following_url":"https://api.github.com/users/nmattam/following{/other_user}","gists_url":"https://api.github.com/users/nmattam/gists{/gist_id}","starred_url":"https://api.github.com/users/nmattam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmattam/subscriptions","organizations_url":"https://api.github.com/users/nmattam/orgs","repos_url":"https://api.github.com/users/nmattam/repos","events_url":"https://api.github.com/users/nmattam/events{/privacy}","received_events_url":"https://api.github.com/users/nmattam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nmattam/cerner_splunk","description":"Cerner's Splunk Cookbook","fork":true,"url":"https://api.github.com/repos/nmattam/cerner_splunk","forks_url":"https://api.github.com/repos/nmattam/cerner_splunk/forks","keys_url":"https://api.github.com/repos/nmattam/cerner_splunk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nmattam/cerner_splunk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nmattam/cerner_splunk/teams","hooks_url":"https://api.github.com/repos/nmattam/cerner_splunk/hooks","issue_events_url":"https://api.github.com/repos/nmattam/cerner_splunk/issues/events{/number}","events_url":"https://api.github.com/repos/nmattam/cerner_splunk/events","assignees_url":"https://api.github.com/repos/nmattam/cerner_splunk/assignees{/user}","branches_url":"https://api.github.com/repos/nmattam/cerner_splunk/branches{/branch}","tags_url":"https://api.github.com/repos/nmattam/cerner_splunk/tags","blobs_url":"https://api.github.com/repos/nmattam/cerner_splunk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nmattam/cerner_splunk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nmattam/cerner_splunk/git/refs{/sha}","trees_url":"https://api.github.com/repos/nmattam/cerner_splunk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nmattam/cerner_splunk/statuses/{sha}","languages_url":"https://api.github.com/repos/nmattam/cerner_splunk/languages","stargazers_url":"https://api.github.com/repos/nmattam/cerner_splunk/stargazers","contributors_url":"https://api.github.com/repos/nmattam/cerner_splunk/contributors","subscribers_url":"https://api.github.com/repos/nmattam/cerner_splunk/subscribers","subscription_url":"https://api.github.com/repos/nmattam/cerner_splunk/subscription","commits_url":"https://api.github.com/repos/nmattam/cerner_splunk/commits{/sha}","git_commits_url":"https://api.github.com/repos/nmattam/cerner_splunk/git/commits{/sha}","comments_url":"https://api.github.com/repos/nmattam/cerner_splunk/comments{/number}","issue_comment_url":"https://api.github.com/repos/nmattam/cerner_splunk/issues/comments{/number}","contents_url":"https://api.github.com/repos/nmattam/cerner_splunk/contents/{+path}","compare_url":"https://api.github.com/repos/nmattam/cerner_splunk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nmattam/cerner_splunk/merges","archive_url":"https://api.github.com/repos/nmattam/cerner_splunk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nmattam/cerner_splunk/downloads","issues_url":"https://api.github.com/repos/nmattam/cerner_splunk/issues{/number}","pulls_url":"https://api.github.com/repos/nmattam/cerner_splunk/pulls{/number}","milestones_url":"https://api.github.com/repos/nmattam/cerner_splunk/milestones{/number}","notifications_url":"https://api.github.com/repos/nmattam/cerner_splunk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nmattam/cerner_splunk/labels{/name}","releases_url":"https://api.github.com/repos/nmattam/cerner_splunk/releases{/id}","deployments_url":"https://api.github.com/repos/nmattam/cerner_splunk/deployments","created_at":"2016-03-23T21:49:21Z","updated_at":"2016-03-23T21:49:22Z","pushed_at":"2016-04-07T21:18:17Z","git_url":"git://github.com/nmattam/cerner_splunk.git","ssh_url":"git@github.com:nmattam/cerner_splunk.git","clone_url":"https://github.com/nmattam/cerner_splunk.git","svn_url":"https://github.com/nmattam/cerner_splunk","homepage":null,"size":207,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"stable"}},"base":{"label":"cerner:stable","ref":"stable","sha":"2c2d82715898832eaa6f468ff12db12828039b45","user":{"login":"cerner","id":1873208,"avatar_url":"https://avatars.githubusercontent.com/u/1873208?v=3","gravatar_id":"","url":"https://api.github.com/users/cerner","html_url":"https://github.com/cerner","followers_url":"https://api.github.com/users/cerner/followers","following_url":"https://api.github.com/users/cerner/following{/other_user}","gists_url":"https://api.github.com/users/cerner/gists{/gist_id}","starred_url":"https://api.github.com/users/cerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cerner/subscriptions","organizations_url":"https://api.github.com/users/cerner/orgs","repos_url":"https://api.github.com/users/cerner/repos","events_url":"https://api.github.com/users/cerner/events{/privacy}","received_events_url":"https://api.github.com/users/cerner/received_events","type":"Organization","site_admin":false},"repo":{"id":24943819,"name":"cerner_splunk","full_name":"cerner/cerner_splunk","owner":{"login":"cerner","id":1873208,"avatar_url":"https://avatars.githubusercontent.com/u/1873208?v=3","gravatar_id":"","url":"https://api.github.com/users/cerner","html_url":"https://github.com/cerner","followers_url":"https://api.github.com/users/cerner/followers","following_url":"https://api.github.com/users/cerner/following{/other_user}","gists_url":"https://api.github.com/users/cerner/gists{/gist_id}","starred_url":"https://api.github.com/users/cerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cerner/subscriptions","organizations_url":"https://api.github.com/users/cerner/orgs","repos_url":"https://api.github.com/users/cerner/repos","events_url":"https://api.github.com/users/cerner/events{/privacy}","received_events_url":"https://api.github.com/users/cerner/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cerner/cerner_splunk","description":"Cerner's Splunk Cookbook","fork":false,"url":"https://api.github.com/repos/cerner/cerner_splunk","forks_url":"https://api.github.com/repos/cerner/cerner_splunk/forks","keys_url":"https://api.github.com/repos/cerner/cerner_splunk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cerner/cerner_splunk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cerner/cerner_splunk/teams","hooks_url":"https://api.github.com/repos/cerner/cerner_splunk/hooks","issue_events_url":"https://api.github.com/repos/cerner/cerner_splunk/issues/events{/number}","events_url":"https://api.github.com/repos/cerner/cerner_splunk/events","assignees_url":"https://api.github.com/repos/cerner/cerner_splunk/assignees{/user}","branches_url":"https://api.github.com/repos/cerner/cerner_splunk/branches{/branch}","tags_url":"https://api.github.com/repos/cerner/cerner_splunk/tags","blobs_url":"https://api.github.com/repos/cerner/cerner_splunk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cerner/cerner_splunk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cerner/cerner_splunk/git/refs{/sha}","trees_url":"https://api.github.com/repos/cerner/cerner_splunk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cerner/cerner_splunk/statuses/{sha}","languages_url":"https://api.github.com/repos/cerner/cerner_splunk/languages","stargazers_url":"https://api.github.com/repos/cerner/cerner_splunk/stargazers","contributors_url":"https://api.github.com/repos/cerner/cerner_splunk/contributors","subscribers_url":"https://api.github.com/repos/cerner/cerner_splunk/subscribers","subscription_url":"https://api.github.com/repos/cerner/cerner_splunk/subscription","commits_url":"https://api.github.com/repos/cerner/cerner_splunk/commits{/sha}","git_commits_url":"https://api.github.com/repos/cerner/cerner_splunk/git/commits{/sha}","comments_url":"https://api.github.com/repos/cerner/cerner_splunk/comments{/number}","issue_comment_url":"https://api.github.com/repos/cerner/cerner_splunk/issues/comments{/number}","contents_url":"https://api.github.com/repos/cerner/cerner_splunk/contents/{+path}","compare_url":"https://api.github.com/repos/cerner/cerner_splunk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cerner/cerner_splunk/merges","archive_url":"https://api.github.com/repos/cerner/cerner_splunk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cerner/cerner_splunk/downloads","issues_url":"https://api.github.com/repos/cerner/cerner_splunk/issues{/number}","pulls_url":"https://api.github.com/repos/cerner/cerner_splunk/pulls{/number}","milestones_url":"https://api.github.com/repos/cerner/cerner_splunk/milestones{/number}","notifications_url":"https://api.github.com/repos/cerner/cerner_splunk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cerner/cerner_splunk/labels{/name}","releases_url":"https://api.github.com/repos/cerner/cerner_splunk/releases{/id}","deployments_url":"https://api.github.com/repos/cerner/cerner_splunk/deployments","created_at":"2014-10-08T14:13:04Z","updated_at":"2016-02-02T17:07:16Z","pushed_at":"2016-04-07T21:18:18Z","git_url":"git://github.com/cerner/cerner_splunk.git","ssh_url":"git@github.com:cerner/cerner_splunk.git","clone_url":"https://github.com/cerner/cerner_splunk.git","svn_url":"https://github.com/cerner/cerner_splunk","homepage":null,"size":225,"stargazers_count":9,"watchers_count":9,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":19,"forks":13,"open_issues":19,"watchers":9,"default_branch":"stable"}},"_links":{"self":{"href":"https://api.github.com/repos/cerner/cerner_splunk/pulls/108"},"html":{"href":"https://github.com/cerner/cerner_splunk/pull/108"},"issue":{"href":"https://api.github.com/repos/cerner/cerner_splunk/issues/108"},"comments":{"href":"https://api.github.com/repos/cerner/cerner_splunk/issues/108/comments"},"review_comments":{"href":"https://api.github.com/repos/cerner/cerner_splunk/pulls/108/comments"},"review_comment":{"href":"https://api.github.com/repos/cerner/cerner_splunk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cerner/cerner_splunk/pulls/108/commits"},"statuses":{"href":"https://api.github.com/repos/cerner/cerner_splunk/statuses/8375951439f128f4d86134a8dd7491ce772cf81d"}}}}