Class: CodespicuousConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/codespicuous/codespicuous_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCodespicuousConfig

Returns a new instance of CodespicuousConfig.



8
9
10
11
12
13
14
15
16
17
# File 'lib/codespicuous/codespicuous_config.rb', line 8

def initialize
  @offline = false
  @configuration_file_name = "codespicuous.yaml"
  @input_path = Pathname.new(".")
  @output_path = Pathname.new(".")
  @list_repositories = false
  @svnlogdir = "svnlog"

  @output_dir_csv_files = "csv_files"
end

Instance Attribute Details

#configuration_file_nameObject

Returns the value of attribute configuration_file_name.



6
7
8
# File 'lib/codespicuous/codespicuous_config.rb', line 6

def configuration_file_name
  @configuration_file_name
end

#input_pathObject

Returns the value of attribute input_path.



6
7
8
# File 'lib/codespicuous/codespicuous_config.rb', line 6

def input_path
  @input_path
end

#list_repositoriesObject

Returns the value of attribute list_repositories.



6
7
8
# File 'lib/codespicuous/codespicuous_config.rb', line 6

def list_repositories
  @list_repositories
end

#offlineObject

Returns the value of attribute offline.



6
7
8
# File 'lib/codespicuous/codespicuous_config.rb', line 6

def offline
  @offline
end

#output_pathObject

Returns the value of attribute output_path.



6
7
8
# File 'lib/codespicuous/codespicuous_config.rb', line 6

def output_path
  @output_path
end

Instance Method Details

#path_to_cached_svn_log(repository_name) ⇒ Object



31
32
33
# File 'lib/codespicuous/codespicuous_config.rb', line 31

def path_to_cached_svn_log(repository_name)
  (Pathname.new(path_to_cached_svn_log_dir) + Pathname.new(repository_name + ".log")).to_s
end

#path_to_cached_svn_log_dirObject



35
36
37
# File 'lib/codespicuous/codespicuous_config.rb', line 35

def path_to_cached_svn_log_dir
  (@input_path + Pathname.new(@svnlogdir)).to_s
end

#path_to_configuration_fileObject



27
28
29
# File 'lib/codespicuous/codespicuous_config.rb', line 27

def path_to_configuration_file
  (@input_path + @configuration_file_name).to_s
end

#path_to_csv_file(filename) ⇒ Object



43
44
45
# File 'lib/codespicuous/codespicuous_config.rb', line 43

def path_to_csv_file(filename)
  (Pathname.new(path_to_output_dir_for_csv_files) + Pathname.new(filename)).to_s
end

#path_to_output_dir_for_csv_filesObject



39
40
41
# File 'lib/codespicuous/codespicuous_config.rb', line 39

def path_to_output_dir_for_csv_files
  (@output_path + Pathname.new(@output_dir_csv_files)).to_s
end