ndr_error 2.3.3 → 2.4.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: c2a1e0f619939182e87406ba8955b5dd072bfde3ad824261116e7f52bd660879
4
- data.tar.gz: 3263b00de3d888682e53c1b849f7f41a1d0f5a0cb2ff5732f4ab6b09cea9375e
3
+ metadata.gz: 2a3df3ca931e154b2ad12097ab5725021d6aa1d3bcb3b61706459258d54084c6
4
+ data.tar.gz: 471325de64342030d9e7088eb27bf803dbcce0163aae2a95bbac7ad2ba6a7df5
5
5
  SHA512:
6
- metadata.gz: 0c31c3184739e50f2d9930c83a29b0b51bd1d2172a91a4b678fb3c00cd5a6d61300492e4458d2d52a1cedf42242b6a07012bdce620423d04a40bc81428d2302d
7
- data.tar.gz: cdac6ac705958779acf0aa81a3b542ff227fb062af6458d990d5783f0fc438e8e9bc0bda41870e16c828d87ea051a777c5b64cc246d29c86ddad73c5938f434f
6
+ metadata.gz: 6a36f65267a128ab83d5eeaf4b836ea70508c89b30c2661f07bb6398ed78351506a632f4b794de621707bc9ca16abdc27d00e044188e4dfd26234986e7610ed6
7
+ data.tar.gz: f0968ff0236b079e0513ee841d3010f4c3135d6931e0f5cb7339471b74729a2b76e7a7707de425d16b0952a50ebda856dd2d5f54ce3f171234b7069d702a72e7
data/CHANGELOG.md CHANGED
@@ -1,10 +1,10 @@
1
1
  ## [Unreleased]
2
- * no unreleased changes
2
+ +* no unreleased changes
3
3
 
4
- ## 2.3.3 / 2025-11-24
5
- ### Fixed
6
- * Support Ruby 3.4, Rails 8.0 [backported from v2.4.3]
7
- * Fix ruby 3.4 frozen string literal warnings [backported from v2.4.3]
4
+ ## 2.4.0 / 2025-01-31
5
+ ### Changed
6
+ * New views with bootstrap 5 styles
7
+ * Switch to bootstrap-icons as glyphicon no longer available in bootstrap 5
8
8
 
9
9
  ## 2.3.2 / 2024-11-21
10
10
  ### Fixed
@@ -2,11 +2,6 @@ module NdrError
2
2
  # Application-wide helpers.
3
3
  # TODO: await ndr_ui gem!
4
4
  module ApplicationHelper
5
- # Bootstrap icon tag.
6
- def glyphicon_tag(type)
7
- content_tag(:span, '', class: "glyphicon glyphicon-#{type}")
8
- end
9
-
10
5
  # Pagination helper for will_paginate:
11
6
  def pagination_summary_for(collection)
12
7
  page = collection.current_page
@@ -11,7 +11,7 @@ module NdrError
11
11
 
12
12
  error.backtrace.map do |line|
13
13
  css_classes = 'trace-item'
14
- css_classes += ' stack-only' unless highlighting.include?(line)
14
+ css_classes << ' stack-only' unless highlighting.include?(line)
15
15
 
16
16
  content_tag(:span, line, class: css_classes)
17
17
  end
@@ -56,25 +56,25 @@ module NdrError
56
56
  bootstrap_list_link_to hash + ' - ' + text, error_fingerprint_path(print)
57
57
  end
58
58
 
59
- def ticket_link_for(fingerprint, small = false)
60
- text = glyphicon_tag('asterisk') + ' View ticket'
61
- css = 'btn btn-default'
62
- css += ' btn-xs' if small
59
+ def ticket_link_for(fingerprint, small = false) # rubocop:disable Style/OptionalBooleanParameter
60
+ text = "#{bootstrap_icon_tag('asterisk', :bi)} View ticket"
61
+ css = 'btn btn-outline-secondary'
62
+ css << ' btn-xs' if small
63
63
 
64
64
  url = fingerprint.ticket_url
65
65
  link_to(text, /^http/i =~ url ? url : "http://#{url}", class: css)
66
66
  end
67
67
 
68
68
  def edit_button_for(fingerprint)
69
- css = 'btn btn-default'
70
- text = glyphicon_tag('pencil') + ' Edit Ticket'
69
+ css = 'btn btn-outline-secondary'
70
+ text = "#{bootstrap_icon_tag('pencil', :bi)} Edit Ticket"
71
71
 
72
72
  link_to(text, edit_error_fingerprint_path(fingerprint), class: css)
73
73
  end
74
74
 
75
75
  def purge_button_for(fingerprint)
76
76
  css = 'btn btn-danger'
77
- text = glyphicon_tag('trash icon-white') + ' Purge'
77
+ text = "#{bootstrap_icon_tag('trash-fill', :bi)} Purge"
78
78
 
