docker-stack 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/docker/stack/localstack/endpoint_stub.rb +7 -3
- data/lib/docker/stack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3e29aa76e2a87fd9e1d699e4ab8549a21bb47cc579273dbfc43be62622cd39a
|
4
|
+
data.tar.gz: 4a393f60d36e2286577859de0c2b91200085612389c1285cb3c60f6e9db16a12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7a69fc4708570ec3357adf175b08f6bcb62fb813eac7debed13c964ab612daa7ba57c82282ec2f4ec5da4cd724c855a03810e237097839f221b123ae628ea54
|
7
|
+
data.tar.gz: c21f693674397771a45393d141394a12b5c032d0c5f3cfe491613114920cf7da6516d46b8581442ab1d4c824fd07830d03417b1428acfe5ba90c0f97a3598b46
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'docker/stack'
|
3
4
|
require 'aws-sdk-core'
|
4
5
|
|
5
6
|
module Docker
|
@@ -36,8 +37,8 @@ module Docker
|
|
36
37
|
def endpoint_for(client)
|
37
38
|
base_port = PORT_MAP[client.class.parent_name]
|
38
39
|
return nil if base_port.nil?
|
39
|
-
base_url = 'http://localhost'
|
40
|
-
offset = Docker::Stack.port_for(:localstack)
|
40
|
+
base_url = ENV['LOCALSTACK_ENDPOINT'] || 'http://localhost'
|
41
|
+
offset = ENV['LOCALSTACK_OFFSET']&.to_i || Docker::Stack.port_for(:localstack)
|
41
42
|
base_uri = URI.parse(base_url)
|
42
43
|
base_uri.port = base_port + offset
|
43
44
|
base_uri.to_s
|
@@ -49,7 +50,10 @@ module Docker
|
|
49
50
|
region: 'us-east-1',
|
50
51
|
credentials: Aws::Credentials.new('localstack-key', 'localstack-secret')
|
51
52
|
)
|
52
|
-
Seahorse::Client::Base
|
53
|
+
classes_to_stub = [Seahorse::Client::Base] + Seahorse::Client::Base.descendants
|
54
|
+
classes_to_stub.each do |klass|
|
55
|
+
klass.add_plugin(Plugin) unless klass.plugins.include?(Plugin)
|
56
|
+
end
|
53
57
|
|
54
58
|
return unless defined?(Aws::S3)
|
55
59
|
Aws::S3::Plugins::BucketDns.options.find { |opt| opt.name == :force_path_style }.default = true
|
data/lib/docker/stack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-stack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Klein
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03
|
11
|
+
date: 2018-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|