Class: Disloku::Repository

Inherits:
Object
  • Object
show all
Defined in:
lib/disloku/Repository.rb

Direct Known Subclasses

Git::Repository

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location) ⇒ Repository

Returns a new instance of Repository.



8
9
10
11
12
13
# File 'lib/disloku/Repository.rb', line 8

def initialize(location)
	@location = location
	@root = getRepositoryRoot()
	@gitDir = File.join(@root, ".git")
	@provider = getProvider()
end

Instance Attribute Details

#locationObject

Returns the value of attribute location.



6
7
8
# File 'lib/disloku/Repository.rb', line 6

def location
  @location
end

#rootObject

Returns the value of attribute root.



6
7
8
# File 'lib/disloku/Repository.rb', line 6

def root
  @root
end

Instance Method Details

#getBranchNameObject

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/disloku/Repository.rb', line 19

def getBranchName()
	raise NotImplementedError.new()
end

#getChangeSets(from = nil, to = nil) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/disloku/Repository.rb', line 27

def getChangeSets(from = nil, to = nil)
	changeSets = @provider.getChangeSets(from, to)

	Log.instance.scope([:default, :logfile]) do
		changeSets.each() do |changeSet|
			Log.instance.info("gathered change set #{changeSet.to_s()}")
		end
	end

	return changeSets
end

#getProviderObject

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/disloku/Repository.rb', line 23

def getProvider()
	raise NotImplementedError.new()
end

#getRepositoryRootObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/disloku/Repository.rb', line 15

def getRepositoryRoot()
	raise NotImplementedError.new()
end