rails-hush 2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00ab0f565ef0a3f88f1fb4c3d6196da665def631ea3d1743fa7a934fbbdfd93a
4
- data.tar.gz: 51d5c3e7a9479ce9f83995e31d3c2abd7a8093ee824e762b9cebf28f2d08e6c4
3
+ metadata.gz: 2add19c4a6ac42c0e6d40e58fa803f67a1e73a8d8c34fd6737ebfc02e5aeeec3
4
+ data.tar.gz: 7625dc4d890061c469c20c6082d2bd10cfb537c33194d1776363f72913181144
5
5
  SHA512:
6
- metadata.gz: 8de20c7aa3454d8b94b5aaefef18c8bf23ef1707fd61f74f2b88583934b2cdf96348f48bbb729bf2f33bb6d99107c4c3706180ea45be5b867db65a1061f5afa9
7
- data.tar.gz: a142bee9e28c8d5997d7c9b91ebde061bc9844afeb0afe2673fe11331b12d439f14bba7d6d8e3d33e82f811d19230b799dd04f87e18149e73117783d8c435269
6
+ metadata.gz: 2891ab655152cd6027707f0d4c88dc708822eb057f66128b75b768ffac8a1c64d40c8071391059a55f178a78d13ab4be932834462773bbe2ebea171bddddcb18
7
+ data.tar.gz: 05eb2d0bb3894e74a7e7f0eafdc6dd30de7ba34b9ab9810782c5a3e01d3688c36f8e2b82a6045f9c82f09d8d9829d32f50d528e77e7de8e7e4c3332ca4cd2d31
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2019-2025 thomas morgan
1
+ Copyright 2019-2026 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
@@ -18,17 +18,12 @@ RailsHush honors Rails settings for `show_exceptions` and `consider_all_requests
18
18
 
19
19
 
20
20
  ## Installation
21
- Add this line to your Rails application's Gemfile:
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. Please use standard GitHub Pull Requests.
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
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
99
+
100
+ [MIT](LICENSE.txt)
@@ -46,8 +46,10 @@ module RailsHush
46
46
  render 406, request, 'Invalid media type'
47
47
  rescue ActionController::ParameterMissing => x
48
48
  render 422, request, "Required parameter missing or empty: #{x.param}"
49
- rescue ActionController::InvalidAuthenticityToken
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)
@@ -1,3 +1,3 @@
1
1
  module RailsHush
2
- VERSION = '2.1.0'
2
+ VERSION = '2.3.0'
3
3
  end
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.1.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan
@@ -18,7 +18,7 @@ dependencies:
18
18
  version: '7'
19
19
  - - "<"
20
20
  - !ruby/object:Gem::Version
21
- version: '8.2'
21
+ version: '8.3'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,7 +28,7 @@ dependencies:
28
28
  version: '7'
29
29
  - - "<"
30
30
  - !ruby/object:Gem::Version
31
- version: '8.2'
31
+ version: '8.3'
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: sqlite3
34
34
  requirement: !ruby/object:Gem::Requirement
@@ -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: 3.6.9
100
+ rubygems_version: 4.0.16
101
101
  specification_version: 4
102
102
  summary: Hushes worthless Rails exceptions & logs
103
103
  test_files: []