derb 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +7 -1
- data/README.md +3 -2
- data/bin/derb +13 -10
- data/derb.gemspec +2 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 318c62e63bcd9243e180c389ef24ebd0b5afbccb
|
4
|
+
data.tar.gz: a66829fd8824e0f2cc7eee4c277d5c7a20de056a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0acb36629ffdc5eefe7d04d39a24058b82901aafcfc167b496c3d2ba32825051e19c8a3df4209c46f25c5563328501cbb00bbcc713b7f13ff657d5df9092bba4
|
7
|
+
data.tar.gz: dcb0ce47627b0974996ed0769320a0d8c8ae9abec6a7cebc663111a33050559aa67454790cee351925149a44efa848c9790aea14c80ec434a6606f1e90309994
|
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# Dockerfile.erb
|
2
2
|
|
3
|
-
Allows you to have Dockerfile.erb templates.
|
3
|
+
Allows you to have simple Dockerfile.erb templates.
|
4
4
|
|
5
5
|
|
6
6
|
## Install
|
@@ -14,6 +14,7 @@ In a directory with a `Dockerfile.erb` (and optionally a `Dockerfile.yml`), run:
|
|
14
14
|
|
15
15
|
$ derb
|
16
16
|
|
17
|
+
It will create the Dockerfile for you.
|
17
18
|
|
18
19
|
## License
|
19
20
|
|
data/bin/derb
CHANGED
@@ -5,7 +5,7 @@ require 'yaml'
|
|
5
5
|
require 'ostruct'
|
6
6
|
|
7
7
|
class Derb
|
8
|
-
VERSION = '0.1.
|
8
|
+
VERSION = '0.1.1'
|
9
9
|
|
10
10
|
def initialize(template_file = nil, data_file = nil)
|
11
11
|
template_file = template_file || 'Dockerfile.erb'
|
@@ -27,20 +27,23 @@ class Derb
|
|
27
27
|
)
|
28
28
|
end
|
29
29
|
|
30
|
-
def render_to_file(output_filename =
|
30
|
+
def render_to_file(output_filename = nil)
|
31
|
+
output_filename = output_filename || 'Dockerfile'
|
32
|
+
|
31
33
|
if File.exists? output_filename
|
32
|
-
|
33
|
-
|
34
|
+
raise "#{output_filename} does already exist, aborting"
|
35
|
+
else
|
36
|
+
File.open(output_filename, 'w+'){ |f|
|
37
|
+
f.write(render)
|
38
|
+
}
|
39
|
+
puts "Created #{output_filename}"
|
34
40
|
end
|
35
|
-
|
36
|
-
File.open(output_filename, 'w+'){ |f|
|
37
|
-
f.write(render)
|
38
|
-
}
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
42
44
|
begin
|
43
|
-
Derb.new(ARGV[0], ARGV[1]).render_to_file
|
44
|
-
rescue
|
45
|
+
Derb.new(ARGV[0], ARGV[1]).render_to_file(ARGV[2])
|
46
|
+
rescue => e
|
45
47
|
$stderr.puts e.message
|
48
|
+
exit 1
|
46
49
|
end
|
data/derb.gemspec
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
|
-
load File.expand_path('../bin/derb', __FILE__)
|
4
|
-
|
5
3
|
Gem::Specification.new do |gem|
|
6
4
|
gem.name = "derb"
|
7
|
-
gem.version =
|
5
|
+
gem.version = "0.2.0"
|
8
6
|
gem.summary = 'Dockerfile.erb'
|
9
|
-
gem.description = '
|
7
|
+
gem.description = 'Allows you to have Dockerfile.erb templates.'
|
10
8
|
gem.license = "MIT"
|
11
9
|
gem.authors = ["Jan Lelis"]
|
12
10
|
gem.email = "mail@janlelis.de"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: derb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
@@ -10,7 +10,7 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: Allows you to have Dockerfile.erb templates.
|
14
14
|
email: mail@janlelis.de
|
15
15
|
executables:
|
16
16
|
- derb
|