faraday_middleware-aws-sigv4 0.5.0 → 1.0.1

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: e09732db4f0a13230a9c0cf1da3940aba5fa6f70d9ec1f6ccda9d12cfc1e81fa
4
- data.tar.gz: f16d00f7a1a92babfb14ca2401335f75ff2f6d37096beb0451da4db14edef79b
3
+ metadata.gz: 1279ad2732579dde393c8914342b55a4aa2891ea6ff56103b3758c8b0d052f33
4
+ data.tar.gz: b0ec1dd7628a34807b8bc17120b9cb8407f3478d42c784f0aa986fb63463e544
5
5
  SHA512:
6
- metadata.gz: a43623245d5ac14ad75c180ee0f7aff685e4a0cd5fb282730e453fb08363e89fe1a5781e186b55623451c2acf5c6a1132b749c27fd3a968c7641f914a5863e74
7
- data.tar.gz: 23b6b71e035f9467dd97d6d82ee3a4aebe5e2502243c6d357da86fac4b51bb8901d686d54aa9438a24db1ba265bc671caa17148e563056314c17f864a0cb068e
6
+ metadata.gz: c3c4df5e1c077662c2fd970c8b5d8e973e6b69519b186d16b861eaa0295eab09d418697c4a43abc902a664a929676777e5aea992a7430051fe002170c1a198ca
7
+ data.tar.gz: dbb9ed948c26ce29e0a3c9e35308d4894f1f812c28901247dddd7695b65f1f9d0184ee0f07d3fefb65f95ed466362be52d9efed5db998ff810364ef24b7ac58c
@@ -10,19 +10,15 @@ jobs:
10
10
  strategy:
11
11
  fail-fast: false
12
12
  matrix:
13
- ruby:
14
- - 2.4
15
- - 2.5
16
- - 2.6
17
- - 2.7
18
- gemfile:
19
- - gemfiles/faraday_0.15.gemfile
20
- - gemfiles/faraday_0.16.gemfile
21
- - gemfiles/faraday_0.17.gemfile
22
- - gemfiles/faraday_1.0.gemfile
23
- - gemfiles/faraday_1.1.gemfile
24
- - gemfiles/faraday_1.2.gemfile
25
- - gemfiles/faraday_1.3.gemfile
13
+ include:
14
+ - ruby: 2.6
15
+ gemfile: gemfiles/faraday_2.0.gemfile
16
+ - ruby: 2.7
17
+ gemfile: gemfiles/faraday_2.0.gemfile
18
+ - ruby: 3.0
19
+ gemfile: gemfiles/faraday_2.0.gemfile
20
+ - ruby: 3.1
21
+ gemfile: gemfiles/faraday_2.0.gemfile
26
22
  env:
27
23
  BUNDLE_GEMFILE: ${{ matrix.gemfile }}
28
24
  steps:
data/.rubocop.yml CHANGED
@@ -1,11 +1,14 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
1
4
  AllCops:
2
5
  Exclude:
3
- - 'gemfiles/**/*'
4
- TargetRubyVersion: 2.4
6
+ - "gemfiles/**/*"
7
+ TargetRubyVersion: 2.5
5
8
  NewCops: enable
6
9
  Bundler/OrderedGems:
7
10
  Include:
8
- - 'Appraisals'
11
+ - "Appraisals"
9
12
  Metrics/BlockLength:
10
13
  Enabled: false
11
14
  Layout/LineLength:
@@ -14,3 +17,11 @@ Metrics/MethodLength:
14
17
  Enabled: false
15
18
  Style/Documentation:
16
19
  Enabled: false
