Skip to content

Commit

Permalink
Make Shoryuken compatibility with aws-sdk-core 2 and 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Cantero committed Sep 2, 2017
1 parent d1acf12 commit 76edb81
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 4 deletions.
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: ruby

rvm:
- 2.0.0
- 2.1.10
Expand All @@ -11,9 +12,18 @@ notifications:
on_success: change
on_failure: always

script: SPEC_ALL=true bundle exec rspec spec
gemfile:
- Gemfile
- Gemfile.aws-sdk-core-v2

env:
- SPEC_ALL=true

script: bundle exec rspec spec

before_install:
- gem update bundler
- gem update bundler

after_success:
- bundle exec codeclimate-test-reporter

Expand Down
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ source 'https://rubygems.org'
gemspec

group :test do
gem 'activejob'
gem 'activejob', '~> 4'
gem 'codeclimate-test-reporter', require: nil
gem 'simplecov'
gem 'multi_xml'
gem 'httparty'
gem 'aws-sdk-sqs'
gem 'aws-sdk-core', '~> 3'
end
13 changes: 13 additions & 0 deletions Gemfile.aws-sdk-core-v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in shoryuken.gemspec
gemspec

group :test do
gem 'activejob', '~> 4'
gem 'codeclimate-test-reporter', require: nil
gem 'simplecov'
gem 'multi_xml'
gem 'httparty'
gem 'aws-sdk-core', '~> 2'
end
5 changes: 5 additions & 0 deletions lib/shoryuken.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
require 'yaml'
require 'json'
require 'aws-sdk-core'
begin
require 'aws-sdk-sqs' unless defined?(Aws::SQS)
rescue LoadError
fail "AWS SDK 3 requires aws-sdk-sqs to be installed separately. Please add gem 'aws-sdk-sqs' to your Gemfile"
end
require 'time'
require 'concurrent'
require 'forwardable'
Expand Down
2 changes: 1 addition & 1 deletion shoryuken.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'pry-byebug'
spec.add_development_dependency 'dotenv'

spec.add_dependency 'aws-sdk-core', '~> 2'
spec.add_dependency 'aws-sdk-core', '>= 2'
spec.add_dependency 'concurrent-ruby'
spec.add_dependency 'thor'
end

0 comments on commit 76edb81

Please sign in to comment.