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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7b0eaffe4eadbac03e5393587f0377220a8dfd335f098d39a0c688e3d87aa90
4
- data.tar.gz: 9b83eb7efda7065551580efcd0966e1609c6e52f85c8619a8cc193340dd0a696
3
+ metadata.gz: 6d9ad7d1afb7766ab99f26cebe531e5242c0e1b045965f8b1b08cdb7d3048b4e
4
+ data.tar.gz: bce09d700333e1bb6cc3a80d9abcdfede0cbd3fb48157c0655342ea89bb68643
5
5
  SHA512:
6
- metadata.gz: 030eebde1411bfd630bcb55f7120e439c39787d5b0ce791ffee804edd21223672ec567f2923c18cc5f7716458e300b31bf74971255858bd48f883a1f137e7b57
7
- data.tar.gz: 9e4e0a31577564dc9fabb969b092b33d370794c5d62658b5bb513bb4cb342c37f0350a4bfe2ed48477e864e78249cce48463a69ff624b13c76b8b2c024855ee7
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
@@ -1,7 +1,7 @@
1
1
  # syntax = docker/dockerfile:1
2
2
 
3
3
  # Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
4
- ARG RUBY_VERSION=<%= Gem.ruby_version %>
4
+ ARG RUBY_VERSION=<%= RUBY_VERSION %>
5
5
  <% if api_client_dir -%>
6
6
  ARG NODE_VERSION=<%= node_version %>
7
7
 
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.1
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