<commit_before>angular.module('ippon').controller('ClubsController',[
  '$scope',
  '$stateParams',
  '$location',
  '$resource',
  '$state',
  'Auth',
function($scope, $stateParams, $location, $resource, $state, Auth){
  var controllerRoot = "/clubs/";
  var club = $resource(controllerRoot + ':clubId',
    {
      clubId: "@id",
      format: "json"
    }, {
      'save' : {
        method: 'PUT'
      },
      'create': {
        method: 'POST'
      }
    });
  var admins = $resource(controllerRoot + ':clubId' + '/admins/' + ':adminId',
    {
      clubId: "@clubId",
      format: "json"
    },{
      'query_admins' : {
        method: 'GET',
        isArray: false
      },
      'create' : {
        method: 'POST',
        params: {
          clubId: "@clubId",
          adminId: "@adminId"
        }
      },
      'delete' : {
        method: 'DELETE',
        params: {
          clubId: "@clubId",
          adminId: "@adminId"
        }
      }
    });



  if($state.is('clubs_show') || $state.is('clubs_edit')) {
    if(!$stateParams.clubId) {
      $state.go('clubs');
    } else {
      club.get({
        clubId: $stateParams.clubId
      }, function(club) {
        $scope.club = club;
        if ($state.is('clubs_show')) {
          admins.query_admins({clubId: $stateParams.clubId},
            function(results) {
              $scope.admins = results.admins;
              $scope.users = results.users;
            }
          );
        }
      }, function(httpResponse) {
        $scope.club = null;
        //flash.error = 'There is no club with Id + $routeParams.clubId'
      });

    }
  } else {<commit_msg>Pass ClubsController.show and .delete spec with players<commit_after>angular.module('ippon').controller('ClubsController',[
  '$scope',
  '$stateParams',
  '$location',
  '$resource',
  '$state',
  'Auth',
function($scope, $stateParams, $location, $resource, $state, Auth){
  var controllerRoot = "/clubs/";
  var club = $resource(controllerRoot + ':clubId',
    {
      clubId: "@id",
      format: "json"
    }, {
      'save' : {
        method: 'PUT'
      },
      'create': {
        method: 'POST'
      }
    });
  var admins = $resource(controllerRoot + ':clubId' + '/admins/' + ':adminId',
    {
      clubId: "@clubId",
      format: "json"
    },{
      'query_admins' : {
        method: 'GET',
        isArray: false
      },
      'create' : {
        method: 'POST',
        params: {
          clubId: "@clubId",
          adminId: "@adminId"
        }
      },
      'delete' : {
        method: 'DELETE',
        params: {
          clubId: "@clubId",
          adminId: "@adminId"
        }
      }
    });

  var player = $resource(controllerRoot + ":clubId" + "/players/" + ":playerId",
    {
      clubId: "@Id",
      format: "json"
    });

  if($state.is('clubs_show') || $state.is('clubs_edit')) {
    if(!$stateParams.clubId) {
      $state.go('clubs');
    } else {
      club.get({
        clubId: $stateParams.clubId
      }, function(club) {
        $scope.club = club;
        if ($state.is('clubs_show')) {
          player.query({clubId: $stateParams.clubId},
          function(results) {
            $scope.players = results;
          });
          admins.query_admins({clubId: $stateParams.clubId},
            function(results) {
              $scope.admins = results.admins;
              $scope.users = results.users;
            }
          );
        }
      }, function(httpResponse) {
        $scope.club = null;
        //flash.error = 'There is no club with Id + $routeParams.clubId'
      });

    }
  } else {
{'fraction_non_alphanumeric': 0.17286348501664817, 'fraction_numerical': 0.0, 'mean_word_length': 1.8186082877247849, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1081854', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1157, 'n_words': 207}