Skip to content

Standardize testing + bump sdk dependency #23

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

Merged
merged 3 commits into from
Jul 31, 2020
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
17 changes: 12 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
language: ruby

rvm:
- 2.2.2
- 2.3.0
- 2.4.0
- 2.0
- 2.1
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- 2.7
- jruby-9.1
- jruby-9.2

sudo: false

env:
- AWS_REGION=foo
- AWS_REGION=us-west-2

script: bundle exec rake
script: bundle exec rake test

bundler_args: --without docs release repl
19 changes: 3 additions & 16 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

source 'https://rubygems.org'

gemspec
Expand All @@ -23,7 +10,7 @@ group :docs do
end

group :test do
gem 'rspec', '~> 2.0'
gem 'simplecov', '~> 0.0', :require => false
gem 'rack-test', '~> 0.0'
gem 'rspec'
gem 'simplecov', require: false
gem 'rack-test'
end
31 changes: 17 additions & 14 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
$REPO_ROOT = File.dirname(__FILE__)
$LOAD_PATH.unshift(File.join($REPO_ROOT, 'lib'))
$VERSION = ENV['VERSION'] || File.read(File.join($REPO_ROOT, 'VERSION')).strip

task 'test:coverage:clear' do
sh("rm -rf #{File.join($REPO_ROOT, 'coverage')}")
end

desc 'Runs unit tests'
task 'test:unit' => 'test:coverage:clear'

desc 'Runs integration tests'
task 'test:integration' => 'test:coverage:clear'

desc 'Runs unit and integration tests'
task 'test' => ['test:unit', 'test:integration']

task :default => :test

Dir.glob('**/*.rake').each do |task_file|
load task_file
end

task :default => 'test:unit'
10 changes: 6 additions & 4 deletions aws-sessionstore-dynamodb.gemspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
require File.dirname(__FILE__) + '/lib/aws/session_store/dynamo_db/version'
version = File.read(File.expand_path('../VERSION', __FILE__)).strip

Gem::Specification.new do |spec|
spec.name = "aws-sessionstore-dynamodb"
spec.version = Aws::SessionStore::DynamoDB::VERSION
spec.authors = ["Ruby Robinson"]
spec.version = version
spec.authors = ["Amazon Web Services"]
spec.email = ["[email protected]", "[email protected]"]

spec.summary = "The Amazon DynamoDB Session Store handles sessions " +
"for Ruby web applications using a DynamoDB backend."
spec.homepage = "http://github.com/aws/aws-sessionstore-dynamodb-ruby"
Expand All @@ -13,6 +15,6 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_dependency 'aws-sdk', '~> 2.0'
spec.add_dependency 'aws-sdk-dynamodb', '~> 1'
spec.add_dependency 'rack', '>= 1.6.4'
end
2 changes: 1 addition & 1 deletion lib/aws/session_store/dynamo_db/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# language governing permissions and limitations under the License.

require 'yaml'
require 'aws-sdk'
require 'aws-sdk-dynamodb'

module Aws::SessionStore::DynamoDB
# This class provides a Configuration object for all DynamoDB transactions
Expand Down
2 changes: 1 addition & 1 deletion lib/aws/session_store/dynamo_db/garbage_collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

require 'aws-sdk'
require 'aws-sdk-dynamodb'

module Aws::SessionStore::DynamoDB
# Collects and deletes unwanted sessions based on
Expand Down
2 changes: 1 addition & 1 deletion lib/aws/session_store/dynamo_db/rack_middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

require 'rack/session/abstract/id'
require 'openssl'
require 'aws-sdk'
require 'aws-sdk-dynamodb'

module Aws::SessionStore::DynamoDB
# This class is an ID based Session Store Rack Middleware
Expand Down
2 changes: 1 addition & 1 deletion lib/aws/session_store/dynamo_db/table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

require 'aws-sdk'
require 'aws-sdk-dynamodb'
require 'logger'

module Aws::SessionStore::DynamoDB
Expand Down
2 changes: 1 addition & 1 deletion tasks/release
29 changes: 0 additions & 29 deletions tasks/test.rake

This file was deleted.