jets 1.1.1 → 1.1.2
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/CHANGELOG.md +9 -0
- data/Gemfile.lock +17 -17
- data/lib/jets/application.rb +4 -0
- data/lib/jets/booter.rb +1 -1
- data/lib/jets/commands/templates/skeleton/config/application.rb.tt +2 -0
- data/lib/jets/resource/api_gateway/cors.rb +1 -1
- data/lib/jets/resource/api_gateway/method.rb +7 -1
- data/lib/jets/resource/api_gateway/rest_api.rb +10 -1
- data/lib/jets/route.rb +4 -0
- data/lib/jets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5ecc5e447f03b9d40dade6bff50a44934927025c95ccf361f982cc53604df333
|
|
4
|
+
data.tar.gz: 73c5f39837c54978981ec64d95fb35357120a9713b607da78489f7c90f2b6dcc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2e6263c94821deef72dede51d7f7bb90f5f23a097a019e934f43244ad281f3aacfe64c7ff11645a13b059927b5d4607de4e299b9290cbd77cd29323643c929a
|
|
7
|
+
data.tar.gz: e9d1d33c1941262bca8139d7d0512b0ab89ec9e4b0300d2d232ca4de083c0eeffe009e5e62910ea5c2661fd8bda4f35295246b5cc18e37a129b1126b5b16a65c
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
|
5
5
|
|
|
6
|
+
## [1.1.2]
|
|
7
|
+
- Add option to specify authorization type application-wide option and on a per-route basis.
|
|
8
|
+
- Add option to specify endpoint type of the ApiGateway: config.api.endpoint_type option
|
|
9
|
+
- pull request #74 from adam-harwood/route_authorization
|
|
10
|
+
- pull request #75 from adam-harwood/apig_endpoint_configuration
|
|
11
|
+
- pull request #76 from tongueroo/api-endpoint
|
|
12
|
+
- pull request #77 from tongueroo/api-auth
|
|
13
|
+
- fix jets new, comment out building of middleware during boot for now
|
|
14
|
+
|
|
6
15
|
## [1.1.1]
|
|
7
16
|
- provide instructions to run jets upgrade:v1 for config.ru update
|
|
8
17
|
|
data/Gemfile.lock
CHANGED
|
@@ -11,7 +11,7 @@ GIT
|
|
|
11
11
|
PATH
|
|
12
12
|
remote: .
|
|
13
13
|
specs:
|
|
14
|
-
jets (1.1.
|
|
14
|
+
jets (1.1.2)
|
|
15
15
|
actionpack (>= 5.2.1)
|
|
16
16
|
actionview (>= 5.2.1)
|
|
17
17
|
activerecord (>= 5.2.1)
|
|
@@ -65,33 +65,33 @@ GEM
|
|
|
65
65
|
tzinfo (~> 1.1)
|
|
66
66
|
arel (9.0.0)
|
|
67
67
|
aws-eventstream (1.0.1)
|
|
68
|
-
aws-partitions (1.
|
|
69
|
-
aws-sdk-cloudformation (1.
|
|
70
|
-
aws-sdk-core (~> 3, >= 3.
|
|
68
|
+
aws-partitions (1.115.0)
|
|
69
|
+
aws-sdk-cloudformation (1.13.0)
|
|
70
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
71
71
|
aws-sigv4 (~> 1.0)
|
|
72
|
-
aws-sdk-cloudwatchlogs (1.
|
|
73
|
-
aws-sdk-core (~> 3, >= 3.
|
|
72
|
+
aws-sdk-cloudwatchlogs (1.11.0)
|
|
73
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
74
74
|
aws-sigv4 (~> 1.0)
|
|
75
|
-
aws-sdk-core (3.
|
|
75
|
+
aws-sdk-core (3.39.0)
|
|
76
76
|
aws-eventstream (~> 1.0)
|
|
77
77
|
aws-partitions (~> 1.0)
|
|
78
78
|
aws-sigv4 (~> 1.0)
|
|
79
79
|
jmespath (~> 1.0)
|
|
80
|
-
aws-sdk-dynamodb (1.
|
|
81
|
-
aws-sdk-core (~> 3, >= 3.
|
|
80
|
+
aws-sdk-dynamodb (1.17.0)
|
|
81
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
82
82
|
aws-sigv4 (~> 1.0)
|
|
83
|
-
aws-sdk-kms (1.
|
|
84
|
-
aws-sdk-core (~> 3, >= 3.
|
|
83
|
+
aws-sdk-kms (1.12.0)
|
|
84
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
85
85
|
aws-sigv4 (~> 1.0)
|
|
86
|
-
aws-sdk-lambda (1.
|
|
87
|
-
aws-sdk-core (~> 3, >= 3.
|
|
86
|
+
aws-sdk-lambda (1.15.0)
|
|
87
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
88
88
|
aws-sigv4 (~> 1.0)
|
|
89
|
-
aws-sdk-s3 (1.
|
|
90
|
-
aws-sdk-core (~> 3, >= 3.
|
|
89
|
+
aws-sdk-s3 (1.25.0)
|
|
90
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
91
91
|
aws-sdk-kms (~> 1)
|
|
92
92
|
aws-sigv4 (~> 1.0)
|
|
93
|
-
aws-sdk-sns (1.
|
|
94
|
-
aws-sdk-core (~> 3, >= 3.
|
|
93
|
+
aws-sdk-sns (1.9.0)
|
|
94
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
95
95
|
aws-sigv4 (~> 1.0)
|
|
96
96
|
aws-sigv4 (1.0.3)
|
|
97
97
|
builder (3.2.3)
|
data/lib/jets/application.rb
CHANGED
|
@@ -78,6 +78,10 @@ class Jets::Application
|
|
|
78
78
|
config.session.store = Rack::Session::Cookie # note when accessing it use session[:store] since .store is an OrderedOptions method
|
|
79
79
|
config.session.options = {}
|
|
80
80
|
|
|
81
|
+
config.api = ActiveSupport::OrderedOptions.new
|
|
82
|
+
config.api.authorization_type = "NONE"
|
|
83
|
+
config.api.endpoint_type = 'EDGE' # PRIVATE, EDGE, REGIONAL
|
|
84
|
+
|
|
81
85
|
config
|
|
82
86
|
end
|
|
83
87
|
|
data/lib/jets/booter.rb
CHANGED
|
@@ -11,7 +11,7 @@ class Jets::Booter
|
|
|
11
11
|
setup_db
|
|
12
12
|
app_initializers
|
|
13
13
|
turbine_initializers
|
|
14
|
-
build_middleware_stack
|
|
14
|
+
# build_middleware_stack # TODO: figure out how to build middleware during Jets.boot without breaking jets new and webpacker:install
|
|
15
15
|
|
|
16
16
|
@booted = true
|
|
17
17
|
end
|
|
@@ -24,6 +24,8 @@ Jets.application.configure do
|
|
|
24
24
|
# config.function.role = "arn:aws:iam::#{Jets.aws.account}:role/service-role/pre-created"
|
|
25
25
|
# config.function.memory_size = 1536
|
|
26
26
|
|
|
27
|
+
# config.api.endpoint_type = 'PRIVATE' # Default is 'EDGE' (https://docs.aws.amazon.com/apigateway/api-reference/link-relation/restapi-create/#endpointConfiguration)
|
|
28
|
+
|
|
27
29
|
# config.function.environment = {
|
|
28
30
|
# global_app_key1: "global_app_value1",
|
|
29
31
|
# global_app_key2: "global_app_value2",
|
|
@@ -10,7 +10,7 @@ module Jets::Resource::ApiGateway
|
|
|
10
10
|
properties: {
|
|
11
11
|
resource_id: "!Ref #{resource_id}",
|
|
12
12
|
rest_api_id: "!Ref RestApi",
|
|
13
|
-
authorization_type:
|
|
13
|
+
authorization_type: authorization_type,
|
|
14
14
|
http_method: "OPTIONS",
|
|
15
15
|
method_responses: [{
|
|
16
16
|
status_code: '200',
|
|
@@ -21,7 +21,7 @@ module Jets::Resource::ApiGateway
|
|
|
21
21
|
rest_api_id: "!Ref RestApi",
|
|
22
22
|
http_method: @route.method,
|
|
23
23
|
request_parameters: {},
|
|
24
|
-
authorization_type:
|
|
24
|
+
authorization_type: authorization_type,
|
|
25
25
|
integration: {
|
|
26
26
|
integration_http_method: "POST",
|
|
27
27
|
type: "AWS_PROXY",
|
|
@@ -64,6 +64,12 @@ module Jets::Resource::ApiGateway
|
|
|
64
64
|
memoize :cors
|
|
65
65
|
|
|
66
66
|
private
|
|
67
|
+
|
|
68
|
+
def authorization_type
|
|
69
|
+
type = @route.authorization_type || Jets.config.api.authorization_type
|
|
70
|
+
type.upcase
|
|
71
|
+
end
|
|
72
|
+
|
|
67
73
|
def resource_id
|
|
68
74
|
@route.path == '' ?
|
|
69
75
|
"RootResourceId" :
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
module Jets::Resource::ApiGateway
|
|
2
2
|
class RestApi < Jets::Resource::Base
|
|
3
|
+
|
|
3
4
|
def definition
|
|
4
5
|
{
|
|
5
6
|
rest_api: {
|
|
6
7
|
type: "AWS::ApiGateway::RestApi",
|
|
7
8
|
properties: {
|
|
8
9
|
name: Jets::Naming.gateway_api_name,
|
|
10
|
+
endpoint_configuration: {
|
|
11
|
+
types: types
|
|
12
|
+
}
|
|
9
13
|
# binary_media_types: ['*/*'], # TODO: comment out, breaking form post
|
|
10
14
|
}
|
|
11
15
|
}
|
|
12
16
|
}
|
|
13
17
|
end
|
|
14
|
-
|
|
18
|
+
|
|
15
19
|
def outputs
|
|
16
20
|
{
|
|
17
21
|
"RestApi" => "!Ref RestApi",
|
|
@@ -19,5 +23,10 @@ module Jets::Resource::ApiGateway
|
|
|
19
23
|
"RootResourceId" => "!GetAtt RestApi.RootResourceId",
|
|
20
24
|
}
|
|
21
25
|
end
|
|
26
|
+
|
|
27
|
+
def types
|
|
28
|
+
endpoint_type = Jets.config.api.endpoint_type || 'EDGE'
|
|
29
|
+
[endpoint_type.upcase]
|
|
30
|
+
end
|
|
22
31
|
end
|
|
23
32
|
end
|
data/lib/jets/route.rb
CHANGED
data/lib/jets/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jets
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tung Nguyen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-11-
|
|
11
|
+
date: 2018-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionpack
|