docker-compose 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/docker-compose.gemspec +2 -0
- data/lib/docker/compose/mapper.rb +3 -1
- data/lib/docker/compose/rake_tasks.rb +7 -5
- data/lib/docker/compose/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 784b16c1d7485086f701cb404cfcf6c03d8985da
|
4
|
+
data.tar.gz: cd9764dd13791b2bd2eec0114d9ffdd402f8221a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3f7cf959d520047d9c28f31ef4228c830a0447cd9f4cf5cfcbd0bc95c36b98ce4a0d50ca09025beeb0fd48509c450b99155029bbe5961823a2462da1a4f03ab
|
7
|
+
data.tar.gz: b5657e1816d9575246c1b6f8621fb333d9bbd904bc79b9c929adc9e01e001cbc82d264184940578db17528549d0375e8ed1dda383e2cd9a87e8904d239da7a2f
|
data/.travis.yml
CHANGED
data/docker-compose.gemspec
CHANGED
@@ -19,6 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
+
spec.required_ruby_version = Gem::Requirement.new("~> 2.0")
|
23
|
+
|
22
24
|
spec.add_dependency 'backticks', '~> 0.5'
|
23
25
|
|
24
26
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
@@ -98,11 +98,13 @@ module Docker::Compose
|
|
98
98
|
raise NoService, "Service '#{service}' not running, or does not publish port '#{port}'"
|
99
99
|
end
|
100
100
|
|
101
|
+
private
|
102
|
+
|
101
103
|
# Map a single string, replacing service names with IPs and container ports
|
102
104
|
# with the host ports that they have been mapped to.
|
103
105
|
# @param [String] value
|
104
106
|
# @return [String]
|
105
|
-
|
107
|
+
def map_scalar(value)
|
106
108
|
uri = begin
|
107
109
|
URI.parse(value)
|
108
110
|
rescue
|
@@ -73,7 +73,9 @@ module Docker::Compose
|
|
73
73
|
define
|
74
74
|
end
|
75
75
|
|
76
|
-
private
|
76
|
+
private
|
77
|
+
|
78
|
+
def define
|
77
79
|
namespace rake_namespace do
|
78
80
|
desc 'Print bash exports with IP/ports of running services'
|
79
81
|
task :env do
|
@@ -107,7 +109,7 @@ module Docker::Compose
|
|
107
109
|
# Substitute and set environment variables that point to network ports
|
108
110
|
# published by docker-compose services. Optionally also print bash export
|
109
111
|
# statements so this information can be made available to a user's shell.
|
110
|
-
|
112
|
+
def export_env(print:)
|
111
113
|
Docker::Compose::Mapper.map(host_env,
|
112
114
|
session: @session,
|
113
115
|
net_info: @net_info) do |k, v|
|
@@ -124,7 +126,7 @@ module Docker::Compose
|
|
124
126
|
# Transform a Ruby value into a String that can be stored in the
|
125
127
|
# environment. This accepts nil, String, or Array and returns nil, String
|
126
128
|
# or JSON-serialized Array.
|
127
|
-
|
129
|
+
def serialize_for_env(v)
|
128
130
|
case v
|
129
131
|
when String
|
130
132
|
v
|
@@ -138,7 +140,7 @@ module Docker::Compose
|
|
138
140
|
end
|
139
141
|
|
140
142
|
# Print an export or unset statement suitable for user's shell
|
141
|
-
|
143
|
+
def print_env(k, v)
|
142
144
|
if v
|
143
145
|
puts @shell_printer.export(k, v)
|
144
146
|
else
|
@@ -146,7 +148,7 @@ module Docker::Compose
|
|
146
148
|
end
|
147
149
|
end
|
148
150
|
|
149
|
-
|
151
|
+
def print_usage
|
150
152
|
command = "rake #{rake_namespace}:env"
|
151
153
|
command = 'bundle exec ' + command if defined?(Bundler)
|
152
154
|
puts @shell_printer.comment('To export these variables to your shell, run:')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-compose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Spataro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backticks
|
@@ -111,9 +111,9 @@ require_paths:
|
|
111
111
|
- lib
|
112
112
|
required_ruby_version: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- - "
|
114
|
+
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '0'
|
116
|
+
version: '2.0'
|
117
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
118
|
requirements:
|
119
119
|
- - ">="
|