derb 0.2.0 → 0.3.0

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.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog.md +5 -0
  3. data/README.md +9 -3
  4. data/bin/derb +1 -3
  5. data/derb.gemspec +1 -1
  6. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 318c62e63bcd9243e180c389ef24ebd0b5afbccb
4
- data.tar.gz: a66829fd8824e0f2cc7eee4c277d5c7a20de056a
3
+ metadata.gz: c04fdac178c25a37865005ff90f7a0cf453c8ea5
4
+ data.tar.gz: 821e15cf6ef69bb355164d1accea166002822c8a
5
5
  SHA512:
6
- metadata.gz: 0acb36629ffdc5eefe7d04d39a24058b82901aafcfc167b496c3d2ba32825051e19c8a3df4209c46f25c5563328501cbb00bbcc713b7f13ff657d5df9092bba4
7
- data.tar.gz: dcb0ce47627b0974996ed0769320a0d8c8ae9abec6a7cebc663111a33050559aa67454790cee351925149a44efa848c9790aea14c80ec434a6606f1e90309994
6
+ metadata.gz: 23d36697a960d180ec344254973692ad38df7e08d828f63bb3d308d92284a323ff555077ffa4a3c83629d4f4b2b1463f90f91e41dd8f09fdc42b13b52450cbd8
7
+ data.tar.gz: 607f02c312fddb9ecec63fbebde9f220dd096adbcc44f6e6cd30e0bf1675ae916b90d9a08b539a94666661ec317c32bc13a9d765e54282ca0f43cc4e1f281c16
@@ -1,3 +1,8 @@
1
+ ### 0.3.0
2
+
3
+ * Activate line trimming and alternative one-line erb syntax
4
+
5
+
1
6
  ### 0.2.0
2
7
 
3
8
  * Allow to specify output file on command line as well
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/ruby*.
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` (and optionally a `Dockerfile.yml`), run:
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "derb"
5
- gem.version = "0.2.0"
5
+ gem.version = "0.3.0"
6
6
  gem.summary = 'Dockerfile.erb'
7
7
  gem.description = 'Allows you to have Dockerfile.erb templates.'
8
8
  gem.license = "MIT"
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.2.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-08-23 00:00:00.000000000 Z
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