faraday_middleware-aws-sigv4 0.6.1 → 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: 6c529e426730ad685dc287898b42b6b27345d63e4faba1e016ad2c7126c29612
4
- data.tar.gz: 812fb0fdbb3f7158f4811c03e08f5004eeeda9f127ee7e1627403f6ebe3ec96f
3
+ metadata.gz: 1279ad2732579dde393c8914342b55a4aa2891ea6ff56103b3758c8b0d052f33
4
+ data.tar.gz: b0ec1dd7628a34807b8bc17120b9cb8407f3478d42c784f0aa986fb63463e544
5
5
  SHA512:
6
- metadata.gz: e43f5ab344a052c4e37f22bdda9127091367bd927d2a5f7b16b2832ab4ae3684a2daa34c111372dfeb2cc28de77d04cecbe13557e56de166ac277e560f5e481f
7
- data.tar.gz: 68cfd56f08e416e3d020a916a10a81ff8e1d813fbbc694ec17484150516dc5cd2fa3d3d09bab4022f018c36478e2109d0a0e307414fe226b7cb6ff74f7737ef3
6
+ metadata.gz: c3c4df5e1c077662c2fd970c8b5d8e973e6b69519b186d16b861eaa0295eab09d418697c4a43abc902a664a929676777e5aea992a7430051fe002170c1a198ca
7
+ data.tar.gz: dbb9ed948c26ce29e0a3c9e35308d4894f1f812c28901247dddd7695b65f1f9d0184ee0f07d3fefb65f95ed466362be52d9efed5db998ff810364ef24b7ac58c
@@ -10,14 +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
- - 3.0
19
- gemfile:
20
- - gemfiles/faraday_1.8.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
21
22
  env:
22
23
  BUNDLE_GEMFILE: ${{ matrix.gemfile }}
23
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,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise 'faraday-1.8' do
4
- gem 'faraday', '~> 1.8.0'
3
+ appraise 'faraday-2.0' do
4
+ gem 'faraday', '~> 2.0.0'
5
5
  end
data/README.md CHANGED
@@ -10,6 +10,7 @@
10
10
 
11
11
  | version | ruby | faraday |
12
12
  |------------|----------|-----------|
13
+ | `>= 1.0.0` | `>= 2.5` | `>= 2.0` |
13
14
  | `>= 0.6.0` | `>= 2.4` | `>= 1.8` |
14
15
  | `>= 0.5.0` | `>= 2.4` | `>= 0.15` |
15
16
  | `>= 0.3.0` | `>= 2.3` | `>= 0.15` |
@@ -34,9 +35,6 @@ Or install it yourself as:
34
35
  ## Usage
35
36
 
36
37
  ```ruby
37
- # `gem install faraday_middleware` is required for this example.
38
- # However, FaradayMiddleware::AwsSigV4 works without faraday_middleware.
39
- require 'faraday_middleware'
40
38
  require 'faraday_middleware/aws_sigv4'
41
39
  require 'pp'
42
40
 
@@ -48,12 +46,7 @@ conn = Faraday.new(url: 'https://apigateway.us-east-1.amazonaws.com') do |farada
48
46
  secret_access_key: ENV['AWS_SECRET_ACCESS_KEY']
49
47
  # see http://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Sigv4/Signer.html
50
48
 
51
- # NOTE: The following middleware is from `faraday_middleware`
52
- # cf. https://github.com/lostisland/faraday_middleware/blob/master/lib/faraday_middleware.rb
53
- # **It is not an essential middleware to work.**
54
49
  faraday.response :json, content_type: /\bjson\b/
55
- faraday.response :raise_error
56
-
57
50
 
58
51
  # NOTE: If you need to send case sensitive headers like `x-amz-access-token` in `SP API`.
59
52
  # cf. https://github.com/lostisland/faraday/issues/747#issuecomment-439864181
@@ -83,7 +76,7 @@ If you previously provided the `service_name` option, you need to rename it `ser
83
76
  ```sh
84
77
  bundle install
85
78
  bundle exec appraisal install
86
- bundle exec appraisal faraday-1.8 rake
79
+ bundle exec appraisal faraday-2.0 rake
87
80
  ```
88
81
 
89
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.6.1'
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,18 +21,17 @@ 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', '>= 1.8', '< 2'
27
+ spec.add_dependency 'faraday', '>= 2.0', '< 3'
28
28
 
29
29
  spec.add_development_dependency 'appraisal', '>= 2.2'
30
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'
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "faraday", "~> 1.8.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.6.1
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-12-19 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,20 +30,20 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.8'
33
+ version: '2.0'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '2'
36
+ version: '3'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '1.8'
43
+ version: '2.0'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '2'
46
+ version: '3'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: appraisal
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -86,20 +86,6 @@ dependencies:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
- - !ruby/object:Gem::Dependency
90
- name: faraday_middleware
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: '0'
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: '0'
103
89
  - !ruby/object:Gem::Dependency
104
90
  name: rake
105
91
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +120,14 @@ dependencies:
134
120
  requirements:
135
121
  - - ">="
136
122
  - !ruby/object:Gem::Version
137
- version: 1.8.0
123
+ version: 1.36.0
138
124
  type: :development
139
125
  prerelease: false
140
126
  version_requirements: !ruby/object:Gem::Requirement
141
127
  requirements:
142
128
  - - ">="
143
129
  - !ruby/object:Gem::Version
144
- version: 1.8.0
130
+ version: 1.36.0
145
131
  - !ruby/object:Gem::Dependency
146
132
  name: rubocop-rake
147
133
  requirement: !ruby/object:Gem::Requirement
@@ -214,7 +200,7 @@ dependencies:
214
200
  version: '0'
215
201
  description: Faraday middleware for AWS Signature Version 4 using aws-sigv4.
216
202
  email:
217
- - sugawara@cookpad.com
203
+ - sugawara@winebarrel.jp
218
204
  executables: []
219
205
  extensions: []
220
206
  extra_rdoc_files: []
@@ -223,6 +209,7 @@ files:
223
209
  - ".gitignore"
224
210
  - ".rspec"
225
211
  - ".rubocop.yml"
212
+ - ".ruby-version"
226
213
  - ".simplecov"
227
214
  - Appraisals
228
215
  - Gemfile
@@ -231,7 +218,7 @@ files:
231
218
  - Rakefile
232
219
  - faraday_middleware-aws-sigv4.gemspec
233
220
  - gemfiles/.bundle/config
234
- - gemfiles/faraday_1.8.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
@@ -248,14 +235,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
248
235
  requirements:
249
236
  - - ">="
250
237
  - !ruby/object:Gem::Version
251
- version: '2.4'
238
+ version: '2.5'
252
239
  required_rubygems_version: !ruby/object:Gem::Requirement
253
240
  requirements:
254
241
  - - ">="
255
242
  - !ruby/object:Gem::Version
256
243
  version: '0'
257
244
  requirements: []
258
- rubygems_version: 3.2.32
245
+ rubygems_version: 3.3.7
259
246
  signing_key:
260
247
  specification_version: 4
261
248
  summary: Faraday middleware for AWS Signature Version 4 using aws-sigv4.