Skip to content

Commit 4c6ffa9

Browse files
mullermpJason733i
authored andcommitted
Standardize testing + bump sdk dependency (aws#23)
1 parent cdb6e1f commit 4c6ffa9

File tree

10 files changed

+43
-73
lines changed

10 files changed

+43
-73
lines changed

.travis.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
language: ruby
22

33
rvm:
4-
- 2.2.2
5-
- 2.3.0
6-
- 2.4.0
4+
- 2.0
5+
- 2.1
6+
- 2.2
7+
- 2.3
8+
- 2.4
9+
- 2.5
10+
- 2.6
11+
- 2.7
12+
- jruby-9.1
13+
- jruby-9.2
714

815
sudo: false
916

1017
env:
11-
- AWS_REGION=foo
18+
- AWS_REGION=us-west-2
1219

13-
script: bundle exec rake
20+
script: bundle exec rake test
1421

1522
bundler_args: --without docs release repl

Gemfile

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License"). You
4-
# may not use this file except in compliance with the License. A copy of
5-
# the License is located at
6-
#
7-
# http://aws.amazon.com/apache2.0/
8-
#
9-
# or in the "license" file accompanying this file. This file is
10-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11-
# ANY KIND, either express or implied. See the License for the specific
12-
# language governing permissions and limitations under the License.
13-
141
source 'https://rubygems.org'
152

163
gemspec
@@ -23,7 +10,7 @@ group :docs do
2310
end
2411

2512
group :test do
26-
gem 'rspec', '~> 2.0'
27-
gem 'simplecov', '~> 0.0', :require => false
28-
gem 'rack-test', '~> 0.0'
13+
gem 'rspec'
14+
gem 'simplecov', require: false
15+
gem 'rack-test'
2916
end

Rakefile

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License"). You
4-
# may not use this file except in compliance with the License. A copy of
5-
# the License is located at
6-
#
7-
# http://aws.amazon.com/apache2.0/
8-
#
9-
# or in the "license" file accompanying this file. This file is
10-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11-
# ANY KIND, either express or implied. See the License for the specific
12-
# language governing permissions and limitations under the License.
1+
$REPO_ROOT = File.dirname(__FILE__)
2+
$LOAD_PATH.unshift(File.join($REPO_ROOT, 'lib'))
3+
$VERSION = ENV['VERSION'] || File.read(File.join($REPO_ROOT, 'VERSION')).strip
134

5+
task 'test:coverage:clear' do
6+
sh("rm -rf #{File.join($REPO_ROOT, 'coverage')}")
7+
end
8+
9+
desc 'Runs unit tests'
10+
task 'test:unit' => 'test:coverage:clear'
11+
12+
desc 'Runs integration tests'
13+
task 'test:integration' => 'test:coverage:clear'
14+
15+
desc 'Runs unit and integration tests'
16+
task 'test' => ['test:unit', 'test:integration']
17+
18+
task :default => :test
1419

1520
Dir.glob('**/*.rake').each do |task_file|
1621
load task_file
1722
end
18-
19-
task :default => 'test:unit'

aws-sessionstore-dynamodb.gemspec

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
require File.dirname(__FILE__) + '/lib/aws/session_store/dynamo_db/version'
1+
version = File.read(File.expand_path('../VERSION', __FILE__)).strip
22

33
Gem::Specification.new do |spec|
44
spec.name = "aws-sessionstore-dynamodb"
5-
spec.version = Aws::SessionStore::DynamoDB::VERSION
6-
spec.authors = ["Ruby Robinson"]
5+
spec.version = version
6+
spec.authors = ["Amazon Web Services"]
7+
8+
79
spec.summary = "The Amazon DynamoDB Session Store handles sessions " +
810
"for Ruby web applications using a DynamoDB backend."
911
spec.homepage = "http://github.com/aws/aws-sessionstore-dynamodb-ruby"
@@ -13,6 +15,6 @@ Gem::Specification.new do |spec|
1315
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
1416
spec.require_paths = ["lib"]
1517

16-
spec.add_dependency 'aws-sdk', '~> 2.0'
18+
spec.add_dependency 'aws-sdk-dynamodb', '~> 1'
1719
spec.add_dependency 'rack', '>= 1.6.4'
1820
end

lib/aws/session_store/dynamo_db/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# language governing permissions and limitations under the License.
1313

1414
require 'yaml'
15-
require 'aws-sdk'
15+
require 'aws-sdk-dynamodb'
1616

1717
module Aws::SessionStore::DynamoDB
1818
# This class provides a Configuration object for all DynamoDB transactions

lib/aws/session_store/dynamo_db/garbage_collection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
1313

14-
require 'aws-sdk'
14+
require 'aws-sdk-dynamodb'
1515

1616
module Aws::SessionStore::DynamoDB
1717
# Collects and deletes unwanted sessions based on

lib/aws/session_store/dynamo_db/rack_middleware.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
require 'rack/session/abstract/id'
1515
require 'openssl'
16-
require 'aws-sdk'
16+
require 'aws-sdk-dynamodb'
1717

1818
module Aws::SessionStore::DynamoDB
1919
# This class is an ID based Session Store Rack Middleware

lib/aws/session_store/dynamo_db/table.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
1313

14-
require 'aws-sdk'
14+
require 'aws-sdk-dynamodb'
1515
require 'logger'
1616

1717
module Aws::SessionStore::DynamoDB

tasks/test.rake

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)