Class: RakeDotNet::SvnInfo

Inherits:
SvnCmd show all
Defined in:
lib/rake_dotnet.rb

Instance Attribute Summary

Attributes inherited from Cli

#bin, #search_paths

Instance Method Summary collapse

Methods inherited from Cli

#exe, #search_for_exe

Constructor Details

#initialize(params = {}) ⇒ SvnInfo

Returns a new instance of SvnInfo.



1156
1157
1158
1159
# File 'lib/rake_dotnet.rb', line 1156

def initialize(params={})
  super
  @path = params[:path] || '.'
end

Instance Method Details

#cmdObject



1161
1162
1163
# File 'lib/rake_dotnet.rb', line 1161

def cmd
  "#{super} info #{path}"
end

#pathObject



1171
1172
1173
# File 'lib/rake_dotnet.rb', line 1171

def path
  "\"#{@path}\""
end

#revisionObject



1165
1166
1167
1168
1169
# File 'lib/rake_dotnet.rb', line 1165

def revision
  puts cmd if VERBOSE
  out = `#{cmd}`
  out.match(/Revision: (\d+)/)[1]
end