rails-hush 2.0.0 → 2.1.0

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: 86475e19b99bc6be82fb5955afcadc3cd9caa95114ae1245ff80e6136af03a20
4
- data.tar.gz: 1fd08b758c10cb7b4940478a3c2afee0e9038633a954294537100c6946f00be9
3
+ metadata.gz: 00ab0f565ef0a3f88f1fb4c3d6196da665def631ea3d1743fa7a934fbbdfd93a
4
+ data.tar.gz: 51d5c3e7a9479ce9f83995e31d3c2abd7a8093ee824e762b9cebf28f2d08e6c4
5
5
  SHA512:
6
- metadata.gz: 25eaa5c38a576b75cfdcca0fdf8f9e39ec641aa3de7c94cb178accebdb1855da02c4a9773173eee3918d83f39895c598855229d41ff8fae9f4e0976c082f9934
7
- data.tar.gz: bb4b27dc501c8291bd9bf6a4b7886300caa4f0a54f243c2dd5aa92b3623fa6ca86c2a284c9cd3fd16e86151cc9eab5fbb0033fc114b404717d6af807a41aec41
6
+ metadata.gz: 8de20c7aa3454d8b94b5aaefef18c8bf23ef1707fd61f74f2b88583934b2cdf96348f48bbb729bf2f33bb6d99107c4c3706180ea45be5b867db65a1061f5afa9
7
+ data.tar.gz: a142bee9e28c8d5997d7c9b91ebde061bc9844afeb0afe2673fe11331b12d439f14bba7d6d8e3d33e82f811d19230b799dd04f87e18149e73117783d8c435269
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2019-2024 thomas morgan
1
+ Copyright 2019-2025 thomas morgan
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -79,7 +79,7 @@ Rails' default "test" environment settings are quite different than "production"
79
79
 
80
80
  ## Contributing
81
81
 
82
- Contributions welcome. Please use standard GitHub Pull Requests.
82
+ Contributions welcomed. Please use standard GitHub Pull Requests.
83
83
 
84
84
 
85
85
  ## License
@@ -15,6 +15,8 @@ module RailsHush
15
15
  @app.call(env)
16
16
  rescue ActionController::UnknownHttpMethod
17
17
  render 405, request, 'Unrecognized HTTP method'
18
+ rescue Encoding::CompatibilityError
19
+ render 400, request, 'Invalid string or encoding'
18
20
  end
19
21
  else
20
22
  @app.call(env)
@@ -23,10 +23,14 @@ module RailsHush
23
23
  if x.message =~ /(Invalid encoding for parameter|invalid %-encoding)/
24
24
  log_request 400, request
25
25
  render 400, request, 'Invalid string or encoding'
26
+ elsif x.message =~ /Rack::Multipart::EmptyContentError|bad content body/
27
+ log_request 400, request
28
+ render 400, request, 'Unable to parse request body'
26
29
  else
27
30
  raise x
28
31
  end
29
- rescue ActionDispatch::Http::Parameters::ParseError
32
+ rescue ActionDispatch::Http::Parameters::ParseError,
33
+ Rack::Multipart::BoundaryTooLongError
30
34
  log_request 400, request
31
35
  render 400, request, 'Unable to parse request body'
32
36
  rescue ActionController::RoutingError => x
@@ -16,7 +16,9 @@ module RailsHush
16
16
  def render(status, request, error=nil)
17
17
  begin
18
18
  content_type = request.formats.first
19
- rescue Mime::Type::InvalidMimeType
19
+ rescue Mime::Type::InvalidMimeType,
20
+ Encoding::CompatibilityError,
21
+ Rack::Multipart::BoundaryTooLongError
20
22
  content_type = Mime[:text]
21
23
  end
22
24
  error ||= Rack::Utils::HTTP_STATUS_CODES.fetch(status, Rack::Utils::HTTP_STATUS_CODES[500])
@@ -1,3 +1,3 @@
1
1
  module RailsHush
2
- VERSION = '2.0.0'
2
+ VERSION = '2.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-hush
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-01 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -19,7 +18,7 @@ dependencies:
19
18
  version: '7'
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
- version: '8.1'
21
+ version: '8.2'
23
22
  type: :runtime
24
23
  prerelease: false
25
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +28,7 @@ dependencies:
29
28
  version: '7'
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
- version: '8.1'
31
+ version: '8.2'
33
32
  - !ruby/object:Gem::Dependency
34
33
  name: sqlite3
35
34
  requirement: !ruby/object:Gem::Requirement
@@ -81,8 +80,9 @@ files:
81
80
  homepage: https://github.com/zarqman/rails-hush
82
81
  licenses:
83
82
  - MIT
84
- metadata: {}
85
- post_install_message:
83
+ metadata:
84
+ source_code_uri: https://github.com/zarqman/rails-hush
85
+ changelog_uri: https://github.com/zarqman/rails-hush/blob/master/CHANGELOG.md
86
86
  rdoc_options: []
87
87
  require_paths:
88
88
  - lib
@@ -97,8 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubygems_version: 3.5.11
101
- signing_key:
100
+ rubygems_version: 3.6.9
102
101
  specification_version: 4
103
102
  summary: Hushes worthless Rails exceptions & logs
104
103
  test_files: []