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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 570f01c2fe2cff82700a1c8110b340a6897381d61fa5248f118b785fe399cefe
4
- data.tar.gz: 64ad72c3d50974e7e816e5647dbcd3f5e26277144ab409b867e7f7ccc58e166e
3
+ metadata.gz: 268e0ae0a8ea29568f0fc6bd1c5766be51ce75707d38aa91b2e297a4e3290c06
4
+ data.tar.gz: '05185b74c8cf470526dc50284074405acb63e9dfa351abddd465d3863485215b'
5
5
  SHA512:
6
- metadata.gz: 10c4489b8c063d2a3e94f63b9ebb0fda617a31f41bc92dcd77a32755307fef81930ba1359a3364f13baf8a3ea746234019343b7621bdf2ff27c6b86076fa473e
7
- data.tar.gz: 76bf5d77ab7f8b3064174aea1baea7eac92a787d217fb8a91c431132da9fba95ef342a6f8f145f2174c74cb6f4a914c5ba74ce8a6c06c5984528fdee0ce86c24
6
+ metadata.gz: fc2abade16acc08eb2107d8ae4547c2f33b0e46c803a8f8231af4d8e236bc985d8f0bea8c8a335c39baf324fba9725f9c30c2377ac96fca53ae12067f1a6737a
7
+ data.tar.gz: 384865807f6d9154fdffa82a0cd165d9bb6c6d8bc5d9e6b3a505ced37586e9d7f382caeb0ae95f483005029f4b71ddbf606312eb0b6211cd834a4427c186a013
@@ -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
@@ -15,4 +15,5 @@ Funds donated via Patreon go directly to support Tung Nguyen's full-time work on
15
15
  - Nate Clark
16
16
  - Hirokatsu Endo
17
17
  - Michael Choi
18
+ - Phan Lam
18
19
  <!--10 end-->
@@ -66,4 +66,5 @@ Gem::Specification.new do |spec|
66
66
  spec.add_development_dependency "bundler"
67
67
  spec.add_development_dependency "rake"
68
68
  spec.add_development_dependency "rspec"
69
+ spec.add_development_dependency "cfn-status"
69
70
  end
@@ -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
@@ -46,7 +46,7 @@ module Jets::SpecHelpers::Controllers
46
46
 
47
47
  params.query_params.each do |key, value|
48
48
  json['queryStringParameters'] ||= {}
49
- json['queryStringParameters'][key.to_s] = value.to_s
49
+ json['queryStringParameters'][key.to_s] = value
50
50
  end
51
51
 
52
52
  json
@@ -1,3 +1,3 @@
1
1
  module Jets
2
- VERSION = "2.3.17"
2
+ VERSION = "2.3.18"
3
3
  end
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.17
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-08-24 00:00:00.000000000 Z
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.2
1106
+ rubygems_version: 3.1.4
1093
1107
  signing_key:
1094
1108
  specification_version: 4
1095
1109
  summary: Ruby Serverless Framework