{"action":"created","comment":{"url":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/comments/28446163","id":28446163,"diff_hunk":"@@ -30,10 +32,10 @@\n \n   context 'in development mode' do\n     it 'finds affected appliances using dev_mode_property_set relation' do\n-      dev_as = create(:dev_appliance_set)\n-      appl1 = create(:appliance, appliance_type: at, appliance_set: dev_as)\n-      create(:appliance, appliance_type: at)\n+      appl1 = dev_appliance\n       dev_pmt = appl1.dev_mode_property_set.port_mapping_templates.first\n+      # other appliances which should not be taken into account\n+      create(:appliance, appliance_type: at)\n \n       affected_appl = Atmosphere::AppliancesAffectedByPmt.new(dev_pmt).find","path":"spec/queries/atmosphere/appliances_affected_by_pmt_spec.rb","position":22,"original_position":22,"commit_id":"8d5cb005c43f2e24269775958b70ac1ff723ac1c","original_commit_id":"8d5cb005c43f2e24269775958b70ac1ff723ac1c","user":{"login":"nowakowski","id":4568385,"avatar_url":"https://avatars.githubusercontent.com/u/4568385?v=3","gravatar_id":"","url":"https://api.github.com/users/nowakowski","html_url":"https://github.com/nowakowski","followers_url":"https://api.github.com/users/nowakowski/followers","following_url":"https://api.github.com/users/nowakowski/following{/other_user}","gists_url":"https://api.github.com/users/nowakowski/gists{/gist_id}","starred_url":"https://api.github.com/users/nowakowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nowakowski/subscriptions","organizations_url":"https://api.github.com/users/nowakowski/orgs","repos_url":"https://api.github.com/users/nowakowski/repos","events_url":"https://api.github.com/users/nowakowski/events{/privacy}","received_events_url":"https://api.github.com/users/nowakowski/received_events","type":"User","site_admin":false},"body":"This looks funky. Wouldn't it make more sense to implement `find` as a static method of `AppliancesAffectedByPmt` (possibly renaming the class to something like `AffectedAppliancesLocalizer`) and parameterize this method with `dev_pmt`?\r\n\r\nATM this invocation reads like you're \"creating\" some sort of \"appliance affected by PMT\" and then invoking something on it. I understand what's really going on, but the choice of names is rather unfortunate...","created_at":"2015-04-15T18:09:12Z","updated_at":"2015-04-15T18:09:12Z","html_url":"https://github.com/dice-cyfronet/atmosphere/pull/145#discussion_r28446163","pull_request_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/145","_links":{"self":{"href":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/comments/28446163"},"html":{"href":"https://github.com/dice-cyfronet/atmosphere/pull/145#discussion_r28446163"},"pull_request":{"href":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/145"}}},"pull_request":{"url":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/145","id":33139319,"html_url":"https://github.com/dice-cyfronet/atmosphere/pull/145","diff_url":"https://github.com/dice-cyfronet/atmosphere/pull/145.diff","patch_url":"https://github.com/dice-cyfronet/atmosphere/pull/145.patch","issue_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/issues/145","number":145,"state":"open","locked":false,"title":"Don't select development appliances on AT PMT change","user":{"login":"mkasztelnik","id":1265430,"avatar_url":"https://avatars.githubusercontent.com/u/1265430?v=3","gravatar_id":"","url":"https://api.github.com/users/mkasztelnik","html_url":"https://github.com/mkasztelnik","followers_url":"https://api.github.com/users/mkasztelnik/followers","following_url":"https://api.github.com/users/mkasztelnik/following{/other_user}","gists_url":"https://api.github.com/users/mkasztelnik/gists{/gist_id}","starred_url":"https://api.github.com/users/mkasztelnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkasztelnik/subscriptions","organizations_url":"https://api.github.com/users/mkasztelnik/orgs","repos_url":"https://api.github.com/users/mkasztelnik/repos","events_url":"https://api.github.com/users/mkasztelnik/events{/privacy}","received_events_url":"https://api.github.com/users/mkasztelnik/received_events","type":"User","site_admin":false},"body":"When `PortMappingTemplate` is added, removed from `ApplianceType` only `Appliances` started in production should be affected. Development `Appliances` have PMT copied into `DevModePropertySet` and should not be modified.\r\n\r\nFix #135\r\n\r\n/cc @dice-cyfronet/atmo-dev-team please take a look. If you have better way how to select only production appliances please let me know.","created_at":"2015-04-13T06:49:42Z","updated_at":"2015-04-15T18:09:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30cf02a8d068e0d2a15c25f6879695166bbdf093","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/145/commits","review_comments_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/145/comments","review_comment_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/issues/145/comments","statuses_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/statuses/8d5cb005c43f2e24269775958b70ac1ff723ac1c","head":{"label":"dice-cyfronet:only_prod_appliances_for_at_pmt_change","ref":"only_prod_appliances_for_at_pmt_change","sha":"8d5cb005c43f2e24269775958b70ac1ff723ac1c","user":{"login":"dice-cyfronet","id":1628782,"avatar_url":"https://avatars.githubusercontent.com/u/1628782?v=3","gravatar_id":"","url":"https://api.github.com/users/dice-cyfronet","html_url":"https://github.com/dice-cyfronet","followers_url":"https://api.github.com/users/dice-cyfronet/followers","following_url":"https://api.github.com/users/dice-cyfronet/following{/other_user}","gists_url":"https://api.github.com/users/dice-cyfronet/gists{/gist_id}","starred_url":"https://api.github.com/users/dice-cyfronet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dice-cyfronet/subscriptions","organizations_url":"https://api.github.com/users/dice-cyfronet/orgs","repos_url":"https://api.github.com/users/dice-cyfronet/repos","events_url":"https://api.github.com/users/dice-cyfronet/events{/privacy}","received_events_url":"https://api.github.com/users/dice-cyfronet/received_events","type":"Organization","site_admin":false},"repo":{"id":25483417,"name":"atmosphere","full_name":"dice-cyfronet/atmosphere","owner":{"login":"dice-cyfronet","id":1628782,"avatar_url":"https://avatars.githubusercontent.com/u/1628782?v=3","gravatar_id":"","url":"https://api.github.com/users/dice-cyfronet","html_url":"https://github.com/dice-cyfronet","followers_url":"https://api.github.com/users/dice-cyfronet/followers","following_url":"https://api.github.com/users/dice-cyfronet/following{/other_user}","gists_url":"https://api.github.com/users/dice-cyfronet/gists{/gist_id}","starred_url":"https://api.github.com/users/dice-cyfronet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dice-cyfronet/subscriptions","organizations_url":"https://api.github.com/users/dice-cyfronet/orgs","repos_url":"https://api.github.com/users/dice-cyfronet/repos","events_url":"https://api.github.com/users/dice-cyfronet/events{/privacy}","received_events_url":"https://api.github.com/users/dice-cyfronet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dice-cyfronet/atmosphere","description":"Atmosphere cloud platform","fork":false,"url":"https://api.github.com/repos/dice-cyfronet/atmosphere","forks_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/forks","keys_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/teams","hooks_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/hooks","issue_events_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/issues/events{/number}","events_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/events","assignees_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/assignees{/user}","branches_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/branches{/branch}","tags_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/tags","blobs_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/statuses/{sha}","languages_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/languages","stargazers_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/stargazers","contributors_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/contributors","subscribers_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/subscribers","subscription_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/subscription","commits_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/contents/{+path}","compare_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/merges","archive_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/downloads","issues_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/issues{/number}","pulls_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls{/number}","milestones_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/milestones{/number}","notifications_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/labels{/name}","releases_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/releases{/id}","created_at":"2014-10-20T19:40:11Z","updated_at":"2015-04-15T11:58:15Z","pushed_at":"2015-04-15T16:22:05Z","git_url":"git://github.com/dice-cyfronet/atmosphere.git","ssh_url":"git@github.com:dice-cyfronet/atmosphere.git","clone_url":"https://github.com/dice-cyfronet/atmosphere.git","svn_url":"https://github.com/dice-cyfronet/atmosphere","homepage":null,"size":6528,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":33,"forks":0,"open_issues":33,"watchers":2,"default_branch":"master"}},"base":{"label":"dice-cyfronet:master","ref":"master","sha":"a58607705d5d7b06ce54221e80b45cebf0d297e4","user":{"login":"dice-cyfronet","id":1628782,"avatar_url":"https://avatars.githubusercontent.com/u/1628782?v=3","gravatar_id":"","url":"https://api.github.com/users/dice-cyfronet","html_url":"https://github.com/dice-cyfronet","followers_url":"https://api.github.com/users/dice-cyfronet/followers","following_url":"https://api.github.com/users/dice-cyfronet/following{/other_user}","gists_url":"https://api.github.com/users/dice-cyfronet/gists{/gist_id}","starred_url":"https://api.github.com/users/dice-cyfronet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dice-cyfronet/subscriptions","organizations_url":"https://api.github.com/users/dice-cyfronet/orgs","repos_url":"https://api.github.com/users/dice-cyfronet/repos","events_url":"https://api.github.com/users/dice-cyfronet/events{/privacy}","received_events_url":"https://api.github.com/users/dice-cyfronet/received_events","type":"Organization","site_admin":false},"repo":{"id":25483417,"name":"atmosphere","full_name":"dice-cyfronet/atmosphere","owner":{"login":"dice-cyfronet","id":1628782,"avatar_url":"https://avatars.githubusercontent.com/u/1628782?v=3","gravatar_id":"","url":"https://api.github.com/users/dice-cyfronet","html_url":"https://github.com/dice-cyfronet","followers_url":"https://api.github.com/users/dice-cyfronet/followers","following_url":"https://api.github.com/users/dice-cyfronet/following{/other_user}","gists_url":"https://api.github.com/users/dice-cyfronet/gists{/gist_id}","starred_url":"https://api.github.com/users/dice-cyfronet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dice-cyfronet/subscriptions","organizations_url":"https://api.github.com/users/dice-cyfronet/orgs","repos_url":"https://api.github.com/users/dice-cyfronet/repos","events_url":"https://api.github.com/users/dice-cyfronet/events{/privacy}","received_events_url":"https://api.github.com/users/dice-cyfronet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dice-cyfronet/atmosphere","description":"Atmosphere cloud platform","fork":false,"url":"https://api.github.com/repos/dice-cyfronet/atmosphere","forks_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/forks","keys_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/teams","hooks_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/hooks","issue_events_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/issues/events{/number}","events_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/events","assignees_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/assignees{/user}","branches_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/branches{/branch}","tags_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/tags","blobs_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/statuses/{sha}","languages_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/languages","stargazers_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/stargazers","contributors_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/contributors","subscribers_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/subscribers","subscription_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/subscription","commits_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/contents/{+path}","compare_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/merges","archive_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/downloads","issues_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/issues{/number}","pulls_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls{/number}","milestones_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/milestones{/number}","notifications_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/labels{/name}","releases_url":"https://api.github.com/repos/dice-cyfronet/atmosphere/releases{/id}","created_at":"2014-10-20T19:40:11Z","updated_at":"2015-04-15T11:58:15Z","pushed_at":"2015-04-15T16:22:05Z","git_url":"git://github.com/dice-cyfronet/atmosphere.git","ssh_url":"git@github.com:dice-cyfronet/atmosphere.git","clone_url":"https://github.com/dice-cyfronet/atmosphere.git","svn_url":"https://github.com/dice-cyfronet/atmosphere","homepage":null,"size":6528,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":33,"forks":0,"open_issues":33,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/145"},"html":{"href":"https://github.com/dice-cyfronet/atmosphere/pull/145"},"issue":{"href":"https://api.github.com/repos/dice-cyfronet/atmosphere/issues/145"},"comments":{"href":"https://api.github.com/repos/dice-cyfronet/atmosphere/issues/145/comments"},"review_comments":{"href":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/145/comments"},"review_comment":{"href":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dice-cyfronet/atmosphere/pulls/145/commits"},"statuses":{"href":"https://api.github.com/repos/dice-cyfronet/atmosphere/statuses/8d5cb005c43f2e24269775958b70ac1ff723ac1c"}}}}