{"action":"opened","issue":{"url":"https://api.github.com/repos/phstc/shoryuken/issues/55","labels_url":"https://api.github.com/repos/phstc/shoryuken/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/phstc/shoryuken/issues/55/comments","events_url":"https://api.github.com/repos/phstc/shoryuken/issues/55/events","html_url":"https://github.com/phstc/shoryuken/issues/55","id":59147663,"number":55,"title":"send_message failing with aws sdk 2","user":{"login":"kookster","id":46439,"avatar_url":"https://avatars.githubusercontent.com/u/46439?v=3","gravatar_id":"","url":"https://api.github.com/users/kookster","html_url":"https://github.com/kookster","followers_url":"https://api.github.com/users/kookster/followers","following_url":"https://api.github.com/users/kookster/following{/other_user}","gists_url":"https://api.github.com/users/kookster/gists{/gist_id}","starred_url":"https://api.github.com/users/kookster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kookster/subscriptions","organizations_url":"https://api.github.com/users/kookster/orgs","repos_url":"https://api.github.com/users/kookster/repos","events_url":"https://api.github.com/users/kookster/events{/privacy}","received_events_url":"https://api.github.com/users/kookster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-26T21:35:39Z","updated_at":"2015-02-26T21:35:39Z","closed_at":null,"body":"The current master now uses the aws sdk 2 for ruby, which is awesome.\r\n\r\nHowever, when the signature for send_message is now to accept a single hash as an argument:\r\nhttp://docs.aws.amazon.com/sdkforruby/api/Aws/SQS/Client.html#send_message-instance_method\r\n\r\nHere is how perform_async tries to call send_message:\r\n```\r\n      def perform_async(body, options = {})\r\n        options ||= {}\r\n        options[:message_attributes] ||= {}\r\n        options[:message_attributes]['shoryuken_class'] = {\r\n          string_value: self.to_s,\r\n          data_type: 'String'\r\n        }\r\n\r\n        queue = Shoryuken::Client.queues(get_shoryuken_options['queue'])\r\n        queue.send_message(body, options)  # this is the wrong number of args\r\n      end\r\n```\r\n\r\nInstead, the send_message call needs to look like this I think:\r\n```\r\n      def perform_async(body, options = {})\r\n        options ||= {}\r\n        options[:message_attributes] ||= {}\r\n        options[:message_attributes]['shoryuken_class'] = {\r\n          string_value: self.to_s,\r\n          data_type: 'String'\r\n        }\r\n        options[:message_body] = body\r\n\r\n        queue = Shoryuken::Client.queues(get_shoryuken_options['queue'])\r\n        queue.send_message(options)\r\n      end\r\n```\r\n\r\n\r\nSo when I try to send a message, I get the following error for the `send_message` on the sqs resource:\r\n```\r\nFailed to create new job and tasks: missing required parameter params[:message_body]\r\n        /Users/andrew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.0.21/lib/seahorse/client/param_validator.rb:24:in `validate!'\r\n        /Users/andrew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.0.21/lib/seahorse/client/param_validator.rb:9:in `validate!'\r\n        /Users/andrew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.0.21/lib/seahorse/client/plugins/param_validation.rb:21:in `call'\r\n        /Users/andrew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.0.21/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'\r\n        /Users/andrew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.0.21/lib/seahorse/client/plugins/param_conversion.rb:22:in `call'\r\n        /Users/andrew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.0.21/lib/aws-sdk-core/plugins/response_paging.rb:10:in `call'\r\n        /Users/andrew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.0.21/lib/seahorse/client/request.rb:70:in `send_request'\r\n        /Users/andrew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.0.21/lib/seahorse/client/base.rb:215:in `block (2 levels) in define_operation_methods'\r\n        /Users/andrew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-resources-2.0.21.pre/lib/aws-sdk-resources/request.rb:24:in `call'\r\n        /Users/andrew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-resources-2.0.21.pre/lib/aws-sdk-resources/operations.rb:41:in `call'\r\n        /Users/andrew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/aws-sdk-resources-2.0.21.pre/lib/aws-sdk-resources/operation_methods.rb:19:in `block in add_operation'\r\n```"}}