microsoft_kiota_abstractions 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -1
- data/.github/workflows/auto-merge-dependabot.yml +32 -0
- data/.github/workflows/projectsbot.yml +1 -1
- data/.github/workflows/release.yml +1 -1
- data/.github/workflows/ruby.yml +2 -2
- data/CHANGELOG.md +10 -0
- data/lib/microsoft_kiota_abstractions/base_request_builder.rb +36 -0
- data/lib/microsoft_kiota_abstractions/request_configuration.rb +22 -0
- data/lib/microsoft_kiota_abstractions/request_information.rb +1 -1
- data/lib/microsoft_kiota_abstractions/version.rb +1 -1
- data/lib/microsoft_kiota_abstractions.rb +2 -0
- data/microsoft_kiota_abstractions.gemspec +2 -2
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dc8072c534a3195a597fd816805ed6412b6265dd8eada12806c59301e463691
|
4
|
+
data.tar.gz: 0b51aa4853fcaa5016f67830a49369ebece406d7ed05681f412ff297fbac350c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e669b6f13c8d68de0a0095d8b536afcb48b37963780c34d9542d22ffc84e2edb98e96a2cdbf85d9701b628964eaf44b0af6d1b1b238dab650691e47adcc495c5
|
7
|
+
data.tar.gz: d6b59ab16474fa28b982fda91c3a9eb47fd913478ae35f97430dfefdee4b58b8b0bdb0721b97cbf8eba840d99730ff830d62db69c367fc135ef749e58269eade
|
data/.github/CODEOWNERS
CHANGED
@@ -1 +1 @@
|
|
1
|
-
* @andrueastman @baywet @
|
1
|
+
* @andrueastman @baywet @zengin @MichaelMainer @calebkiage @rkodev
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: Auto-merge dependabot updates
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
branches: [ main ]
|
6
|
+
|
7
|
+
permissions:
|
8
|
+
pull-requests: write
|
9
|
+
contents: write
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
|
13
|
+
dependabot-merge:
|
14
|
+
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
|
17
|
+
if: ${{ github.actor == 'dependabot[bot]' }}
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- name: Dependabot metadata
|
21
|
+
id: metadata
|
22
|
+
uses: dependabot/fetch-metadata@v1.3.6
|
23
|
+
with:
|
24
|
+
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
25
|
+
|
26
|
+
- name: Enable auto-merge for Dependabot PRs
|
27
|
+
# Only if version bump is not a major version change
|
28
|
+
if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}}
|
29
|
+
run: gh pr merge --auto --merge "$PR_URL"
|
30
|
+
env:
|
31
|
+
PR_URL: ${{github.event.pull_request.html_url}}
|
32
|
+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
@@ -10,7 +10,7 @@ jobs:
|
|
10
10
|
steps:
|
11
11
|
- name: Generate token
|
12
12
|
id: generate_token
|
13
|
-
uses: tibdex/github-app-token@
|
13
|
+
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
14
14
|
with:
|
15
15
|
app_id: ${{ secrets.GRAPHBOT_APP_ID }}
|
16
16
|
private_key: ${{ secrets.GRAPHBOT_APP_PEM }}
|
data/.github/workflows/ruby.yml
CHANGED
@@ -12,7 +12,7 @@ jobs:
|
|
12
12
|
fail-fast: false
|
13
13
|
matrix:
|
14
14
|
os: [ubuntu-latest, macos-latest]
|
15
|
-
ruby-version: ['
|
15
|
+
ruby-version: ['3.0', '3.1', '3.2', head, jruby, jruby-head, truffleruby, truffleruby-head]
|
16
16
|
runs-on: ${{ matrix.os }}
|
17
17
|
steps:
|
18
18
|
- uses: actions/checkout@v3
|
@@ -25,7 +25,7 @@ jobs:
|
|
25
25
|
- name: Run tests
|
26
26
|
run: bundle exec rake
|
27
27
|
- name: Upload artifacts for ruby version 3 and ubuntu
|
28
|
-
if: ${{ matrix.os == 'ubuntu-latest' && matrix.ruby-version == '3.
|
28
|
+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.ruby-version == '3.2'}}
|
29
29
|
uses: actions/upload-artifact@v3
|
30
30
|
with:
|
31
31
|
name: drop
|
data/CHANGELOG.md
CHANGED
@@ -11,6 +11,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
11
11
|
|
12
12
|
### Changed
|
13
13
|
|
14
|
+
## [0.14.0] - 2023-03-14
|
15
|
+
|
16
|
+
### Added
|
17
|
+
|
18
|
+
- Added a base request builder and request configuration class to reduce the amount of generated code.
|
19
|
+
|
20
|
+
### Changed
|
21
|
+
|
22
|
+
- Bumped minimum required ruby version to 3.0.
|
23
|
+
|
14
24
|
## [0.13.0] - 2023-01-10
|
15
25
|
|
16
26
|
### Added
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module MicrosoftKiotaAbstractions
|
2
|
+
##
|
3
|
+
# Base class for request builders. Performs basic validation and defines common properties.
|
4
|
+
class BaseRequestBuilder
|
5
|
+
##
|
6
|
+
# Path parameters for the request
|
7
|
+
@path_parameters
|
8
|
+
##
|
9
|
+
# The request adapter to use to execute the requests.
|
10
|
+
@request_adapter
|
11
|
+
##
|
12
|
+
# Url template to use to build the URL for the current request builder
|
13
|
+
@url_template
|
14
|
+
##
|
15
|
+
## Instantiates a new BaseRequestBuilder and sets the default values.
|
16
|
+
## @param path_parameters Path parameters for the request
|
17
|
+
## @param request_adapter The request adapter to use to execute the requests.
|
18
|
+
## @param url_template Url template to use to build the URL for the current request builder
|
19
|
+
## @return a void
|
20
|
+
##
|
21
|
+
def initialize(path_parameters, request_adapter, url_template)
|
22
|
+
raise StandardError, 'request_adapter cannot be null' if request_adapter.nil?
|
23
|
+
raise StandardError, 'url_template cannot be null' if url_template.nil? || url_template.empty?
|
24
|
+
@request_adapter = request_adapter
|
25
|
+
unless path_parameters.nil? then
|
26
|
+
if path_parameters.is_a? Hash then
|
27
|
+
@path_parameters = path_parameters.clone
|
28
|
+
elsif path_parameters.is_a? String then
|
29
|
+
@path_parameters = { "request-raw-url" => path_parameters }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
@path_parameters = Hash.new if path_parameters.nil?
|
33
|
+
@url_template = url_template
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require_relative 'request_headers'
|
2
|
+
|
3
|
+
module MicrosoftKiotaAbstractions
|
4
|
+
##
|
5
|
+
# Configuration for the request such as headers, query parameters, and middleware options.
|
6
|
+
class RequestConfiguration
|
7
|
+
##
|
8
|
+
# Request headers
|
9
|
+
attr_accessor :headers
|
10
|
+
##
|
11
|
+
# Request options
|
12
|
+
attr_accessor :options
|
13
|
+
##
|
14
|
+
# Request query parameters
|
15
|
+
attr_accessor :query_parameters
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
@headers = RequestHeaders.new
|
19
|
+
@options = Array.new
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -105,7 +105,7 @@ module MicrosoftKiotaAbstractions
|
|
105
105
|
end
|
106
106
|
|
107
107
|
def add_headers_from_raw_object(h)
|
108
|
-
h.select{|x,y| @headers.add(x.to_s, y)} unless !h
|
108
|
+
h.get_all.select{|x,y| @headers.add(x.to_s, y)} unless !h
|
109
109
|
end
|
110
110
|
|
111
111
|
def set_query_string_parameters_from_raw_object(q)
|
@@ -5,8 +5,10 @@ require_relative "microsoft_kiota_abstractions/authentication/base_bearer_token_
|
|
5
5
|
require_relative "microsoft_kiota_abstractions/authentication/anonymous_authentication_provider"
|
6
6
|
require_relative "microsoft_kiota_abstractions/api_error"
|
7
7
|
require_relative "microsoft_kiota_abstractions/http_method"
|
8
|
+
require_relative "microsoft_kiota_abstractions/base_request_builder"
|
8
9
|
require_relative "microsoft_kiota_abstractions/api_client_builder"
|
9
10
|
require_relative "microsoft_kiota_abstractions/request_adapter"
|
11
|
+
require_relative "microsoft_kiota_abstractions/request_configuration"
|
10
12
|
require_relative "microsoft_kiota_abstractions/request_option"
|
11
13
|
require_relative "microsoft_kiota_abstractions/request_headers"
|
12
14
|
require_relative "microsoft_kiota_abstractions/request_information"
|
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = 'microsoft_kiota_abstractions'
|
7
7
|
spec.version = MicrosoftKiotaAbstractions::VERSION
|
8
8
|
spec.authors = 'Microsoft Corporation'
|
9
|
-
spec.email = 'graphsdkpub@microsoft.com'
|
9
|
+
spec.email = 'graphsdkpub+ruby@microsoft.com'
|
10
10
|
spec.description = 'Microsoft Kiota Abstractions - Ruby abstractions for building library agnostic http client'
|
11
11
|
spec.summary = 'The Kiota abstractions are language specific libraries defining the basic constructs Kiota projects need once an SDK has been generated from an OpenAPI definition.'
|
12
12
|
spec.homepage = 'https://microsoft.github.io/kiota/'
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
'source_code_uri' => 'https://github.com/microsoft/kiota-abstractions-ruby',
|
19
19
|
'github_repo' => 'ssh://github.com/microsoft/kiota-abstractions-ruby'
|
20
20
|
}
|
21
|
-
spec.required_ruby_version = '>=
|
21
|
+
spec.required_ruby_version = '>= 3.0.0'
|
22
22
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
24
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: microsoft_kiota_abstractions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -88,13 +88,14 @@ dependencies:
|
|
88
88
|
version: '0'
|
89
89
|
description: Microsoft Kiota Abstractions - Ruby abstractions for building library
|
90
90
|
agnostic http client
|
91
|
-
email: graphsdkpub@microsoft.com
|
91
|
+
email: graphsdkpub+ruby@microsoft.com
|
92
92
|
executables: []
|
93
93
|
extensions: []
|
94
94
|
extra_rdoc_files: []
|
95
95
|
files:
|
96
96
|
- ".github/CODEOWNERS"
|
97
97
|
- ".github/dependabot.yml"
|
98
|
+
- ".github/workflows/auto-merge-dependabot.yml"
|
98
99
|
- ".github/workflows/code-ql.yml"
|
99
100
|
- ".github/workflows/conflicting-pr-label.yml"
|
100
101
|
- ".github/workflows/projectsbot.yml"
|
@@ -117,8 +118,10 @@ files:
|
|
117
118
|
- lib/microsoft_kiota_abstractions/authentication/anonymous_authentication_provider.rb
|
118
119
|
- lib/microsoft_kiota_abstractions/authentication/authentication_provider.rb
|
119
120
|
- lib/microsoft_kiota_abstractions/authentication/base_bearer_token_authentication_provider.rb
|
121
|
+
- lib/microsoft_kiota_abstractions/base_request_builder.rb
|
120
122
|
- lib/microsoft_kiota_abstractions/http_method.rb
|
121
123
|
- lib/microsoft_kiota_abstractions/request_adapter.rb
|
124
|
+
- lib/microsoft_kiota_abstractions/request_configuration.rb
|
122
125
|
- lib/microsoft_kiota_abstractions/request_headers.rb
|
123
126
|
- lib/microsoft_kiota_abstractions/request_information.rb
|
124
127
|
- lib/microsoft_kiota_abstractions/request_option.rb
|
@@ -150,14 +153,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
150
153
|
requirements:
|
151
154
|
- - ">="
|
152
155
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
156
|
+
version: 3.0.0
|
154
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
158
|
requirements:
|
156
159
|
- - ">="
|
157
160
|
- !ruby/object:Gem::Version
|
158
161
|
version: '0'
|
159
162
|
requirements: []
|
160
|
-
rubygems_version: 3.
|
163
|
+
rubygems_version: 3.4.6
|
161
164
|
signing_key:
|
162
165
|
specification_version: 4
|
163
166
|
summary: The Kiota abstractions are language specific libraries defining the basic
|