cthiesfork-awspec 1.2.0 → 1.2.1
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/awspec.gemspec +4 -3
- data/lib/awspec/helper/finder/apigateway.rb +1 -1
- data/lib/awspec/stub/apigateway.rb +8 -1
- data/lib/awspec/type/apigateway.rb +6 -0
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6acd2b23e5c2564124412e9ec7799aae402bc209d712bde3b784e56f12c2f1cd
|
|
4
|
+
data.tar.gz: cc1e55611112b19f3a4fb4def33bac4e36047a544550f784594470a402a05f41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24fe2dd496f424d878d7cb3a59cd3876b73041af59c8acddc455a770490257fb283cbd889f08dc24262c010552281e8ed0224437f660d058770dde4e5911fb81
|
|
7
|
+
data.tar.gz: f50cfd18585a8fd4de12fb53df20e85bd8fbad14d6e488469ac4c2cc95d84494525f51fdc4e6bc93cb0a85f50d974507a857830dd899b9208dd2ef34878f9faf
|
data/awspec.gemspec
CHANGED
|
@@ -6,12 +6,13 @@ require 'awspec/version'
|
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |spec|
|
|
8
8
|
spec.name = 'cthiesfork-awspec'
|
|
9
|
-
spec.version = '1.2.
|
|
9
|
+
spec.version = '1.2.1'
|
|
10
10
|
spec.authors = ['cthies']
|
|
11
11
|
spec.email = ['colekthiessen@gmail.com']
|
|
12
12
|
|
|
13
|
-
spec.summary = 'Forked version of Awspec'
|
|
14
|
-
spec.description = 'Forked version of Awspec. All credit to the owners of the
|
|
13
|
+
spec.summary = 'Forked version of Awspec with extended API Gateway testing'
|
|
14
|
+
spec.description = 'Forked version of Awspec with extended API Gateway testing. All credit to the owners of the
|
|
15
|
+
Awspec repository at https://github.com/k1LoW/awspec'
|
|
15
16
|
spec.homepage = 'https://github.com/ckthiessen/awspec'
|
|
16
17
|
spec.license = 'MIT'
|
|
17
18
|
|
|
@@ -25,7 +25,7 @@ module Awspec::Helper
|
|
|
25
25
|
|
|
26
26
|
def find_api_resources_by_id(api_id)
|
|
27
27
|
all_resources = []
|
|
28
|
-
apigateway_client.get_resources(rest_api_id: api_id, limit: 500).each do |response|
|
|
28
|
+
apigateway_client.get_resources(rest_api_id: api_id, limit: 500, embed: ['methods']).each do |response|
|
|
29
29
|
all_resources += response.items
|
|
30
30
|
end
|
|
31
31
|
all_resources != [] ? all_resources : nil
|
|
@@ -93,7 +93,14 @@ Aws.config[:apigateway] = {
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
|
-
path: '/zambonis/123'
|
|
96
|
+
path: '/zambonis/123',
|
|
97
|
+
resource_methods: {
|
|
98
|
+
'POST' => {
|
|
99
|
+
http_method: 'POST',
|
|
100
|
+
method_integration: { http_method: 'AWS',
|
|
101
|
+
uri: 'arn:aws:apigateway:us-east-1:cognito-idp:action/ListUsers' }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
97
104
|
}
|
|
98
105
|
]
|
|
99
106
|
}
|
|
@@ -31,6 +31,10 @@ module Awspec::Type
|
|
|
31
31
|
self.api_resources.each do |resource|
|
|
32
32
|
next if resource.resource_methods.nil?
|
|
33
33
|
resource.resource_methods.each do |_, method|
|
|
34
|
+
if method.method_integration.uri =~ /arn:aws:.*/
|
|
35
|
+
aws_path = method.method_integration.uri.slice!(%r{\/.*})
|
|
36
|
+
return resource if aws_path == path
|
|
37
|
+
end
|
|
34
38
|
uri = Addressable::URI.parse(method.method_integration.uri)
|
|
35
39
|
return resource if uri.path == path
|
|
36
40
|
end
|
|
@@ -45,6 +49,7 @@ module Awspec::Type
|
|
|
45
49
|
resource_to_check.resource_methods.each do |_, method|
|
|
46
50
|
return resource_to_check if method.http_method == http_method
|
|
47
51
|
end
|
|
52
|
+
nil
|
|
48
53
|
end
|
|
49
54
|
|
|
50
55
|
def has_integration_method?(integration_path, http_method)
|
|
@@ -54,6 +59,7 @@ module Awspec::Type
|
|
|
54
59
|
integration_resource_to_check.resource_methods.each do |_, method|
|
|
55
60
|
return integration_resource_to_check if method.method_integration.http_method == http_method
|
|
56
61
|
end
|
|
62
|
+
nil
|
|
57
63
|
end
|
|
58
64
|
end
|
|
59
65
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cthiesfork-awspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- cthies
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-03-
|
|
11
|
+
date: 2020-03-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk
|
|
@@ -212,8 +212,9 @@ dependencies:
|
|
|
212
212
|
- - "~>"
|
|
213
213
|
- !ruby/object:Gem::Version
|
|
214
214
|
version: 0.49.0
|
|
215
|
-
description:
|
|
216
|
-
|
|
215
|
+
description: |-
|
|
216
|
+
Forked version of Awspec with extended API Gateway testing. All credit to the owners of the
|
|
217
|
+
Awspec repository at https://github.com/k1LoW/awspec
|
|
217
218
|
email:
|
|
218
219
|
- colekthiessen@gmail.com
|
|
219
220
|
executables:
|
|
@@ -738,5 +739,5 @@ requirements: []
|
|
|
738
739
|
rubygems_version: 3.0.3
|
|
739
740
|
signing_key:
|
|
740
741
|
specification_version: 4
|
|
741
|
-
summary: Forked version of Awspec
|
|
742
|
+
summary: Forked version of Awspec with extended API Gateway testing
|
|
742
743
|
test_files: []
|