jets 2.3.17 → 2.3.18
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 +5 -0
- data/backers.md +1 -0
- data/jets.gemspec +1 -0
- data/lib/jets/cfn/upload.rb +18 -2
- data/lib/jets/resource/api_gateway/method.rb +1 -1
- data/lib/jets/resource/api_gateway/resource.rb +1 -1
- data/lib/jets/spec_helpers/controllers/request.rb +1 -1
- data/lib/jets/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 268e0ae0a8ea29568f0fc6bd1c5766be51ce75707d38aa91b2e297a4e3290c06
|
|
4
|
+
data.tar.gz: '05185b74c8cf470526dc50284074405acb63e9dfa351abddd465d3863485215b'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc2abade16acc08eb2107d8ae4547c2f33b0e46c803a8f8231af4d8e236bc985d8f0bea8c8a335c39baf324fba9725f9c30c2377ac96fca53ae12067f1a6737a
|
|
7
|
+
data.tar.gz: 384865807f6d9154fdffa82a0cd165d9bb6c6d8bc5d9e6b3a505ced37586e9d7f382caeb0ae95f483005029f4b71ddbf606312eb0b6211cd834a4427c186a013
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
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/).
|
|
5
5
|
|
|
6
|
+
## [2.3.18]
|
|
7
|
+
- #514 Allow to define route that contains dot
|
|
8
|
+
- #515 set content type on upload by using extension so cloudfront will compress when serving
|
|
9
|
+
- #517 support nested query params in tests
|
|
10
|
+
|
|
6
11
|
## [2.3.17]
|
|
7
12
|
- #472 Docs: Update cors-support.md
|
|
8
13
|
- #475 Docs: Update activerecord.md to include db:create step
|
data/backers.md
CHANGED
data/jets.gemspec
CHANGED
data/lib/jets/cfn/upload.rb
CHANGED
|
@@ -7,6 +7,13 @@ module Jets::Cfn
|
|
|
7
7
|
include ActionView::Helpers::NumberHelper # number_to_human_size
|
|
8
8
|
|
|
9
9
|
attr_reader :bucket_name
|
|
10
|
+
|
|
11
|
+
CONTENT_TYPES_BY_EXTENSION = {
|
|
12
|
+
'.css' => 'text/css',
|
|
13
|
+
'.js' => 'application/javascript',
|
|
14
|
+
'.html' => 'text/html'
|
|
15
|
+
}
|
|
16
|
+
|
|
10
17
|
def initialize(bucket_name)
|
|
11
18
|
@bucket_name = bucket_name
|
|
12
19
|
end
|
|
@@ -90,8 +97,17 @@ module Jets::Cfn
|
|
|
90
97
|
|
|
91
98
|
key = s3_key(full_path)
|
|
92
99
|
obj = s3_resource.bucket(bucket_name).object(key)
|
|
93
|
-
puts "Uploading s3://#{bucket_name}/#{key}" # uncomment to see and debug
|
|
94
|
-
obj.upload_file(full_path, acl: "public-read", cache_control: cache_control)
|
|
100
|
+
puts "Uploading and setting content type for s3://#{bucket_name}/#{key}" # uncomment to see and debug
|
|
101
|
+
obj.upload_file(full_path, { acl: "public-read", cache_control: cache_control }.merge(content_type_headers(full_path)))
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def content_type_headers(full_path)
|
|
105
|
+
content_type = CONTENT_TYPES_BY_EXTENSION[File.extname(full_path)]
|
|
106
|
+
if content_type
|
|
107
|
+
{ content_type: content_type }
|
|
108
|
+
else
|
|
109
|
+
{}
|
|
110
|
+
end
|
|
95
111
|
end
|
|
96
112
|
|
|
97
113
|
def s3_key(full_path)
|
|
@@ -96,7 +96,7 @@ module Jets::Resource::ApiGateway
|
|
|
96
96
|
def camelized_path
|
|
97
97
|
path = @route.path
|
|
98
98
|
path = "homepage" if path == ''
|
|
99
|
-
path.gsub('/','_').gsub(':','').gsub('*','').camelize
|
|
99
|
+
path.gsub('/','_').gsub(':','').gsub('*','').gsub('.','').camelize
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
end
|
|
@@ -76,7 +76,7 @@ module Jets::Resource::ApiGateway
|
|
|
76
76
|
private
|
|
77
77
|
# Similar path_logical_id method in resource/route.rb
|
|
78
78
|
def path_logical_id(path)
|
|
79
|
-
path.gsub('/','_').gsub(':','').gsub('*','').gsub('-','_').camelize
|
|
79
|
+
path.gsub('/','_').gsub(':','').gsub('*','').gsub('-','_').gsub('.','_').camelize
|
|
80
80
|
end
|
|
81
81
|
end
|
|
82
82
|
end
|
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: 2.3.
|
|
4
|
+
version: 2.3.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tung Nguyen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-11-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionmailer
|
|
@@ -542,6 +542,20 @@ dependencies:
|
|
|
542
542
|
- - ">="
|
|
543
543
|
- !ruby/object:Gem::Version
|
|
544
544
|
version: '0'
|
|
545
|
+
- !ruby/object:Gem::Dependency
|
|
546
|
+
name: cfn-status
|
|
547
|
+
requirement: !ruby/object:Gem::Requirement
|
|
548
|
+
requirements:
|
|
549
|
+
- - ">="
|
|
550
|
+
- !ruby/object:Gem::Version
|
|
551
|
+
version: '0'
|
|
552
|
+
type: :development
|
|
553
|
+
prerelease: false
|
|
554
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
555
|
+
requirements:
|
|
556
|
+
- - ">="
|
|
557
|
+
- !ruby/object:Gem::Version
|
|
558
|
+
version: '0'
|
|
545
559
|
description: 'Jets is a framework that allows you to create serverless applications
|
|
546
560
|
with a beautiful language: Ruby. It includes everything required to build and deploy
|
|
547
561
|
an application. Jets leverages the power of Ruby to make serverless joyful for
|
|
@@ -1089,7 +1103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1089
1103
|
- !ruby/object:Gem::Version
|
|
1090
1104
|
version: '0'
|
|
1091
1105
|
requirements: []
|
|
1092
|
-
rubygems_version: 3.1.
|
|
1106
|
+
rubygems_version: 3.1.4
|
|
1093
1107
|
signing_key:
|
|
1094
1108
|
specification_version: 4
|
|
1095
1109
|
summary: Ruby Serverless Framework
|