microsoft_kiota_abstractions 0.14.0 → 0.14.2

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: 3dc8072c534a3195a597fd816805ed6412b6265dd8eada12806c59301e463691
4
- data.tar.gz: 0b51aa4853fcaa5016f67830a49369ebece406d7ed05681f412ff297fbac350c
3
+ metadata.gz: 3d8867b9a8bfa01dc4d0a54613f3350d405c80f1d9e521ed8b35bb405a68b443
4
+ data.tar.gz: d8d61123f81182e924f1cf74b86abb5ed89da24b8300e9ca80af2e0b054a83a4
5
5
  SHA512:
6
- metadata.gz: e669b6f13c8d68de0a0095d8b536afcb48b37963780c34d9542d22ffc84e2edb98e96a2cdbf85d9701b628964eaf44b0af6d1b1b238dab650691e47adcc495c5
7
- data.tar.gz: d6b59ab16474fa28b982fda91c3a9eb47fd913478ae35f97430dfefdee4b58b8b0bdb0721b97cbf8eba840d99730ff830d62db69c367fc135ef749e58269eade
6
+ metadata.gz: fba27a4c85291c028383b48e4d294ced778c1669b599eacbd3277661129bfb4cde99428c431563e84201a10d8a5d916df710436907e03e24a6d398beba108413
7
+ data.tar.gz: 7afaaf78fbc9aea05b6ec991f299baa90ee9f0dfe70dfa70fa98e61b1448227eed6ebc1b2c21a67fd168e2e8d061e90142e55d91c85c7c61e52570feda71ba5a
@@ -0,0 +1,101 @@
1
+ id:
2
+ name: GitOps.PullRequestIssueManagement
3
+ description: GitOps.PullRequestIssueManagement primitive
4
+ owner:
5
+ resource: repository
6
+ disabled: false
7
+ where:
8
+ configuration:
9
+ resourceManagementConfiguration:
10
+ scheduledSearches:
11
+ - description:
12
+ frequencies:
13
+ - hourly:
14
+ hour: 6
15
+ filters:
16
+ - isIssue
17
+ - isOpen
18
+ - hasLabel:
19
+ label: 'Needs: Author Feedback'
20
+ - hasLabel:
21
+ label: 'Status: No Recent Activity'
22
+ - noActivitySince:
23
+ days: 3
24
+ actions:
25
+ - closeIssue
26
+ - description:
27
+ frequencies:
28
+ - hourly:
29
+ hour: 6
30
+ filters:
31
+ - isIssue
32
+ - isOpen
33
+ - hasLabel:
34
+ label: 'Needs: Author Feedback'
35
+ - noActivitySince:
36
+ days: 4
37
+ - isNotLabeledWith:
38
+ label: 'Status: No Recent Activity'
39
+ actions:
40
+ - addLabel:
41
+ label: 'Status: No Recent Activity'
42
+ - addReply:
43
+ reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
44
+ - description:
45
+ frequencies:
46
+ - hourly:
47
+ hour: 6
48
+ filters:
49
+ - isIssue
50
+ - isOpen
51
+ - hasLabel:
52
+ label: 'Resolution: Duplicate'
53
+ - noActivitySince:
54
+ days: 1
55
+ actions:
56
+ - addReply:
57
+ reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes.
58
+ - closeIssue
59
+ eventResponderTasks:
60
+ - if:
61
+ - payloadType: Issue_Comment
62
+ - isAction:
63
+ action: Created
64
+ - isActivitySender:
65
+ issueAuthor: True
66
+ - hasLabel:
67
+ label: 'Needs: Author Feedback'
68
+ - isOpen
69
+ then:
70
+ - addLabel:
71
+ label: 'Needs: Attention :wave:'
72
+ - removeLabel:
73
+ label: 'Needs: Author Feedback'
74
+ description:
75
+ - if:
76
+ - payloadType: Issues
77
+ - not:
78
+ isAction:
79
+ action: Closed
80
+ - hasLabel:
81
+ label: 'Status: No Recent Activity'
82
+ then:
83
+ - removeLabel:
84
+ label: 'Status: No Recent Activity'
85
+ description:
86
+ - if:
87
+ - payloadType: Issue_Comment
88
+ - hasLabel:
89
+ label: 'Status: No Recent Activity'
90
+ then:
91
+ - removeLabel:
92
+ label: 'Status: No Recent Activity'
93
+ description:
94
+ - if:
95
+ - payloadType: Pull_Request
96
+ then:
97
+ - inPrLabel:
98
+ label: WIP
99
+ description:
100
+ onFailure:
101
+ onSuccess:
@@ -19,7 +19,7 @@ jobs:
19
19
  steps:
20
20
  - name: Dependabot metadata
21
21
  id: metadata
22
- uses: dependabot/fetch-metadata@v1.3.6
22
+ uses: dependabot/fetch-metadata@v1.6.0
23
23
  with:
24
24
  github-token: "${{ secrets.GITHUB_TOKEN }}"
25
25
 
@@ -40,7 +40,7 @@ jobs:
40
40
 
41
41
  steps:
42
42
  - name: Checkout repository
43
- uses: actions/checkout@v3
43
+ uses: actions/checkout@v4
44
44
 
45
45
  # Initializes the CodeQL tools for scanning.
46
46
  - name: Initialize CodeQL
@@ -10,7 +10,7 @@ jobs:
10
10
  steps:
11
11
  - name: Generate token
12
12
  id: generate_token
13
- uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
13
+ uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
14
14
  with:
15
15
  app_id: ${{ secrets.GRAPHBOT_APP_ID }}
16
16
  private_key: ${{ secrets.GRAPHBOT_APP_PEM }}
