envoy-hooks 0.9.5 → 0.11.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/workflows/codeql.yml +48 -0
- data/Gemfile.lock +6 -6
- data/envoy-hooks.gemspec +3 -3
- data/lib/envoy/hooks/version.rb +1 -1
- data/lib/envoy/hooks.rb +12 -2
- metadata +11 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c6da37a3234f8c88354d2f6770a523f45c414cc74679ca672bef584b411c3f62
|
|
4
|
+
data.tar.gz: ee528c681784c2ffe453132412ff5eb5ff75ab344efc48fe489df74beea10251
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c8db0e49750b2e144775be58fdf6d51b7e4225976385d8c837a8a7f52095d03d1cd1a00dfbd6f76e7a0a28b404e10885502e763793699d1b3de9ceeb8b3d2e3b
|
|
7
|
+
data.tar.gz: bfaed3c37887887aaa251758d14ba95145462587b1050779ae55aebca3dba67cd3450d882b53dae40043ad9042dce81c8400516660f7fc2886bcda8487722d6e
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: "CodeQL Advanced"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "master" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "master" ]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: '21 22 * * 0'
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
analyze:
|
|
13
|
+
name: Analyze (${{ matrix.language }})
|
|
14
|
+
|
|
15
|
+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
|
16
|
+
permissions:
|
|
17
|
+
# required for all workflows
|
|
18
|
+
security-events: write
|
|
19
|
+
|
|
20
|
+
# required to fetch internal or private CodeQL packs
|
|
21
|
+
packages: read
|
|
22
|
+
|
|
23
|
+
# only required for workflows in private repositories
|
|
24
|
+
actions: read
|
|
25
|
+
contents: read
|
|
26
|
+
|
|
27
|
+
strategy:
|
|
28
|
+
fail-fast: false
|
|
29
|
+
matrix:
|
|
30
|
+
include:
|
|
31
|
+
- language: ruby
|
|
32
|
+
build-mode: none
|
|
33
|
+
|
|
34
|
+
steps:
|
|
35
|
+
- name: Checkout repository
|
|
36
|
+
uses: actions/checkout@v4
|
|
37
|
+
|
|
38
|
+
# Initializes the CodeQL tools for scanning.
|
|
39
|
+
- name: Initialize CodeQL
|
|
40
|
+
uses: github/codeql-action/init@v4
|
|
41
|
+
with:
|
|
42
|
+
languages: ${{ matrix.language }}
|
|
43
|
+
build-mode: ${{ matrix.build-mode }}
|
|
44
|
+
|
|
45
|
+
- name: Perform CodeQL Analysis
|
|
46
|
+
uses: github/codeql-action/analyze@v4
|
|
47
|
+
with:
|
|
48
|
+
category: "/language:${{matrix.language}}"
|
data/Gemfile.lock
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
envoy-hooks (0.
|
|
5
|
-
faraday (~> 0.
|
|
4
|
+
envoy-hooks (0.11.0)
|
|
5
|
+
faraday (~> 0.17)
|
|
6
6
|
faraday-net_http (~> 1.0)
|
|
7
|
-
faraday_middleware (~> 0.
|
|
7
|
+
faraday_middleware (~> 0.14)
|
|
8
8
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
12
|
ast (2.4.2)
|
|
13
13
|
diff-lcs (1.5.0)
|
|
14
|
-
faraday (0.
|
|
14
|
+
faraday (0.17.6)
|
|
15
15
|
multipart-post (>= 1.2, < 3)
|
|
16
16
|
faraday-net_http (1.0.1)
|
|
17
|
-
faraday_middleware (0.
|
|
17
|
+
faraday_middleware (0.14.0)
|
|
18
18
|
faraday (>= 0.7.4, < 1.0)
|
|
19
19
|
json (2.6.3)
|
|
20
20
|
multipart-post (2.3.0)
|
|
@@ -76,4 +76,4 @@ DEPENDENCIES
|
|
|
76
76
|
rubocop-rspec
|
|
77
77
|
|
|
78
78
|
BUNDLED WITH
|
|
79
|
-
2.4.
|
|
79
|
+
2.4.10
|
data/envoy-hooks.gemspec
CHANGED
|
@@ -5,7 +5,7 @@ require_relative 'lib/envoy/hooks/version'
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = 'envoy-hooks'
|
|
7
7
|
spec.version = Envoy::Hooks::VERSION
|
|
8
|
-
spec.authors = [
|
|
8
|
+
spec.authors = %w[Jeffrey-Biles-Envoy Anthony-Floccari-Envoy]
|
|
9
9
|
spec.email = ['afloccari@envoy.com']
|
|
10
10
|
|
|
11
11
|
spec.summary = 'Ruby wrapper for envoy/hooks'
|
|
@@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
|
|
|
30
30
|
|
|
31
31
|
# Uncomment to register a new dependency of your gem
|
|
32
32
|
# spec.add_dependency "example-gem", "~> 1.0"
|
|
33
|
-
spec.add_dependency 'faraday', '~> 0.
|
|
34
|
-
spec.add_dependency 'faraday_middleware', '~> 0.
|
|
33
|
+
spec.add_dependency 'faraday', '~> 0.17'
|
|
34
|
+
spec.add_dependency 'faraday_middleware', '~> 0.14'
|
|
35
35
|
spec.add_dependency 'faraday-net_http', '~> 1.0'
|
|
36
36
|
|
|
37
37
|
# For more information and examples about making a new gem, checkout our
|
data/lib/envoy/hooks/version.rb
CHANGED
data/lib/envoy/hooks.rb
CHANGED
|
@@ -34,11 +34,21 @@ module Envoy
|
|
|
34
34
|
def upsertSubscription(subscriptionScope:, clientId:, status:, config: {}, externalId: nil, creatorUserId: nil,
|
|
35
35
|
authorizedScopes: [])
|
|
36
36
|
# NOTE: - should we be doing these checks in here, or let the API handle it?
|
|
37
|
-
if !subscriptionScope || !subscriptionScope[:type]
|
|
37
|
+
if !subscriptionScope || !subscriptionScope[:type]
|
|
38
38
|
raise(Error, 'Must fully define a subscriptionScope for `upsertSubscription`')
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
# Validate that id is present for non-GLOBAL subscriptions
|
|
42
|
+
if subscriptionScope[:type] != 'GLOBAL' && !subscriptionScope[:id]
|
|
43
|
+
raise(Error, 'subscriptionScope.id is required for non-GLOBAL subscriptions')
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Validate that id is nil/null for GLOBAL subscriptions
|
|
47
|
+
if subscriptionScope[:type] == 'GLOBAL' && subscriptionScope[:id]
|
|
48
|
+
raise(Error, 'subscriptionScope.id must be nil for GLOBAL subscriptions')
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
validateEnum('subscriptionScope.type', subscriptionScope[:type], %w[LOCATION COMPANY USER ZONE GLOBAL])
|
|
42
52
|
validateEnum('status', status, %w[ENABLED DISABLED PENDING])
|
|
43
53
|
|
|
44
54
|
faraday.post('/rest/v1/subscriptions', {
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: envoy-hooks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeffrey-Biles-Envoy
|
|
8
8
|
- Anthony-Floccari-Envoy
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-01-21 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: faraday
|
|
@@ -17,28 +17,28 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - "~>"
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 0.
|
|
20
|
+
version: '0.17'
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - "~>"
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 0.
|
|
27
|
+
version: '0.17'
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: faraday_middleware
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
31
31
|
requirements:
|
|
32
32
|
- - "~>"
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: 0.
|
|
34
|
+
version: '0.14'
|
|
35
35
|
type: :runtime
|
|
36
36
|
prerelease: false
|
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
39
|
- - "~>"
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: 0.
|
|
41
|
+
version: '0.14'
|
|
42
42
|
- !ruby/object:Gem::Dependency
|
|
43
43
|
name: faraday-net_http
|
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -53,7 +53,7 @@ dependencies:
|
|
|
53
53
|
- - "~>"
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
55
|
version: '1.0'
|
|
56
|
-
description:
|
|
56
|
+
description:
|
|
57
57
|
email:
|
|
58
58
|
- afloccari@envoy.com
|
|
59
59
|
executables: []
|
|
@@ -61,6 +61,7 @@ extensions: []
|
|
|
61
61
|
extra_rdoc_files: []
|
|
62
62
|
files:
|
|
63
63
|
- ".circleci/config.yml"
|
|
64
|
+
- ".github/workflows/codeql.yml"
|
|
64
65
|
- ".gitignore"
|
|
65
66
|
- ".rspec"
|
|
66
67
|
- ".rubocop.yml"
|
|
@@ -79,7 +80,7 @@ licenses: []
|
|
|
79
80
|
metadata:
|
|
80
81
|
homepage_uri: https://github.com/envoy/envoy-hooks-ruby
|
|
81
82
|
source_code_uri: https://github.com/envoy/envoy-hooks-ruby
|
|
82
|
-
post_install_message:
|
|
83
|
+
post_install_message:
|
|
83
84
|
rdoc_options: []
|
|
84
85
|
require_paths:
|
|
85
86
|
- lib
|
|
@@ -95,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
95
96
|
version: '0'
|
|
96
97
|
requirements: []
|
|
97
98
|
rubygems_version: 3.1.6
|
|
98
|
-
signing_key:
|
|
99
|
+
signing_key:
|
|
99
100
|
specification_version: 4
|
|
100
101
|
summary: Ruby wrapper for envoy/hooks
|
|
101
102
|
test_files: []
|