cthiesfork-awspec 1.0.0 → 1.1.0

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: ee3bd42cf9c0c17594a02d8228af5ce77d1161f42a9d7134f022031dd48e78d7
4
- data.tar.gz: 2ea5d4ba799dac0a1982a86d90ed1f9fb0db13c29193da60e3d91f84f9f0c189
3
+ metadata.gz: c0ceb4dd81e824e3b7cb888a0e91eded7603d1f7ca1f9a3906e45e55e2cd981c
4
+ data.tar.gz: 29473c8f95f0fe93faea99bba7ed197bce015518358303e1cdae63fdf89cdb6e
5
5
  SHA512:
6
- metadata.gz: 9e47ac654afeb3b0cf4f38c60b4d4d6ff1f0d3964669fe3f3b9f34a3d8121c1cd4701d2807a2ce571415b3b44d0699e900f914c938a030f2a48780de8fb4e733
7
- data.tar.gz: ca71f4944414bc57fc92d573cfc2232ec4de531d037dec8fc89688fb81c464bcd54ba6e4820139fdda487b57dba8ddf1b69a4bbf8fd6f00c32afab0727d3884b
6
+ metadata.gz: ed53af3a1cc0aee85e9e0d8e33ccf829e93bef4f373697ba290a9d3fd02924a8e443d620240b71088fff17c9591c7ebdfa24ea4a96654f3ef78c7677d537e279
7
+ data.tar.gz: c800999b96ac689a827a1b3dd24d3c8365f0dcbb06a8fc46bb6973a124bbc7e4b1260cdd7fe1b1f8ae5c6ab4f75742689897e3bf92b450a46202fdcf101bc36d
data/awspec.gemspec CHANGED
@@ -6,12 +6,12 @@ require 'awspec/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'cthiesfork-awspec'
9
- spec.version = '1.0.0'
9
+ spec.version = '1.1.0'
10
10
  spec.authors = ['cthies']
11
11
  spec.email = ['colekthiessen@gmail.com']
12
12
 
13
13
  spec.summary = 'Forked version of Awspec'
14
- spec.description = 'Forked version of Awspec'
14
+ spec.description = 'Forked version of Awspec. All credit to the owners of the Awspec repo at https://github.com/k1LoW/awspec'
15
15
  spec.homepage = 'https://github.com/ckthiessen/awspec'
16
16
  spec.license = 'MIT'
17
17
 
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_runtime_dependency 'rspec-its'
30
30
  spec.add_runtime_dependency 'term-ansicolor'
31
31
  spec.add_runtime_dependency 'thor'
32
+ spec.add_runtime_dependency 'addressable'
32
33
  spec.add_development_dependency 'bundler', '>= 1.9', '< 3.0'
33
34
  spec.add_development_dependency 'octorelease'
34
35
  spec.add_development_dependency 'pry'
@@ -267,7 +267,7 @@ end
267
267
 
268
268
  ### have_tag
269
269
 
270
- ### its(:architecture), its(:creation_date), its(:image_id), its(:image_location), its(:image_type), its(:public), its(:kernel_id), its(:owner_id), its(:platform), its(:ramdisk_id), its(:state), its(:description), its(:ena_support), its(:hypervisor), its(:image_owner_alias), its(:name), its(:root_device_name), its(:root_device_type), its(:sriov_net_support), its(:state_reason), its(:virtualization_type)
270
+ ### its(:architecture), its(:creation_date), its(:image_id), its(:image_location), its(:image_type), its(:public), its(:kernel_id), its(:owner_id), its(:platform), its(:platform_details), its(:usage_operation), its(:ramdisk_id), its(:state), its(:description), its(:ena_support), its(:hypervisor), its(:image_owner_alias), its(:name), its(:root_device_name), its(:root_device_type), its(:sriov_net_support), its(:state_reason), its(:virtualization_type)
271
271
  ### :unlock: Advanced use
272
272
 
273
273
  `ami` can use `Aws::EC2::Image` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Image.html).
@@ -284,6 +284,10 @@ describe apigateway('my-apigateway') do
284
284
  end
285
285
  ```
286
286
 
287
+ ### have_integration_path
288
+
289
+ ### have_path
290
+
287
291
  ### its(:id), its(:name), its(:description), its(:created_date), its(:version), its(:warnings), its(:binary_media_types), its(:minimum_compression_size), its(:api_key_source), its(:policy), its(:tags)
288
292
  ## <a name="autoscaling_group">autoscaling_group</a>
289
293
 
@@ -894,7 +898,7 @@ end
894
898
  ```
895
899
 
896
900
 
897
- ### its(:availability_zone), its(:create_time), its(:encrypted), its(:kms_key_id), its(:outpost_arn), its(:size), its(:snapshot_id), its(:state), its(:volume_id), its(:iops), its(:volume_type), its(:fast_restored)
901
+ ### its(:availability_zone), its(:create_time), its(:encrypted), its(:kms_key_id), its(:outpost_arn), its(:size), its(:snapshot_id), its(:state), its(:volume_id), its(:iops), its(:volume_type), its(:fast_restored), its(:multi_attach_enabled)
898
902
  ### :unlock: Advanced use