20
+ RSpec/ExampleLength:
21
+ Enabled: false
22
+ RSpec/MultipleExpectations:
23
+ Enabled: false
24
+ RSpec/MultipleMemoizedHelpers:
25
+ Enabled: false
26
+ RSpec/ContextWording:
27
+ Enabled: false
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-3.1.2
data/.simplecov CHANGED
@@ -1,6 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- SimpleCov.start do
4
- # exclude directories and files
5
- add_filter '/spec/'
6
- end
3
+ SimpleCov.add_filter 'spec'
4
+ SimpleCov.start 'rails' unless SimpleCov.running
data/Appraisals CHANGED
@@ -1,29 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise 'faraday-0.15' do
4
- gem 'faraday', '~> 0.15.0'
5
- end
6
-
7
- appraise 'faraday-0.16' do
8
- gem 'faraday', '~> 0.16.0'
9
- end
10
-
11
- appraise 'faraday-0.17' do
12
- gem 'faraday', '~> 0.17.0'
13
- end
14
-
15
- appraise 'faraday-1.0' do
16
- gem 'faraday', '~> 1.0.0'
17
- end
18
-
19
- appraise 'faraday-1.1' do
20
- gem 'faraday', '~> 1.1.0'
21
- end
22
-
23
- appraise 'faraday-1.2' do
24
- gem 'faraday', '~> 1.2.0'
25
- end
26
-
27
- appraise 'faraday-1.3' do
28
- gem 'faraday', '~> 1.3.0'
3
+ appraise 'faraday-2.0' do
4
+ gem 'faraday', '~> 2.0.0'
29
5
  end
