opener-callback-handler 1.0.2 → 1.1.0

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: 0c43eb8c8cbde3f398e7ec0f25ff584365630455
4
- data.tar.gz: c0fbf54889d79b749f3b5378273aa09351643375
3
+ metadata.gz: 655ab9d8c146fc45a37585a22d07b4302288b0f9
4
+ data.tar.gz: 4bb1d96b74f4005c239d66028ddbed274d0ee878
5
5
  SHA512:
6
- metadata.gz: dd67df8a7290bed1aebe1c77d625077594f833b082eb94413385e0e2948bdb502e43e2a43da59b34ad679980a8b0c68dd0f0ca7cae2110c0cc0aa555bd0b4130
7
- data.tar.gz: 90ea8f276077f96bb6d33a85df64b508fb5e6767ee2536ec245ff5446c5ac3ea0c2f01fba47d2bfe121bf9e9759da2e0a62a3bf6554618d80b7e6e2f522a0ce3
6
+ metadata.gz: 63d3055bed9d31b32bef298bb707984a1b32a955f5c50466a5ba221558042bccfcbb3a39c1deef69f5bbad0b161e9d00c7f00518da6dd764937073f9566ba28b
7
+ data.tar.gz: 811a710dae0e96546edf862627ae8c37284396a3632845bcce8e5c85bf2dfbbcaeb074050edff6faf26c7d987defdfd5fc96016e30e26a57b3b7452d333ed3f0
@@ -10,7 +10,7 @@ module Opener
10
10
  # Here `<name>` is the name of the queue to use.
11
11
  #
12
12
  # @!attribute [r] sqs
13
- # @return [AWS::SQS]
13
+ # @return [Aws::SQS::Client]
14
14
  #
15
15
  class AmazonSqs
16
16
  attr_reader :sqs
@@ -24,35 +24,32 @@ module Opener
24
24
  end
25
25
 
26
26
  def initialize
27
- @sqs = AWS::SQS.new
27
+ @sqs = Aws::SQS::Client.new
28
28
  end
29
29
 
30
- ##
31
30
  # @param [String] uri The queue URI
32
31
  # @param [Hash] params The message to submit.
33
- #
34
32
  def process(uri, params = {})
35
- queue = queue_for_uri(uri)
33
+ queue_url = queue_url_for_uri(uri)
36
34
 
37
- queue.send_message(JSON.dump(params))
35
+ sqs.send_message(
36
+ :queue_url => queue_url,
37
+ :message_body => JSON.dump(params)
38
+ )
38
39
  end
39
40
 
40
- ##
41
41
  # @param [String] uri
42
- # @return [AWS::SQS::Queue]
43
- #
44
- def queue_for_uri(uri)
42
+ # @return [String]
43
+ def queue_url_for_uri(uri)
45
44
  parsed = Addressable::URI.parse(uri)
46
45
 
47
- return queue_for_name(parsed.host)
46
+ return queue_url_for_name(parsed.host)
48
47
  end
49
48
 
50
- ##
51
49
  # @param [String] name
52
- # @return [AWS::SQS::Queue]
53
- #
54
- def queue_for_name(name)
55
- return sqs.queues.named(name)
50
+ # @return [String]
51
+ def queue_url_for_name(name)
52
+ sqs.get_queue_url(:queue_name => name).queue_url
56
53
  end
57
54
  end # AmazonSqs
58
55
  end # Strategies
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class CallbackHandler
3
- VERSION = '1.0.2'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  'LICENSE.txt'
17
17
  ]).select { |file| File.file?(file) }
18
18
 
19
- spec.add_dependency 'aws-sdk', '~> 1.0'
19
+ spec.add_dependency 'aws-sdk', '~> 2.0'
20
20
  spec.add_dependency 'httpclient'
21
21
  spec.add_dependency 'addressable'
22
22
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-callback-handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-05 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: httpclient
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  requirements: []
129
129
  rubyforge_project:
130
- rubygems_version: 2.2.2
130
+ rubygems_version: 2.4.8
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: Tool for handling different callback URLs based on their protocol.