79
79
  options = {
80
80
  'method' => :delete,
@@ -86,18 +86,18 @@ module NdrError
86
86
  end
87
87
 
88
88
  def previous_button_for(error)
89
- css = 'btn btn-default'
90
- css += ' disabled' if error.nil?
91
- text = glyphicon_tag('chevron-left')
89
+ css = 'btn btn-outline-secondary'
90
+ css << ' disabled' if error.nil?
91
+ text = bootstrap_icon_tag('chevron-left', :bi)
92
92
  path = error.nil? ? '#' : error_fingerprint_path(error.error_fingerprint, log_id: error)
93
93
 
94
94
  link_to(text, path, class: css)
95
95
  end
96
96
 
97
97
  def next_button_for(error)
98
- css = 'btn btn-default'
99
- css += ' disabled' if error.nil?
100
- text = glyphicon_tag('chevron-right')
98
+ css = 'btn btn-outline-secondary'
99
+ css << ' disabled' if error.nil?
100
+ text = bootstrap_icon_tag('chevron-right', :bi)
101
101
  path = error.nil? ? '#' : error_fingerprint_path(error.error_fingerprint, log_id: error)
102
102
 
103
103
  link_to(text, path, class: css)
@@ -8,19 +8,14 @@
8
8
  </head>
9
9
  <body class="bootstrap">
10
10
 
11
- <div class="navbar navbar-default navbar-fixed-top" role="navigation">
11
+ <div class="navbar navbar-expand-lg fixed-top bg-body-tertiary" role="navigation">
12
12
  <div class="container-fluid">
13
- <!-- Brand and toggle get grouped for better mobile display -->
14
13
  <div class="navbar-header">
15
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
16
- <span class="sr-only">Toggle navigation</span>
17
- <span class="icon-bar"></span>
18
- <span class="icon-bar"></span>
19
- <span class="icon-bar"></span>
14
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#menubar" aria-controls="menubar" aria-expanded="false" aria-label="Toggle navigation">
15
+ <span class="navbar-toggler-icon"></span>
20
16
  </button>
21
-
22
17
  <%= link_to '&#171; Back to App'.html_safe, '/', class: "navbar-brand" %>
23
- <p class="navbar-text">Error Logging by NDR</p>
18
+ <span class="navbar-text">Error Logging by NDR</span>
24
19
  </div>
25
20
  </div>
26
21
  </div>
@@ -16,5 +16,5 @@
16
16
  </div>
17
17
 
18
18
  <%= form.submit 'Update', class: 'btn btn-primary' %>
19
- <%= link_to 'Cancel', error_fingerprint_path(@fingerprint), class: 'btn btn-default' %>
19
+ <%= link_to 'Cancel', error_fingerprint_path(@fingerprint), class: 'btn btn-outline-secondary' %>
20
20
  <% end %>
@@ -5,16 +5,14 @@
5
5
  %>
6
6
 
7
7
  <div class="row">
8
- <div id="search_form_container" class="col-md-4 col-md-offset-8">
8
+ <div id="search_form_container" class="col-md-4 offset-md-8">
9
9
  <%= form_tag(error_fingerprints_path, method: :get) do %>
10
10
  <div class="input-group">
11
11
  <% if @keywords.any? %>
12
- <%= link_to glyphicon_tag('list icon-white') + ' ' + glyphicon_tag('arrow-left icon-white'), error_fingerprints_path, class: 'btn btn-info input-group-addon' %>
12
+ <%= link_to bootstrap_icon_tag(:'list-task', :bi) + ' ' + bootstrap_icon_tag(:'arrow-left-circle-fill', :bi), error_fingerprints_path, class: 'btn btn-info' %>
13
13
  <% end %>
14
14
  <%= text_field_tag :q, @keywords.join(', '), class: 'form-control search-query' %>
15
- <span class="input-group-btn">
16
- <button type="submit" class="btn btn-default"><%= glyphicon_tag('search') %></button>
17
- </span>
15
+ <button type="submit" class="btn btn-outline-secondary"><%= bootstrap_icon_tag(:search, :bi) %></button>
18
16
  </div>
19
17
  <% end %>
20
18
  </div>
@@ -45,7 +43,7 @@
45
43
  <%= latest_user_for(fingerprint, @keywords) %>
46
44
  </td>
47
45
  <td>
48
- <div class="pull-right">
46
+ <div class="float-end">
49
47
  <%= ticket_link_for(fingerprint, true) if fingerprint.ticket_url.present? %>
50
48
  </div>
51
49
 
@@ -57,7 +55,8 @@
57
55
  </tbody>
58
56
  </table>
59
57
 
60
- <span class="pull-right text-muted"><%= pagination_summary_for(@fingerprints) %></span>
58
+ <span class="float-end text-muted"><%= pagination_summary_for(@fingerprints) %></span>
59
+ <%# TODO: use bootstrap_will_paginate %>
61
60
  <%= will_paginate(@fingerprints) %>
62
61
  </div>
63
62
  </div>
@@ -7,7 +7,7 @@
7
7
 
8
8
  <hr />
9
9
  <div class="clearfix">
10
- <div class="pull-right">
10
+ <div class="float-end">
11
11
  <div class="btn-group">
12
12
  <%= ticket_link_for(@fingerprint) if @fingerprint.ticket_url.present? %>
13
13
  <%= edit_button_for(@fingerprint) if user_can_edit_errors? %>
@@ -22,7 +22,7 @@
22
22
  <%= previous_button_for(@error.previous) %>
23
23
 
24
24
  <div class="btn-group">
25
- <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">
25
+ <a class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" href="#">
26
26
  <%= pluralize(@error.similar_errors.length - 1, 'Similar Error') %> Stored
27
27
  <span class="caret"></span>
28
28
  </a>
@@ -39,13 +39,13 @@
39
39
 
40
40
  <% if @fingerprint.causal_error_fingerprint %>
41
41
  <div class="btn-group">
42
- <%= link_to bootstrap_icon_tag('arrow-up') + ' View Cause', error_fingerprint_path(@fingerprint.causal_error_fingerprint), class: 'btn btn-default' %>
42
+ <%= link_to bootstrap_icon_tag('arrow-up') + ' View Cause', error_fingerprint_path(@fingerprint.causal_error_fingerprint), class: 'btn btn-outline-secondary' %>
43
43
  </div>
44
44
  <% end %>
45
45
 
46
46
  <% if @fingerprint.caused_error_fingerprints.any? %>
47
47
  <div class="btn-group">
48
- <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">
48
+ <a class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" href="#">
49
49
  <%= pluralize(@fingerprint.caused_error_fingerprints.length, 'Downstream Error') %> Stored
50
50
  <span class="caret"></span>
51
51
  </a>
@@ -117,7 +117,7 @@
117
117
  <% end %>
118
118
 
119
119
  <h4>
120
- <small class="pull-right"><%= check_box_tag :toggle_app_trace_only %> only app trace?</small>
120
+ <small class="float-end"><%= check_box_tag :toggle_app_trace_only %> only app trace?</small>
121
121
  Backtrace:
122
122
  </h4>
123
123
  <% if (highlighted_trace = highlighted_trace_for(@error)).present? %>
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Contains the version of NdrError. Sourced by the gemspec.
4
4
  module NdrError
5
- VERSION = '2.3.3'
5
+ VERSION = '2.4.0'
6
6
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ndr_error
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - NCRS Development Team
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2025-01-31 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: rails
@@ -18,7 +19,7 @@ dependencies:
18
19
  version: '6.1'
19
20
  - - "<"
20
21
  - !ruby/object:Gem::Version
21
- version: '8.1'
22
+ version: '7.3'
22
23
  type: :runtime
23
24
  prerelease: false
24
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,7 +29,7 @@ dependencies:
28
29
  version: '6.1'
29
30
  - - "<"
30
31
  - !ruby/object:Gem::Version
31
- version: '8.1'
32
+ version: '7.3'
32
33
  - !ruby/object:Gem::Dependency
33
34
  name: net-imap
34
35
  requirement: !ruby/object:Gem::Requirement
@@ -89,14 +90,14 @@ dependencies:
89
90
  name: ndr_ui
90
91
  requirement: !ruby/object:Gem::Requirement
91
92
  requirements:
92
- - - "<"
93
+ - - ">="
93
94
  - !ruby/object:Gem::Version
94
95
  version: '5.0'
95
96
  type: :runtime
96
97
  prerelease: false
97
98
  version_requirements: !ruby/object:Gem::Requirement
98
99
  requirements:
99
- - - "<"
100
+ - - ">="
100
101
  - !ruby/object:Gem::Version
101
102
  version: '5.0'
102
103
  - !ruby/object:Gem::Dependency
@@ -268,6 +269,7 @@ homepage: https://github.com/NHSDigital/ndr_error
268
269
  licenses:
269
270
  - MIT
270
271
  metadata: {}
272
+ post_install_message:
271
273
  rdoc_options: []
272
274
  require_paths:
273
275
  - lib
@@ -282,7 +284,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
282
284
  - !ruby/object:Gem::Version
283
285
  version: '0'
284
286
  requirements: []
285
- rubygems_version: 3.6.9
287
+ rubygems_version: 3.3.27
288
+ signing_key:
286
289
  specification_version: 4
287
290
  summary: Rails exception logging
288
291
  test_files: []