We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b7d84b commit c038125Copy full SHA for c038125
.github/workflows/ci.yml
@@ -33,6 +33,9 @@ jobs:
33
bundle config set --local with 'build rbs'
34
bundle install
35
36
+ - name: Install rbs collection
37
+ run: rbs collection install
38
+
39
- name: Build SDK
40
run: bundle exec rake build
41
.gitignore
@@ -2,10 +2,12 @@
2
3
/.byebug_history
4
/.bundle
5
+/.gem_rbs_collection
6
/.yardoc
7
/api-docs
8
/Gemfile.lock
9
/coverage
10
+/rbs_collection.lock.yaml
11
*.gem
12
benchmark_report.json
13
gems/aws-sigv4/CHANGELOG.md
@@ -1,6 +1,8 @@
1
Unreleased Changes
------------------
+* Feature - Add RBS signature files to support static type checking
1.10.1 (2024-10-21)
gems/aws-sigv4/lib/aws-sigv4/request.rb
@@ -7,7 +7,7 @@ module Sigv4
class Request
# @option options [required, String] :http_method
- # @option options [required, HTTP::URI, HTTPS::URI, String] :endpoint
+ # @option options [required, String, URI::HTTP, URI::HTTPS] :endpoint
# @option options [Hash<String,String>] :headers ({})
# @option options [String, IO] :body ('')
def initialize(options = {})
@@ -30,12 +30,12 @@ def http_method
30
@http_method
31
end
32
- # @param [String, HTTP::URI, HTTPS::URI] endpoint
+ # @param [String, URI::HTTP, URI::HTTPS] endpoint
def endpoint=(endpoint)
@endpoint = URI.parse(endpoint.to_s)
- # @return [HTTP::URI, HTTPS::URI]
+ # @return [URI::HTTP, URI::HTTPS]
def endpoint
@endpoint
gems/aws-sigv4/lib/aws-sigv4/signer.rb
@@ -205,7 +205,7 @@ def initialize(options = {})
205
# @option request [required, String] :http_method One of
206
# 'GET', 'HEAD', 'PUT', 'POST', 'PATCH', or 'DELETE'
207
#
208
- # @option request [required, String, URI::HTTPS, URI::HTTP] :url
+ # @option request [required, String, URI::HTTP, URI::HTTPS] :url
209
# The request URI. Must be a valid HTTP or HTTPS URI.
210
211
# @option request [optional, Hash] :headers ({}) A hash of headers
@@ -383,7 +383,7 @@ def sign_event(prior_signature, payload, encoder)
383
# @option options [required, String] :http_method The HTTP request method,
384
# e.g. 'GET', 'HEAD', 'PUT', 'POST', 'PATCH', or 'DELETE'.
385
386
- # @option options [required, String, HTTPS::URI, HTTP::URI] :url
+ # @option options [required, String, URI::HTTP, URI::HTTPS] :url
387
# The URI to sign.
388
389
# @option options [Hash] :headers ({}) Headers that should
gems/aws-sigv4/sig/errors.rbs
@@ -0,0 +1,13 @@
+module Aws
+ module Sigv4
+ module Errors
+ class MissingCredentialsError < ArgumentError
+ def initialize: (?String msg) -> void
+ end
+ class MissingRegionError < ArgumentError
+ def initialize: (*untyped) -> void
+end
gems/aws-sigv4/sig/interfaces.rbs
@@ -0,0 +1,15 @@
+ interface _Credentials
+ def access_key_id: () -> String
+ def secret_access_key: () -> String
+ def session_token: () -> String?
+ def set?: () -> bool
+ interface _CredentialsProvider
+ def credentials: () -> _Credentials
14
15
gems/aws-sigv4/sig/manifest.yaml
@@ -0,0 +1,4 @@
+dependencies:
+ - name: tempfile
+ - name: stringio
+ - name: uri
gems/aws-sigv4/sig/request.rbs
@@ -0,0 +1,25 @@
+ class Request
+ def initialize: (
+ http_method: String,
+ endpoint: String | URI::HTTP | URI::HTTPS,
+ ?headers: Hash[String, String],
+ ?body: String | IO
+ ) -> void
+ | (?Hash[Symbol, untyped]) -> void
+ def http_method=: (String http_method) -> void
+ def http_method: () -> String
+ def endpoint: () -> (URI::HTTP | URI::HTTPS)
16
+ def endpoint=: (String | URI::HTTP | URI::HTTPS endpoint) -> void
17
18
+ def headers=: (Hash[String, String] headers) -> void
19
+ def headers: () -> Hash[String, String]
20
21
+ def body=: (String | IO body) -> void
22
+ def body: () -> (String | IO)
23
24
25
gems/aws-sigv4/sig/signature.rbs
@@ -0,0 +1,12 @@
+ class Signature
+ attr_accessor headers: Hash[String, String]
+ attr_accessor canonical_request: String
+ attr_accessor string_to_sign: String
+ attr_accessor content_sha256: String
+ attr_accessor signature: String
+ attr_accessor extra: Hash[untyped, untyped]
0 commit comments