Class: DarcsTempRepo
- Inherits:
-
Object
- Object
- DarcsTempRepo
- Defined in:
- app/reporters/darcs_temp_repo.rb
Overview
This class is part of a workaround for darcs bug #250 Darcs somehow needs to have a local repo to retrieve the changelog from a repo behind an HTTP server
For more details see bugs.darcs.net/issue250
Constant Summary collapse
- @@path =
File.(__FILE__ + '../../../../tmp/tmprepo')
Instance Method Summary collapse
-
#initialize(filesystem = File, fileutils = FileUtils, runner = ChdirRunner.new(@@path)) ⇒ DarcsTempRepo
constructor
A new instance of DarcsTempRepo.
- #path ⇒ Object
Constructor Details
#initialize(filesystem = File, fileutils = FileUtils, runner = ChdirRunner.new(@@path)) ⇒ DarcsTempRepo
Returns a new instance of DarcsTempRepo.
29 30 31 32 33 34 35 |
# File 'app/reporters/darcs_temp_repo.rb', line 29 def initialize(filesystem=File, fileutils=FileUtils, runner=ChdirRunner.new(@@path)) unless filesystem.exists?(path + '/_darcs') fileutils.mkdir_p(path) runner.run("darcs init") end end |
Instance Method Details
#path ⇒ Object
37 |
# File 'app/reporters/darcs_temp_repo.rb', line 37 def path; @@path; end |