@@ -10,7 +10,7 @@ jobs:
10
10
  Git_Release:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v3
13
+ - uses: actions/checkout@v4
14
14
  - name: Github Release
15
15
  uses: anton-yurchenko/git-release@v5.0
16
16
  env:
@@ -25,7 +25,7 @@ jobs:
25
25
  name: production_feeds
26
26
  runs-on: ubuntu-latest
27
27
  steps:
28
- - uses: actions/checkout@v3
28
+ - uses: actions/checkout@v4
29
29
  - uses: ruby/setup-ruby@v1
30
30
  with:
31
31
  ruby-version: '3.2'
@@ -15,13 +15,13 @@ jobs:
15
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
- - uses: actions/checkout@v3
18
+ - uses: actions/checkout@v4
19
19
  - uses: ruby/setup-ruby@v1
20
20
  with:
21
21
  ruby-version: ${{ matrix.ruby-version }}
22
22
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
23
23
  bundler: 'latest'
24
- cache-version: 1
24
+ cache-version: 2
25
25
  - name: Run tests
26
26
  run: bundle exec rake
27
27
  - name: Upload artifacts for ruby version 3 and ubuntu
data/CHANGELOG.md CHANGED
@@ -11,6 +11,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ### Changed
13
13
 
14
+ ## [0.14.1] - 2023-09-06
15
+
16
+ ### Added
17
+
18
+ - Added a try_add method for request headers
19
+
20
+ ## [0.14.1] - 2023-09-06
21
+
22
+ ### Changed
23
+
24
+ - Switched to std URI template
25
+
14
26
  ## [0.14.0] - 2023-03-14
15
27
 
16
28
  ### Added
@@ -22,6 +22,18 @@ module MicrosoftKiotaAbstractions
22
22
  end
23
23
  end
24
24
  end
25
+ def try_add(key, value)
26
+ if key.nil? || key.empty? || value.nil? || value.empty? then
27
+ raise ArgumentError, 'key and value cannot be nil or empty'
28
+ end
29
+ existing_value = @headers[key]
30
+ if existing_value.nil? || existing_value.empty? then
31
+ @headers[key] = Array[value.to_s]
32
+ return true
33
+ else
34
+ return false
35
+ end
36
+ end
25
37
  def get(key)
26
38
  if key.nil? || key.empty? then
27
39
  raise ArgumentError, 'key cannot be nil or empty'
@@ -1,5 +1,5 @@
1
1
  require 'uri'
2
- require 'addressable/template'
2
+ require 'stduritemplate'
3
3
  require_relative 'http_method'
4
4
  require_relative 'request_headers'
5
5
 
@@ -34,8 +34,7 @@ module MicrosoftKiotaAbstractions
34
34
  self.uri = self.path_parameters[@@raw_url_key]
35
35
  return @uri
36
36
  else
37
- template = Addressable::Template.new(@url_template)
38
- return URI(template.expand(self.path_parameters.merge(self.query_parameters)).to_s)
37
+ return URI(StdUriTemplate.expand(@url_template, self.path_parameters.merge(self.query_parameters)))
39
38
  end
40
39
  end
41
40
  end
@@ -86,13 +85,13 @@ module MicrosoftKiotaAbstractions
86
85
 
87
86
  def set_stream_content(value = $stdin)
88
87
  @content = value
89
- @headers.add(@@content_type_header, @@binary_content_type)
88
+ @headers.try_add(@@content_type_header, @@binary_content_type)
90
89
  end
91
90
 
92
91
  def set_content_from_parsable(request_adapter, content_type, values)
93
92
  begin
94
93
  writer = request_adapter.get_serialization_writer_factory().get_serialization_writer(content_type)
95
- @headers.add(@@content_type_header, content_type)
94
+ @headers.try_add(@@content_type_header, content_type)
96
95
  if values != nil && values.kind_of?(Array)
97
96
  writer.write_collection_of_object_values(nil, values)
98
97
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MicrosoftKiotaAbstractions
4
- VERSION = "0.14.0"
4
+ VERSION = "0.14.2"
5
5
  end
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.bindir = 'bin'
29
29
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ['lib']
31
- spec.add_runtime_dependency 'addressable', '~> 2.7', '>= 2.7.0'
31
+ spec.add_runtime_dependency 'stduritemplate', '~> 0.0.39'
32
32
  spec.add_runtime_dependency 'iso8601', '~> 0.13.0'
33
33
  spec.add_development_dependency 'rake', '~> 13.0'
34
34
  spec.add_development_dependency 'rspec', '~> 3.0'
metadata CHANGED
@@ -1,35 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microsoft_kiota_abstractions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.2
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-03-22 00:00:00.000000000 Z
11
+ date: 2023-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: addressable
14
+ name: stduritemplate
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.7'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 2.7.0
19
+ version: 0.0.39
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '2.7'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 2.7.0
26
+ version: 0.0.39
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: iso8601
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -95,6 +89,7 @@ extra_rdoc_files: []
95
89
  files:
96
90
  - ".github/CODEOWNERS"
97
91
  - ".github/dependabot.yml"
92
+ - ".github/policies/resourceManagement.yml"
98
93
  - ".github/workflows/auto-merge-dependabot.yml"
99
94
  - ".github/workflows/code-ql.yml"
100
95
  - ".github/workflows/conflicting-pr-label.yml"
@@ -160,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
155
  - !ruby/object:Gem::Version
161
156
  version: '0'
162
157
  requirements: []
163
- rubygems_version: 3.4.6
158
+ rubygems_version: 3.4.10
164
159
  signing_key:
165
160
  specification_version: 4
166
161
  summary: The Kiota abstractions are language specific libraries defining the basic