Sha256: 6996a7d1ec2c4a903a70d2a6e8ea3ea3fe5f361a8562c034a6da8ba4dda1f882

Contents?: true

Size: 592 Bytes

Versions: 12

Compression:

Stored size: 592 Bytes

Contents


module Dockerun
  module Template
    class TemplateEngine

      def self.template_root
        File.join(File.dirname(__FILE__),"..","..","..","template")
      end

      def self.available_templates
        avail = Dir.glob(File.join(template_root,"Dockerfile_*.erb"))

        #userDir = File.join(Dir.home,".dockerun","template")
        #if File.exist?(userDir)
        #  avail += Dir.glob(userDir,"*.erb")
        #end
        
        avail.map! { |f| 
          name = File.basename(f,File.extname(f))
          name.gsub("Dockerfile_","")
        }
      end

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
dockerun-0.3.6 lib/dockerun/template/template_engine.rb
dockerun-0.3.5 lib/dockerun/template/template_engine.rb
dockerun-0.3.4 lib/dockerun/template/template_engine.rb
dockerun-0.3.3 lib/dockerun/template/template_engine.rb
dockerun-0.3.1 lib/dockerun/template/template_engine.rb
dockerun-0.3.0 lib/dockerun/template/template_engine.rb
dockerun-0.2.3 lib/dockerun/template/template_engine.rb
dockerun-0.2.2 lib/dockerun/template/template_engine.rb
dockerun-0.2.1 lib/dockerun/template/template_engine.rb
dockerun-0.2.0 lib/dockerun/template/template_engine.rb
dockerun-0.1.18 lib/dockerun/template/template_engine.rb
dockerun-0.1.16 lib/dockerun/template/template_engine.rb