rservicebus2 0.2.25 → 0.2.26

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: ae906c0d751849d9f4843a7b8ca164398597fd9f7fd88a6673b7d4851e2f1672
4
- data.tar.gz: e0b563cf71559ff0565af68132bb31035e292098cf9f2716b086b6293daa8481
3
+ metadata.gz: 8590b64121dc0528e931b8bad65291c44b80e92d9cf1702ab33aad06ba0d246d
4
+ data.tar.gz: b737f18b0ab817bdcf0256a67e01a7d1fc19c9564af74b7242d7050fc3655ff3
5
5
  SHA512:
6
- metadata.gz: 69c1d0ff2b0c93f087dd5a9daf57040f132e0d3e513ef591b608c35f7ef350daa7ac0e5640d72e254f5358e12cb09d23c517cc8c61018d53eb2b9beee5c82f45
7
- data.tar.gz: e26625aa44347b9f604fa6f64f9344cca6509fe952240439092c96252c458d910ac620331554aa93914aaf51d3feb895912e53eb1c3ad2014dc3e7eca8bab33e
6
+ metadata.gz: b0967729a2066a27fb42723246ff6833e885b9fd8224a71f55086bcff6208b54b606465c3b84301b0ae93c1e99a3ab3d8301173724c49a3186adf09a041bae51
7
+ data.tar.gz: 827131189ff39fe240a5077c3ff5ced08253718b966a2ff13200b29b3d144543ddd648ad8fb65f7441853a5f0c13423113f4223f87007a2ddaf5857bc55c415d
@@ -6,9 +6,20 @@ module RServiceBus2
6
6
  # AppResourceAWSDynamoDb
7
7
  class AppResourceAWSDynamoDb < AppResource
8
8
  def connect(uri)
9
- region = uri.host
9
+ host_name = uri.host
10
+ url_port = uri.port.nil? ? '' : ":#{uri.port}"
10
11
 
11
- Aws::DynamoDB::Client.new(region: region)
12
+ region = nil
13
+ unless uri.query.nil?
14
+ parts = CGI.parse(uri.query)
15
+ region = parts['region'][0] unless parts['region'].nil?
16
+ end
17
+
18
+ if region.nil?
19
+ Aws::DynamoDB::Client.new(endpoint: "http://#{host_name}#{url_port}")
20
+ else
21
+ Aws::DynamoDB::Client.new(endpoint: "http://#{host_name}#{url_port}", region: region)
22
+ end
12
23
  end
13
24
 
14
25
  def finished
@@ -6,9 +6,23 @@ module RServiceBus2
6
6
  # AppResourceAWSDynamoDb
7
7
  class AppResourceAWSS3 < AppResource
8
8
  def connect(uri)
9
- region = uri.host
9
+ host_name = uri.host
10
+ url_port = uri.port.nil? ? '' : ":#{uri.port}"
10
11
 
11
- Aws::S3::Client.new(region: region)
12
+ region = nil
13
+ unless uri.query.nil?
14
+ parts = CGI.parse(uri.query)
15
+ region = parts['region'][0] unless parts['region'].nil?
16
+ end
17
+
18
+ if region.nil?
19
+ Aws::S3::Client.new(endpoint: "http://#{host_name}#{url_port}")
20
+ else
21
+ puts "region: #{region}"
22
+ Aws::S3::Client.new(endpoint: "http://#{host_name}#{url_port}", region: region)
23
+ end
24
+
25
+ #Aws::S3::Client.new(region: region)
12
26
  end
13
27
 
14
28
  def finished
@@ -9,9 +9,21 @@ module RServiceBus2
9
9
  @bucket_name = uri.path
10
10
  @bucket_name[0] = ''
11
11
 
12
- @region = uri.host
12
+ host_name = uri.host
13
+ url_port = uri.port.nil? ? '' : ":#{uri.port}"
14
+
15
+ region = nil
16
+ unless uri.query.nil?
17
+ parts = CGI.parse(uri.query)
18
+ region = parts['region'][0] unless parts['region'].nil?
19
+ end
20
+
21
+ if region.nil?
22
+ @s3_client = Aws::S3::Client.new(endpoint: "http://#{host_name}#{url_port}")
23
+ else
24
+ @s3_client = Aws::S3::Client.new(endpoint: "http://#{host_name}#{url_port}", region: region)
25
+ end
13
26
 
14
- @s3_client = Aws::S3::Client.new(region: @region)
15
27
  @input_filter = []
16
28
  end
17
29
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rservicebus2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.25
4
+ version: 0.2.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guy Irvine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-04 00:00:00.000000000 Z
11
+ date: 2021-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: beanstalk-client