lib/docman/builders/git_builder.rb in docman-0.0.3 vs lib/docman/builders/git_builder.rb in docman-0.0.4

- old
+ new

@@ -6,29 +6,21 @@ register_builder :git def direct puts 'Do direct' - GitUtil.get(@info['repo'], @info['full_build_path'], version_type, version) + GitUtil.get(@info['repo'], @info['full_build_path'], @info.version_type, @info.version) end def strip puts 'Do strip' FileUtils.rm_r(@info['full_build_path']) if File.directory? @info['full_build_path'] - result = GitUtil.get(@info['repo'], @info['temp_path'], version_type, version) + result = GitUtil.get(@info['repo'], @info['temp_path'], @info.version_type, @info.version) FileUtils.mkdir_p(@info['full_build_path']) FileUtils.cp_r(Dir["#{@info['temp_path']}/."], @info['full_build_path']) FileUtils.rm_r(File.join(@info['full_build_path'], '.git')) result end - # TODO: need to refactor into into @info class. - def version - @info['states'][@state]['version'] - end - - def version_type - @info['states'][@state]['type'] - end end end end