Method: Cir::Repository.create
- Defined in:
- lib/cir/repository.rb
.create(rootPath) ⇒ Object
Create new repository backend (initialize git repo and the metadata database)
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/cir/repository.rb', line 26 def self.create(rootPath) git = Cir::GitRepository.create(rootPath) # Create database database = YAML::Store.new(rootPath + '/' + FILE_LIST) database.transaction do database[:version] = 1 database[:files] = {} end # Add it to git and finish git.add_file FILE_LIST git.commit end |