dockerfile-rails 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/erbtest.rb +41 -0
- data/lib/generators/templates/Dockerfile.erb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d9ad7d1afb7766ab99f26cebe531e5242c0e1b045965f8b1b08cdb7d3048b4e
|
4
|
+
data.tar.gz: bce09d700333e1bb6cc3a80d9abcdfede0cbd3fb48157c0655342ea89bb68643
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 452a96a35af88b08aca8229ff52be8ebc37712da48ec2b17f5b3ab8147c7901e0ee344698d209c9cd515fd984dfc652d188a01718a3853b00d790cc9bb9ed7f2
|
7
|
+
data.tar.gz: 7b11087072696ef3aae63f895e8680ed048d60500f3d6947319c2ffa47254b9af6a02c7f63584ccf6782affb88e198d2d16eb438703c6cc85d023427b280a1f7
|
data/lib/erbtest.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
TEMPLATE = <<-EOF
|
2
|
+
value is <%= five %>
|
3
|
+
other is <%= three %>
|
4
|
+
EOF
|
5
|
+
|
6
|
+
require 'delegate'
|
7
|
+
require 'forwardable'
|
8
|
+
class Scope < SimpleDelegator
|
9
|
+
end
|
10
|
+
|
11
|
+
require 'erb'
|
12
|
+
class ShoppingList
|
13
|
+
def five
|
14
|
+
'FiVe'
|
15
|
+
end
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
renderer = ERB.new(TEMPLATE)
|
19
|
+
puts '***'
|
20
|
+
|
21
|
+
values = {one: 'One', three: 'tHrEe'}
|
22
|
+
|
23
|
+
scope = (Class.new(SimpleDelegator) do
|
24
|
+
extend Forwardable
|
25
|
+
def_delegators values, :one, :three
|
26
|
+
|
27
|
+
def three
|
28
|
+
3
|
29
|
+
end
|
30
|
+
end).new(self)
|
31
|
+
|
32
|
+
puts renderer.result(scope.get_binding)
|
33
|
+
end
|
34
|
+
|
35
|
+
def get_binding
|
36
|
+
binding
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
puts '?'
|
41
|
+
test = ShoppingList.new
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockerfile-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- Rakefile
|
37
37
|
- lib/dockerfile-rails.rb
|
38
38
|
- lib/dockerfile-rails/scanner.rb
|
39
|
+
- lib/erbtest.rb
|
39
40
|
- lib/generators/dockerfile_generator.rb
|
40
41
|
- lib/generators/templates/Dockerfile.erb
|
41
42
|
- lib/generators/templates/docker-compose.yml.erb
|