jets 5.0.10 → 5.0.11
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 +4 -0
- data/lib/jets/overrides/lambda/marshaller.rb +5 -15
- data/lib/jets/spec_helpers/controllers.rb +6 -7
- 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: e0f81036f4a6561d9a79f029ca1362a8f48ad234b5318d97126b4530aee2ea27
|
4
|
+
data.tar.gz: 1051b3344523c20ed370a2602b65de25c71d1bce50a5c7cb67ef9dcbcd97e190
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f47b839cb9d3138c110d825a3936f0b823b7317e9f6559de1b199f64bad9820bd7716d04576f16ee27242a82e3090877967a6bc540dbe611afdd065e44deb8ff
|
7
|
+
data.tar.gz: a3bca9d28b17ce9a133b1a35bb01154e35601233ce9630172c5be15fe063e341df8af12d6a534628f8c022ac93093276bb879921e8b69d39b9dcc167cc34195b
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
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
|
+
## [5.0.11] - 2024-03-20
|
7
|
+
- [#711](https://github.com/rubyonjets/jets/pull/711) Fix controller testing in jets 5 - handling of params and query
|
8
|
+
- [#715](https://github.com/rubyonjets/jets/pull/715) remove force_encoding that causes issues for international characters
|
9
|
+
|
6
10
|
## [5.0.10] - 2024-02-08
|
7
11
|
- [#706](https://github.com/rubyonjets/jets/pull/706) permit YAML load of Date class
|
8
12
|
- [#708](https://github.com/rubyonjets/jets/pull/708) Fix Prewarming
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "json"
|
2
2
|
|
3
3
|
# Hack AwsLambda Ruby Runtime to fix .to_json issue collision with ActiveSupport.
|
4
4
|
# To reproduce:
|
@@ -18,24 +18,14 @@ module AwsLambda
|
|
18
18
|
def marshall_response(method_response)
|
19
19
|
case method_response
|
20
20
|
when StringIO, IO
|
21
|
-
[method_response,
|
21
|
+
[method_response, "application/unknown"]
|
22
22
|
else
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
if method_response.is_a?(Hash)
|
27
|
-
method_response.deep_transform_values! do |v|
|
28
|
-
if v.respond_to?(:force_encoding) && !v.frozen?
|
29
|
-
v.force_encoding("ISO-8859-1").encode("UTF-8")
|
30
|
-
else
|
31
|
-
v # IE: Integer
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
23
|
+
# Note: Removed previous code which did force_encoding("ISO-8859-1").encode("UTF-8")
|
24
|
+
# It caused issues with international characters.
|
25
|
+
# It does not seem like we need the force_encoding anymore.
|
35
26
|
JSON.dump(method_response)
|
36
27
|
end
|
37
28
|
end
|
38
|
-
|
39
29
|
end
|
40
30
|
end
|
41
31
|
end
|
@@ -16,19 +16,18 @@ module Jets::SpecHelpers
|
|
16
16
|
attr_reader :request, :response
|
17
17
|
def http_call(method:, path:, **options)
|
18
18
|
headers = options.delete(:headers) || {}
|
19
|
+
params_hash = options.delete(:params) || options
|
19
20
|
md = path.match(/\?(.*)/)
|
20
|
-
|
21
|
-
query = Rack::Utils.parse_nested_query(
|
21
|
+
path = path.gsub("?#{md[1]}", '') if md
|
22
|
+
query = md ? Rack::Utils.parse_nested_query(md[1]).merge(params_hash) : params_hash
|
22
23
|
|
23
24
|
params = Params.new
|
24
25
|
if method.to_sym == :get
|
25
26
|
params.body_params = {}
|
26
|
-
params.query_params
|
27
|
+
params.query_params = query || {}
|
27
28
|
else
|
28
|
-
params.body_params = options.delete(:body) ||
|
29
|
+
params.body_params = options.delete(:body) || query
|
29
30
|
end
|
30
|
-
params.path_params = params.path_params
|
31
|
-
params.query_params = query
|
32
31
|
|
33
32
|
# Note: Do not cache the request object. Otherwise, it cannot be reused between specs.
|
34
33
|
# See: https://community.rubyonjets.com/t/is-jets-spechelpers-controllers-request-being-cached/244/2
|
@@ -52,4 +51,4 @@ module Jets::SpecHelpers
|
|
52
51
|
Jets.logger = old_logger
|
53
52
|
end
|
54
53
|
end
|
55
|
-
end
|
54
|
+
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: 5.0.
|
4
|
+
version: 5.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|