data/README.md CHANGED
@@ -3,16 +3,18 @@
3
3
  [Faraday](https://github.com/lostisland/faraday) middleware for AWS Signature Version 4 using [aws-sigv4](https://rubygems.org/gems/aws-sigv4).
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/faraday_middleware-aws-sigv4.svg)](https://badge.fury.io/rb/faraday_middleware-aws-sigv4)
6
- ![test](https://github.com/winebarrel/faraday_middleware-aws-sigv4/workflows/test/badge.svg)
6
+ [![Build Status](https://github.com/winebarrel/faraday_middleware-aws-sigv4/workflows/test/badge.svg?branch=master)](https://github.com/winebarrel/faraday_middleware-aws-sigv4/actions)
7
7
  [![Coverage Status](https://coveralls.io/repos/github/winebarrel/faraday_middleware-aws-sigv4/badge.svg?branch=master)](https://coveralls.io/github/winebarrel/faraday_middleware-aws-sigv4?branch=master)
8
8
 
9
- * `faraday_middleware-aws-sigv4 < 0.3.0`
10
- * `faraday < 0.15`
11
- * `faraday_middleware-aws-sigv4 >= 0.3.0`
12
- * `ruby >= 2.3`
13
- * `faraday >= 0.15`
14
- * `faraday_middleware-aws-sigv4 >= 0.5.0`
15
- * `ruby >= 2.4`
9
+ ## Required dependency version
10
+
11
+ | version | ruby | faraday |
12
+ |------------|----------|-----------|
13
+ | `>= 1.0.0` | `>= 2.5` | `>= 2.0` |
14
+ | `>= 0.6.0` | `>= 2.4` | `>= 1.8` |
15
+ | `>= 0.5.0` | `>= 2.4` | `>= 0.15` |
16
+ | `>= 0.3.0` | `>= 2.3` | `>= 0.15` |
17
+ | `< 0.3.0` | - | `< 0.15` |
16
18
 
17
19
  ## Installation
18
20
 
@@ -33,9 +35,6 @@ Or install it yourself as:
33
35
  ## Usage
34
36
 
35
37
  ```ruby
36
- # `gem install faraday_middleware` is required for this example.
37
- # However, FaradayMiddleware::AwsSigV4 works without faraday_middleware.
38
- require 'faraday_middleware'
39
38
  require 'faraday_middleware/aws_sigv4'
40
39
  require 'pp'
41
40
 
@@ -47,12 +46,10 @@ conn = Faraday.new(url: 'https://apigateway.us-east-1.amazonaws.com') do |farada
47
46
  secret_access_key: ENV['AWS_SECRET_ACCESS_KEY']
48
47
  # see http://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Sigv4/Signer.html
49
48
 
50
- # NOTE: The following middleware is from `faraday_middleware`
51
- # cf. https://github.com/lostisland/faraday_middleware/blob/master/lib/faraday_middleware.rb
52
- # **It is not an essential middleware to work.**
53
49
  faraday.response :json, content_type: /\bjson\b/
54
- faraday.response :raise_error
55
50
 
51
+ # NOTE: If you need to send case sensitive headers like `x-amz-access-token` in `SP API`.
52
+ # cf. https://github.com/lostisland/faraday/issues/747#issuecomment-439864181
56
53
  faraday.adapter Faraday.default_adapter
57
54
  end
58
55
 
@@ -79,7 +76,7 @@ If you previously provided the `service_name` option, you need to rename it `ser
79
76
  ```sh
80
77
  bundle install
81
78
  bundle exec appraisal install
82
- bundle exec appraisal faraday-0.16 rake
79
+ bundle exec appraisal faraday-2.0 rake
83
80
  ```
84
81
 
85
82
  ## Related Links
@@ -5,9 +5,9 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'faraday_middleware-aws-sigv4'
8
- spec.version = '0.5.0'
8
+ spec.version = '1.0.1'
9
9
  spec.authors = ['Genki Sugawara']
10
- spec.email = ['sugawara@cookpad.com']
10
+ spec.email = ['sugawara@winebarrel.jp']
11
11
 
12
12
  spec.summary = 'Faraday middleware for AWS Signature Version 4 using aws-sigv4.'
13
13
  spec.description = 'Faraday middleware for AWS Signature Version 4 using aws-sigv4.'
@@ -21,21 +21,23 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
- spec.required_ruby_version = '>= 2.4'
24
+ spec.required_ruby_version = '>= 2.5'
25
25
 
26
26
  spec.add_dependency 'aws-sigv4', '~> 1.0'
27
- spec.add_dependency 'faraday', '>= 0.15'
27
+ spec.add_dependency 'faraday', '>= 2.0', '< 3'
28
28
 
29
29
  spec.add_development_dependency 'appraisal', '>= 2.2'
30
- spec.add_development_dependency 'aws-sdk-core', '~> 3.14.0'
30
+ spec.add_development_dependency 'aws-sdk-core', '>= 3.124.0'
31
31
  spec.add_development_dependency 'bundler'
32
- spec.add_development_dependency 'faraday_middleware'
33
32
  spec.add_development_dependency 'rake'
34
33
  spec.add_development_dependency 'rspec', '~> 3.0'
35
- spec.add_development_dependency 'rubocop', '>= 1.8.0'
34
+ spec.add_development_dependency 'rubocop', '>= 1.36.0'
36
35
  spec.add_development_dependency 'rubocop-rake'
37
36
  spec.add_development_dependency 'rubocop-rspec'
38
37
  spec.add_development_dependency 'simplecov'
39
38
  spec.add_development_dependency 'simplecov-lcov'
40
39
  spec.add_development_dependency 'timecop'
40
+ spec.metadata = {
41
+ 'rubygems_mfa_required' => 'true'
42
+ }
41
43
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "faraday", "~> 1.1.0"
5
+ gem "faraday", "~> 2.0.0"
6
6
 
7
7
  gemspec path: "../"
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'faraday'
4
+ require 'faraday_middleware/request/aws_sigv4'
4
5
 
5
6
  module FaradayMiddleware
6
- autoload :AwsSigV4, 'faraday_middleware/request/aws_sigv4'
7
- Faraday::Request.register_middleware aws_sigv4: -> { AwsSigV4 }
7
+ Faraday::Request.register_middleware aws_sigv4: FaradayMiddleware::AwsSigV4
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday_middleware-aws-sigv4
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-07 00:00:00.000000000 Z
11
+ date: 2022-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sigv4
@@ -30,14 +30,20 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.15'
33
+ version: '2.0'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '3'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
41
  - - ">="
39
42
  - !ruby/object:Gem::Version
40
- version: '0.15'
43
+ version: '2.0'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '3'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: appraisal
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -54,34 +60,20 @@ dependencies:
54
60
  version: '2.2'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: aws-sdk-core
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 3.14.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 3.14.0
69
- - !ruby/object:Gem::Dependency
70
- name: bundler
71
63
  requirement: !ruby/object:Gem::Requirement
72
64
  requirements:
73
65
  - - ">="
74
66
  - !ruby/object:Gem::Version
75
- version: '0'
67
+ version: 3.124.0
76
68
  type: :development
77
69
  prerelease: false
78
70
  version_requirements: !ruby/object:Gem::Requirement
79
71
  requirements:
80
72
  - - ">="
81
73
  - !ruby/object:Gem::Version
82
- version: '0'
74
+ version: 3.124.0
83
75
  - !ruby/object:Gem::Dependency
84
- name: faraday_middleware
76
+ name: bundler
85
77
  requirement: !ruby/object:Gem::Requirement
86
78
  requirements:
87
79
  - - ">="
@@ -128,14 +120,14 @@ dependencies:
128
120
  requirements:
129
121
  - - ">="
130
122
  - !ruby/object:Gem::Version
131
- version: 1.8.0
123
+ version: 1.36.0
132
124
  type: :development
133
125
  prerelease: false
134
126
  version_requirements: !ruby/object:Gem::Requirement
135
127
  requirements:
136
128
  - - ">="
137
129
  - !ruby/object:Gem::Version
138
- version: 1.8.0
130
+ version: 1.36.0
139
131
  - !ruby/object:Gem::Dependency
140
132
  name: rubocop-rake
141
133
  requirement: !ruby/object:Gem::Requirement
@@ -208,7 +200,7 @@ dependencies:
208
200
  version: '0'
209
201
  description: Faraday middleware for AWS Signature Version 4 using aws-sigv4.
210
202
  email:
211
- - sugawara@cookpad.com
203
+ - sugawara@winebarrel.jp
212
204
  executables: []
213
205
  extensions: []
214
206
  extra_rdoc_files: []
@@ -217,6 +209,7 @@ files:
217
209
  - ".gitignore"
218
210
  - ".rspec"
219
211
  - ".rubocop.yml"
212
+ - ".ruby-version"
220
213
  - ".simplecov"
221
214
  - Appraisals
222
215
  - Gemfile
@@ -225,20 +218,15 @@ files:
225
218
  - Rakefile
226
219
  - faraday_middleware-aws-sigv4.gemspec
227
220
  - gemfiles/.bundle/config
228
- - gemfiles/faraday_0.15.gemfile
229
- - gemfiles/faraday_0.16.gemfile
230
- - gemfiles/faraday_0.17.gemfile
231
- - gemfiles/faraday_1.0.gemfile
232
- - gemfiles/faraday_1.1.gemfile
233
- - gemfiles/faraday_1.2.gemfile
234
- - gemfiles/faraday_1.3.gemfile
221
+ - gemfiles/faraday_2.0.gemfile
235
222
  - lib/faraday_middleware/aws_sigv4.rb
236
223
  - lib/faraday_middleware/request/aws_sigv4.rb
237
224
  - lib/faraday_middleware/request/aws_sigv4_util.rb
238
225
  homepage: https://github.com/winebarrel/faraday_middleware-aws-sigv4
239
226
  licenses:
240
227
  - MIT
241
- metadata: {}
228
+ metadata:
229
+ rubygems_mfa_required: 'true'
242
230
  post_install_message:
243
231
  rdoc_options: []
244
232
  require_paths:
@@ -247,14 +235,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
247
235
  requirements:
248
236
  - - ">="
249
237
  - !ruby/object:Gem::Version
250
- version: '2.4'
238
+ version: '2.5'
251
239
  required_rubygems_version: !ruby/object:Gem::Requirement
252
240
  requirements:
253
241
  - - ">="
254
242
  - !ruby/object:Gem::Version
255
243
  version: '0'
256
244
  requirements: []
257
- rubygems_version: 3.0.3
245
+ rubygems_version: 3.3.7
258
246
  signing_key:
259
247
  specification_version: 4
260
248
  summary: Faraday middleware for AWS Signature Version 4 using aws-sigv4.
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "faraday", "~> 0.15.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "faraday", "~> 0.16.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "faraday", "~> 0.17.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "faraday", "~> 1.0.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "faraday", "~> 1.2.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "faraday", "~> 1.3.0"
6
-
7
- gemspec path: "../"