exception-track 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 204adb921c2d193136a838e4b3612e80162b59eda35b0e6c245c529038d98d88
4
- data.tar.gz: eb21c43240e595356f99c4790112120f337625d4ba9da0359fe30dbb6f9fc774
3
+ metadata.gz: 032c9ba1ad0589f704bedbff866d3bab2aae870abc44251b2e8b5f504732fe77
4
+ data.tar.gz: 72946a5e0284dac9fd318671aa46f2322c10522010a6d2c076024801d7749be9
5
5
  SHA512:
6
- metadata.gz: 350a1ba8b5ec9836b93c38cb40f68083fbb484a7c7435a39025068cafb50eeb6def491f187c3c29cba24f0fd5ead757c3f435fcad896c2ce49e2c05420657675
7
- data.tar.gz: c602e2dd3ba3bd8f5bef4bee20c4910c72733e8557d14831751a46b55ecbcaf918de7a96c7d492c7dcc144147a474758105cd715c95ce2c4ce4900ab963e746d
6
+ metadata.gz: 4e2fe6f4660aec15140e9fa70f1876a51d78e1c61fdc98cfadfaaee08a5426fc3ddba66e6b3b858cc119293add6503a95bd3934de779bdcb22cb23ad0bfbfe61
7
+ data.tar.gz: 3807967a319b57e6e7a1fe1dc0647e3bbb4496729b47ddd392d9a36973f4d76c7470dfb646c085a841d9921b5295e8e6e6de170534a55d51bcd739295cdebbb6
data/README.md CHANGED
@@ -1,5 +1,4 @@
1
- ExceptionTrack
2
- --------------
1
+ ## ExceptionTrack
3
2
 
4
3
  Tracking exceptions for Rails application store them in database.
5
4
 
