ndr_error 2.2.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +49 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/MIT-LICENSE +1 -1
- data/README.md +3 -3
- data/app/helpers/ndr_error/errors_helper.rb +3 -3
- data/app/models/ndr_error/fingerprint.rb +5 -7
- data/app/models/ndr_error/log.rb +1 -1
- data/app/views/ndr_error/errors/show.html.erb +1 -1
- data/lib/ndr_error/engine.rb +7 -5
- data/lib/ndr_error/version.rb +1 -1
- data/lib/ndr_error.rb +1 -1
- metadata +72 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f49dc885da418df0e38967e588599bc5bb39dd28b38c0428e2e2be50f3aed3fb
|
4
|
+
data.tar.gz: 4c37d3fb4f80fdb00c9818f6f27f2a6092679d70042aa5a631638f2281ad774c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65f3517c5f0ce8c00d21c1dfa3e0d8b28c7d1145d19652e839bb28984a63e0f599768dfa2f01d1d7c487f1cd46378653f9dd26347d86650d77fd5a99d0e4af35
|
7
|
+
data.tar.gz: 1c0cf70df6ae213175c8aa038a4711314638e25d119218124ff6ed01323a538e707d30ae4168fc40a01715e17ca066a2c3a591f0f1dc752a63a22ccca0a1d856
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
## [Unreleased]
|
2
|
+
* No unreleased changes
|
3
|
+
|
4
|
+
## 2.3.1 / 2022-12-02
|
5
|
+
### Fixed
|
6
|
+
* Drop support for Ruby 2.6
|
7
|
+
* Support Ruby 3.1, Rails 7.0
|
8
|
+
* Replace Public Health England naming with NHS Digital
|
9
|
+
|
10
|
+
## 2.3.0 / 2022-01-14
|
11
|
+
### Fixed
|
12
|
+
* Allow basic loading into a host app that doesn't use `sprockets`.
|
13
|
+
* Drop support for Rails 5, Ruby 2.5
|
14
|
+
* Support Ruby 3.0
|
15
|
+
|
16
|
+
## 2.2.1 / 2020-02-26
|
17
|
+
### Fixed
|
18
|
+
* Allow basic loading into a host app that doesn't use `sprockets`.
|
19
|
+
|
20
|
+
## 2.2.0 / 2020-02-26
|
21
|
+
### Added
|
22
|
+
* Add more flexible middleware `NdrError::Recorder` middleware
|
23
|
+
|
24
|
+
## 2.1.0 / 2019-10-08
|
25
|
+
### Added
|
26
|
+
* Add `NdrError.after_log { ... }` callback registration (#20)
|
27
|
+
|
28
|
+
## 2.0.3 / 2019-07-25
|
29
|
+
### Fixed
|
30
|
+
* Add `inverse_of` configuration to the associations
|
31
|
+
|
32
|
+
## 2.0.2 / 2019-05-16
|
33
|
+
### Fixed
|
34
|
+
* fix bug that causes crash on vague search. Resolves #10
|
35
|
+
* Support for Rails 6, Ruby 2.6, dropping support for older versions
|
36
|
+
|
37
|
+
## 2.0.1 / 2018-10-11
|
38
|
+
### Fixed
|
39
|
+
* fix bug with searching integer user column
|
40
|
+
|
41
|
+
## 2.0.0 / 2018-06-05
|
42
|
+
### Added
|
43
|
+
* log causal exceptions too, automatically (#16)
|
44
|
+
* introduce breadcrumbs to the UI
|
45
|
+
|
46
|
+
### Fixed
|
47
|
+
* tidy up controls for navigating between logs
|
48
|
+
* improve behaviour / UI when there are multiple logs. Resolves #14
|
49
|
+
* fix CSS float issue
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# NdrError [![Build Status](https://
|
1
|
+
# NdrError [![Build Status](https://github.com/NHSDigital/ndr_error/workflows/Test/badge.svg)](https://github.com/NHSDigital/ndr_error/actions?query=workflow%3Atest) [![Gem Version](https://badge.fury.io/rb/ndr_error.svg)](https://rubygems.org/gems/ndr_error)
|
2
2
|
|
3
|
-
This is the
|
3
|
+
This is the NHS Digital (NHS-D) National Disease Registers (NDR) Error ruby gem. It is a
|
4
4
|
Rails engine that provides error logging, viewing, and grouping capabilities.
|
5
5
|
|
6
6
|
Exceptions are logged as `NdrError::Log` records, which can be associated by instances
|
@@ -94,7 +94,7 @@ NdrError.description_fuzzers.unshift(lambda { |description|
|
|
94
94
|
|
95
95
|
## Contributing
|
96
96
|
|
97
|
-
1. Fork it ( https://github.com/
|
97
|
+
1. Fork it ( https://github.com/NHSDigital/ndr_error/fork )
|
98
98
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
99
99
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
100
100
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -18,7 +18,7 @@ module NdrError
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def latest_timestamp_for(fingerprint)
|
21
|
-
fingerprint.updated_at.
|
21
|
+
fingerprint.updated_at.to_formatted_s(:db)
|
22
22
|
end
|
23
23
|
|
24
24
|
def latest_user_for(fingerprint, search)
|
@@ -36,7 +36,7 @@ module NdrError
|
|
36
36
|
'class' => 'badge badge-info',
|
37
37
|
'data-toggle' => 'tooltip',
|
38
38
|
'data-placement' => 'right',
|
39
|
-
'title' => "Since #{fingerprint.created_at.
|
39
|
+
'title' => "Since #{fingerprint.created_at.to_formatted_s(:db)}"
|
40
40
|
}
|
41
41
|
|
42
42
|
content_tag(:span, text, opts)
|
@@ -44,7 +44,7 @@ module NdrError
|
|
44
44
|
|
45
45
|
def similar_error_link(error)
|
46
46
|
user = error.user_id && content_tag(:span, error.user_id, class: 'text-muted')
|
47
|
-
text = safe_join([user, error.created_at.
|
47
|
+
text = safe_join([user, error.created_at.to_formatted_s(:db)].compact, ' - ')
|
48
48
|
|
49
49
|
bootstrap_list_link_to text, error_fingerprint_path(error.error_fingerprint, log_id: error)
|
50
50
|
end
|
@@ -6,13 +6,11 @@ module NdrError
|
|
6
6
|
|
7
7
|
self.primary_key = 'error_fingerprintid'
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
belongs_to_options[:optional] = true if Rails::VERSION::MAJOR > 4
|
15
|
-
belongs_to :causal_error_fingerprint, belongs_to_options
|
9
|
+
belongs_to :causal_error_fingerprint,
|
10
|
+
class_name: 'NdrError::Fingerprint',
|
11
|
+
foreign_key: 'causal_error_fingerprintid',
|
12
|
+
inverse_of: :caused_error_fingerprints,
|
13
|
+
optional: true
|
16
14
|
|
17
15
|
has_many :caused_error_fingerprints,
|
18
16
|
class_name: 'NdrError::Fingerprint',
|
data/app/models/ndr_error/log.rb
CHANGED
@@ -85,7 +85,7 @@ module NdrError
|
|
85
85
|
|
86
86
|
# Performs a soft-delete of this log.
|
87
87
|
def flag_as_deleted!(time = Time.current)
|
88
|
-
update_attribute(:status, "deleted at #{time.
|
88
|
+
update_attribute(:status, "deleted at #{time.to_formatted_s(:db)}")
|
89
89
|
end
|
90
90
|
|
91
91
|
# Copy across attributes from the exception object.
|
@@ -78,7 +78,7 @@
|
|
78
78
|
<table class="table table-bordered">
|
79
79
|
<tbody>
|
80
80
|
<tr>
|
81
|
-
<th>Time of Error:</th><td><%= @error.created_at.
|
81
|
+
<th>Time of Error:</th><td><%= @error.created_at.to_formatted_s(:db) %></td>
|
82
82
|
<th>User:</th><td><%= @error.user_id %> <small class="text-muted"><%= @error.user_roles %></small></td>
|
83
83
|
</tr>
|
84
84
|
<tr>
|
data/lib/ndr_error/engine.rb
CHANGED
@@ -14,11 +14,13 @@ module NdrError
|
|
14
14
|
|
15
15
|
# Hook into host app's asset pipeline
|
16
16
|
initializer 'ndr_error.assets.precompile' do |app|
|
17
|
-
app.config.assets
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
if app.config.respond_to?(:assets)
|
18
|
+
app.config.assets.precompile += %w[
|
19
|
+
ndr_error/ndr_error.css
|
20
|
+
ndr_error/ndr_error.js
|
21
|
+
ndr_error/bootstrap/glyphicons-halflings-regular*
|
22
|
+
]
|
23
|
+
end
|
22
24
|
end
|
23
25
|
|
24
26
|
# Extract context filtering from the host application
|
data/lib/ndr_error/version.rb
CHANGED
data/lib/ndr_error.rb
CHANGED
@@ -98,6 +98,6 @@ module NdrError
|
|
98
98
|
# 4.2 compatability layer is targetted since all the bundled migrations were written prior to
|
99
99
|
# Rails 5.
|
100
100
|
def self.migration_class
|
101
|
-
|
101
|
+
ActiveRecord::Migration[4.2]
|
102
102
|
end
|
103
103
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ndr_error
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NCRS Development Team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,20 +16,62 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '6.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '7'
|
22
|
+
version: '7.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '6.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '7'
|
32
|
+
version: '7.1'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: net-imap
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: net-pop
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: net-smtp
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
33
75
|
- !ruby/object:Gem::Dependency
|
34
76
|
name: will_paginate
|
35
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,6 +114,20 @@ dependencies:
|
|
72
114
|
- - ">="
|
73
115
|
- !ruby/object:Gem::Version
|
74
116
|
version: '0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: puma
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
75
131
|
- !ruby/object:Gem::Dependency
|
76
132
|
name: sqlite3
|
77
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,14 +190,14 @@ dependencies:
|
|
134
190
|
requirements:
|
135
191
|
- - ">="
|
136
192
|
- !ruby/object:Gem::Version
|
137
|
-
version: '
|
193
|
+
version: '5.10'
|
138
194
|
type: :development
|
139
195
|
prerelease: false
|
140
196
|
version_requirements: !ruby/object:Gem::Requirement
|
141
197
|
requirements:
|
142
198
|
- - ">="
|
143
199
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
200
|
+
version: '5.10'
|
145
201
|
- !ruby/object:Gem::Dependency
|
146
202
|
name: simplecov
|
147
203
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,6 +218,8 @@ executables: []
|
|
162
218
|
extensions: []
|
163
219
|
extra_rdoc_files: []
|
164
220
|
files:
|
221
|
+
- CHANGELOG.md
|
222
|
+
- CODE_OF_CONDUCT.md
|
165
223
|
- MIT-LICENSE
|
166
224
|
- README.md
|
167
225
|
- Rakefile
|
@@ -193,11 +251,11 @@ files:
|
|
193
251
|
- lib/ndr_error/uuid_builder.rb
|
194
252
|
- lib/ndr_error/version.rb
|
195
253
|
- lib/tasks/ndr_error_tasks.rake
|
196
|
-
homepage: https://github.com/
|
254
|
+
homepage: https://github.com/NHSDigital/ndr_error
|
197
255
|
licenses:
|
198
256
|
- MIT
|
199
257
|
metadata: {}
|
200
|
-
post_install_message:
|
258
|
+
post_install_message:
|
201
259
|
rdoc_options: []
|
202
260
|
require_paths:
|
203
261
|
- lib
|
@@ -205,15 +263,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
205
263
|
requirements:
|
206
264
|
- - ">="
|
207
265
|
- !ruby/object:Gem::Version
|
208
|
-
version: '2.
|
266
|
+
version: '2.7'
|
209
267
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
268
|
requirements:
|
211
269
|
- - ">="
|
212
270
|
- !ruby/object:Gem::Version
|
213
271
|
version: '0'
|
214
272
|
requirements: []
|
215
|
-
rubygems_version: 3.
|
216
|
-
signing_key:
|
273
|
+
rubygems_version: 3.2.33
|
274
|
+
signing_key:
|
217
275
|
specification_version: 4
|
218
276
|
summary: Rails exception logging
|
219
277
|
test_files: []
|