rails-hush 2.2.0 → 2.3.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 +4 -4
- data/README.md +22 -8
- data/lib/rails_hush/middleware/hush_two.rb +2 -0
- data/lib/rails_hush/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: 2add19c4a6ac42c0e6d40e58fa803f67a1e73a8d8c34fd6737ebfc02e5aeeec3
|
|
4
|
+
data.tar.gz: 7625dc4d890061c469c20c6082d2bd10cfb537c33194d1776363f72913181144
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2891ab655152cd6027707f0d4c88dc708822eb057f66128b75b768ffac8a1c64d40c8071391059a55f178a78d13ab4be932834462773bbe2ebea171bddddcb18
|
|
7
|
+
data.tar.gz: 05eb2d0bb3894e74a7e7f0eafdc6dd30de7ba34b9ab9810782c5a3e01d3688c36f8e2b82a6045f9c82f09d8d9829d32f50d528e77e7de8e7e4c3332ca4cd2d31
|
data/README.md
CHANGED
|
@@ -18,17 +18,12 @@ RailsHush honors Rails settings for `show_exceptions` and `consider_all_requests
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
|
-
Add
|
|
21
|
+
Add to Gemfile:
|
|
22
22
|
|
|
23
23
|
```ruby
|
|
24
24
|
gem 'rails-hush'
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
And then execute:
|
|
28
|
-
```bash
|
|
29
|
-
$ bundle
|
|
30
|
-
```
|
|
31
|
-
|
|
32
27
|
|
|
33
28
|
## Usage
|
|
34
29
|
|
|
@@ -79,8 +74,27 @@ Rails' default "test" environment settings are quite different than "production"
|
|
|
79
74
|
|
|
80
75
|
## Contributing
|
|
81
76
|
|
|
82
|
-
Contributions welcomed.
|
|
77
|
+
Contributions are welcomed. If unsure about the scope or reach of a potential PR, feel free to open a discussion Issue first (not required though).
|
|
78
|
+
|
|
79
|
+
Please submit human-written contributions only. No contributions containing output generated by LLMs or other non-deterministic systems are allowed.
|
|
80
|
+
|
|
81
|
+
* Code, tests, docs, PRs: must be 100% human written.
|
|
82
|
+
* Issues, security reports: must originally be 100% human written. If not originally in English, an LLM may be used to translate to English provided that this translation is disclosed.
|
|
83
|
+
|
|
84
|
+
We recognize that opinions about the use of LLMs and non-deterministic systems vary widely. Still, we respectfully ask that you honor this policy when interacting with this project.
|
|
85
|
+
|
|
86
|
+
###### Q: May I use LLMs apart from contributions?
|
|
87
|
+
All usage, training or otherwise, must respect copyrights. Beyond that, we've found that LLMs are prone to errors and misunderstandings--sometimes obvious, sometimes subtle. Please verify everything before trusting an LLM's output.
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
#### Running tests
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
bundle install
|
|
94
|
+
rake [test]
|
|
95
|
+
```
|
|
83
96
|
|
|
84
97
|
|
|
85
98
|
## License
|
|
86
|
-
|
|
99
|
+
|
|
100
|
+
[MIT](LICENSE.txt)
|
|
@@ -48,6 +48,8 @@ module RailsHush
|
|
|
48
48
|
render 422, request, "Required parameter missing or empty: #{x.param}"
|
|
49
49
|
rescue (Rails.version > '8.2' ? ActionController::InvalidCrossOriginRequest : ActionController::InvalidAuthenticityToken)
|
|
50
50
|
render 422, request, 'Invalid CSRF token'
|
|
51
|
+
rescue ActionController::TooManyRequests
|
|
52
|
+
render 429, request, 'Too Many Requests'
|
|
51
53
|
end
|
|
52
54
|
else
|
|
53
55
|
@app.call(env)
|
data/lib/rails_hush/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-hush
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- thomas morgan
|
|
@@ -97,7 +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:
|
|
100
|
+
rubygems_version: 4.0.16
|
|
101
101
|
specification_version: 4
|
|
102
102
|
summary: Hushes worthless Rails exceptions & logs
|
|
103
103
|
test_files: []
|