899
903
 
900
904
  `ebs` can use `Aws::EC2::Volume` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Volume.html).
@@ -1319,7 +1323,7 @@ describe eks('my-eks') do
1319
1323
  end
1320
1324
  ```
1321
1325
 
1322
- ### its(:name), its(:arn), its(:created_at), its(:version), its(:endpoint), its(:role_arn), its(:logging), its(:identity), its(:status), its(:client_request_token), its(:platform_version), its(:tags)
1326
+ ### its(:name), its(:arn), its(:created_at), its(:version), its(:endpoint), its(:role_arn), its(:logging), its(:identity), its(:status), its(:client_request_token), its(:platform_version), its(:tags), its(:encryption_config)
1323
1327
  ## <a name="elasticache">elasticache</a>
1324
1328
 
1325
1329
  Elasticache resource type.
@@ -1467,7 +1471,7 @@ end
1467
1471
  ```
1468
1472
 
1469
1473
 
1470
- ### its(:domain_id), its(:domain_name), its(:arn), its(:created), its(:deleted), its(:endpoint), its(:endpoints), its(:processing), its(:upgrade_processing), its(:elasticsearch_version), its(:access_policies), its(:snapshot_options), its(:vpc_options), its(:cognito_options), its(:encryption_at_rest_options), its(:node_to_node_encryption_options), its(:advanced_options), its(:log_publishing_options), its(:service_software_options), its(:domain_endpoint_options)
1474
+ ### its(:domain_id), its(:domain_name), its(:arn), its(:created), its(:deleted), its(:endpoint), its(:endpoints), its(:processing), its(:upgrade_processing), its(:elasticsearch_version), its(:access_policies), its(:snapshot_options), its(:vpc_options), its(:cognito_options), its(:encryption_at_rest_options), its(:node_to_node_encryption_options), its(:advanced_options), its(:log_publishing_options), its(:service_software_options), its(:domain_endpoint_options), its(:advanced_security_options)
1471
1475
  ## <a name="elastictranscoder_pipeline">elastictranscoder_pipeline</a>
1472
1476
 
1473
1477
  ElastictranscoderPipeline resource type.
@@ -75,15 +75,25 @@ Aws.config[:apigateway] = {
75
75
  position: '1',
76
76
  items: [
77
77
  {
78
- path: '/proxy'
78
+ path: '/proxy',
79
+ resource_methods: {
80
+ 'GET' => {
81
+ method_integration: { uri: 'http://127.0.0.1:8080/hockey' }
82
+ }
83
+ }
79
84
  },
80
85
  {
81
- path: '/zambonis'
86
+ path: '/zambonis',
87
+ resource_methods: {
88
+ 'POST' => {
89
+ method_integration: { uri: 'http://127.0.0.1:8080/zambonis/{arena}' }
90
+ }
91
+ }
82
92
  },
83
93
  {
84
94
  path: '/zambonis/123'
85
95
  }
86
- ]
96
+ ]
87
97
  }
88
98
  }
89
99
  }
@@ -1,3 +1,5 @@
1
+ require 'addressable/uri'
2
+
1
3
  module Awspec::Type
2
4
  class Apigateway < ResourceBase
3
5
  aws_resource Aws::APIGateway::Client
@@ -12,13 +14,28 @@ module Awspec::Type
12
14
  @id ||= resource_via_client.id if resource_via_client
13
15
  end
14
16
 
17
+ def api_resources
18
+ @api_resources.nil? ? @api_resources = find_api_resources_by_id(@id) : @api_resources
19
+ end
20
+
15
21
  def has_path?(path)
16
22
  check_existence
17
- all_resources = find_api_resources_by_id(@id)
18
- all_resources.each do |resource|
23
+ self.api_resources.each do |resource|
19
24
  return true if resource.path == path
20
25
  end
21
26
  false
22
27
  end
28
+
29
+ def has_integration_path?(path)
30
+ check_existence
31
+ self.api_resources.each do |resource|
32
+ next if resource.resource_methods.nil?
33
+ resource.resource_methods.each do |_, value|
34
+ uri = Addressable::URI.parse(value.method_integration.uri)
35
+ return true if uri.path == path
36
+ end
37
+ end
38
+ false
39
+ end
23
40
  end
24
41
  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.0.0
4
+ version: 1.1.0
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-02 00:00:00.000000000 Z
11
+ date: 2020-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: addressable
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: bundler
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -198,7 +212,8 @@ dependencies:
198
212
  - - "~>"
199
213
  - !ruby/object:Gem::Version
200
214
  version: 0.49.0
201
- description: Forked version of Awspec
215
+ description: Forked version of Awspec. All credit to the owners of the Awspec repo
216
+ at https://github.com/k1LoW/awspec
202
217
  email:
203
218
  - colekthiessen@gmail.com
204
219
  executables: