class XMigra::GitSpecifics::RepoStoredMigrationChain
Public Class Methods
new(branch, path, options={})
click to toggle source
Calls superclass method
XMigra::MigrationChain::new
# File lib/xmigra/vcs_support/git.rb, line 598 def initialize(branch, path, options={}) @branch = branch options[:vcs_specifics] = GitSpecifics super(path, options) end
Protected Instance Methods
yaml_of_file(fpath)
click to toggle source
# File lib/xmigra/vcs_support/git.rb, line 605 def yaml_of_file(fpath) fdir, fname = Pathname(fpath).split file_contents = Dir.chdir(fdir) do |pwd| GitSpecifics.run_git(:show, "#{@branch}:./#{fname}") end begin YAML.load(file_contents, fpath.to_s) rescue raise XMigra::Error, "Error loading/parsing #{fpath}" end end