hoosegow 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -0
- data/hoosegow.gemspec +2 -2
- data/lib/hoosegow/docker.rb +2 -0
- data/script/bootstrap +1 -1
- data/spec/hoosegow_docker_spec.rb +22 -0
- metadata +4 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5236254c19caca40ddba281a7b4881ed849885c4
|
4
|
+
data.tar.gz: 7f266fd4654f08680b084fbe5ff6daf86b3e5f48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 612bd862bbdb713fafabf7605d8b98136f121bf8321437e71c55fb86946209c8cc06a945b7bb508eef90fd1329e0f7d502827aeb75875c960fa666334da1ac0e
|
7
|
+
data.tar.gz: 66a72c410f73b9aa21238568e21d5eccef15b48f6bf35f1de94838db2f98579b1238cf5cce9fdce6c5835e836dc2d714e29ca7b1a95af9beae493dc6cb93973a
|
data/Rakefile
CHANGED
data/hoosegow.gemspec
CHANGED
@@ -2,7 +2,7 @@ require 'rake'
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'hoosegow'
|
5
|
-
s.version = '1.2.
|
5
|
+
s.version = '1.2.3'
|
6
6
|
s.summary = "A Docker jail for ruby code"
|
7
7
|
s.description = "Hoosegow provides an RPC layer on top of Docker containers so that you can isolate unsafe parts of your application."
|
8
8
|
s.authors = ["Ben Toews", "Matt Burke"]
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.executables = ['hoosegow']
|
25
25
|
s.homepage = 'https://github.com/github/hoosegow'
|
26
26
|
s.required_ruby_version = ">= 1.9.3"
|
27
|
-
s.add_development_dependency 'rake'
|
27
|
+
s.add_development_dependency 'rake'
|
28
28
|
s.add_development_dependency 'rspec', '>= 2.14.1', '~> 2.14'
|
29
29
|
s.add_runtime_dependency 'msgpack', '>= 0.5.6', '~> 0.5'
|
30
30
|
s.add_runtime_dependency 'yajl-ruby', '>= 1.1.0', '~> 1.1'
|
data/lib/hoosegow/docker.rb
CHANGED
data/script/bootstrap
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
#!/bin/bash
|
2
|
-
bundle install -j4
|
2
|
+
bundle install -j4 --path .bundle --binstubs bundler-bin
|
@@ -106,4 +106,26 @@ describe Hoosegow::Docker do
|
|
106
106
|
expect(docker.image_exist?("not_there")).to eq(false)
|
107
107
|
end
|
108
108
|
end
|
109
|
+
|
110
|
+
context "delete_container" do
|
111
|
+
let(:docker) { Hoosegow::Docker.new CONFIG }
|
112
|
+
let(:container) { Object.new }
|
113
|
+
before do
|
114
|
+
docker.instance_variable_set(:@container, container)
|
115
|
+
allow(container).to receive(:id).and_return("1234")
|
116
|
+
$old_stderr = $stderr
|
117
|
+
$stderr = StringIO.new
|
118
|
+
end
|
119
|
+
after do
|
120
|
+
$stderr = $old_stderr
|
121
|
+
end
|
122
|
+
|
123
|
+
it "rescues error and prints when error is raised" do
|
124
|
+
allow(container).to receive(:delete).
|
125
|
+
and_raise(::Docker::Error::ServerError, "device or resource busy")
|
126
|
+
docker.delete_container
|
127
|
+
$stderr.rewind
|
128
|
+
expect($stderr.read).to eql("Docker could not delete 1234: device or resource busy\n")
|
129
|
+
end
|
130
|
+
end
|
109
131
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoosegow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Toews
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -17,20 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
21
|
-
- - "~>"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: '10.3'
|
20
|
+
version: '0'
|
24
21
|
type: :development
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
27
24
|
requirements:
|
28
25
|
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '10.3'
|
27
|
+
version: '0'
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: rspec
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|