thin_man 0.19.13 → 0.19.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/thin_man.js +22 -21
- data/lib/thin_man/version.rb +1 -1
- data/test/javascript/spec/thinManSpec.js +0 -17
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5b4cbda5757d7b31222d644d2685f6a3d713bc9
|
4
|
+
data.tar.gz: c36e05fad643a166894b348f9c67c66b16757c48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e72e621228b0a20289207d0c3f96bbd54c3e420fefd6b61b97d69a628cff0ff3a0f703e0d72eade329c24d915170c361917db083f121fc83e2546f8a0aa9c79
|
7
|
+
data.tar.gz: 0aa04f2b853df8a725796cc2ca00d0ae4c6412c86b3a8c0fd312efe02ef81dddeede1ff33c35676cc2838cfbe2ab930282d91decae08677b5b7be55d2bd04357
|
@@ -348,7 +348,7 @@ var initThinMan = function() {
|
|
348
348
|
}
|
349
349
|
} else if (jqXHR.status == 500) {
|
350
350
|
if (this.sendHelpLink()) {
|
351
|
-
if (window.confirm('There was an error communicating with the server. Please click "ok" to submit a bug report. If a new tab does not open, please disable pop up blocking and try again. Clicking "Cancel" will return you to the current page.')) {
|
351
|
+
if (window.confirm('There was an error communicating with the server. Please click "ok" to submit a bug report. If a new tab does not open, please disable pop up blocking and try again. Clicking "Cancel" will return you to the current page.')) { this.updateAndSubmitForm() };
|
352
352
|
} else {
|
353
353
|
window.alert('There was an error communicating with the server.')
|
354
354
|
}
|
@@ -358,24 +358,25 @@ var initThinMan = function() {
|
|
358
358
|
var sendHelpLink = $("meta[name='sendHelpLink']").attr("content")
|
359
359
|
return (undefined !== sendHelpLink && "true" === sendHelpLink)
|
360
360
|
},
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
361
|
+
updateAndSubmitForm: function() {
|
362
|
+
var $form = $('#ajax-500-help')
|
363
|
+
var user = this.getCurrentUser()
|
364
|
+
var token = $("meta[name='helpToken']").attr("content")
|
365
|
+
|
366
|
+
$form.children('input[name="http_request_details[requested_path]"]').val(this.ajax_options.url)
|
367
|
+
$form.children('input[name="http_request_details[referred_from]"]').val(window.location.href)
|
368
|
+
$form.children('input[name="http_request_details[request_method]"]').val(this.ajax_options.type)
|
369
|
+
$form.children('input[name="http_request_details[data]"]').val(this.ajax_options.data)
|
370
|
+
$form.children('input[name="submission[occured_at]"]').val(new Date())
|
371
|
+
$form.children('input[name="submission[url]"]').val(window.location.href)
|
372
|
+
$form.children('input[name="submission[url]"]').val(window.location.href)
|
373
|
+
$form.children('input[name="user[name]"]').val(user.name)
|
374
|
+
$form.children('input[name="user[email]"]').val(user.email)
|
375
|
+
$form.children('input[name="user[time_zone]"]').val(user.time_zone)
|
376
|
+
$form.children('input[name="token"]').val(token)
|
377
|
+
$form.submit()
|
378
378
|
},
|
379
|
+
|
379
380
|
getCurrentUser: function() {
|
380
381
|
user = {
|
381
382
|
name: $("meta[name='userName']").attr("content"),
|
@@ -598,9 +599,9 @@ var initThinMan = function() {
|
|
598
599
|
data_array.push({ name: button_name, value: button_value })
|
599
600
|
}
|
600
601
|
data_array.push(
|
601
|
-
|
602
|
-
|
603
|
-
|
602
|
+
{ name: 'thin_man_submitter', value: thin_man_submitter },
|
603
|
+
{ name: 'browser_tab_id', value: browserTabId }
|
604
|
+
)
|
604
605
|
return data_array;
|
605
606
|
} else {
|
606
607
|
// need to implement a data-attribute for multiple file fields so we can allow selecting mutliple files at once. example here:
|
data/lib/thin_man/version.rb
CHANGED
@@ -215,23 +215,6 @@ describe("thin_man", function(){
|
|
215
215
|
var thin = new thin_man.AjaxFormSubmission($form);
|
216
216
|
expect(thin.getCurrentUser()).toEqual({ name: 'Name', email: 'Email', time_zone: 'Mountain' })
|
217
217
|
});
|
218
|
-
|
219
|
-
it('builds help link', function(){
|
220
|
-
var thin = new thin_man.AjaxLinkSubmission($form);
|
221
|
-
thin.ajax_options = {
|
222
|
-
url: 'test.com',
|
223
|
-
type: 'GET',
|
224
|
-
data: {test: 'testing'}
|
225
|
-
};
|
226
|
-
thin.ajaxComplete(TestResponses.error);
|
227
|
-
link = thin.buildHelpLink();
|
228
|
-
expect(link).toMatch('test.com');
|
229
|
-
expect(link).toMatch('GET');
|
230
|
-
expect(link).toMatch('testing');
|
231
|
-
expect(link).toMatch('Name');
|
232
|
-
expect(link).toMatch('Email');
|
233
|
-
expect(link).toMatch('Mountain');
|
234
|
-
})
|
235
218
|
});
|
236
219
|
|
237
220
|
describe("POST/PATCH/DELETE request", function(){
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thin_man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut, Adam Bialek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|