indocker 0.3.3 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75fb3f5b77d832b54c9f055f9baeff26dc14b6cf4fcbe740a9df05ff1402f07c
4
- data.tar.gz: a01858bc28c0c243a1a397f5a4a364f5df5ddbdfa71f5ae74135e703265ceb31
3
+ metadata.gz: 0ace9121628e29137ad50db6a6ced1e89a8295d352f4df94292a9bf16dc3febb
4
+ data.tar.gz: 031a8379c69ef612d6782e4246f030eb747582b47f28a1eacedb79c5d345b5f8
5
5
  SHA512:
6
- metadata.gz: fe711686da87588d266f28953aafe462b5ec3d206f3307233ebf30859752fd7d8ae1a7bb65a5eab0c6182d3d1163234c1b1a4129f652726441b8f82241d6ac9f
7
- data.tar.gz: 856d41ae64eaf250bd3b715e7d1dcc1567676036b19aadb7af03a809bb6f67b960575dbd111da7fd5c4cbe422e922e8295a9ac1981662ac03741cca6013c97d5
6
+ metadata.gz: 24e0c0e996ceaccd442fb3513eedc4aa037720d6054a9696a9139d75c11262720290c5d2c1cd46545e1065689a9a518ad18c0a1bc2ead53e896db7fc0d81f24b
7
+ data.tar.gz: e620e1c14a5cc29e3bacc68cbdf72f9983fe951c510501b3c12703c3e0e8db3a9964af031086f573cf8e4e2101148772c44e4c51b347b590542f967fad04c071
@@ -1,4 +1,6 @@
1
1
  class Indocker::Images::Image
2
+ DOCKERFILE = "Dockerfile"
3
+
2
4
  attr_reader :name, :compile, :compile_rpaths, :dependent_images, :build_args
3
5
 
4
6
  def initialize(name)
@@ -37,6 +39,7 @@ class Indocker::Images::Image
37
39
  end
38
40
 
39
41
  def compile?(path)
42
+ return true if path.include?(DOCKERFILE)
40
43
  return false if !@compile
41
44
  return true if @compile_rpaths.empty?
42
45
  return true if @compile_rpaths.any? { |rpath| path.include?(rpath) }
@@ -2,14 +2,16 @@ require 'erb'
2
2
 
3
3
  class Indocker::Images::TemplateCompiler
4
4
  def compile(path, context, image)
5
- if !image.compile?(file)
5
+ if !image.compile?(path)
6
6
  Indocker.logger.debug("skipping ERB compilation for #{path}".grey)
7
7
  return
8
8
  end
9
9
 
10
10
  Indocker.logger.debug("compiling template file #{path}".grey)
11
+
11
12
  template = File.read(path)
12
13
  content = ERB.new(template).result(context.helper.get_binding)
14
+
13
15
  File.write(path, content)
14
16
  rescue Errno::EACCES => e
15
17
  # do nothing for read only files
@@ -1,3 +1,3 @@
1
1
  module Indocker
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indocker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Gatiyatov