derb 0.2.0 → 0.3.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 +5 -0
- data/README.md +9 -3
- data/bin/derb +1 -3
- data/derb.gemspec +1 -1
- 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: c04fdac178c25a37865005ff90f7a0cf453c8ea5
|
4
|
+
data.tar.gz: 821e15cf6ef69bb355164d1accea166002822c8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23d36697a960d180ec344254973692ad38df7e08d828f63bb3d308d92284a323ff555077ffa4a3c83629d4f4b2b1463f90f91e41dd8f09fdc42b13b52450cbd8
|
7
|
+
data.tar.gz: 607f02c312fddb9ecec63fbebde9f220dd096adbcc44f6e6cd30e0bf1675ae916b90d9a08b539a94666661ec317c32bc13a9d765e54282ca0f43cc4e1f281c16
|
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
@@ -1,21 +1,27 @@
|
|
1
1
|
# Dockerfile.erb
|
2
2
|
|
3
|
-
Allows you to have simple Dockerfile.erb templates.
|
3
|
+
Allows you to have simple Dockerfile.erb (embedded Ruby) templates.
|
4
4
|
|
5
5
|
|
6
6
|
## Install
|
7
7
|
|
8
|
-
`gem install derb` or directly use the script in *bin/
|
8
|
+
With rubygems you can `gem install derb` or directly use the script in *bin/derb*.
|
9
9
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
In a directory with a `Dockerfile.erb`
|
13
|
+
In a directory with a `Dockerfile.erb` run:
|
14
14
|
|
15
15
|
$ derb
|
16
16
|
|
17
17
|
It will create the Dockerfile for you.
|
18
18
|
|
19
|
+
|
20
|
+
## Data
|
21
|
+
|
22
|
+
You can define a `Dockerfile.yml` in the same directory - its data will be available in the template.
|
23
|
+
|
24
|
+
|
19
25
|
## License
|
20
26
|
|
21
27
|
Copyright (c) 2014 Jan Lelis. MIT-License.
|
data/bin/derb
CHANGED
@@ -5,8 +5,6 @@ require 'yaml'
|
|
5
5
|
require 'ostruct'
|
6
6
|
|
7
7
|
class Derb
|
8
|
-
VERSION = '0.1.1'
|
9
|
-
|
10
8
|
def initialize(template_file = nil, data_file = nil)
|
11
9
|
template_file = template_file || 'Dockerfile.erb'
|
12
10
|
data_file = data_file || 'Dockerfile.yml'
|
@@ -22,7 +20,7 @@ class Derb
|
|
22
20
|
end
|
23
21
|
|
24
22
|
def render
|
25
|
-
ERB.new(@template).result(
|
23
|
+
ERB.new(@template, nil, "%<>").result(
|
26
24
|
OpenStruct.new(@data).instance_eval { binding }
|
27
25
|
)
|
28
26
|
end
|
data/derb.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: derb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Allows you to have Dockerfile.erb templates.
|
14
14
|
email: mail@janlelis.de
|