hoosegow 1.2.1 → 1.2.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
  SHA1:
3
- metadata.gz: 8a743e7ec41c3707de2a2e28ac52496e05453c70
4
- data.tar.gz: b69f9d254a0c2fe8f3639cdeaadaf2957632e1af
3
+ metadata.gz: ceed4f5d348d898d233966dfc25bf9fac28a6940
4
+ data.tar.gz: bc31af907f34fb7cebf7e17634a3ed3b95395e6c
5
5
  SHA512:
6
- metadata.gz: 51cca6f9ed8ab60e905c3f601541eefa119425fd4a24e969c3f0426daa34d87d31aa9b1adf02a76bf03e58c7f832beb17309438dcac7e0b249d776fbbc338d68
7
- data.tar.gz: 6a424b86b4fbf080eb87056a9a85d5266bc6071d044bac12751557ece029d9f7ae712a98b60db1f87abea488fb240f36799d6b3352b46723074aff88d27b0618
6
+ metadata.gz: d02daa560bdfa44dcc50c79998d57886d5502843cd8de6d49d1f0cf39ba8f3f4f1908e1478c61ca0ca2246c6df6e5ce5d867d13d42acfe1e2bf978fa60e842ac
7
+ data.tar.gz: 7fdef10365911b536da35c20c83c21e63590a844cc413194f70edac6d75c80041e97397cae9de93e62862096aa86a26985b928623e2042d51f99a689660a021f
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.1'
5
+ s.version = '1.2.2'
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"]
@@ -28,5 +28,5 @@ Gem::Specification.new do |s|
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'
31
- s.add_runtime_dependency 'docker-api', '~> 1.13.6'
31
+ s.add_runtime_dependency 'docker-api', '~> 1.19'
32
32
  end
@@ -38,7 +38,7 @@ class Hoosegow
38
38
  # :Other - any option with a capitalized key will be passed on
39
39
  # to the 'create container' call. See http://docs.docker.io/en/latest/reference/api/docker_remote_api_v1.9/#create-a-container
40
40
  def initialize(options = {})
41
- ::Docker.url = docker_url options
41
+ set_docker_url! options
42
42
  @after_create = options[:after_create]
43
43
  @after_start = options[:after_start]
44
44
  @after_stop = options[:after_stop]
@@ -168,6 +168,13 @@ class Hoosegow
168
168
  end
169
169
 
170
170
  private
171
+ # Private: Set the docker URL, if related options are present.
172
+ def set_docker_url!(options)
173
+ if url = docker_url(options)
174
+ ::Docker.url = url
175
+ end
176
+ end
177
+
171
178
  # Private: Get the URL to use for communicating with Docker. If a host and/or
172
179
  # port a present, a TCP socket URL will be generated. Otherwise a Unix
173
180
  # socket will be used.
@@ -184,9 +191,10 @@ class Hoosegow
184
191
  host = options[:host] || DEFAULT_HOST
185
192
  port = options[:port] || DEFAULT_PORT
186
193
  "tcp://#{host}:#{port}"
187
- else
188
- path = options[:socket] || DEFAULT_SOCKET
194
+ elsif path = options[:socket]
189
195
  "unix://#{path}"
196
+ else
197
+ nil
190
198
  end
191
199
  end
192
200
 
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.1
4
+ version: 1.2.2
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: 2015-06-11 00:00:00.000000000 Z
12
+ date: 2015-11-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -97,14 +97,14 @@ dependencies:
97
97
  requirements:
98
98
  - - "~>"
99
99
  - !ruby/object:Gem::Version
100
- version: 1.13.6
100
+ version: '1.19'
101
101
  type: :runtime
102
102
  prerelease: false
103
103
  version_requirements: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - "~>"
106
106
  - !ruby/object:Gem::Version
107
- version: 1.13.6
107
+ version: '1.19'
108
108
  description: Hoosegow provides an RPC layer on top of Docker containers so that you
109
109
  can isolate unsafe parts of your application.
110
110
  email: mastahyeti@github.com
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  version: '0'
155
155
  requirements: []
156
156
  rubyforge_project:
157
- rubygems_version: 2.2.3
157
+ rubygems_version: 2.4.5
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: A Docker jail for ruby code