quarantine 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16d6eb14a6e87360b3f61ea7e35ff7659ed3ac2c4593e4b63db6aef23841e592
4
- data.tar.gz: 1acc1bd90b2d3849f3c9cbfb0210ddf5d7cafe8ce3254376c736d67268a12f55
3
+ metadata.gz: 8fc1311c40c02cd62c89672cad8ef3504a0abe8cb0e9c6eb4a3ccdf4a7acc664
4
+ data.tar.gz: a8afa4b5d8de5c26e5a03790d0d053c77044caf08fde8cdd4dde2165a33e48e2
5
5
  SHA512:
6
- metadata.gz: 21256b85495c744328f43b1b2cb4094179d78689352757dcdeb067f822f402f9c28cf4fb12231e60ed1e1c6864ad2a48f8b7f7aa909e0c9d16a772dcde5e4c62
7
- data.tar.gz: 1f50bbccf8273705894b2ebfb2ef9a6bdb5807ff4b2ea6f1e4dd5e3fc2cab3f2303b9ba8e9a5d5768a3e3ba293a074698bd28725865258dcaedfc7483cfa1c55
6
+ metadata.gz: 84bf594f24acca0a92cb49da883368de553a816ac3d0f4f58b3bf5c147db86019c858f1f1f9a11d38e9e2af5de859a07e29d6b46c239972c33ae23a008f12ad2
7
+ data.tar.gz: 2e9f6d30eff342421f12a99bedf64888cdca6406b20496fa481309acb1df7eb1acc70e0ada1d8821780a23fc9296e1254727f343c0c1d716db1679117d4e2471
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 1.0.5
2
+ Add aws_credentials argument during dynamodb initialization to override the AWS SDK credential chain
3
+
1
4
  ### 1.0.4
2
5
  Enable upstream callers to mark an example as flaky through the example's metadata
3
6
 
data/README.md CHANGED
@@ -39,7 +39,7 @@ In your `spec_helper.rb` setup quarantine and rspec-retry gem. Click [rspec-retr
39
39
  require 'quarantine'
40
40
  require 'rspec-retry'
41
41
 
42
- Quarantine.bind({database: :dynamodb, aws_region: 'us-west-1'})
42
+ Quarantine.bind({database: :dynamodb, aws_region: 'us-west-1'}) # Also accepts aws_credentials to override the standard AWS credential chain
43
43
 
44
44
  RSpec.configure do |config|
45
45
 
@@ -140,7 +140,8 @@ CI="1" BRANCH="master" rspec
140
140
 
141
141
  #### Why is dynamodb failing to connect?
142
142
 
143
- The AWS client loads credentials from the following locations:
143
+ The AWS client loads credentials from the following locations (in order of precedence):
144
+ - The optional `aws_credentials` parameter passed into `Quarantine.bind`
144
145
  - `ENV['AWS_ACCESS_KEY_ID']` and `ENV['AWS_SECRET_ACCESS_KEY']`
145
146
  - `Aws.config[:credentials]`
146
147
  - The shared credentials ini file at `~/.aws/credentials`
@@ -7,8 +7,11 @@ class Quarantine
7
7
  class DynamoDB < Base
8
8
  attr_accessor :dynamodb
9
9
 
10
- def initialize(aws_region: 'us-west-1', **_additional_arguments)
11
- @dynamodb = Aws::DynamoDB::Client.new({ region: aws_region })
10
+ def initialize(aws_region: 'us-west-1', aws_credentials: nil, **_additional_arguments)
11
+ options = { region: aws_region }
12
+ options[:credentials] = aws_credentials if aws_credentials
13
+
14
+ @dynamodb = Aws::DynamoDB::Client.new(options)
12
15
  end
13
16
 
14
17
  def scan(table_name)
@@ -1,3 +1,3 @@
1
1
  class Quarantine
2
- VERSION = '1.0.4'.freeze
2
+ VERSION = '1.0.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quarantine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flexport Engineering, Eric Zhu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-19 00:00:00.000000000 Z
11
+ date: 2020-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubygems_version: 3.0.2
94
+ rubygems_version: 3.0.4
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Quarantine flaky Ruby Rspec tests