Class: GitHandler::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/git_handler/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Configuration

Initialize a new Configuration instance with options hash

Valid options:

:user       - Git user
:home_path  - Git user home path
:repos_path - Path to repositories
:log_path   - Git access log path


16
17
18
19
20
21
# File 'lib/git_handler/configuration.rb', line 16

def initialize(options={})
  @user       = options[:user]       || 'git'
  @home_path  = options[:home_path]  || '/home/git'
  @repos_path = options[:repos_path] || File.join(@home_path, 'repositories')
  @log_path   = options[:log_path]   || File.join(@home_path, 'access.log')
end

Instance Attribute Details

#home_pathObject (readonly)

Returns the value of attribute home_path.



4
5
6
# File 'lib/git_handler/configuration.rb', line 4

def home_path
  @home_path
end

#log_pathObject (readonly)

Returns the value of attribute log_path.



6
7
8
# File 'lib/git_handler/configuration.rb', line 6

def log_path
  @log_path
end

#repos_pathObject (readonly)

Returns the value of attribute repos_path.



5
6
7
# File 'lib/git_handler/configuration.rb', line 5

def repos_path
  @repos_path
end

#userObject (readonly)

Returns the value of attribute user.



3
4
5
# File 'lib/git_handler/configuration.rb', line 3

def user
  @user
end