Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Shoryuken compatibility with aws-sdk-core 2 and 3 #433

Merged
merged 1 commit into from
Sep 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 5 additions & 3 deletions 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 'aws-sdk-core', '~> 3'
gem 'aws-sdk-sqs'
gem 'codeclimate-test-reporter', require: nil
gem 'simplecov'
gem 'multi_xml'
gem 'httparty'
gem 'multi_xml'
gem 'simplecov'
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 'aws-sdk-core', '~> 2'
gem 'codeclimate-test-reporter', require: nil
gem 'httparty'
gem 'multi_xml'
gem 'simplecov'
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