{"action":"created","comment":{"url":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/comments/66725545","id":66725545,"diff_hunk":"@@ -0,0 +1,64 @@\n+require 'spec_helper'\n+require 'ostruct'\n+\n+RSpec.describe NounProjectApi::CollectionRetriever do\n+  it 'raises an error on empty initialization input' do\n+    expect { NounProjectApi::Collection.new }.to raise_error(ArgumentError)\n+  end\n+\n+  it 'accepts JSON string input' do\n+    data = JSON.parse(Fakes::Results::COLLECTION_VALID)\n+    expect { NounProjectApi::Collection.new(JSON.dump(data[\"collection\"])) }.to_not raise_error\n+  end\n+\n+  it 'accepts JSON string input with collection encapsulation' do\n+    expect { NounProjectApi::Collection.new(Fakes::Results::COLLECTION_VALID) }.to_not raise_error\n+  end\n+\n+  it 'accepts hash input' do\n+    data = JSON.parse(Fakes::Results::COLLECTION_VALID)\n+    expect { NounProjectApi::Collection.new(data) }.to_not raise_error\n+  end\n+\n+  context \"exposed attributes\" do\n+    before :each do\n+      @json = JSON.parse(Fakes::Results::COLLECTION_VALID)\n+      @valid_collection = NounProjectApi::Collection.new(Fakes::Results::COLLECTION_VALID)\n+    end\n+\n+    it 'id as number' do\n+      expect(@valid_collection.id).to be_a(Fixnum)\n+      expect(@valid_collection.id).to eq(@json[\"collection\"][\"id\"].to_i)\n+    end\n+\n+    it 'author id as number' do\n+      expect(@valid_collection.author_id).to eq(@json[\"collection\"][\"author_id\"].to_i)\n+    end\n+\n+    it 'author name' do\n+      expect(@valid_collection.author_name).to eq(@json[\"collection\"][\"author\"][\"name\"])\n+    end\n+\n+    it 'icon count as number' do\n+      expect(@valid_collection.icon_count).to eq(@json[\"collection\"][\"icon_count\"].to_i)\n+    end\n+\n+    it 'is published' do\n+      expect(@valid_collection.is_published?).to eq(@json[\"collection\"][\"is_published\"].to_i == 1)\n+    end\n+\n+    it 'builds a simple hash' do","path":"spec/lib/noun-project-api/collection_spec.rb","position":50,"original_position":50,"commit_id":"6f0bc6f00f4b0002fcc8a5bb62486bb35a706038","original_commit_id":"6f0bc6f00f4b0002fcc8a5bb62486bb35a706038","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","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":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2016-06-12T18:56:43Z","updated_at":"2016-06-12T18:56:43Z","html_url":"https://github.com/TailorBrands/noun-project-api/pull/3#discussion_r66725545","pull_request_url":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/comments/66725545"},"html":{"href":"https://github.com/TailorBrands/noun-project-api/pull/3#discussion_r66725545"},"pull_request":{"href":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/3","id":73503942,"html_url":"https://github.com/TailorBrands/noun-project-api/pull/3","diff_url":"https://github.com/TailorBrands/noun-project-api/pull/3.diff","patch_url":"https://github.com/TailorBrands/noun-project-api/pull/3.patch","issue_url":"https://api.github.com/repos/TailorBrands/noun-project-api/issues/3","number":3,"state":"open","locked":false,"title":"Get collection by slug or ID","user":{"login":"shepardtone","id":437519,"avatar_url":"https://avatars.githubusercontent.com/u/437519?v=3","gravatar_id":"","url":"https://api.github.com/users/shepardtone","html_url":"https://github.com/shepardtone","followers_url":"https://api.github.com/users/shepardtone/followers","following_url":"https://api.github.com/users/shepardtone/following{/other_user}","gists_url":"https://api.github.com/users/shepardtone/gists{/gist_id}","starred_url":"https://api.github.com/users/shepardtone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepardtone/subscriptions","organizations_url":"https://api.github.com/users/shepardtone/orgs","repos_url":"https://api.github.com/users/shepardtone/repos","events_url":"https://api.github.com/users/shepardtone/events{/privacy}","received_events_url":"https://api.github.com/users/shepardtone/received_events","type":"User","site_admin":false},"body":"This PR is basically a wrapper for http://api.thenounproject.com/documentation.html#get--collection-(int-id).\r\n","created_at":"2016-06-12T18:56:38Z","updated_at":"2016-06-12T18:56:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f66f5a66d0db8d82cc7dbd8280b7aa1ae3ae4253","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/3/commits","review_comments_url":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/3/comments","review_comment_url":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TailorBrands/noun-project-api/issues/3/comments","statuses_url":"https://api.github.com/repos/TailorBrands/noun-project-api/statuses/6f0bc6f00f4b0002fcc8a5bb62486bb35a706038","head":{"label":"shepardtone:dev","ref":"dev","sha":"6f0bc6f00f4b0002fcc8a5bb62486bb35a706038","user":{"login":"shepardtone","id":437519,"avatar_url":"https://avatars.githubusercontent.com/u/437519?v=3","gravatar_id":"","url":"https://api.github.com/users/shepardtone","html_url":"https://github.com/shepardtone","followers_url":"https://api.github.com/users/shepardtone/followers","following_url":"https://api.github.com/users/shepardtone/following{/other_user}","gists_url":"https://api.github.com/users/shepardtone/gists{/gist_id}","starred_url":"https://api.github.com/users/shepardtone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepardtone/subscriptions","organizations_url":"https://api.github.com/users/shepardtone/orgs","repos_url":"https://api.github.com/users/shepardtone/repos","events_url":"https://api.github.com/users/shepardtone/events{/privacy}","received_events_url":"https://api.github.com/users/shepardtone/received_events","type":"User","site_admin":false},"repo":{"id":41527095,"name":"noun-project-api","full_name":"shepardtone/noun-project-api","owner":{"login":"shepardtone","id":437519,"avatar_url":"https://avatars.githubusercontent.com/u/437519?v=3","gravatar_id":"","url":"https://api.github.com/users/shepardtone","html_url":"https://github.com/shepardtone","followers_url":"https://api.github.com/users/shepardtone/followers","following_url":"https://api.github.com/users/shepardtone/following{/other_user}","gists_url":"https://api.github.com/users/shepardtone/gists{/gist_id}","starred_url":"https://api.github.com/users/shepardtone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepardtone/subscriptions","organizations_url":"https://api.github.com/users/shepardtone/orgs","repos_url":"https://api.github.com/users/shepardtone/repos","events_url":"https://api.github.com/users/shepardtone/events{/privacy}","received_events_url":"https://api.github.com/users/shepardtone/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shepardtone/noun-project-api","description":"A Ruby API wrapper for The Noun Project API's","fork":true,"url":"https://api.github.com/repos/shepardtone/noun-project-api","forks_url":"https://api.github.com/repos/shepardtone/noun-project-api/forks","keys_url":"https://api.github.com/repos/shepardtone/noun-project-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shepardtone/noun-project-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shepardtone/noun-project-api/teams","hooks_url":"https://api.github.com/repos/shepardtone/noun-project-api/hooks","issue_events_url":"https://api.github.com/repos/shepardtone/noun-project-api/issues/events{/number}","events_url":"https://api.github.com/repos/shepardtone/noun-project-api/events","assignees_url":"https://api.github.com/repos/shepardtone/noun-project-api/assignees{/user}","branches_url":"https://api.github.com/repos/shepardtone/noun-project-api/branches{/branch}","tags_url":"https://api.github.com/repos/shepardtone/noun-project-api/tags","blobs_url":"https://api.github.com/repos/shepardtone/noun-project-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shepardtone/noun-project-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shepardtone/noun-project-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/shepardtone/noun-project-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shepardtone/noun-project-api/statuses/{sha}","languages_url":"https://api.github.com/repos/shepardtone/noun-project-api/languages","stargazers_url":"https://api.github.com/repos/shepardtone/noun-project-api/stargazers","contributors_url":"https://api.github.com/repos/shepardtone/noun-project-api/contributors","subscribers_url":"https://api.github.com/repos/shepardtone/noun-project-api/subscribers","subscription_url":"https://api.github.com/repos/shepardtone/noun-project-api/subscription","commits_url":"https://api.github.com/repos/shepardtone/noun-project-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/shepardtone/noun-project-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/shepardtone/noun-project-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/shepardtone/noun-project-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/shepardtone/noun-project-api/contents/{+path}","compare_url":"https://api.github.com/repos/shepardtone/noun-project-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shepardtone/noun-project-api/merges","archive_url":"https://api.github.com/repos/shepardtone/noun-project-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shepardtone/noun-project-api/downloads","issues_url":"https://api.github.com/repos/shepardtone/noun-project-api/issues{/number}","pulls_url":"https://api.github.com/repos/shepardtone/noun-project-api/pulls{/number}","milestones_url":"https://api.github.com/repos/shepardtone/noun-project-api/milestones{/number}","notifications_url":"https://api.github.com/repos/shepardtone/noun-project-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shepardtone/noun-project-api/labels{/name}","releases_url":"https://api.github.com/repos/shepardtone/noun-project-api/releases{/id}","deployments_url":"https://api.github.com/repos/shepardtone/noun-project-api/deployments","created_at":"2015-08-28T04:31:42Z","updated_at":"2015-08-28T04:31:42Z","pushed_at":"2015-08-28T21:27:14Z","git_url":"git://github.com/shepardtone/noun-project-api.git","ssh_url":"git@github.com:shepardtone/noun-project-api.git","clone_url":"https://github.com/shepardtone/noun-project-api.git","svn_url":"https://github.com/shepardtone/noun-project-api","homepage":"","size":129,"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":"TailorBrands:master","ref":"master","sha":"3d9849e0db3a38ce9162e933bb7d97b921218db5","user":{"login":"TailorBrands","id":9573277,"avatar_url":"https://avatars.githubusercontent.com/u/9573277?v=3","gravatar_id":"","url":"https://api.github.com/users/TailorBrands","html_url":"https://github.com/TailorBrands","followers_url":"https://api.github.com/users/TailorBrands/followers","following_url":"https://api.github.com/users/TailorBrands/following{/other_user}","gists_url":"https://api.github.com/users/TailorBrands/gists{/gist_id}","starred_url":"https://api.github.com/users/TailorBrands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TailorBrands/subscriptions","organizations_url":"https://api.github.com/users/TailorBrands/orgs","repos_url":"https://api.github.com/users/TailorBrands/repos","events_url":"https://api.github.com/users/TailorBrands/events{/privacy}","received_events_url":"https://api.github.com/users/TailorBrands/received_events","type":"Organization","site_admin":false},"repo":{"id":26228609,"name":"noun-project-api","full_name":"TailorBrands/noun-project-api","owner":{"login":"TailorBrands","id":9573277,"avatar_url":"https://avatars.githubusercontent.com/u/9573277?v=3","gravatar_id":"","url":"https://api.github.com/users/TailorBrands","html_url":"https://github.com/TailorBrands","followers_url":"https://api.github.com/users/TailorBrands/followers","following_url":"https://api.github.com/users/TailorBrands/following{/other_user}","gists_url":"https://api.github.com/users/TailorBrands/gists{/gist_id}","starred_url":"https://api.github.com/users/TailorBrands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TailorBrands/subscriptions","organizations_url":"https://api.github.com/users/TailorBrands/orgs","repos_url":"https://api.github.com/users/TailorBrands/repos","events_url":"https://api.github.com/users/TailorBrands/events{/privacy}","received_events_url":"https://api.github.com/users/TailorBrands/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TailorBrands/noun-project-api","description":"A Ruby API wrapper for The Noun Project API's","fork":false,"url":"https://api.github.com/repos/TailorBrands/noun-project-api","forks_url":"https://api.github.com/repos/TailorBrands/noun-project-api/forks","keys_url":"https://api.github.com/repos/TailorBrands/noun-project-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TailorBrands/noun-project-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TailorBrands/noun-project-api/teams","hooks_url":"https://api.github.com/repos/TailorBrands/noun-project-api/hooks","issue_events_url":"https://api.github.com/repos/TailorBrands/noun-project-api/issues/events{/number}","events_url":"https://api.github.com/repos/TailorBrands/noun-project-api/events","assignees_url":"https://api.github.com/repos/TailorBrands/noun-project-api/assignees{/user}","branches_url":"https://api.github.com/repos/TailorBrands/noun-project-api/branches{/branch}","tags_url":"https://api.github.com/repos/TailorBrands/noun-project-api/tags","blobs_url":"https://api.github.com/repos/TailorBrands/noun-project-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TailorBrands/noun-project-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TailorBrands/noun-project-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/TailorBrands/noun-project-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TailorBrands/noun-project-api/statuses/{sha}","languages_url":"https://api.github.com/repos/TailorBrands/noun-project-api/languages","stargazers_url":"https://api.github.com/repos/TailorBrands/noun-project-api/stargazers","contributors_url":"https://api.github.com/repos/TailorBrands/noun-project-api/contributors","subscribers_url":"https://api.github.com/repos/TailorBrands/noun-project-api/subscribers","subscription_url":"https://api.github.com/repos/TailorBrands/noun-project-api/subscription","commits_url":"https://api.github.com/repos/TailorBrands/noun-project-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/TailorBrands/noun-project-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/TailorBrands/noun-project-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/TailorBrands/noun-project-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/TailorBrands/noun-project-api/contents/{+path}","compare_url":"https://api.github.com/repos/TailorBrands/noun-project-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TailorBrands/noun-project-api/merges","archive_url":"https://api.github.com/repos/TailorBrands/noun-project-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TailorBrands/noun-project-api/downloads","issues_url":"https://api.github.com/repos/TailorBrands/noun-project-api/issues{/number}","pulls_url":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls{/number}","milestones_url":"https://api.github.com/repos/TailorBrands/noun-project-api/milestones{/number}","notifications_url":"https://api.github.com/repos/TailorBrands/noun-project-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TailorBrands/noun-project-api/labels{/name}","releases_url":"https://api.github.com/repos/TailorBrands/noun-project-api/releases{/id}","deployments_url":"https://api.github.com/repos/TailorBrands/noun-project-api/deployments","created_at":"2014-11-05T16:30:43Z","updated_at":"2016-03-27T05:48:19Z","pushed_at":"2016-06-12T18:56:38Z","git_url":"git://github.com/TailorBrands/noun-project-api.git","ssh_url":"git@github.com:TailorBrands/noun-project-api.git","clone_url":"https://github.com/TailorBrands/noun-project-api.git","svn_url":"https://github.com/TailorBrands/noun-project-api","homepage":"","size":563,"stargazers_count":9,"watchers_count":9,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/3"},"html":{"href":"https://github.com/TailorBrands/noun-project-api/pull/3"},"issue":{"href":"https://api.github.com/repos/TailorBrands/noun-project-api/issues/3"},"comments":{"href":"https://api.github.com/repos/TailorBrands/noun-project-api/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TailorBrands/noun-project-api/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/TailorBrands/noun-project-api/statuses/6f0bc6f00f4b0002fcc8a5bb62486bb35a706038"}}}}
{"actor":{"display_login":"houndci-bot"}}