GitHub PullRequestReviewCommentEvent at 2014-09-23 02:28:56
Repository: RubyCastsBrasil
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/comments/17889751","id":17889751,"diff_hunk":"@@ -5,10 +5,66 @@\n   it { expect(subject).to belong_to(:user)                             }\n   it { expect(subject).to have_many(:tag_relationships)                }\n   it { expect(subject).to have_many(:tags).through(:tag_relationships) }\n+  it { expect(subject).to have_many(:cast_transitions) }\n \n   describe '.find_by_param(param)' do\n     it 'should find cast by to_param' do\n-      expect(Cast.find_by_param(cast.to_param)).to eq(cast)\n+      expect(Cast.find_by_param(cast.to_param)).to eq(cast);\n+    end\n+  end\n+\n+  describe '.current_state' do\n+    it 'should be in initial state' do\n+      expect(cast.current_state.to_sym).to eq(:started);\n+    end\n+  end\n+\n+  describe '.can_transition_to?' do\n+    it 'cast is in initial state' do\n+      expect(cast.can_transition_to?(:approved)).to eq(true);\n+      expect(cast.can_transition_to?(:need_improvement)).to eq(true);\n+      expect(cast.can_transition_to?(:not_approved)).to eq(true);\n+    end\n+\n+    it 'cast is in approved state' do\n+      cast.transition_to!(:approved);\n+      expect(cast.can_transition_to?(:need_improvement)).to eq(true);\n+    end\n+\n+    it 'cast is in need_improvement state' do\n+      cast.transition_to!(:need_improvement);\n+      expect(cast.can_transition_to?(:approved)).to eq(true);","path":"spec/models/cast_spec.rb","position":33,"original_position":33,"commit_id":"6ecf0039ee7ae4f36df6e1a307cf1ee16e1a1008","original_commit_id":"6ecf0039ee7ae4f36df6e1a307cf1ee16e1a1008","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=2","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Do not use semicolons to terminate expressions.","created_at":"2014-09-23T02:28:56Z","updated_at":"2014-09-23T02:28:56Z","html_url":"https://github.com/RubyCastsBrasil/RubyCastsBrasil/pull/103#discussion_r17889751","pull_request_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/103","_links":{"self":{"href":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/comments/17889751"},"html":{"href":"https://github.com/RubyCastsBrasil/RubyCastsBrasil/pull/103#discussion_r17889751"},"pull_request":{"href":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/103"}}},"pull_request":{"url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/103","id":21622065,"html_url":"https://github.com/RubyCastsBrasil/RubyCastsBrasil/pull/103","diff_url":"https://github.com/RubyCastsBrasil/RubyCastsBrasil/pull/103.diff","patch_url":"https://github.com/RubyCastsBrasil/RubyCastsBrasil/pull/103.patch","issue_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/issues/103","number":103,"state":"open","locked":false,"title":"Maquina de estados da cast","user":{"login":"wenderjean","id":941776,"avatar_url":"https://avatars.githubusercontent.com/u/941776?v=2","gravatar_id":"","url":"https://api.github.com/users/wenderjean","html_url":"https://github.com/wenderjean","followers_url":"https://api.github.com/users/wenderjean/followers","following_url":"https://api.github.com/users/wenderjean/following{/other_user}","gists_url":"https://api.github.com/users/wenderjean/gists{/gist_id}","starred_url":"https://api.github.com/users/wenderjean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenderjean/subscriptions","organizations_url":"https://api.github.com/users/wenderjean/orgs","repos_url":"https://api.github.com/users/wenderjean/repos","events_url":"https://api.github.com/users/wenderjean/events{/privacy}","received_events_url":"https://api.github.com/users/wenderjean/received_events","type":"User","site_admin":false},"body":"Pessoal, adicionei a funcionalidade de maquinas de estado da cast baseado na gem STATESMAN, sugestões são bem vindas. =)","created_at":"2014-09-23T02:24:22Z","updated_at":"2014-09-23T02:28:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ed97cef07ca677e2013f291bfb2099bbc670b51","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/103/commits","review_comments_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/103/comments","review_comment_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/comments/{number}","comments_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/issues/103/comments","statuses_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/statuses/6ecf0039ee7ae4f36df6e1a307cf1ee16e1a1008","head":{"label":"wenderjean:master","ref":"master","sha":"6ecf0039ee7ae4f36df6e1a307cf1ee16e1a1008","user":{"login":"wenderjean","id":941776,"avatar_url":"https://avatars.githubusercontent.com/u/941776?v=2","gravatar_id":"","url":"https://api.github.com/users/wenderjean","html_url":"https://github.com/wenderjean","followers_url":"https://api.github.com/users/wenderjean/followers","following_url":"https://api.github.com/users/wenderjean/following{/other_user}","gists_url":"https://api.github.com/users/wenderjean/gists{/gist_id}","starred_url":"https://api.github.com/users/wenderjean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenderjean/subscriptions","organizations_url":"https://api.github.com/users/wenderjean/orgs","repos_url":"https://api.github.com/users/wenderjean/repos","events_url":"https://api.github.com/users/wenderjean/events{/privacy}","received_events_url":"https://api.github.com/users/wenderjean/received_events","type":"User","site_admin":false},"repo":{"id":23131051,"name":"RubyCastsBrasil","full_name":"wenderjean/RubyCastsBrasil","owner":{"login":"wenderjean","id":941776,"avatar_url":"https://avatars.githubusercontent.com/u/941776?v=2","gravatar_id":"","url":"https://api.github.com/users/wenderjean","html_url":"https://github.com/wenderjean","followers_url":"https://api.github.com/users/wenderjean/followers","following_url":"https://api.github.com/users/wenderjean/following{/other_user}","gists_url":"https://api.github.com/users/wenderjean/gists{/gist_id}","starred_url":"https://api.github.com/users/wenderjean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenderjean/subscriptions","organizations_url":"https://api.github.com/users/wenderjean/orgs","repos_url":"https://api.github.com/users/wenderjean/repos","events_url":"https://api.github.com/users/wenderjean/events{/privacy}","received_events_url":"https://api.github.com/users/wenderjean/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wenderjean/RubyCastsBrasil","description":"Ruby Casts com conteúdo em português totalmente grátis!","fork":true,"url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil","forks_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/forks","keys_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/teams","hooks_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/hooks","issue_events_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/issues/events{/number}","events_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/events","assignees_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/assignees{/user}","branches_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/branches{/branch}","tags_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/tags","blobs_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/git/refs{/sha}","trees_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/statuses/{sha}","languages_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/languages","stargazers_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/stargazers","contributors_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/contributors","subscribers_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/subscribers","subscription_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/subscription","commits_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/commits{/sha}","git_commits_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/git/commits{/sha}","comments_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/comments{/number}","issue_comment_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/issues/comments/{number}","contents_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/contents/{+path}","compare_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/merges","archive_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/downloads","issues_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/issues{/number}","pulls_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/pulls{/number}","milestones_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/milestones{/number}","notifications_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/labels{/name}","releases_url":"https://api.github.com/repos/wenderjean/RubyCastsBrasil/releases{/id}","created_at":"2014-08-20T01:00:33Z","updated_at":"2014-08-29T02:47:15Z","pushed_at":"2014-09-23T02:28:50Z","git_url":"git://github.com/wenderjean/RubyCastsBrasil.git","ssh_url":"git@github.com:wenderjean/RubyCastsBrasil.git","clone_url":"https://github.com/wenderjean/RubyCastsBrasil.git","svn_url":"https://github.com/wenderjean/RubyCastsBrasil","homepage":"http://rubycastsbrasil.herokuapp.com/","size":13588,"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":"RubyCastsBrasil:master","ref":"master","sha":"0925de25f1a64a9912186be8bb13c839d489672b","user":{"login":"RubyCastsBrasil","id":8202522,"avatar_url":"https://avatars.githubusercontent.com/u/8202522?v=2","gravatar_id":"","url":"https://api.github.com/users/RubyCastsBrasil","html_url":"https://github.com/RubyCastsBrasil","followers_url":"https://api.github.com/users/RubyCastsBrasil/followers","following_url":"https://api.github.com/users/RubyCastsBrasil/following{/other_user}","gists_url":"https://api.github.com/users/RubyCastsBrasil/gists{/gist_id}","starred_url":"https://api.github.com/users/RubyCastsBrasil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubyCastsBrasil/subscriptions","organizations_url":"https://api.github.com/users/RubyCastsBrasil/orgs","repos_url":"https://api.github.com/users/RubyCastsBrasil/repos","events_url":"https://api.github.com/users/RubyCastsBrasil/events{/privacy}","received_events_url":"https://api.github.com/users/RubyCastsBrasil/received_events","type":"Organization","site_admin":false},"repo":{"id":21985146,"name":"RubyCastsBrasil","full_name":"RubyCastsBrasil/RubyCastsBrasil","owner":{"login":"RubyCastsBrasil","id":8202522,"avatar_url":"https://avatars.githubusercontent.com/u/8202522?v=2","gravatar_id":"","url":"https://api.github.com/users/RubyCastsBrasil","html_url":"https://github.com/RubyCastsBrasil","followers_url":"https://api.github.com/users/RubyCastsBrasil/followers","following_url":"https://api.github.com/users/RubyCastsBrasil/following{/other_user}","gists_url":"https://api.github.com/users/RubyCastsBrasil/gists{/gist_id}","starred_url":"https://api.github.com/users/RubyCastsBrasil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubyCastsBrasil/subscriptions","organizations_url":"https://api.github.com/users/RubyCastsBrasil/orgs","repos_url":"https://api.github.com/users/RubyCastsBrasil/repos","events_url":"https://api.github.com/users/RubyCastsBrasil/events{/privacy}","received_events_url":"https://api.github.com/users/RubyCastsBrasil/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RubyCastsBrasil/RubyCastsBrasil","description":"Ruby Casts com conteúdo em português totalmente grátis!","fork":false,"url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil","forks_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/forks","keys_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/teams","hooks_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/hooks","issue_events_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/issues/events{/number}","events_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/events","assignees_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/assignees{/user}","branches_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/branches{/branch}","tags_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/tags","blobs_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/git/refs{/sha}","trees_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/statuses/{sha}","languages_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/languages","stargazers_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/stargazers","contributors_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/contributors","subscribers_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/subscribers","subscription_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/subscription","commits_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/commits{/sha}","git_commits_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/git/commits{/sha}","comments_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/comments{/number}","issue_comment_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/issues/comments/{number}","contents_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/contents/{+path}","compare_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/merges","archive_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/downloads","issues_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/issues{/number}","pulls_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls{/number}","milestones_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/milestones{/number}","notifications_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/labels{/name}","releases_url":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/releases{/id}","created_at":"2014-07-18T15:34:19Z","updated_at":"2014-09-22T17:12:51Z","pushed_at":"2014-09-20T23:15:03Z","git_url":"git://github.com/RubyCastsBrasil/RubyCastsBrasil.git","ssh_url":"git@github.com:RubyCastsBrasil/RubyCastsBrasil.git","clone_url":"https://github.com/RubyCastsBrasil/RubyCastsBrasil.git","svn_url":"https://github.com/RubyCastsBrasil/RubyCastsBrasil","homepage":"http://rubycastsbrasil.herokuapp.com/","size":16219,"stargazers_count":41,"watchers_count":41,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":10,"forks":26,"open_issues":10,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/103"},"html":{"href":"https://github.com/RubyCastsBrasil/RubyCastsBrasil/pull/103"},"issue":{"href":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/issues/103"},"comments":{"href":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/issues/103/comments"},"review_comments":{"href":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/103/comments"},"review_comment":{"href":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/pulls/103/commits"},"statuses":{"href":"https://api.github.com/repos/RubyCastsBrasil/RubyCastsBrasil/statuses/6ecf0039ee7ae4f36df6e1a307cf1ee16e1a1008"}}}}