cutlass 0.2.4 → 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 +4 -0
- data/Gemfile.lock +2 -2
- data/lib/cutlass/app.rb +7 -2
- data/lib/cutlass/container_boot.rb +2 -1
- data/lib/cutlass/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60df15fbdd7d8e5720584aac45b553e93eeb79fb72f78192ba06d51ec8b63a00
|
4
|
+
data.tar.gz: aea137a128750f7184f0bb5cfbd693957bd679dcda2b14e07b449b2611a801e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c1a8c7b46f327e0859b06a1b1311e65f1e10ebd755ab222201059639743010b7071e84c850452f13d47c38f80b688fbb581b06dbb2356b590badd11b6094a53
|
7
|
+
data.tar.gz: c4a7289cbf891b6d258803957c2ecfb59a8ee4f590cb1ef1a9fecc5c7b91651844c1118e4a8bf397ee31dc9287454bba93c6a73689547e1bc86015405b950ce0
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cutlass (0.
|
4
|
+
cutlass (0.3.0)
|
5
5
|
docker-api (>= 2.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -17,7 +17,7 @@ GEM
|
|
17
17
|
docker-api (2.2.0)
|
18
18
|
excon (>= 0.47.0)
|
19
19
|
multi_json
|
20
|
-
excon (0.
|
20
|
+
excon (0.87.0)
|
21
21
|
hashdiff (1.0.1)
|
22
22
|
multi_json (1.15.0)
|
23
23
|
parallel (1.20.1)
|
data/lib/cutlass/app.rb
CHANGED
@@ -90,10 +90,15 @@ module Cutlass
|
|
90
90
|
on_teardown { thread.join }
|
91
91
|
end
|
92
92
|
|
93
|
-
def start_container(
|
93
|
+
def start_container(env: {}, expose_ports: [], memory: nil)
|
94
94
|
raise "No block given" unless block_given?
|
95
95
|
|
96
|
-
ContainerBoot.new(
|
96
|
+
ContainerBoot.new(
|
97
|
+
image_id: last_build.image_id,
|
98
|
+
env: env,
|
99
|
+
expose_ports: expose_ports,
|
100
|
+
memory: memory
|
101
|
+
).call do |container|
|
97
102
|
yield container
|
98
103
|
end
|
99
104
|
end
|
@@ -33,7 +33,7 @@ module Cutlass
|
|
33
33
|
# container. It does not execute the container's entrypoint. That means if you're running
|
34
34
|
# inside of a CNB image, that env vars won't be set and the directory might be different.
|
35
35
|
class ContainerBoot
|
36
|
-
def initialize(image_id:, expose_ports: [], memory: nil)
|
36
|
+
def initialize(image_id:, env: {}, expose_ports: [], memory: nil)
|
37
37
|
@expose_ports = Array(expose_ports)
|
38
38
|
config = {
|
39
39
|
"Image" => image_id,
|
@@ -53,6 +53,7 @@ module Cutlass
|
|
53
53
|
end
|
54
54
|
|
55
55
|
config["Memory"] = memory.to_i if memory
|
56
|
+
config["Env"] = env.map { |k, v| "#{k}=#{v}" }
|
56
57
|
@container = Docker::Container.create(config)
|
57
58
|
end
|
58
59
|
|
data/lib/cutlass/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cutlass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- schneems
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docker-api
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
|
-
rubygems_version: 3.
|
95
|
+
rubygems_version: 3.1.4
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: Write CNB integration tests for Pack in Ruby with cutlass
|