39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/falsework/upgrader.rb', line 39
def initialize dir, note = Mould::NOTE
fail UpgradeError, "directory #{dir} is unreadable" unless File.readable?(dir.to_s)
@dir = Pathname.new File.realpath(dir)
begin
@note = Upgrader.noteLoad(@dir + note)
rescue
raise UpgradeError, $!
end
@mould = Mould.new @note['project']['classy'], @note['template']['name']
@template_dir = Mould.templates[@note['template']['name']]
@project = @mould.project
@batch = false
end
|