@@ -7,7 +6,7 @@ This gem is base on [exception_notification](https://github.com/smartinez87/exce
7
6
 
8
7
  [中文介绍和使用说明](https://ruby-china.org/topics/32325)
9
8
 
10
- [![Gem Version](https://badge.fury.io/rb/exception-track.svg)](https://badge.fury.io/rb/exception-track) [![Build Status](https://travis-ci.org/rails-engine/exception-track.svg)](https://travis-ci.org/rails-engine/exception-track) [![Code Climate](https://codeclimate.com/github/rails-engine/exception-track/badges/gpa.svg)](https://codeclimate.com/github/rails-engine/exception-track) [![codecov.io](https://codecov.io/github/rails-engine/exception-track/coverage.svg?branch=master)](https://codecov.io/github/rails-engine/exception-track?branch=master) [![](http://inch-ci.org/github/rails-engine/exception-track.svg?branch=master)](http://inch-ci.org/github/rails-engine/exception-track?branch=master)
9
+ [![Gem Version](https://badge.fury.io/rb/exception-track.svg)](https://badge.fury.io/rb/exception-track) [![build](https://github.com/rails-engine/exception-track/workflows/build/badge.svg)](https://github.com/rails-engine/exception-track/actions?query=workflow%3Abuild) [![codecov.io](https://codecov.io/github/rails-engine/exception-track/coverage.svg?branch=master)](https://codecov.io/github/rails-engine/exception-track?branch=master)
11
10
 
12
11
  ![2017-02-17 12 35 18](https://cloud.githubusercontent.com/assets/5518/23052599/8e267c02-f50d-11e6-8d6e-cef0cc1991b7.png)
13
12
 
@@ -41,6 +40,12 @@ Rails.application.routes.draw do
41
40
  end
42
41
  ```
43
42
 
43
+ Migrate database:
44
+
45
+ ```shell
46
+ bundle exec rails db:migrate
47
+ ```
48
+
44
49
  Now you can open: http://localhost:3000/exception-track
45
50
 
46
51
  ## Configuration
@@ -1,27 +1,78 @@
1
+ :root {
2
+ --body-background-color: #eee;
3
+ --card-background-color: #fff;
4
+ --card-border-color: #fff;
5
+ --card-shadow-color: rgba(200, 200, 200, 0.26);
6
+ --text-color: #333;
7
+ --text-color1: #666;
8
+ --text-color2: #999;
9
+ --link-color: #364cc9;
10
+ --table-background-color1: #f5f5f5;
11
+ --table-border-color: #f0f0f0;
12
+ --input-border-color: #ddd;
13
+ --button-background-color: #fff;
14
+ --button-border-color: #eee;
15
+ --button-text-color: #555;
16
+ --button-hover-background-color: #f7f7f7;
17
+ --button-hover-border-color: #eee;
18
+ --button-danger-color: #f85149;
19
+ --button-danger-hover-background-color: #f85149;
20
+ --button-danger-hover-color: #fff;
21
+ --pre-background-color: #f7f7f7;
22
+ --notice-color: #fff;
23
+ --notice-background-color: #3CBD46;
24
+ }
25
+
26
+ @media (prefers-color-scheme: dark) {
27
+ :root {
28
+ --body-background-color: #0d1117;
29
+ --card-background-color: rgba(200, 200, 200, 0.02);
30
+ --card-border-color: #30363d;
31
+ --card-shadow-color: rgba(0, 0, 0, 0.16);
32
+ --text-color: #c9d1d9;
33
+ --text-color1: #999;
34
+ --text-color2: #888;
35
+ --link-color: #58a6ff;
36
+ --table-background-color1: #161b22;
37
+ --table-border-color: #30363d;
38
+ --input-border-color: #333;
39
+ --button-background-color: #21262d;
40
+ --button-border-color: #30363d;
41
+ --button-text-color: #c9d1d9;
42
+ --button-hover-background-color: #30363d;
43
+ --button-hover-border-color: #8b949e;
44
+ --pre-background-color: #161b22;
45
+ --notice-color: #3CBD46;
46
+ --notice-background-color: #3cbd4621;
47
+ }
48
+ }
1
49
 
2
50
  body {
3
51
  margin: 0;
4
52
  padding: 20px 0;
5
- background-color: #eee;
53
+ background-color: var(--body-background-color);
6
54
  }
7
55
 
8
56
  body, textarea {
9
57
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, Helvetica, sans-serif;
10
58
  font-size: 14px;
11
59
  line-height: 1.4;
12
- color: #333;
60
+ color: var(--text-color);
13
61
  }
14
62
 
15
63
  .footer {
16
64
  padding: 15px;
17
65
  text-align: center;
18
- color: #999;
66
+ color: var(--text-color2);
67
+ }
68
+
69
+ .footer a:link, .footer a:visited {
70
+ color: var(--text-color1);
71
+ text-decoration: underline;
19
72
  }
20
- .footer a:link,
21
- .footer a:visited { color: #666; text-decoration: underline;}
22
73
 
23
74
  a, a:visited, a:active {
24
- color: #364cc9;
75
+ color: var(--link-color);
25
76
  text-decoration: none;
26
77
  }
27
78
 
@@ -34,15 +85,15 @@ table {
34
85
  border-collapse: collapse;
35
86
  border-spacing: 0;
36
87
  margin-bottom: 20px;
88
+ border: 1px solid var(--table-border-color);
89
+ border-radius: 3px;
37
90
  }
38
91
 
39
- th {
40
- text-align: left;
41
- border-bottom: solid 1px #e0e0e0;
92
+ td.date {
93
+ width: 170px;
94
+ font-size: 12px;
42
95
  }
43
96
 
44
- td.date { width: 150px; font-size: 12px; }
45
-
46
97
  h1 {
47
98
  margin-top: 0;
48
99
  font-size: 20px;
@@ -66,29 +117,28 @@ ul {
66
117
  table td, table th {
67
118
  padding: 10px 15px;
68
119
  }
69
- th { background: #f5f5f5; border-bottom: 1px solid #e0e0e0; }
70
- td {
71
- border-top: solid 1px #e0e0e0;
120
+
121
+ th {
122
+ text-align: left;
123
+ background: var(--table-background-color1);
124
+ border-bottom: 1px solid var(--table-border-color);
72
125
  }
73
126
 
74
- pre {
75
- background-color: #eee;
76
- padding: 10px;
77
- white-space: pre-wrap;
78
- word-break: break-word;
127
+ td {
128
+ border-top: solid 1px var(--table-border-color);
79
129
  }
80
130
 
81
131
  textarea {
82
132
  width: 100%;
83
133
  height: 100px;
84
- border: solid 1px #ddd;
134
+ border: solid 1px var(--input-border-color);
85
135
  padding: 10px;
86
136
  }
87
137
 
88
138
  hr {
89
139
  border: none;
90
140
  height: 0;
91
- border-top: solid 1px #ddd;
141
+ border-top: solid 1px var(--input-border-color);
92
142
  margin-bottom: 15px;
93
143
  }
94
144
 
@@ -107,16 +157,29 @@ hr {
107
157
  -ms-user-select: none;
108
158
  user-select: none;
109
159
  border-radius: 3px;
110
- border: 1px solid #ccc;
160
+ transition: .2s cubic-bezier(.3, 0, .5, 1);
161
+ transition-property: color, background-color, border-color;
162
+ border: 1px solid var(--button-border-color);
111
163
  padding: 6px 16px;
112
- color: #555 !important;
164
+ color: var(--button-text-color) !important;
113
165
  outline: 0 !important;
114
- background: #FFF;
166
+ background: var(--button-background-color);
115
167
  }
116
- .btn:hover { text-decoration: none !important; background: #f7f7f7; }
117
- .btn-danger { background: #fff; color: #E33F00 !important; border-color: #E33F00;}
168
+
169
+ .btn:hover {
170
+ text-decoration: none !important;
171
+ background: var(--button-hover-background-color);
172
+ }
173
+
174
+ .btn-danger {
175
+ background: var(--button-background-color);
176
+ color: var(--button-danger-color) !important;
177
+ border-color: var(--button-border-color);
178
+ }
179
+
118
180
  .btn-danger:hover {
119
- background: #FCEDEC;
181
+ background: var(--button-danger-hover-background-color);
182
+ color: var(--button-danger-hover-color) !important;
120
183
  }
121
184
 
122
185
  .container {
@@ -124,8 +187,9 @@ hr {
124
187
  margin-left: auto;
125
188
  margin-right: auto;
126
189
  padding: 20px;
127
- background-color: #fff;
128
- box-shadow: 0 1px 8px rgba(200, 200, 200, 0.26);
190
+ background-color: var(--card-background-color);
191
+ box-shadow: 0 1px 8px var(--card-shadow-color);
192
+ border: 1px solid var(--card-border-color);
129
193
  border-radius: 3px;
130
194
  }
131
195
 
@@ -140,49 +204,67 @@ hr {
140
204
  height: 34px;
141
205
  line-height: 34px;
142
206
  }
143
- .toolbar form { display: inline; }
144
- .toolbar .pull-right { float: right; }
207
+
208
+ .toolbar form {
209
+ display: inline;
210
+ }
211
+
212
+ .toolbar .pull-right {
213
+ float: right;
214
+ }
145
215
 
146
216
  #notice {
147
217
  padding: 8px 15px;
148
- background: #3CBD46;
149
- color: #fff;
218
+ background: var(--notice-background-color);
219
+ color: var(--notice-color);
150
220
  margin-bottom: 15px;
151
221
  border-radius: 3px;
152
222
  }
153
223
 
154
224
  pre {
155
- background: #f7f7f7;
225
+ white-space: pre-wrap;
226
+ word-break: break-word;
227
+ background: var(--pre-background-color);
156
228
  padding: 25px;
157
229
  border-radius: 3px;
158
230
  font-size: 12px;
159
231
  font-family: Menlo, Monaco, Consolas, monospace;
160
232
  }
161
233
 
162
- h1 { font-size: 16px; }
234
+ h1 {
235
+ font-size: 16px;
236
+ }
163
237
 
164
238
  .pagination {
165
239
  padding-bottom: 15px;
166
240
  font-size: 14px;
167
241
  }
168
242
 
169
- .pagination li { display: inline; }
243
+ .pagination li {
244
+ display: inline;
245
+ }
170
246
 
171
247
  .pagination a {
172
248
  display: inline-block;
173
249
  padding: 5px 10px;
174
- border: 1px solid #eee;
175
- color: #555;
250
+ border-radius: 3px;
251
+ border: 1px solid var(--button-border-color);
252
+ color: var(--button-text-color);
253
+ background: var(--button-background-color);
176
254
  text-decoration: none;
177
255
  }
256
+
178
257
  .pagination a:hover {
179
- background: #f7f7f7;
258
+ background: var(--button-hover-background-color);
259
+ color: var(--button-hover-color);
260
+ border-color: var(--button-hover-border-color);
180
261
  }
181
- .pagination em,
182
- .pagination .current {
262
+
263
+ .pagination em, .pagination .current {
264
+ border-radius: 3px;
183
265
  display: inline-block;
184
266
  padding: 5px 10px;
185
- border: 1px solid #f0f0f0;
186
- background: #f0f0f0;
267
+ border: 1px solid var(--button-hover-border-color);
268
+ background: var(--button-hover-background-color);
187
269
  font-style: normal;
188
- }
270
+ }
@@ -3,7 +3,7 @@
3
3
  module ExceptionTrack
4
4
  class LogsController < ActionController::Base
5
5
  layout "exception-track/application"
6
- before_action :set_log, only: %i[show destroy]
6
+ before_action :set_log, only: :show
7
7
 
8
8
  # GET /exception_logs
9
9
  def index
@@ -6,7 +6,7 @@
6
6
  }
7
7
  </script>
8
8
  <div class="toolbar">
9
- <%= @logs.total_count %> exceptions
9
+ <a class="btn" href="/">Back to App</a>
10
10
 
11
11
  <div class="pull-right">
12
12
  <%= form_tag(export_logs_path, method: 'post') do %>
@@ -21,6 +21,7 @@
21
21
  <% if @logs.blank? %>
22
22
  <div class="no-record">No exceptions.</div>
23
23
  <% else %>
24
+ <h1><%= pluralize(@logs.total_count, 'exception') %></h1>
24
25
  <%= paginate @logs %>
25
26
 
26
27
  <table class="table table-borded tabl">
@@ -22,7 +22,7 @@ module ExceptionTrack
22
22
  end
23
23
 
24
24
  def configure(&block)
25
- config.instance_exec(&block)
25
+ config.instance_eval(&block)
26
26
  end
27
27
  end
28
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ExceptionTrack
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception-track
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-03 00:00:00.000000000 Z
11
+ date: 2020-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: exception_notification
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.2'
55
- - !ruby/object:Gem::Dependency
56
- name: mysql2
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  description: Tracking exceptions for Rails application store them in database by exception_notification
70
56
  gem.
71
57
  email:
@@ -97,7 +83,7 @@ homepage: https://github.com/rails-engine/exception-track
97
83
  licenses:
98
84
  - MIT
99
85
  metadata: {}
100
- post_install_message:
86
+ post_install_message:
101
87
  rdoc_options: []
102
88
  require_paths:
103
89
  - lib
@@ -112,8 +98,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
98
  - !ruby/object:Gem::Version
113
99
  version: '0'
114
100
  requirements: []
115
- rubygems_version: 3.0.3
116
- signing_key:
101
+ rubygems_version: 3.1.4
102
+ signing_key:
117
103
  specification_version: 4
118
104
  summary: Tracking exceptions for Rails application store them in database.
119
105
  test_files: []