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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80302c5dd736c970690c1aa29ceb94d79daf73724ed027e0dde75547816e4d24
4
- data.tar.gz: 950a262dbff162954772b7087b174f8fe1fcabcfb98abd5e10ab188e26dd760c
3
+ metadata.gz: f3e29aa76e2a87fd9e1d699e4ab8549a21bb47cc579273dbfc43be62622cd39a
4
+ data.tar.gz: 4a393f60d36e2286577859de0c2b91200085612389c1285cb3c60f6e9db16a12
5
5
  SHA512:
6
- metadata.gz: f5917fd1f09b87b401841f1c618584ddcf135bf768ee83412a3b9a213aa13acad9d7e9acd89fc190b6b3a616624ecdad2110e79093ce9a35fed63e8fbba03313
7
- data.tar.gz: 2b1dce9db080d99cc8edb6d46b990d02db0c402d3cbafc523ccd2442a5e72eecba3ba67cbef421fd8309e9af768c4a86003e845e9ce2e7736194547d954361cd
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.add_plugin(Plugin) unless Seahorse::Client::Base.plugins.include?(Plugin)
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Docker
4
4
  module Stack
5
- VERSION = '0.2.6'
5
+ VERSION = '0.2.7'
6
6
  end
7
7
  end
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.6
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-26 00:00:00.000000000 Z
11
+ date: 2018-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview