{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/comments/38516114","id":38516114,"diff_hunk":"@@ -1,244 +1,274 @@\n-require 'test_helper'\n-\n-class Api::V2::ComputeResourcesControllerTest < ActionController::TestCase\n-  def setup\n-    Fog.mock!\n-  end\n-\n-  def teardown\n-    Fog.unmock!\n-  end\n-\n-  valid_attrs = { :name => 'special_compute', :provider => 'EC2', :region => 'eu-west-1', :user => 'user@example.com', :password => 'secret' }\n-\n-  test \"should get index\" do\n-    get :index, { }\n-    assert_response :success\n-    assert_not_nil assigns(:compute_resources)\n-    compute_resources = ActiveSupport::JSON.decode(@response.body)\n-    assert !compute_resources.empty?\n-  end\n-\n-  test \"should show compute_resource\" do\n-    get :show, { :id => compute_resources(:one).to_param }\n-    assert_response :success\n-    show_response = ActiveSupport::JSON.decode(@response.body)\n-    assert !show_response.empty?\n-  end\n-\n-  test \"should create valid compute resource\" do\n-    post :create, { :compute_resource => valid_attrs }\n-    assert_response :created\n-    show_response = ActiveSupport::JSON.decode(@response.body)\n-    assert !show_response.empty?\n-  end\n-\n-  test \"should update compute resource\" do\n-    put :update, { :id => compute_resources(:mycompute).to_param, :compute_resource => { :description => \"new_description\" } }\n-    assert_equal \"new_description\", ComputeResource.find_by_name('mycompute').description\n-    assert_response :success\n-  end\n-\n-  test \"should destroy compute resource\" do\n-    assert_difference('ComputeResource.count', -1) do\n-      delete :destroy, { :id => compute_resources(:yourcompute).id }\n-    end\n-    assert_response :success\n-  end\n-\n-  test \"should get index of owned\" do\n-    setup_user 'view', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\n-    get :index, {}\n-    assert_response :success\n-    assert_not_nil assigns(:compute_resources)\n-    compute_resources = ActiveSupport::JSON.decode(@response.body)\n-    ids               = compute_resources['results'].map { |hash| hash['id'] }\n-    assert_includes ids, compute_resources(:mycompute).id\n-    refute_includes ids, compute_resources(:yourcompute).id\n-  end\n-\n-  test \"should allow access to a compute resource for owner\" do\n-    setup_user 'view', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\n-    get :show, { :id => compute_resources(:mycompute).to_param }\n-    assert_response :success\n-  end\n-\n-  test \"should update compute resource for owner\" do\n-    setup_user 'edit', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\n-    put :update, { :id => compute_resources(:mycompute).to_param, :compute_resource => { :description => \"new_description\" } }\n-    assert_equal \"new_description\", ComputeResource.find_by_name('mycompute').description\n-    assert_response :success\n-  end\n-\n-  test \"should destroy compute resource for owner\" do\n-    assert_difference('ComputeResource.count', -1) do\n-      setup_user 'destroy', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\n-      delete :destroy, { :id => compute_resources(:mycompute).id }\n-    end\n-    assert_response :success\n-  end\n-\n-  test \"should not allow access to a compute resource out of users compute resources scope\" do\n-    setup_user 'view', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\n-    get :show, { :id => compute_resources(:one).to_param }\n-    assert_response :not_found\n-  end\n-\n-  test \"should not update compute resource for restricted\" do\n-    setup_user 'edit', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\n-    put :update, { :id => compute_resources(:yourcompute).to_param, :compute_resource => { :description => \"new_description\" } }\n-    assert_response :not_found\n-  end\n-\n-  test \"should not destroy compute resource for restricted\" do\n-    setup_user 'destroy', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\n-    delete :destroy, { :id => compute_resources(:yourcompute).id }\n-    assert_response :not_found\n-  end\n-\n-  test \"should get available images\" do\n-    img = Object.new\n-    img.stubs(:name).returns('some_image')\n-    img.stubs(:id).returns('123')\n-\n-    Foreman::Model::EC2.any_instance.stubs(:available_images).returns([img])\n-\n-    get :available_images, { :id => compute_resources(:ec2).to_param }\n-    assert_response :success\n-    available_images = ActiveSupport::JSON.decode(@response.body)\n-    assert_not_empty available_images\n-  end\n-\n-  test \"should get available networks\" do\n-    network = Object.new\n-    network.stubs(:name).returns('test_network')\n-    network.stubs(:id).returns('my11-test35-uuid99')\n-\n-    Foreman::Model::Ovirt.any_instance.stubs(:available_networks).returns([network])\n-\n-    get :available_networks, { :id => compute_resources(:ovirt).to_param, :cluster_id => '123-456-789' }\n-    assert_response :success\n-    available_networks = ActiveSupport::JSON.decode(@response.body)\n-    assert !available_networks.empty?\n-  end\n-\n-  test \"should get available clusters\" do\n-    cluster = Object.new\n-    cluster.stubs(:name).returns('test_cluster')\n-    cluster.stubs(:id).returns('my11-test35-uuid99')\n-\n-    Foreman::Model::Ovirt.any_instance.stubs(:available_clusters).returns([cluster])\n-\n-    get :available_clusters, { :id => compute_resources(:ovirt).to_param }\n-    assert_response :success\n-    available_clusters = ActiveSupport::JSON.decode(@response.body)\n-    assert !available_clusters.empty?\n-  end\n-\n-  test \"should get available storage domains\" do\n-    storage_domain = Object.new\n-    storage_domain.stubs(:name).returns('test_cluster')\n-    storage_domain.stubs(:id).returns('my11-test35-uuid99')\n-\n-    Foreman::Model::Ovirt.any_instance.stubs(:available_storage_domains).returns([storage_domain])\n-\n-    get :available_storage_domains, { :id => compute_resources(:ovirt).to_param }\n-    assert_response :success\n-    available_storage_domains = ActiveSupport::JSON.decode(@response.body)\n-    assert !available_storage_domains.empty?\n-  end\n-\n-  context 'vmware' do\n-    setup do\n-      @vmware_object = Object.new\n-      @vmware_object.stubs(:name).returns('test_vmware_object')\n-      @vmware_object.stubs(:id).returns('my11-test35-uuid99')\n-    end\n-\n-    teardown do\n-      assert_response :success\n-      available_objects = ActiveSupport::JSON.decode(@response.body)\n-      assert_not_empty available_objects\n-    end\n-\n-    test \"should get available vmware networks\" do\n-      Foreman::Model::Vmware.any_instance.stubs(:available_networks).returns([@vmware_object])\n-      get :available_networks, { :id => compute_resources(:vmware).to_param, :cluster_id => '123-456-789' }\n-    end\n-\n-    test \"should get available vmware clusters\" do\n-      Foreman::Model::Vmware.any_instance.stubs(:available_clusters).returns([@vmware_object])\n-      get :available_clusters, { :id => compute_resources(:vmware).to_param }\n-    end\n-\n-    test \"should get available vmware storage domains\" do\n-      Foreman::Model::Vmware.any_instance.stubs(:available_storage_domains).returns([@vmware_object])\n-      get :available_storage_domains, { :id => compute_resources(:vmware).to_param }\n-    end\n-\n-    test \"should get available vmware resource pools\" do\n-      Foreman::Model::Vmware.any_instance.stubs(:available_resource_pools).returns([@vmware_object])\n-      get :available_resource_pools, { :id => compute_resources(:vmware).to_param, :cluster_id => '123-456-789' }\n-    end\n-\n-    test \"should get available vmware folders\" do\n-      Foreman::Model::Vmware.any_instance.stubs(:available_folders).returns([@vmware_object])\n-      get :available_folders, { :id => compute_resources(:vmware).to_param, :cluster_id => '123-456-789' }\n-    end\n-  end\n-\n-  test \"should get specific vmware storage domain\" do\n-    storage_domain = Object.new\n-    storage_domain.stubs(:name).returns('test_vmware_cluster')\n-    storage_domain.stubs(:id).returns('my11-test35-uuid99')\n-\n-    Foreman::Model::Vmware.any_instance.expects(:available_storage_domains).with('test_vmware_cluster').returns([storage_domain])\n-\n-    get :available_storage_domains, { :id => compute_resources(:vmware).to_param, :storage_domain => 'test_vmware_cluster' }\n-    assert_response :success\n-    available_storage_domains = ActiveSupport::JSON.decode(@response.body)\n-    assert_equal storage_domain.id, available_storage_domains['results'].first.try(:[], 'id')\n-  end\n-\n-  test \"should associate hosts that match\" do\n-    host_cr = FactoryGirl.create(:host, :on_compute_resource)\n-    host_bm = FactoryGirl.create(:host)\n-\n-    uuid = Foreman.uuid\n-    vm2 = mock('vm2')\n-    vm2.expects(:identity).at_least_once.returns(uuid)\n-    vms = [mock('vm1', :identity => host_cr.uuid), vm2]\n-    ComputeResource.any_instance.expects(:vms).returns(vms)\n-\n-    Foreman::Model::EC2.any_instance.expects(:associated_host).returns(host_bm)\n-    put :associate, { :id => host_cr.compute_resource.to_param }\n-    assert_response :success\n-\n-    hosts = ActiveSupport::JSON.decode(@response.body)\n-    assert_equal [host_bm.id], hosts['results'].map { |h| h['id'] }\n-    assert_equal uuid, host_bm.reload.uuid\n-    assert_equal host_cr.compute_resource.id, host_bm.compute_resource_id\n-    assert host_bm.compute?\n-  end\n-\n-  test \"should update boolean attribute set_console_password for Libvirt compute resource\" do\n-    cr = compute_resources(:one)\n-    put :update, { :id => cr.id, :compute_resource => { :set_console_password => true } }\n-    cr.reload\n-    assert_equal 1, cr.attrs[:setpw]\n-  end\n-\n-  test \"should update boolean attribute set_console_password for VMware compute resource\" do\n-    cr = compute_resources(:vmware)\n-    put :update, { :id => cr.id, :compute_resource => { :set_console_password => true } }\n-    cr.reload\n-    assert_equal 1, cr.attrs[:setpw]\n-  end\n-\n-  test \"should not update set_console_password to true for non-VMware or non-Libvirt compute resource\" do\n-    cr = compute_resources(:openstack)\n-    put :update, { :id => cr.id, :compute_resource => { :set_console_password => true } }\n-    cr.reload\n-    assert_nil cr.attrs[:setpw]\n-  end\n-end\n+require 'test_helper'\r\n+\r\n+class Api::V2::ComputeResourcesControllerTest < ActionController::TestCase\r\n+  def setup\r\n+    Fog.mock!\r\n+  end\r\n+\r\n+  def teardown\r\n+    Fog.unmock!\r\n+  end\r\n+\r\n+  valid_attrs = { :name => 'special_compute', :provider => 'EC2', :region => 'eu-west-1', :user => 'user@example.com', :password => 'secret' }\r\n+\r\n+  test \"should get index\" do\r\n+    get :index, { }\r\n+    assert_response :success\r\n+    assert_not_nil assigns(:compute_resources)\r\n+    compute_resources = ActiveSupport::JSON.decode(@response.body)\r\n+    assert !compute_resources.empty?\r\n+  end\r\n+\r\n+  test \"should show compute_resource\" do\r\n+    get :show, { :id => compute_resources(:one).to_param }\r\n+    assert_response :success\r\n+    show_response = ActiveSupport::JSON.decode(@response.body)\r\n+    assert !show_response.empty?\r\n+  end\r\n+\r\n+  test \"should create valid compute resource\" do\r\n+    post :create, { :compute_resource => valid_attrs }\r\n+    assert_response :created\r\n+    show_response = ActiveSupport::JSON.decode(@response.body)\r\n+    assert !show_response.empty?\r\n+  end\r\n+\r\n+  test \"should update compute resource\" do\r\n+    put :update, { :id => compute_resources(:mycompute).to_param, :compute_resource => { :description => \"new_description\" } }\r\n+    assert_equal \"new_description\", ComputeResource.find_by_name('mycompute').description\r\n+    assert_response :success\r\n+  end\r\n+\r\n+  test \"should destroy compute resource\" do\r\n+    assert_difference('ComputeResource.count', -1) do\r\n+      delete :destroy, { :id => compute_resources(:yourcompute).id }\r\n+    end\r\n+    assert_response :success\r\n+  end\r\n+\r\n+  test \"should get index of owned\" do\r\n+    setup_user 'view', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\r\n+    get :index, {}\r\n+    assert_response :success\r\n+    assert_not_nil assigns(:compute_resources)\r\n+    compute_resources = ActiveSupport::JSON.decode(@response.body)\r\n+    ids               = compute_resources['results'].map { |hash| hash['id'] }\r\n+    assert_includes ids, compute_resources(:mycompute).id\r\n+    refute_includes ids, compute_resources(:yourcompute).id\r\n+  end\r\n+\r\n+  test \"should allow access to a compute resource for owner\" do\r\n+    setup_user 'view', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\r\n+    get :show, { :id => compute_resources(:mycompute).to_param }\r\n+    assert_response :success\r\n+  end\r\n+\r\n+  test \"should update compute resource for owner\" do\r\n+    setup_user 'edit', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\r\n+    put :update, { :id => compute_resources(:mycompute).to_param, :compute_resource => { :description => \"new_description\" } }\r\n+    assert_equal \"new_description\", ComputeResource.find_by_name('mycompute').description\r\n+    assert_response :success\r\n+  end\r\n+\r\n+  test \"should destroy compute resource for owner\" do\r\n+    assert_difference('ComputeResource.count', -1) do\r\n+      setup_user 'destroy', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\r\n+      delete :destroy, { :id => compute_resources(:mycompute).id }\r\n+    end\r\n+    assert_response :success\r\n+  end\r\n+\r\n+  test \"should not allow access to a compute resource out of users compute resources scope\" do\r\n+    setup_user 'view', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\r\n+    get :show, { :id => compute_resources(:one).to_param }\r\n+    assert_response :not_found\r\n+  end\r\n+\r\n+  test \"should not update compute resource for restricted\" do\r\n+    setup_user 'edit', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\r\n+    put :update, { :id => compute_resources(:yourcompute).to_param, :compute_resource => { :description => \"new_description\" } }\r\n+    assert_response :not_found\r\n+  end\r\n+\r\n+  test \"should not destroy compute resource for restricted\" do\r\n+    setup_user 'destroy', 'compute_resources', \"id = #{compute_resources(:mycompute).id}\"\r\n+    delete :destroy, { :id => compute_resources(:yourcompute).id }\r\n+    assert_response :not_found\r\n+  end\r\n+\r\n+  test \"should get available images\" do\r\n+    img = Object.new\r\n+    img.stubs(:name).returns('some_image')\r\n+    img.stubs(:id).returns('123')\r\n+\r\n+    Foreman::Model::EC2.any_instance.stubs(:available_images).returns([img])\r\n+\r\n+    get :available_images, { :id => compute_resources(:ec2).to_param }\r\n+    assert_response :success\r\n+    available_images = ActiveSupport::JSON.decode(@response.body)\r\n+    assert_not_empty available_images\r\n+  end\r\n+\r\n+  test \"should get available networks\" do\r\n+    network = Object.new\r\n+    network.stubs(:name).returns('test_network')\r\n+    network.stubs(:id).returns('my11-test35-uuid99')\r\n+\r\n+    Foreman::Model::Ovirt.any_instance.stubs(:available_networks).returns([network])\r\n+\r\n+    get :available_networks, { :id => compute_resources(:ovirt).to_param, :cluster_id => '123-456-789' }\r\n+    assert_response :success\r\n+    available_networks = ActiveSupport::JSON.decode(@response.body)\r\n+    assert !available_networks.empty?\r\n+  end\r\n+\r\n+  test \"should get available clusters\" do\r\n+    cluster = Object.new\r\n+    cluster.stubs(:name).returns('test_cluster')\r\n+    cluster.stubs(:id).returns('my11-test35-uuid99')\r\n+\r\n+    Foreman::Model::Ovirt.any_instance.stubs(:available_clusters).returns([cluster])\r\n+\r\n+    get :available_clusters, { :id => compute_resources(:ovirt).to_param }\r\n+    assert_response :success\r\n+    available_clusters = ActiveSupport::JSON.decode(@response.body)\r\n+    assert !available_clusters.empty?\r\n+  end\r\n+\r\n+  test \"should get available storage domains\" do\r\n+    storage_domain = Object.new\r\n+    storage_domain.stubs(:name).returns('test_cluster')\r\n+    storage_domain.stubs(:id).returns('my11-test35-uuid99')\r\n+\r\n+    Foreman::Model::Ovirt.any_instance.stubs(:available_storage_domains).returns([storage_domain])\r\n+\r\n+    get :available_storage_domains, { :id => compute_resources(:ovirt).to_param }\r\n+    assert_response :success\r\n+    available_storage_domains = ActiveSupport::JSON.decode(@response.body)\r\n+    assert !available_storage_domains.empty?\r\n+  end\r\n+\r\n+  context 'ec2' do \r\n+    setup do\r\n+      @ec2_object = Object.new\r\n+      @ec2_object.stubs(:name).returns('test_ec2_object')\r\n+    end    \r\n+\r\n+    teardown do\r\n+      assert_response :success\r\n+      available_objects = ActiveSupport::JSON.decode(@response.body)\r\n+      assert_not_empty available_objects\r\n+    end\r\n+\r\n+    test \"should get available flavors\" do\r\n+      @ec2_object.stubs(:id).returns('123')\r\n+      Foreman::Model::EC2.any_instance.stubs(:available_flavors).returns([@ec2_object])\r","path":"test/functional/api/v2/compute_resources_controller_test.rb","position":409,"original_position":409,"commit_id":"fe22540737e9f9267cdbe5cf06099c3acd29054d","original_commit_id":"fe22540737e9f9267cdbe5cf06099c3acd29054d","user":{"login":"eLobato","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/eLobato","html_url":"https://github.com/eLobato","followers_url":"https://api.github.com/users/eLobato/followers","following_url":"https://api.github.com/users/eLobato/following{/other_user}","gists_url":"https://api.github.com/users/eLobato/gists{/gist_id}","starred_url":"https://api.github.com/users/eLobato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eLobato/subscriptions","organizations_url":"https://api.github.com/users/eLobato/orgs","repos_url":"https://api.github.com/users/eLobato/repos","events_url":"https://api.github.com/users/eLobato/events{/privacy}","received_events_url":"https://api.github.com/users/eLobato/received_events","type":"User","site_admin":false},"body":"This is still using stubs, you can freely call these methods now that Fog.mock! is set. It'd return an actual mocked fog response. Same goes for the rest of the stubbing done here. \r\n\r\nAlso what I meant by a helper method was not just to use setup & teardown blocks, but making something like\r\n\r\n```ruby\r\ndef get_available(method, compute_resource_type)\r\n  get method, :id => compute_resources(compute_resource_type).to_param \r\n  assert_response :success\r\n  assert_not_empty ActiveSupport::JSON.decode(@response.body)\r\nend\r\n```\r\n\r\nThen defining your tests in terms of that so it'd be like:\r\n\r\n```ruby\r\ncontext 'ec2' do \r\n  get_available(:available_flavors, :ec2)\r\n  get_available(:available_security_groups, :ec2)\r\n  get_available(:available_zones, :ec2)\r\nend\r\n\r\ncontext 'vmware' do \r\n  get_available(:available_clusters, :vmware)\r\n  get_available(:available_storage_domains, :vmware)\r\n  get_available(:available_resource_pools, :vmware)\r\n  get_available(:available_folders, :vmware)\r\nend\r\n```\r\n\r\nFeel free to leave out the refactor of the other Compute Resource tests if you want.","created_at":"2015-09-02T10:05:02Z","updated_at":"2015-09-02T10:05:02Z","html_url":"https://github.com/theforeman/foreman/pull/2657#discussion_r38516114","pull_request_url":"https://api.github.com/repos/theforeman/foreman/pulls/2657","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments/38516114"},"html":{"href":"https://github.com/theforeman/foreman/pull/2657#discussion_r38516114"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2657"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/2657","id":43857860,"html_url":"https://github.com/theforeman/foreman/pull/2657","diff_url":"https://github.com/theforeman/foreman/pull/2657.diff","patch_url":"https://github.com/theforeman/foreman/pull/2657.patch","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/2657","number":2657,"state":"open","locked":false,"title":"Fixes #3650, 11600 - Compute Resource availability_zones, flavors, security_groups API v2 endpoints ","user":{"login":"kairel","id":1394395,"avatar_url":"https://avatars.githubusercontent.com/u/1394395?v=3","gravatar_id":"","url":"https://api.github.com/users/kairel","html_url":"https://github.com/kairel","followers_url":"https://api.github.com/users/kairel/followers","following_url":"https://api.github.com/users/kairel/following{/other_user}","gists_url":"https://api.github.com/users/kairel/gists{/gist_id}","starred_url":"https://api.github.com/users/kairel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kairel/subscriptions","organizations_url":"https://api.github.com/users/kairel/orgs","repos_url":"https://api.github.com/users/kairel/repos","events_url":"https://api.github.com/users/kairel/events{/privacy}","received_events_url":"https://api.github.com/users/kairel/received_events","type":"User","site_admin":false},"body":"ref #3650 and ref#11600","created_at":"2015-09-01T10:04:17Z","updated_at":"2015-09-02T10:05:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9fc8efad5617cb7667902fff6dd03d522e7a7332","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman/pulls/2657/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman/pulls/2657/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/2657/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/fe22540737e9f9267cdbe5cf06099c3acd29054d","head":{"label":"kairel:3650-add_values_compute_resources","ref":"3650-add_values_compute_resources","sha":"fe22540737e9f9267cdbe5cf06099c3acd29054d","user":{"login":"kairel","id":1394395,"avatar_url":"https://avatars.githubusercontent.com/u/1394395?v=3","gravatar_id":"","url":"https://api.github.com/users/kairel","html_url":"https://github.com/kairel","followers_url":"https://api.github.com/users/kairel/followers","following_url":"https://api.github.com/users/kairel/following{/other_user}","gists_url":"https://api.github.com/users/kairel/gists{/gist_id}","starred_url":"https://api.github.com/users/kairel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kairel/subscriptions","organizations_url":"https://api.github.com/users/kairel/orgs","repos_url":"https://api.github.com/users/kairel/repos","events_url":"https://api.github.com/users/kairel/events{/privacy}","received_events_url":"https://api.github.com/users/kairel/received_events","type":"User","site_admin":false},"repo":{"id":41554011,"name":"foreman","full_name":"kairel/foreman","owner":{"login":"kairel","id":1394395,"avatar_url":"https://avatars.githubusercontent.com/u/1394395?v=3","gravatar_id":"","url":"https://api.github.com/users/kairel","html_url":"https://github.com/kairel","followers_url":"https://api.github.com/users/kairel/followers","following_url":"https://api.github.com/users/kairel/following{/other_user}","gists_url":"https://api.github.com/users/kairel/gists{/gist_id}","starred_url":"https://api.github.com/users/kairel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kairel/subscriptions","organizations_url":"https://api.github.com/users/kairel/orgs","repos_url":"https://api.github.com/users/kairel/repos","events_url":"https://api.github.com/users/kairel/events{/privacy}","received_events_url":"https://api.github.com/users/kairel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kairel/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/kairel/foreman","forks_url":"https://api.github.com/repos/kairel/foreman/forks","keys_url":"https://api.github.com/repos/kairel/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kairel/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kairel/foreman/teams","hooks_url":"https://api.github.com/repos/kairel/foreman/hooks","issue_events_url":"https://api.github.com/repos/kairel/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/kairel/foreman/events","assignees_url":"https://api.github.com/repos/kairel/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/kairel/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/kairel/foreman/tags","blobs_url":"https://api.github.com/repos/kairel/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kairel/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kairel/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/kairel/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kairel/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/kairel/foreman/languages","stargazers_url":"https://api.github.com/repos/kairel/foreman/stargazers","contributors_url":"https://api.github.com/repos/kairel/foreman/contributors","subscribers_url":"https://api.github.com/repos/kairel/foreman/subscribers","subscription_url":"https://api.github.com/repos/kairel/foreman/subscription","commits_url":"https://api.github.com/repos/kairel/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/kairel/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/kairel/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/kairel/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/kairel/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/kairel/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kairel/foreman/merges","archive_url":"https://api.github.com/repos/kairel/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kairel/foreman/downloads","issues_url":"https://api.github.com/repos/kairel/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/kairel/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/kairel/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/kairel/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kairel/foreman/labels{/name}","releases_url":"https://api.github.com/repos/kairel/foreman/releases{/id}","created_at":"2015-08-28T15:14:59Z","updated_at":"2015-08-28T15:15:03Z","pushed_at":"2015-09-01T13:17:06Z","git_url":"git://github.com/kairel/foreman.git","ssh_url":"git@github.com:kairel/foreman.git","clone_url":"https://github.com/kairel/foreman.git","svn_url":"https://github.com/kairel/foreman","homepage":"http://theforeman.org","size":36015,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"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":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"1e7822a586b6e4f288823df0b9419ef2749d6b8c","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":258750,"name":"foreman","full_name":"theforeman/foreman","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/foreman","description":"an application that automates the lifecycle of servers ","fork":false,"url":"https://api.github.com/repos/theforeman/foreman","forks_url":"https://api.github.com/repos/theforeman/foreman/forks","keys_url":"https://api.github.com/repos/theforeman/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman/events","assignees_url":"https://api.github.com/repos/theforeman/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman/merges","archive_url":"https://api.github.com/repos/theforeman/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman/releases{/id}","created_at":"2009-07-23T15:07:00Z","updated_at":"2015-09-01T13:43:27Z","pushed_at":"2015-09-02T09:59:57Z","git_url":"git://github.com/theforeman/foreman.git","ssh_url":"git@github.com:theforeman/foreman.git","clone_url":"https://github.com/theforeman/foreman.git","svn_url":"https://github.com/theforeman/foreman","homepage":"http://theforeman.org","size":86351,"stargazers_count":837,"watchers_count":837,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":426,"mirror_url":null,"open_issues_count":82,"forks":426,"open_issues":82,"watchers":837,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2657"},"html":{"href":"https://github.com/theforeman/foreman/pull/2657"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2657"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2657/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2657/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2657/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman/statuses/fe22540737e9f9267cdbe5cf06099c3acd29054d"}}}}