GitHub PullRequestReviewCommentEvent at 2014-10-07 16:17:47
Repository: Markus
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments/18530436","id":18530436,"diff_hunk":"@@ -0,0 +1,828 @@\n+require File.expand_path(File.join(File.dirname(__FILE__),\n+                                   '..', 'git_repository'))\n+require 'test/unit' # load Test::Unit\n+require 'rubygems'\n+require 'fileutils'\n+require 'shoulda'   # load Thoughtbot Shoulda (used as testing framework)\n+require 'time'\n+require 'rugged'\n+\n+# bring Repository::GitRepository into current namespace\n+include Repository\n+\n+# Test suite for testing proper functioning of\n+# GitRepository, an implementation of AbstractRepository\n+class GitRepositoryTest < Test::Unit::TestCase\n+\n+  # NOTE: PATHS PROVIDED MUST BE \"/\" TERMINATED\n+  # AS COMPARED TO SUBVERSION REPOSITORIES\n+  GIT_TEST_REPOS_DIR = File.expand_path(File.join(File.dirname(__FILE__),\"/git_repos\"))\n+  TEST_REPO = GIT_TEST_REPOS_DIR + \"/repo1/\"\n+  TEST_EXPORT_REPO = GIT_TEST_REPOS_DIR + \"/exported_repo1\"\n+  TEST_EXPORT_REPO_2 = GIT_TEST_REPOS_DIR + \"/exported_repo2\"\n+  RESOURCE_DIR = File.expand_path(File.join(File.dirname(__FILE__),\"/input_files\"))\n+  TEST_USER = \"testuser\"\n+\n+  context \"GitRepository class\" do\n+\n+    teardown do\n+      FileUtils.remove_dir(TEST_REPO, true)\n+    end\n+\n+    should \"be able to create a new Git repository\" do\n+      GitRepository.create(TEST_REPO)\n+      assert_not_nil(Rugged::Repository.discover(TEST_REPO),\n+                     \"Unable to creat a Git repository\")\n+    end\n+\n+    should \"be able to open an existing Git repository\" do\n+      GitRepository.create(TEST_REPO)\n+      repo = GitRepository.open(TEST_REPO)\n+      assert_not_nil(repo, \"Cannot open git repository\")\n+      assert_instance_of(Repository::GitRepository,\n+                         repo,\n+                         \"Repository is of wrong type\")\n+      repo.close()\n+    end\n+\n+    should \"be able to access an existing Git repository\" do\n+      GitRepository.create(TEST_REPO)\n+      GitRepository.access(TEST_REPO) do |repo|\n+        assert_not_nil(repo, \"Cannot access git repository\")\n+        assert_instance_of(Repository::GitRepository,\n+                           repo,\n+                           \"Repository is of wrong type\")\n+      end\n+    end\n+\n+    should \"know if a Git repository exists at some place\" do\n+      GitRepository.create(TEST_REPO)\n+      assert_equal(GitRepository.repository_exists?(TEST_REPO),\n+                   true,\n+                   \"A Git repository should exist at: '\" + TEST_REPO + \"'\")\n+    end\n+\n+    should \"be able to delete a Git repository\" do\n+      GitRepository.create(TEST_REPO)\n+      GitRepository.delete(TEST_REPO)\n+      assert_equal(GitRepository.repository_exists?(TEST_REPO),\n+                   false,\n+                   'Did not properly delete the repository')\n+    end\n+  end\n+\n+  context \"A GitRepository instance\" do\n+\n+    # setup and teardown for the current context\n+\n+    # creates a new Git repository at TEST_REPO\n+    setup do\n+      #make sure there is not a leftover directory here from a previous run\n+      FileUtils.remove_dir(TEST_REPO, true)\n+      FileUtils.mkdir_p(TEST_EXPORT_REPO_2)\n+      # configure and create repositories\n+      conf_admin = Hash.new\n+      conf_admin[\"IS_REPOSITORY_ADMIN\"] = true\n+      conf_admin[\"REPOSITORY_PERMISSION_FILE\"] = GIT_TEST_REPOS_DIR + \"/git_auth/\"\n+\n+      # create repository first\n+      Repository.get_class(\"git\", conf_admin).create(TEST_REPO)\n+      # open the repository\n+      @repo = Repository.get_class(\"git\", conf_admin).open(TEST_REPO)\n+\n+    end\n+\n+    # removes the Git repository at TEST_REPO\n+    teardown do\n+      if !@repo.nil? and !@repo.closed?\n+        @repo.close()\n+      end\n+      FileUtils.remove_dir(TEST_REPO, true)\n+      FileUtils.remove_dir(TEST_EXPORT_REPO, true)\n+      FileUtils.remove_dir(TEST_EXPORT_REPO_2, true)\n+    end\n+\n+    # beginning of tests\n+\n+    should \"have exported the Git repository\" do\n+      assert_not_nil(@repo.export(TEST_EXPORT_REPO),\n+                     \"Did not properly export git repository\")\n+\n+      assert(File.exists?(TEST_EXPORT_REPO),\n+             \"Did not properly export git repository\")\n+      @repo.close()\n+    end\n+\n+    should \"export one file of the Git repository into a file\" do\n+      file = \"not-on-the-shelves-2009.pdf\"\n+\n+      # Let's start by adding the file to the git repository\n+      add_file_helper(@repo, file)\n+\n+      assert_not_nil(@repo.export(\"myfile.pdf\",file),\n+                     \"Did not properly export the file from the git repo\")\n+\n+      assert(File.exists?(\"myfile.pdf\"),\n+             \"The file does not exist in the destination repository\")\n+\n+      FileUtils.remove_file(\"myfile.pdf\", true)\n+      @repo.close()\n+    end\n+\n+    should \"export one file of the Git repository into a repository\" do\n+      file = \"not-on-the-shelves-2009.pdf\"\n+      repo_to_export_to = File.join(TEST_EXPORT_REPO_2, file)\n+\n+      # Let's start by adding the file to the git repository\n+      add_file_helper(@repo, file)\n+\n+      assert_not_nil(@repo.export(repo_to_export_to,file),\n+                     \"Did not properly export the file from the git repo\")\n+\n+      assert(File.exists?(repo_to_export_to),\n+             \"The file does not exist in the destination repository\")\n+\n+      @repo.close()\n+    end\n+\n+\n+    should \"raise an error if the repository where you want to export exists\" do\n+      @repo.export(TEST_EXPORT_REPO)\n+      assert_raise(ExportRepositoryAlreadyExists) do\n+        @repo.export(TEST_EXPORT_REPO)\n+      end\n+    end\n+\n+    should \"have been instanciated and a Git repository in the filesystem created\" do\n+      assert_not_nil(@repo, \"Could not create/open Repository: look into the tests' setup\")\n+      @repo.close()\n+    end\n+\n+    should \"provide a transaction\" do\n+      transaction = @repo.get_transaction(TEST_USER)\n+      assert_not_nil(transaction, \"Could not retrieve transaction\")\n+      assert_instance_of(Repository::Transaction, transaction,\n+                         \"Transaction is not of correct type!\")\n+      @repo.close()\n+    end\n+\n+    should \"give the latest revision\" do\n+      revision = @repo.get_latest_revision()\n+      assert_not_nil(revision, \"Could not retrieve latest revision\")\n+      assert_instance_of(Repository::GitRevision, revision, \"Revision is of wrong type!\")\n+      # Assuming that our head is our last revision,\n+      # as the sha number is not constant,\n+      # we are going to use the name\n+      assert_equal( @repo.get_repos.lookup(@repo.get_repos.head.target).tree.oid,\n+                    revision.revision_number.tree.oid,\n+                    \"Wrong revision number\")\n+      @repo.close()\n+    end\n+\n+    should \"be able to retrieve a revision given a valid revision as integer number\" do\n+      r = @repo.get_latest_revision()\n+      assert_not_nil(r, \"Could not retrieve latest revision\")\n+      rev_int = r.revision_number\n+      new_revision = @repo.get_revision(rev_int)\n+      assert_instance_of(Repository::GitRevision, new_revision,\n+                         \"Revision not of class SubversionRevision\")\n+      assert_equal(new_revision.revision_number, rev_int,\n+                   \"Revision numbers (int values) should be equal\")\n+      @repo.close()\n+    end\n+\n+    should \"raise a RevisionDoesNotExist exception\" do\n+      r = @repo.get_latest_revision()\n+      assert_not_nil(r, \"Could not retrieve latest revision\")\n+      # creates a random 40 characters string\n+      some_commit_sha = (0...40).map { (65 + rand(26)).chr }.join\n+      revision_non_existent = Rugged::Reference.create(@repo.get_repos,\"refs/heads/unit_test\",some_commit_sha)\n+      assert_raise(RevisionDoesNotExist) do\n+        @repo.get_revision(revision_non_existent) # raises exception\n+      end\n+      @repo.close()\n+    end\n+\n+    should \"be able to close its repository using the close() method\" do\n+      @repo.close()\n+      FileUtils.remove_dir(TEST_REPO)#Will fail under Windows if not closed\n+    end\n+\n+    should \"know whether or not it is closed\" do\n+      assert(!@repo.closed?, \"opened repository identified as closed\")\n+      @repo.close()\n+      assert(@repo.closed?, \"closed repository identified as open\")\n+    end\n+\n+    should \"be able to create a directory in repository\" do\n+      dir_single_level = TEST_REPO + \"/folder1\"\n+      dir_multi_level =  TEST_REPO  + \"/folder2/subfolder1\"\n+      txn = @repo.get_transaction(TEST_USER)\n+\n+      # observation: git dont add empty folders to staging area\n+      txn.add_path(dir_single_level)\n+      txn.add_path(dir_multi_level)\n+      @repo.commit(txn)\n+      revision = @repo.get_latest_revision()\n+\n+      assert_equal(true, revision.path_exists?(dir_single_level), message = \"Repository folder not created\")\n+      assert_equal(true, revision.path_exists?(dir_multi_level), message = \"Repository folder not created\")\n+      @repo.close()\n+    end\n+\n+    add_file_test = \"add a new file to an empty repository\"\n+    should(add_file_test) do\n+      rev_num = @repo.get_latest_revision().revision_number\n+      txn = @repo.get_transaction(TEST_USER)\n+      filename = \"MyClass.java\"\n+      file_contents = File.read(RESOURCE_DIR + \"/\" + filename)\n+      txn.add(filename, file_contents)\n+      latest_revision = @repo.get_latest_revision().revision_number\n+      assert_equal(rev_num.tree.oid, latest_revision.tree.oid, \"Revision # should be the same!\")\n+      @repo.commit(txn) # git commit\n+      latest_revision = @repo.get_latest_revision().revision_number\n+\n+      assert_not_equal(rev_num, latest_revision, \"Revision # has not changed!\")\n+\n+      txn = @repo.get_transaction(TEST_USER)\n+      filename = 'MyInterface.java'\n+      file_contents = File.read(RESOURCE_DIR + \"/\" + filename)\n+      txn.add(filename, file_contents)\n+      @repo.commit(txn) # git commit\n+\n+      # look if new file is available\n+      git_rev = @repo.get_latest_revision()\n+      files = git_rev.files_at_path(git_rev)\n+      assert_not_nil(files[filename], \"Could not find file '\" + filename + \"'\")\n+      # test download_as_string\n+      assert_equal(@repo.download_as_string(files[filename]),\n+                   file_contents,\n+                   \"Mismatching content\")\n+      @repo.close()\n+    end\n+\n+    should \"delete a commited file from repository\" do\n+      add_file_test.intern() # call add_file_test to make sure it works, not sure if that's useful\n+      # add MyClass.java to repo\n+      filename = \"MyClass.java\"\n+      add_file_helper(@repo, filename)\n+      txn = @repo.get_transaction(TEST_USER)\n+      txn.remove(filename, @repo.get_latest_revision().revision_number)\n+      @repo.commit(txn)\n+\n+      # filename should not be available in repo now\n+      git_rev = @repo.get_latest_revision()\n+      files = git_rev.files_at_path(git_rev)\n+      #files = svn_rev.files_at_path(\"/\")\n+      assert_nil(files[filename], \"File '\" + filename + \"' should have been removed!\")\n+      @repo.close()\n+    end\n+\n+    should \"be able to add multiple files using a single transaction\" do\n+      files_to_add = [\"MyClass.java\", \"MyInterface.java\", \"test.xml\"]\n+      old_revision = @repo.get_latest_revision()\n+      add_some_files_helper(@repo, files_to_add)\n+      new_revision = @repo.get_latest_revision()\n+      assert_instance_of(Repository::GitRevision, old_revision, \"Should be of type GitRevision\")\n+      assert_instance_of(Repository::GitRevision, new_revision, \"Should be of type GitRevision\")\n+      #assert_equal(old_revision.revision_number + 1, new_revision.revision_number, \"Revision number should increase by 1\")\n+      # repository should know of the added files, now\n+      files = new_revision.files_at_path(new_revision)\n+      files_to_add.each do |file|\n+        assert_not_nil(files[file], \"File '\" + file + \"' not found in repository\")\n+        content = File.read(RESOURCE_DIR + \"/\" + file)\n+        # test stringify_files also\n+        assert_equal(content, @repo.stringify_files(files[file]))\n+      end\n+      @repo.close()\n+    end\n+\n+    should \"be able to add, remove using a single transaction\" do\n+      files_to_add = [\"MyClass.java\", \"MyInterface.java\", \"test.xml\"]\n+      add_some_files_helper(@repo, files_to_add) # add some initial files\n+      old_revision = @repo.get_latest_revision()\n+      # add one more file\n+      filename = \"ruby_file.rb\"\n+      txn = @repo.get_transaction(TEST_USER)\n+      file_contents = File.read(RESOURCE_DIR + \"/\" + filename)\n+      txn.add(filename, file_contents)\n+      # remove a file\n+      txn.remove(\"test.xml\", @repo.get_latest_revision().revision_number) # remove a file previously existent in current rev.\n+      @repo.commit(txn)\n+\n+      new_revision = @repo.get_latest_revision()\n+      assert_instance_of(Repository::GitRevision, old_revision, \"Should be of type GitRevision\")\n+      assert_instance_of(Repository::GitRevision, new_revision, \"Should be of type GitRevision\")\n+      #assert_equal(old_revision.revision_number + 1, new_revision.revision_number, \"Revision number should have been increased by 1\")\n+      # test repository on its correct content\n+      files = new_revision.files_at_path(new_revision)\n+      files_to_add << filename # push filename to files_to_add\n+      files_to_add.each do |file|\n+        if file != \"test.xml\"\n+          assert_not_nil(files[file], \"File '\" + file + \"' not found in repository\")\n+          content = File.read(RESOURCE_DIR + \"/\" + file)\n+          # test stringify_files also\n+          assert_equal(content, @repo.stringify_files(files[file]))\n+        end\n+      end\n+      @repo.close()\n+    end\n+\n+    should \"be able to get a revision by timestamp\" do\n+      files_to_add = [\"MyClass.java\", \"MyInterface.java\", \"test.xml\"]\n+      add_some_files_helper(@repo, files_to_add) # add some initial files\n+      old_revision = @repo.get_latest_revision()\n+      # add one more file\n+      filename = \"ruby_file.rb\"\n+      txn = @repo.get_transaction(TEST_USER)\n+      file_contents = File.read(RESOURCE_DIR + \"/\" + filename)\n+      txn.add(filename, file_contents)\n+\n+      # collect a timestamp for later use\n+      repo_timestamp = Time.now\n+\n+      # delay last commit for our test\n+      @repo.commit(txn)\n+      sleep(2)\n+\n+      # remove a file\n+      txn.remove(\"test.xml\", @repo.get_latest_revision().revision_number) # remove a file previously existent in current rev.\n+      @repo.commit(txn)\n+\n+      new_revision = @repo.get_latest_revision()\n+      assert_instance_of(Repository::GitRevision, old_revision, \"Should be of type GitRevision\")\n+      assert_instance_of(Repository::GitRevision, new_revision, \"Should be of type GitRevision\")\n+      #assert_equal(old_revision.revision_number + 1, new_revision.revision_number, \"Revision number should have been increased by 1\")\n+      # test repository on its correct content\n+      files = new_revision.files_at_path(new_revision)\n+      files_to_add << filename # push filename to files_to_add\n+      files_to_add.each do |file|\n+        if file != \"test.xml\"\n+          assert_not_nil(files[file], \"File '\" + file + \"' not found in repository\")\n+          content = File.read(RESOURCE_DIR + \"/\" + file)\n+          # test stringify_files also\n+          assert_equal(content, @repo.stringify_files(files[file]))\n+        end\n+      end\n+\n+      # test the timestamp-revision stuff\n+      rev_num_by_timestamp = @repo.get_revision_by_timestamp(Time.now)\n+      latest_rev = @repo.get_latest_revision()\n+      assert_instance_of(Repository::GitRevision, rev_num_by_timestamp, \"Revision number is of wrong type\")\n+      assert_instance_of(Repository::GitRevision, latest_rev, \"Revision number is of wrong type\")\n+      assert_equal(rev_num_by_timestamp.revision_number, latest_rev.revision_number, \"Revision number (int values) do not match\")\n+\n+      # test.xml should be in the repository for the timestamp \"repo_timestamp\"\n+      rev_num_by_timestamp = @repo.get_revision_by_timestamp(repo_timestamp)\n+      assert_instance_of(Repository::GitRevision, rev_num_by_timestamp, \"Revision number is of wrong type\")\n+      files = rev_num_by_timestamp.files_at_path(rev_num_by_timestamp)\n+      files_to_add.each do |file|\n+        if file == \"test.xml\"\n+          assert_not_nil(files[file], \"File '\" + file + \"' not found in repository\")\n+          content = File.read(RESOURCE_DIR + \"/\" + file)\n+          # test stringify_files also\n+          assert_equal(content, @repo.stringify_files(files[file]))\n+        end\n+      end\n+      @repo.close()\n+    end\n+\n+    should \"be able to get the last_modified_date of a file\" do\n+      files_to_add = [\"MyClass.java\", \"MyInterface.java\", \"test.xml\"]\n+      add_some_files_helper(@repo, files_to_add) # add some initial files\n+      revision = @repo.get_latest_revision\n+\n+      files_to_add.each do |file_name|\n+        assert_not_nil revision.last_modified_date()\n+        assert (revision.last_modified_date - Time.now) < 1\n+      end\n+\n+      # giving times for diferent commits\n+      sleep(2)\n+      txn = @repo.get_transaction(TEST_USER)\n+      txn.replace('MyClass.java', 'new data', 'text', 1)\n+      @repo.commit(txn)\n+\n+      new_revision = @repo.get_latest_revision\n+      assert_not_nil new_revision.last_modified_date()\n+      assert_not_equal new_revision.last_modified_date, revision.last_modified_date\n+      @repo.close()\n+    end\n+\n+  end # end context\n+\n+  context \"A repository with an authorization file specified\" do\n+\n+    GIT_AUTH_FOLDER = GIT_TEST_REPOS_DIR + \"/git_auth\"\n+    GIT_AUTH_FILE = GIT_AUTH_FOLDER + \"/conf/gitolite.conf\"\n+\n+    setup do\n+      #cleanup any files that may be left over\n+      FileUtils.remove_dir(GIT_TEST_REPOS_DIR + \"/Testrepo1\", true)\n+      FileUtils.remove_dir(GIT_TEST_REPOS_DIR + \"/Repository2\", true)\n+      FileUtils.remove_dir(TEST_REPO, true)\n+      FileUtils.rm(GIT_AUTH_FILE, :force => true)\n+\n+      ga_repo =  Gitolite::GitoliteAdmin.bootstrap(GIT_AUTH_FOLDER)\n+      # have a clean auth file\n+      FileUtils.cp(GIT_AUTH_FILE + '.orig', GIT_AUTH_FILE)\n+      # create repository first\n+      repo1 = GIT_TEST_REPOS_DIR + \"/Testrepo1\"\n+      repo2 = GIT_TEST_REPOS_DIR + \"/Repository2\"\n+      conf_admin = Hash.new\n+      conf_admin[\"IS_REPOSITORY_ADMIN\"] = true\n+      conf_admin[\"REPOSITORY_PERMISSION_FILE\"] = GIT_AUTH_FOLDER\n+\n+      Repository.get_class(\"git\", conf_admin).create(repo1)\n+      Repository.get_class(\"git\", conf_admin).create(repo2)\n+      Repository.get_class(\"git\", conf_admin).create(TEST_REPO)\n+      # open the repository\n+      conf_non_admin = Hash.new\n+      conf_non_admin[\"IS_REPOSITORY_ADMIN\"] = false\n+      conf_non_admin[\"REPOSITORY_PERMISSION_FILE\"] = GIT_AUTH_FOLDER\n+\n+      @repo1 = Repository.get_class(\"git\", conf_non_admin).open(repo1) # non-admin repository\n+      @repo2 = Repository.get_class(\"git\", conf_non_admin).open(repo2) # again, a non-admin repo\n+      @repo = Repository.get_class(\"git\", conf_admin).open(TEST_REPO)     # repo with admin-privs\n+\n+      # add some files\n+      files_to_add = [\"MyClass.java\", \"MyInterface.java\", \"test.xml\"]\n+      add_some_files_helper(@repo1, files_to_add)\n+      add_some_files_helper(@repo2, files_to_add)\n+    end\n+\n+    # removes Git repositories\n+    teardown do\n+      if !@repo.nil? and !@repo.closed?\n+        @repo.close()\n+        @repo1.close()\n+        @repo2.close()\n+      end\n+      GitRepository.delete(GIT_TEST_REPOS_DIR + \"/Testrepo1\")\n+      GitRepository.delete(GIT_TEST_REPOS_DIR + \"/Repository2\")\n+      GitRepository.delete(TEST_REPO)\n+      FileUtils.rm(GIT_AUTH_FILE, :force => true)\n+    end\n+\n+    should \"be able to get permissions for a user\" do\n+      # check if permission constants are working\n+      assert_equal(2, Repository::Permission::WRITE)\n+      assert_equal(4, Repository::Permission::READ)\n+      assert_equal(6, Repository::Permission::READ_WRITE)\n+      assert_equal(4, Repository::Permission::ANY)\n+\n+      assert_equal(Repository::Permission::READ_WRITE, @repo1.get_permissions(\"user1\"))\n+      assert_equal(Repository::Permission::READ, @repo1.get_permissions(\"someother_user\"))\n+      assert_equal(Repository::Permission::READ, @repo2.get_permissions(\"test\"))\n+\n+      #For some reason it does not work to just put these lines in the teardown\n+      @repo.close()\n+      @repo1.close()\n+      @repo2.close()\n+    end\n+\n+    should \"raise a UserNotFound exception\" do\n+      # check if permission constants are working\n+      assert_equal(2, Repository::Permission::WRITE)\n+      assert_equal(4, Repository::Permission::READ)\n+      assert_equal(6, Repository::Permission::READ_WRITE)\n+      assert_equal(4, Repository::Permission::ANY)\n+\n+      assert_raise(UserNotFound) do\n+        @repo1.get_permissions(\"non_existent_user\")\n+      end\n+      assert_raise(UserNotFound) do\n+        @repo2.get_permissions(\"non_existent_user\")\n+      end\n+      assert_raise(UserNotFound) do\n+        @repo.set_permissions(\"non_existent_user\", Repository::Permission::READ_WRITE)\n+      end\n+      assert_raise(UserNotFound) do\n+        @repo.remove_user(\"non_existent_user\")\n+      end\n+      @repo.close()\n+      @repo1.close()\n+      @repo2.close()\n+    end\n+\n+    should \"raise a UserAlreadyExistent exception\" do\n+      # check if permission constants are working\n+      assert_equal(2, Repository::Permission::WRITE)\n+      assert_equal(4, Repository::Permission::READ)\n+      assert_equal(6, Repository::Permission::READ_WRITE)\n+      assert_equal(4, Repository::Permission::ANY)\n+\n+      @repo.add_user(\"user_x\", Repository::Permission::READ)\n+      assert_raise(UserAlreadyExistent) do\n+        @repo.add_user(\"user_x\", Repository::Permission::READ_WRITE) # user_x exists already\n+      end\n+      @repo.close()\n+      @repo1.close()\n+      @repo2.close()\n+    end\n+\n+    should \"not be allowed to modify permissions when not it authoritative mode\" do\n+      # check if permission constants are working\n+      assert_equal(2, Repository::Permission::WRITE)\n+      assert_equal(4, Repository::Permission::READ)\n+      assert_equal(6, Repository::Permission::READ_WRITE)\n+      assert_equal(4, Repository::Permission::ANY)\n+\n+      assert_raise(NotAuthorityError) do\n+        @repo1.add_user(\"user_x\", Repository::Permission::READ)\n+      end\n+      assert_raise(NotAuthorityError) do\n+        @repo2.set_permissions(\"test\", Repository::Permission::READ_WRITE)\n+      end\n+      assert_raise(NotAuthorityError) do\n+        @repo2.remove_user(\"test\")\n+      end\n+      @repo.close()\n+      @repo1.close()\n+      @repo2.close()\n+    end\n+\n+    should \"be able to add a user\" do\n+      # check if permission constants are working\n+      assert_equal(2, Repository::Permission::WRITE)\n+      assert_equal(4, Repository::Permission::READ)\n+      assert_equal(6, Repository::Permission::READ_WRITE)\n+      assert_equal(4, Repository::Permission::ANY)\n+      @repo.add_user(TEST_USER, Repository::Permission::READ)\n+      assert_equal(Repository::Permission::READ, @repo.get_permissions(TEST_USER))\n+      @repo.close()\n+      @repo1.close()\n+      @repo2.close()\n+    end\n+\n+    should \"be able to manage users and permissions\" do\n+      # tests\n+      #   'add_user()'\n+      #   'remove_user()'\n+      #   'get_permissions()'\n+      #   'set_permissions()\n+      #   'get_users()'\n+      another_user = \"another_user_id\"\n+\n+      # check if permission constants are working\n+      assert_equal(2, Repository::Permission::WRITE)\n+      assert_equal(4, Repository::Permission::READ)\n+      assert_equal(6, Repository::Permission::READ_WRITE)\n+      assert_equal(4, Repository::Permission::ANY)\n+\n+      users_with_any_perm = @repo.get_users(Repository::Permission::ANY)\n+      assert_nil(users_with_any_perm, \"There aren't any users, yet\")\n+      users_with_read_perm = @repo.get_users(Repository::Permission::READ)\n+      assert_nil(users_with_read_perm, \"There aren't any users, yet\")\n+      users_with_read_write_perm = @repo.get_users(Repository::Permission::READ_WRITE)\n+      assert_nil(users_with_read_write_perm, \"There aren't any users, yet\")\n+\n+      @repo.add_user(TEST_USER, Repository::Permission::READ)\n+      users_with_any_perm = @repo.get_users(Repository::Permission::ANY)\n+      assert_not_nil(users_with_any_perm, \"There is a user with some permissions\")\n+      assert_equal(TEST_USER, users_with_any_perm.shift, TEST_USER + \" should have some permissions\")\n+      users_with_read_perm = @repo.get_users(Repository::Permission::READ)\n+      assert_not_nil(users_with_read_perm, TEST_USER + \" should have read permissions\")\n+      assert_equal(TEST_USER, users_with_read_perm.shift, TEST_USER + \" should have read permissions\")\n+      users_with_read_write_perm = @repo.get_users(Repository::Permission::READ_WRITE)\n+      assert_nil(users_with_read_write_perm, \"There is no user with read and write permissions\")\n+      # see if permissions have been set accordingly\n+      assert_equal(Repository::Permission::READ, @repo.get_permissions(TEST_USER), \"Permissions don't match\")\n+\n+      # set (overwrite) permissions\n+      @repo.set_permissions(TEST_USER, Repository::Permission::READ_WRITE)\n+      assert_equal(Repository::Permission::READ_WRITE, @repo.get_permissions(TEST_USER), \"Permissions don't match\")\n+      users_with_read_write_perm = @repo.get_users(Repository::Permission::READ_WRITE)\n+      assert_not_nil(users_with_read_write_perm, \"There is a user with read and write permissions\")\n+      assert_equal(TEST_USER, users_with_read_write_perm.shift, TEST_USER + \" should have read and write permissions\")\n+\n+      # add another user\n+      @repo.add_user(another_user, Repository::Permission::READ)\n+      assert_equal(Repository::Permission::READ, @repo.get_permissions(another_user), \"Permissions don't match\")\n+      users_with_any_perm = @repo.get_users(Repository::Permission::ANY)\n+      assert_not_nil(users_with_any_perm, \"There are some users with some permissions\")\n+      assert_equal([TEST_USER, another_user].sort, users_with_any_perm.sort, \"There are some missing users\")\n+      users_with_read_perm = @repo.get_users(Repository::Permission::READ).sort\n+      assert_not_nil(users_with_read_perm, \"Some user has read permissions\")\n+      assert_equal(another_user, users_with_read_perm.shift, another_user + \" should have read permissions\")\n+      users_with_read_write_perm = @repo.get_users(Repository::Permission::READ_WRITE).sort\n+      assert_not_nil(users_with_read_write_perm, \"There are some users with read and write permissions\")\n+      assert_equal(TEST_USER, users_with_read_write_perm.shift, TEST_USER + \" should have read and write permissions\")\n+\n+      # remove user\n+      @repo.remove_user(TEST_USER)\n+      assert_equal(Repository::Permission::READ, @repo.get_permissions(another_user), \"Permissions don't match\")\n+      users_with_any_perm = @repo.get_users(Repository::Permission::ANY).sort\n+      assert_not_nil(users_with_any_perm, \"There are some users with some permissions\")\n+      assert_equal(another_user, users_with_any_perm.shift, another_user +\" still has some perms\")\n+      users_with_read_perm = @repo.get_users(Repository::Permission::READ).sort\n+      assert_not_nil(users_with_read_perm, \"Some user has read permissions\")\n+      assert_equal(another_user, users_with_read_perm.shift, another_user + \" should have read permissions\")\n+      users_with_read_write_perm = @repo.get_users(Repository::Permission::READ_WRITE)\n+      assert_nil(users_with_read_write_perm, \"There are NO users with read and write permissions\")\n+\n+      @repo.remove_user(another_user)\n+      users_with_any_perm = @repo.get_users(Repository::Permission::ANY)\n+      assert_nil(users_with_any_perm, \"There are NO users with any permissions\")\n+      @repo.close()\n+      @repo1.close()\n+      @repo2.close()\n+    end\n+\n+  end # end context\n+\n+  context \"Looping over several repositories\" do\n+\n+    should \"add a user per each repository\" do\n+      # use a different svn_authz file for this test\n+      old_git_auth = GIT_AUTH_FILE\n+      new_git_auth = GIT_TEST_REPOS_DIR + \"/git_auth_bulk_stuff\"\n+      new_git_auth_file = new_git_auth + \"/conf/gitolite.conf\"\n+\n+      if !File.directory?(new_git_auth)\n+        FileUtils.mkdir_p(new_git_auth)\n+      end\n+\n+      # remove auth file if it exists\n+      if File.exist?(new_git_auth_file)\n+        FileUtils.rm(new_git_auth_file)\n+      end\n+\n+      # create some repositories, add some users\n+      repo_base_name = GIT_TEST_REPOS_DIR + \"/Group_\"\n+      repository_names = []\n+      (1..5).each do |counter|\n+        repository_names.push(repo_base_name + counter.to_s.rjust(3, \"0\"))\n+      end\n+\n+      # remove repositories, if they exist\n+      repository_names.each do |repo_name|\n+        if GitRepository.repository_exists?(repo_name)\n+          GitRepository.delete(repo_name)\n+        end\n+      end\n+\n+      repositories = []\n+      conf_admin = Hash.new\n+      conf_admin[\"IS_REPOSITORY_ADMIN\"] = true\n+      conf_admin[\"REPOSITORY_PERMISSION_FILE\"] = new_git_auth\n+\n+      repository_names.each do |repo_name|\n+        Repository.get_class(\"git\", conf_admin).create(repo_name)\n+        repo = Repository.get_class(\"git\", conf_admin).open(repo_name)\n+        repo.add_user(\"some_user\", Repository::Permission::READ_WRITE)\n+        repo.add_user(\"another_user\", Repository::Permission::READ_WRITE)\n+        repositories.push(repo)\n+      end\n+\n+      # add a user for each repository\n+      repositories.each do |repo|\n+        repo.add_user(TEST_USER, Repository::Permission::READ_WRITE)\n+      end\n+\n+      # assertions\n+      repositories.each do |r|\n+        assert_equal(Repository::Permission::READ_WRITE, r.get_permissions(TEST_USER))\n+      end\n+\n+      #close all repositories\n+      repositories.each do |repo|\n+        repo.close()\n+      end\n+      # remove repositories repositories created\n+      repository_names.each do |repo_name|\n+        GitRepository.delete(repo_name)\n+      end\n+\n+    end\n+  end # end context\n+\n+  context \"GitRepository\" do\n+    should \"raise an exception if not properly configured\" do\n+      conf = Hash.new\n+      conf[\"REPOSITORY_PERMISSION_FILE\"] = 'something'\n+      assert_raise(ConfigurationError) do\n+        Repository.get_class(\"git\", conf) # missing a required constant\n+      end\n+    end\n+  end # end context\n+\n+  context \"Setting and deleting bulk permissions\" do\n+    setup do\n+      # use a different svn_authz file for this test\n+      new_git_auth = GIT_TEST_REPOS_DIR + \"/git_auth_bulk_stuff2\"\n+\n+      if !File.directory?(new_git_auth)\n+        FileUtils.mkdir_p(new_git_auth)\n+      end\n+\n+      @conf_admin = Hash.new\n+      @conf_admin[\"IS_REPOSITORY_ADMIN\"] = true\n+      @conf_admin[\"REPOSITORY_PERMISSION_FILE\"] = new_git_auth\n+      # create some repositories, add some users\n+      repo_base_name = \"Group_\"\n+      @repository_names = []\n+      (1..5).each do |counter|\n+        @repository_names.push(repo_base_name + counter.to_s.rjust(3, \"0\"))\n+      end\n+\n+      @repositories = []\n+      @repository_names.each do |repo_name|\n+        Repository.get_class(\"git\", @conf_admin).create(GIT_TEST_REPOS_DIR + \"/\" + repo_name)\n+        repo = Repository.get_class(\"git\", @conf_admin).open(GIT_TEST_REPOS_DIR + \"/\" + repo_name)\n+        @repositories.push(repo)\n+      end\n+    end\n+\n+    teardown do\n+      new_git_auth = GIT_TEST_REPOS_DIR + \"/git_auth_bulk_stuff2\"\n+      new_git_auth_file = new_git_auth + \"/conf/gitolite.conf\"\n+\n+      # remove auth file if it exists\n+      if File.directory?(new_git_auth)\n+        FileUtils.rm_rf(GIT_TEST_REPOS_DIR + \"/git_auth_bulk_stuff2/\")\n+      end\n+\n+      # remove auth file if it exists\n+      if File.exist?(new_git_auth_file)\n+        FileUtils.rm(new_git_auth_file)\n+      end\n+\n+      # remove repositories, if they exist\n+      @repository_names.each do |repo_name|\n+        if GitRepository.repository_exists?(GIT_TEST_REPOS_DIR + \"/\" + repo_name)\n+          GitRepository.delete(GIT_TEST_REPOS_DIR + \"/\" + repo_name)\n+        end\n+      end\n+    end\n+\n+    should \"Add a user and set permissions to every Group repository\" do\n+\n+      # Ok, now lets try to add a few bulk users\n+      assert GitRepository.set_bulk_permissions(@repository_names, {\"test_user\" => Repository::Permission::READ})\n+      assert GitRepository.set_bulk_permissions(@repository_names, {\"test_user2\" => Repository::Permission::READ_WRITE})\n+\n+      # Test to make sure they got attached to each repository\n+      @repository_names.each do |repo_name|\n+        repo = Repository.get_class(\"git\", @conf_admin).open(GIT_TEST_REPOS_DIR + \"/\" + repo_name)\n+        assert_equal(Repository::Permission::READ, repo.get_permissions(\"test_user\"))\n+        assert_equal(Repository::Permission::READ_WRITE, repo.get_permissions(\"test_user2\"))\n+        repo.close()\n+      end\n+\n+      # Ok, now let's try to remove them\n+      assert GitRepository.delete_bulk_permissions(@repository_names, ['test_user'])\n+      # Test to make sure they got attached to each repository\n+      @repository_names.each do |repo_name|\n+        repo = Repository.get_class(\"git\", @conf_admin).open(GIT_TEST_REPOS_DIR + \"/\" + repo_name)\n+        assert_raises Repository::UserNotFound do\n+          repo.get_permissions(\"test_user\")\n+        end\n+        assert_equal(Repository::Permission::READ_WRITE, repo.get_permissions(\"test_user2\"))\n+        repo.close()\n+      end\n+      @repositories.each do|repo|\n+        repo.close()\n+      end\n+    end\n+  end#end context\n+\n+  # private # private helper methods for this class\n+\n+  def add_file_helper(repo, file)\n+\n+    # copy example file to repository folder\n+    # workdir = path/to/my/repository/\n+    # path =  path/to/my/repository/.git\n+    FileUtils.cp(RESOURCE_DIR + \"/\" + file,repo.get_repos_workdir)","path":"lib/repo/test/git_repository_test.rb","position":797,"original_position":797,"commit_id":"108d05087c656cfe570eadab563ea3fc1fdc1423","original_commit_id":"108d05087c656cfe570eadab563ea3fc1fdc1423","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":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","created_at":"2014-10-07T16:17:47Z","updated_at":"2014-10-07T16:17:47Z","html_url":"https://github.com/MarkUsProject/Markus/pull/1815#discussion_r18530436","pull_request_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/1815","_links":{"self":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments/18530436"},"html":{"href":"https://github.com/MarkUsProject/Markus/pull/1815#discussion_r18530436"},"pull_request":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/1815"}}},"pull_request":{"url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/1815","id":22364491,"html_url":"https://github.com/MarkUsProject/Markus/pull/1815","diff_url":"https://github.com/MarkUsProject/Markus/pull/1815.diff","patch_url":"https://github.com/MarkUsProject/Markus/pull/1815.patch","issue_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/1815","number":1815,"state":"open","locked":false,"title":"Fixing tests","user":{"login":"SoftwareDev","id":5432316,"avatar_url":"https://avatars.githubusercontent.com/u/5432316?v=2","gravatar_id":"","url":"https://api.github.com/users/SoftwareDev","html_url":"https://github.com/SoftwareDev","followers_url":"https://api.github.com/users/SoftwareDev/followers","following_url":"https://api.github.com/users/SoftwareDev/following{/other_user}","gists_url":"https://api.github.com/users/SoftwareDev/gists{/gist_id}","starred_url":"https://api.github.com/users/SoftwareDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SoftwareDev/subscriptions","organizations_url":"https://api.github.com/users/SoftwareDev/orgs","repos_url":"https://api.github.com/users/SoftwareDev/repos","events_url":"https://api.github.com/users/SoftwareDev/events{/privacy}","received_events_url":"https://api.github.com/users/SoftwareDev/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-07T16:16:41Z","updated_at":"2014-10-07T16:17:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68669e2b15c50e3ab8f8aad37299f35ef7e619e9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/1815/commits","review_comments_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/1815/comments","review_comment_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments/{number}","comments_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/1815/comments","statuses_url":"https://api.github.com/repos/MarkUsProject/Markus/statuses/108d05087c656cfe570eadab563ea3fc1fdc1423","head":{"label":"SoftwareDev:git","ref":"git","sha":"108d05087c656cfe570eadab563ea3fc1fdc1423","user":{"login":"SoftwareDev","id":5432316,"avatar_url":"https://avatars.githubusercontent.com/u/5432316?v=2","gravatar_id":"","url":"https://api.github.com/users/SoftwareDev","html_url":"https://github.com/SoftwareDev","followers_url":"https://api.github.com/users/SoftwareDev/followers","following_url":"https://api.github.com/users/SoftwareDev/following{/other_user}","gists_url":"https://api.github.com/users/SoftwareDev/gists{/gist_id}","starred_url":"https://api.github.com/users/SoftwareDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SoftwareDev/subscriptions","organizations_url":"https://api.github.com/users/SoftwareDev/orgs","repos_url":"https://api.github.com/users/SoftwareDev/repos","events_url":"https://api.github.com/users/SoftwareDev/events{/privacy}","received_events_url":"https://api.github.com/users/SoftwareDev/received_events","type":"User","site_admin":false},"repo":{"id":24034862,"name":"Markus","full_name":"SoftwareDev/Markus","owner":{"login":"SoftwareDev","id":5432316,"avatar_url":"https://avatars.githubusercontent.com/u/5432316?v=2","gravatar_id":"","url":"https://api.github.com/users/SoftwareDev","html_url":"https://github.com/SoftwareDev","followers_url":"https://api.github.com/users/SoftwareDev/followers","following_url":"https://api.github.com/users/SoftwareDev/following{/other_user}","gists_url":"https://api.github.com/users/SoftwareDev/gists{/gist_id}","starred_url":"https://api.github.com/users/SoftwareDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SoftwareDev/subscriptions","organizations_url":"https://api.github.com/users/SoftwareDev/orgs","repos_url":"https://api.github.com/users/SoftwareDev/repos","events_url":"https://api.github.com/users/SoftwareDev/events{/privacy}","received_events_url":"https://api.github.com/users/SoftwareDev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SoftwareDev/Markus","description":"Git repository of MarkUs","fork":true,"url":"https://api.github.com/repos/SoftwareDev/Markus","forks_url":"https://api.github.com/repos/SoftwareDev/Markus/forks","keys_url":"https://api.github.com/repos/SoftwareDev/Markus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SoftwareDev/Markus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SoftwareDev/Markus/teams","hooks_url":"https://api.github.com/repos/SoftwareDev/Markus/hooks","issue_events_url":"https://api.github.com/repos/SoftwareDev/Markus/issues/events{/number}","events_url":"https://api.github.com/repos/SoftwareDev/Markus/events","assignees_url":"https://api.github.com/repos/SoftwareDev/Markus/assignees{/user}","branches_url":"https://api.github.com/repos/SoftwareDev/Markus/branches{/branch}","tags_url":"https://api.github.com/repos/SoftwareDev/Markus/tags","blobs_url":"https://api.github.com/repos/SoftwareDev/Markus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SoftwareDev/Markus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SoftwareDev/Markus/git/refs{/sha}","trees_url":"https://api.github.com/repos/SoftwareDev/Markus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SoftwareDev/Markus/statuses/{sha}","languages_url":"https://api.github.com/repos/SoftwareDev/Markus/languages","stargazers_url":"https://api.github.com/repos/SoftwareDev/Markus/stargazers","contributors_url":"https://api.github.com/repos/SoftwareDev/Markus/contributors","subscribers_url":"https://api.github.com/repos/SoftwareDev/Markus/subscribers","subscription_url":"https://api.github.com/repos/SoftwareDev/Markus/subscription","commits_url":"https://api.github.com/repos/SoftwareDev/Markus/commits{/sha}","git_commits_url":"https://api.github.com/repos/SoftwareDev/Markus/git/commits{/sha}","comments_url":"https://api.github.com/repos/SoftwareDev/Markus/comments{/number}","issue_comment_url":"https://api.github.com/repos/SoftwareDev/Markus/issues/comments/{number}","contents_url":"https://api.github.com/repos/SoftwareDev/Markus/contents/{+path}","compare_url":"https://api.github.com/repos/SoftwareDev/Markus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SoftwareDev/Markus/merges","archive_url":"https://api.github.com/repos/SoftwareDev/Markus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SoftwareDev/Markus/downloads","issues_url":"https://api.github.com/repos/SoftwareDev/Markus/issues{/number}","pulls_url":"https://api.github.com/repos/SoftwareDev/Markus/pulls{/number}","milestones_url":"https://api.github.com/repos/SoftwareDev/Markus/milestones{/number}","notifications_url":"https://api.github.com/repos/SoftwareDev/Markus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SoftwareDev/Markus/labels{/name}","releases_url":"https://api.github.com/repos/SoftwareDev/Markus/releases{/id}","created_at":"2014-09-14T22:18:29Z","updated_at":"2014-09-19T19:11:45Z","pushed_at":"2014-10-07T16:08:00Z","git_url":"git://github.com/SoftwareDev/Markus.git","ssh_url":"git@github.com:SoftwareDev/Markus.git","clone_url":"https://github.com/SoftwareDev/Markus.git","svn_url":"https://github.com/SoftwareDev/Markus","homepage":"http://www.markusproject.org","size":17046,"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":"MarkUsProject:master","ref":"master","sha":"70256f2e88dd82697cc4f6526dab8e30a8d51ac1","user":{"login":"MarkUsProject","id":415874,"avatar_url":"https://avatars.githubusercontent.com/u/415874?v=2","gravatar_id":"","url":"https://api.github.com/users/MarkUsProject","html_url":"https://github.com/MarkUsProject","followers_url":"https://api.github.com/users/MarkUsProject/followers","following_url":"https://api.github.com/users/MarkUsProject/following{/other_user}","gists_url":"https://api.github.com/users/MarkUsProject/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkUsProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkUsProject/subscriptions","organizations_url":"https://api.github.com/users/MarkUsProject/orgs","repos_url":"https://api.github.com/users/MarkUsProject/repos","events_url":"https://api.github.com/users/MarkUsProject/events{/privacy}","received_events_url":"https://api.github.com/users/MarkUsProject/received_events","type":"Organization","site_admin":false},"repo":{"id":940538,"name":"Markus","full_name":"MarkUsProject/Markus","owner":{"login":"MarkUsProject","id":415874,"avatar_url":"https://avatars.githubusercontent.com/u/415874?v=2","gravatar_id":"","url":"https://api.github.com/users/MarkUsProject","html_url":"https://github.com/MarkUsProject","followers_url":"https://api.github.com/users/MarkUsProject/followers","following_url":"https://api.github.com/users/MarkUsProject/following{/other_user}","gists_url":"https://api.github.com/users/MarkUsProject/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkUsProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkUsProject/subscriptions","organizations_url":"https://api.github.com/users/MarkUsProject/orgs","repos_url":"https://api.github.com/users/MarkUsProject/repos","events_url":"https://api.github.com/users/MarkUsProject/events{/privacy}","received_events_url":"https://api.github.com/users/MarkUsProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MarkUsProject/Markus","description":"Git repository of MarkUs","fork":false,"url":"https://api.github.com/repos/MarkUsProject/Markus","forks_url":"https://api.github.com/repos/MarkUsProject/Markus/forks","keys_url":"https://api.github.com/repos/MarkUsProject/Markus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarkUsProject/Markus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarkUsProject/Markus/teams","hooks_url":"https://api.github.com/repos/MarkUsProject/Markus/hooks","issue_events_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/events{/number}","events_url":"https://api.github.com/repos/MarkUsProject/Markus/events","assignees_url":"https://api.github.com/repos/MarkUsProject/Markus/assignees{/user}","branches_url":"https://api.github.com/repos/MarkUsProject/Markus/branches{/branch}","tags_url":"https://api.github.com/repos/MarkUsProject/Markus/tags","blobs_url":"https://api.github.com/repos/MarkUsProject/Markus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarkUsProject/Markus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarkUsProject/Markus/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarkUsProject/Markus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarkUsProject/Markus/statuses/{sha}","languages_url":"https://api.github.com/repos/MarkUsProject/Markus/languages","stargazers_url":"https://api.github.com/repos/MarkUsProject/Markus/stargazers","contributors_url":"https://api.github.com/repos/MarkUsProject/Markus/contributors","subscribers_url":"https://api.github.com/repos/MarkUsProject/Markus/subscribers","subscription_url":"https://api.github.com/repos/MarkUsProject/Markus/subscription","commits_url":"https://api.github.com/repos/MarkUsProject/Markus/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarkUsProject/Markus/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarkUsProject/Markus/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/comments/{number}","contents_url":"https://api.github.com/repos/MarkUsProject/Markus/contents/{+path}","compare_url":"https://api.github.com/repos/MarkUsProject/Markus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarkUsProject/Markus/merges","archive_url":"https://api.github.com/repos/MarkUsProject/Markus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarkUsProject/Markus/downloads","issues_url":"https://api.github.com/repos/MarkUsProject/Markus/issues{/number}","pulls_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls{/number}","milestones_url":"https://api.github.com/repos/MarkUsProject/Markus/milestones{/number}","notifications_url":"https://api.github.com/repos/MarkUsProject/Markus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarkUsProject/Markus/labels{/name}","releases_url":"https://api.github.com/repos/MarkUsProject/Markus/releases{/id}","created_at":"2010-09-26T16:18:08Z","updated_at":"2014-09-29T06:58:50Z","pushed_at":"2014-10-03T19:35:56Z","git_url":"git://github.com/MarkUsProject/Markus.git","ssh_url":"git@github.com:MarkUsProject/Markus.git","clone_url":"https://github.com/MarkUsProject/Markus.git","svn_url":"https://github.com/MarkUsProject/Markus","homepage":"http://www.markusproject.org","size":47050,"stargazers_count":110,"watchers_count":110,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":134,"mirror_url":null,"open_issues_count":111,"forks":134,"open_issues":111,"watchers":110,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/1815"},"html":{"href":"https://github.com/MarkUsProject/Markus/pull/1815"},"issue":{"href":"https://api.github.com/repos/MarkUsProject/Markus/issues/1815"},"comments":{"href":"https://api.github.com/repos/MarkUsProject/Markus/issues/1815/comments"},"review_comments":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/1815/comments"},"review_comment":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/1815/commits"},"statuses":{"href":"https://api.github.com/repos/MarkUsProject/Markus/statuses/108d05087c656cfe570eadab563ea3fc1fdc1423"}}}}