Class: SVNCampfireNotifier::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/svn_campfire_notifier/project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository_path, revision) ⇒ Project

Returns a new instance of Project.



5
6
7
8
# File 'lib/svn_campfire_notifier/project.rb', line 5

def initialize(repository_path, revision)
  @repository_path = repository_path
  @revision        = revision.to_i
end

Instance Attribute Details

#repository_pathObject (readonly)

Returns the value of attribute repository_path.



3
4
5
# File 'lib/svn_campfire_notifier/project.rb', line 3

def repository_path
  @repository_path
end

#revisionObject (readonly)

Returns the value of attribute revision.



3
4
5
# File 'lib/svn_campfire_notifier/project.rb', line 3

def revision
  @revision
end

Instance Method Details

#authorObject



14
15
16
# File 'lib/svn_campfire_notifier/project.rb', line 14

def author
  @author ||= `svnlook author -r #{revision} #{repository_path}`.strip
end

#changedObject



18
19
20
# File 'lib/svn_campfire_notifier/project.rb', line 18

def changed
  @changes ||= `svnlook changed -r #{revision} #{repository_path}`.strip
end

#logObject



22
23
24
# File 'lib/svn_campfire_notifier/project.rb', line 22

def log
  @log ||= `svnlook log -r #{revision} #{repository_path}`.strip
end

#nameObject



10
11
12
# File 'lib/svn_campfire_notifier/project.rb', line 10

def name
  @repository_path.split('/').last
end