indocker 0.3.4 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1525d1c94e75b882f157869b2974f6e2b28492e5da405845e6f73b1e8c1c7316
4
- data.tar.gz: 7f67cfe0523352dfe5143f24bcdfe51634174e8d36b61e44725ddba16c84ae1e
3
+ metadata.gz: e03a0049fdc315498757017b1353d48d835111b3fbdd58560ee0775edd9a6069
4
+ data.tar.gz: 59d579a9a956ea58ebb717e379d86949ac94e6522cc34a0b8982cbaa2a48f564
5
5
  SHA512:
6
- metadata.gz: 36c2071132b96a0c7628db048233b4a1b4433fb299bccede5cdca84eeaed4a5100cfc6870c34c98847596cecdcf8ab0361e70328af0ab044e0b1147b1d1e4a52
7
- data.tar.gz: b4ec3d0e29b21c3fbaf5b0551ea68cb0e69d5b34fb0f6b2755d5379ff38a9cb4261f7d36752c0fd33f2c722ab3b8a9f3859bc6ed6f6660ce221e1c8bcbf07f29
6
+ metadata.gz: 28541ee745441392be17b677daa08e8b6ee6d01d55689fd7fa83f8df0ca4313352858bb583ed22bfa518b8693d7ef02996ceddc70616b5c18798779bc8ce92ce
7
+ data.tar.gz: a4b6cf05ff1aaac207d8c2119233a88470b04996b67d3e509ecfedc6a47f773ed4daac73b69390a0ab239c63ac4025f6c5c5f6c708b2130f45546efc7768bda7
@@ -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) }
@@ -57,7 +60,7 @@ class Indocker::Images::Image
57
60
  @compile_rpaths = flag_or_rpaths
58
61
  end
59
62
 
60
- @dockerfile = path
63
+ nil
61
64
  end
62
65
 
63
66
  def dockerfile
@@ -8,8 +8,10 @@ class Indocker::Images::TemplateCompiler
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.4"
2
+ VERSION = "0.3.6"
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.4
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Gatiyatov