class Repository::AbstractRepository

Public Class Methods

access(connect_string) click to toggle source

Static method: Yields an existing Repository and closes it afterwards

# File lib/repo/repository.rb, line 88
def self.access(connect_string)
  raise NotImplementedError, "Repository::create Not yet implemented"
end
create(connect_string) click to toggle source

Static method: Creates a new repository at given location; returns an AbstractRepository instance, with the repository opened.

# File lib/repo/repository.rb, line 83
def self.create(connect_string)
  raise NotImplementedError, "Repository::create Not yet implemented"
end
delete(connect_string) click to toggle source

Static method: Deletes an existing Subversion repository

# File lib/repo/repository.rb, line 93
def self.delete(connect_string)
  raise NotImplementedError, "Repository::create Not yet implemented"
end
delete_bulk_permissions(groups, user_ids) click to toggle source

Static method on Repository to remove permissions on an Array of users across a series of group repositories user_ids is an Array of user_ids

# File lib/repo/repository.rb, line 191
def self.delete_bulk_permissions(groups, user_ids)
  raise NotImplementedError, "Repository.delete_bulk_permissions: Not yet implemented"
end
new(connect_string) click to toggle source

Initializes Object, and verifies connection to the repository back end. This should throw a ConnectionError if we’re unable to connect.

# File lib/repo/repository.rb, line 66
def initialize(connect_string)
  raise NotImplementedError, "Repository.initialize(connect_string): Not yet implemented"
end
open(connect_string) click to toggle source

Static method: Opens a repository at given location; returns an AbstractRepository instance

# File lib/repo/repository.rb, line 77
def self.open(connect_string)
  raise NotImplementedError, "Repository::open Not yet implemented"
end
repository_exists?(path) click to toggle source

Static method: Should report if a repository exists at given location

# File lib/repo/repository.rb, line 71
def self.repository_exists?(path)
  raise NotImplementedError, "Repository::repository_exists? Not yet implemented"
end
set_bulk_permissions(groups, user_id_permissions_map) click to toggle source

Static method on Repository to set permissions on a set of users across a series of group repositories. user_id_permissions_map is a hash in the form of: {user_id => Repository::Permissions::READ, user_id =>.…}

::set_bulk_permissions will clobber pre-existing permissions, and automatically #add_user to a repository permission set.

::set_bulk_permissions is commonly used when setting permissions for many repositories

# File lib/repo/repository.rb, line 183
def self.set_bulk_permissions(groups, user_id_permissions_map)
  raise NotImplementedError, "Repository.set_bulk_permissions: Not yet implemented"
end

Public Instance Methods

add_user(user_id, permissions) click to toggle source

Adds a user with a given permission-set to the repository

# File lib/repo/repository.rb, line 141
def add_user(user_id, permissions)
  raise NotImplementedError,  "Repository.add_user: Not yet implemented"
end
close() click to toggle source

Closes the repository

# File lib/repo/repository.rb, line 98
def close
  raise NotImplementedError, "Repository::create Not yet implemented"
end
closed?() click to toggle source

Tests if the repository is closed

# File lib/repo/repository.rb, line 103
def closed?
  raise NotImplementedError, "Repository::create Not yet implemented"
end
commit(transaction) click to toggle source

Commits a transaction associated with a repository

# File lib/repo/repository.rb, line 120
def commit(transaction)
  raise NotImplementedError,  "Repository.commit: Not yet implemented"
end
download_as_string(files) click to toggle source
Alias for: stringify_files
expand_path(file_name, dir_string) click to toggle source

Converts a pathname to an absolute pathname

# File lib/repo/repository.rb, line 168
def expand_path(file_name, dir_string)
  raise NotImplementedError, "Repository.expand_path: Not yet implemented"
end
get_latest_revision() click to toggle source

Returns the latest Repository::AbstractRevision

# File lib/repo/repository.rb, line 125
def get_latest_revision
  raise NotImplementedError, "Repository.get_latest_revision: Not yet implemented"
end
get_permissions(user_id) click to toggle source

Gets permissions for a particular user

# File lib/repo/repository.rb, line 158
def get_permissions(user_id)
  raise NotImplementedError, "Repository.get_permissions: Not yet implemented"
end
get_revision(revision_number) click to toggle source

Return a Repository::AbstractRevision for a given revision_number if it exists

# File lib/repo/repository.rb, line 131
def get_revision(revision_number)
  raise NotImplementedError,  "Repository.get_revision: Not yet implemented"
end
get_revision_by_timestamp(timestamp, path = nil) click to toggle source

Return a RepositoryRevision for a given timestamp

# File lib/repo/repository.rb, line 136
def get_revision_by_timestamp(timestamp, path = nil)
  raise NotImplementedError,  "Repository.get_revision_by_timestamp: Not yet implemented"
end
get_transaction(user_id, comment) click to toggle source

Returns a transaction for the provided user and uses comment as the commit message

# File lib/repo/repository.rb, line 115
def get_transaction(user_id, comment)
  raise NotImplementedError,  "Repository.get_transaction: Not yet implemented"
end
get_users(permissions) click to toggle source

Gets a list of users with permissions in question on the repository

use "Repository::Permission::ANY" to get a list of all users with any permissions
i.e. all users with at least read permissions
# File lib/repo/repository.rb, line 153
def get_users(permissions)
  raise NotImplementedError, "Repository.get_users: Not yet implemented"
end
remove_user(user_id) click to toggle source

Removes user permissions for read & write access to the repository

# File lib/repo/repository.rb, line 146
def remove_user(user_id)
  raise NotImplementedError,  "Repository.remove_user: Not yet implemented"
end
set_permissions(user_id, permissions) click to toggle source

Sets permissions for a particular user

# File lib/repo/repository.rb, line 163
def set_permissions(user_id, permissions)
  raise NotImplementedError, "Repository.set_permissions: Not yet implemented"
end
stringify_files(files) click to toggle source

Given either an array of, or a single object of class RevisionFile, return a stream of data for the user to download as the file(s).

# File lib/repo/repository.rb, line 109
def stringify_files(files)
  raise NotImplementedError,  "Repository.download: Not yet implemented"
end
Also aliased as: download_as_string