metaparticle 0.0.0.4 → 0.0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metaparticle/base.rb +4 -18
- data/lib/metaparticle/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b5fc7410834157239605c41792ecd172d012fc4
|
4
|
+
data.tar.gz: 49556bba40a884627afb6bb2f1b48e4cee2a5733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dca50260cc5bd1c3ad31bef4448a04317a1f5658ec68b54ef361612d381334d4ea73f0ded75a42f9266c4d96b5cd4babf7b7f041f5dcfedccbe80684de99330b
|
7
|
+
data.tar.gz: dbddc0dbc6762c37e024e38125070b61da2cf41199828414524a5c1fdf1035fd057f4d795c34b5f2ab8b2bf5fd0c30fd14efb8d440068ea9c7ba9e62870ca946
|
data/lib/metaparticle/base.rb
CHANGED
@@ -6,23 +6,9 @@ require "metaparticle/metaparticle_runner"
|
|
6
6
|
|
7
7
|
module Metaparticle
|
8
8
|
class Base
|
9
|
-
def initialize(
|
10
|
-
@
|
11
|
-
|
12
|
-
if block.arity == 1
|
13
|
-
block.call(self)
|
14
|
-
else
|
15
|
-
instance_eval(&block)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def call(env)
|
21
|
-
@app.call(env)
|
22
|
-
end
|
23
|
-
|
24
|
-
def containerize(&block)
|
25
|
-
@config = OpenStruct.new(block.call)
|
9
|
+
def initialize(config, &block)
|
10
|
+
@config = OpenStruct.new(config)
|
11
|
+
@app = block
|
26
12
|
run!
|
27
13
|
end
|
28
14
|
|
@@ -66,7 +52,7 @@ CMD rackup
|
|
66
52
|
|
67
53
|
def run!
|
68
54
|
if docker.in_docker_container?
|
69
|
-
|
55
|
+
@app.call
|
70
56
|
end
|
71
57
|
@config.image = "#{@config.repository}/#{@config.name}"
|
72
58
|
write_dockerfile
|
data/lib/metaparticle/version.rb
CHANGED