sidekiq_cleaner 5.3.6 → 5.3.8

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
  SHA1:
3
- metadata.gz: 80b71ddf444c3237d724423ce89058d32bac548f
4
- data.tar.gz: 9dbdbd1833de751277af45a78584b9c3766756af
3
+ metadata.gz: 9499715e22e3ddd5c36eb4e6b199ff8783481b40
4
+ data.tar.gz: '003987c30bc90f13192c0d0f744ec0bd9a7f83fd'
5
5
  SHA512:
6
- metadata.gz: bd9cfff68506a3870d6eeaa22f3a7353eb02241c3f2d9821f7c029608b8c2e4c45d409bac6959919f652570cda5b9e07f0000574473d8d4bf091a5b7e5bf54c6
7
- data.tar.gz: 832ceba80715b9a3cd0b30db137939bce82c48096724ee2385af690ef7658def4dad13527910ec5123c0efe2234fd82cacc8fd8e20633568220bdf897d4d9d54
6
+ metadata.gz: 63d4bbe8bdbd5aa517eff0dd28ef2c28ca8693fbf4df4e32a2ec165b38c3e5c22d46922219544683881725c6e3d06eab4e3f80e4afe15e2d11854922bdbec64d
7
+ data.tar.gz: 48395e51f35c5c979a27d6d044d473b8867762906e82a93a6644068534a3881f5cc00be961bbb4efa8195c987cb24264c75bbdee80af23413199e97b1b9e24f1
@@ -94,6 +94,7 @@ $(function() {
94
94
  $(function() {
95
95
  var authTokens = $('[name="authenticity_token"]');
96
96
  var authToken = '';
97
+ var nestedRoot = window.location.pathname.split('/')
97
98
  if(authTokens) {
98
99
  authToken = authTokens[0].value;
99
100
  }
@@ -101,72 +102,140 @@ $(function() {
101
102
  $('.class-cleaner-retry-button').click(function(event){
102
103
  event.preventDefault();
103
104
  var className = this.getAttribute('data_name');
104
- $.ajax({
105
- url: '/cleaner/errors/retry',
106
- type: 'POST',
107
- data: {
108
- "retry_error_class": className
109
- },
110
- headers: {
111
- "X-CSRF-Token": authToken
112
- },
113
- success: function(data, statusCode) {
114
- window.location.href = '/cleaner/morgue'
115
- }
116
- });
105
+ if (nestedRoot.length >= 2 && nestedRoot !== '') {
106
+ var initialPath = nestedRoot[1]
107
+ $.ajax({
108
+ url: `/${initialPath}/cleaner/errors/retry`,
109
+ type: 'POST',
110
+ data: {
111
+ "retry_error_class": className
112
+ },
113
+ headers: {
114
+ "X-CSRF-Token": authToken
115
+ },
116
+ success: function(data, statusCode) {
117
+ window.location.href = `/${initialPath}/cleaner/morgue`
118
+ }
119
+ });
120
+ } else {
121
+ $.ajax({
122
+ url: '/cleaner/errors/retry',
123
+ type: 'POST',
124
+ data: {
125
+ "retry_error_class": className
126
+ },
127
+ headers: {
128
+ "X-CSRF-Token": authToken
129
+ },
130
+ success: function(data, statusCode) {
131
+ window.location.href = '/cleaner/morgue'
132
+ }
133
+ });
134
+ }
117
135
  });
118
136
 
119
137
  $('.class-cleaner-delete-button').click(function(event){
120
138
  event.preventDefault();
121
139
  var className = this.getAttribute('data_name');
122
- $.ajax({
123
- url: '/cleaner/errors/delete',
124
- type: 'POST',
125
- data: {
126
- "delete_error_class": className
127
- },
128
- headers: {
129
- "X-CSRF-Token": authToken
130
- },
131
- success: function(data, statusCode) {
132
- window.location.href = '/cleaner/morgue'
133
- }
134
- });
140
+ if (nestedRoot.length >= 2 && nestedRoot !== '') {
141
+ var initialPath = nestedRoot[1]
142
+ $.ajax({
143
+ url: `/${initialPath}/cleaner/errors/delete`,
144
+ type: 'POST',
145
+ data: {
146
+ "delete_error_class": className
147
+ },
148
+ headers: {
149
+ "X-CSRF-Token": authToken
150
+ },
151
+ success: function(data, statusCode) {
152
+ window.location.href = `/${initialPath}/cleaner/morgue`
153
+ }
154
+ });
155
+ } else {
156
+ $.ajax({
157
+ url: '/cleaner/errors/delete',
158
+ type: 'POST',
159
+ data: {
160
+ "delete_error_class": className
161
+ },
162
+ headers: {
163
+ "X-CSRF-Token": authToken
164
+ },
165
+ success: function(data, statusCode) {
166
+ window.location.href = '/cleaner/morgue'
167
+ }
168
+ });
169
+ }
135
170
  });
136
171
 
137
172
  $('.exception-cleaner-retry-button').click(function(event){
138
173
  event.preventDefault();
139
174
  var exceptionName = this.getAttribute('data_name');
140
- $.ajax({
141
- url: '/cleaner/errors/retry',
142
- type: 'POST',
143
- data: {
144
- "retry_error_exception": exceptionName
145
- },
146
- headers: {
147
- "X-CSRF-Token": authToken
148
- },
149
- success: function(data, statusCode) {
150
- window.location.href = '/cleaner/morgue'
151
- }
152
- });
175
+ if (nestedRoot.length >= 2 && nestedRoot !== '') {
176
+ var initialPath = nestedRoot[1];
177
+ $.ajax({
178
+ url: `/${initialPath}/cleaner/errors/retry`,
179
+ type: 'POST',
180
+ data: {
181
+ "retry_error_exception": exceptionName
182
+ },
183
+ headers: {
184
+ "X-CSRF-Token": authToken
185
+ },
186
+ success: function(data, statusCode) {
187
+ window.location.href = `/${initialPath}/cleaner/morgue`
188
+ }
189
+ });
190
+ } else {
191
+ $.ajax({
192
+ url: '/cleaner/errors/retry',
193
+ type: 'POST',
194
+ data: {
195
+ "retry_error_exception": exceptionName
196
+ },
197
+ headers: {
198
+ "X-CSRF-Token": authToken
199
+ },
200
+ success: function(data, statusCode) {
201
+ window.location.href = '/cleaner/morgue'
202
+ }
203
+ });
204
+ }
153
205
  });
154
206
 
155
207
  $('.exception-cleaner-delete-button').click(function(event){
156
208
  event.preventDefault();
157
209
  var exceptionName = this.getAttribute('data_name');
158
- $.ajax({
159
- url: '/cleaner/errors/delete',
160
- type: 'POST',
161
- data: {
162
- "delete_error_exception": expceptionName
163
- },
164
- headers: {
165
- "X-CSRF-Token": authToken
166
- },
167
- success: function(data, statusCode) {
168
- window.location.href = '/cleaner/morgue'
169
- }
170
- });
210
+ if (nestedRoot.length >= 2 && nestedRoot !== '') {
211
+ var initialPath = nestedRoot[1];
212
+ $.ajax({
213
+ url: `/${initialPath}/cleaner/errors/delete`,
214
+ type: 'POST',
215
+ data: {
216
+ "delete_error_exception": expceptionName
217
+ },
218
+ headers: {
219
+ "X-CSRF-Token": authToken
220
+ },
221
+ success: function(data, statusCode) {
222
+ window.location.href = `/${initialPath}/cleaner/morgue`
223
+ }
224
+ });
225
+ } else {
226
+ $.ajax({
227
+ url: '/cleaner/errors/delete',
228
+ type: 'POST',
229
+ data: {
230
+ "delete_error_exception": expceptionName
231
+ },
232
+ headers: {
233
+ "X-CSRF-Token": authToken
234
+ },
235
+ success: function(data, statusCode) {
236
+ window.location.href = '/cleaner/morgue'
237
+ }
238
+ });
239
+ }
171
240
  });
172
241
  });
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Sidekiq
3
- VERSION = "5.3.6"
3
+ VERSION = "5.3.8"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_cleaner
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.6
4
+ version: 5.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Belling
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-24 00:00:00.000000000 Z
11
+ date: 2019-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis