thin_man 0.18.6 → 0.18.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c0b78ed1e63d360849a06e9c617ca4c2728df06
|
4
|
+
data.tar.gz: d19cbdd4702f7fcd984fbf2645861c71d86fd68a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef0a591fe7964685c22232818987a84c0e0a3134661dcc95d14fab1d612025d69484c440d0ff9d872832799afa5dee7d15a4080698f96d5ef341b05ad1b870be
|
7
|
+
data.tar.gz: 55590dfbb46affbe074064f19c4fcc607c7b43e15fdcd28f9ea5e998a6809bdcbc57ddcb64ace3ae1552a029df118e3a997df2b3b887af2a6cc2c0b1e8a71699
|
@@ -1,70 +1,4 @@
|
|
1
1
|
// This is a bit heavy for what it does, but should be super-easy to extend/enhance
|
2
|
-
if(typeof Class === "undefined"){
|
3
|
-
/* Simple JavaScript Inheritance
|
4
|
-
* By John Resig http://ejohn.org/
|
5
|
-
* MIT Licensed.
|
6
|
-
*/
|
7
|
-
// Inspired by base2 and Prototype
|
8
|
-
(function(){
|
9
|
-
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
|
10
|
-
// The base Class implementation (does nothing)
|
11
|
-
this.Class = function(){};
|
12
|
-
|
13
|
-
// Create a new Class that inherits from this class
|
14
|
-
Class.extend = function(prop) {
|
15
|
-
var _super = this.prototype;
|
16
|
-
|
17
|
-
// Instantiate a base class (but only create the instance,
|
18
|
-
// don't run the init constructor)
|
19
|
-
initializing = true;
|
20
|
-
var prototype = new this();
|
21
|
-
initializing = false;
|
22
|
-
|
23
|
-
// Copy the properties over onto the new prototype
|
24
|
-
for (var name in prop) {
|
25
|
-
// Check if we're overwriting an existing function
|
26
|
-
prototype[name] = typeof prop[name] == "function" &&
|
27
|
-
typeof _super[name] == "function" && fnTest.test(prop[name]) ?
|
28
|
-
(function(name, fn){
|
29
|
-
return function() {
|
30
|
-
var tmp = this._super;
|
31
|
-
|
32
|
-
// Add a new ._super() method that is the same method
|
33
|
-
// but on the super-class
|
34
|
-
this._super = _super[name];
|
35
|
-
|
36
|
-
// The method only need to be bound temporarily, so we
|
37
|
-
// remove it when we're done executing
|
38
|
-
var ret = fn.apply(this, arguments);
|
39
|
-
this._super = tmp;
|
40
|
-
|
41
|
-
return ret;
|
42
|
-
};
|
43
|
-
})(name, prop[name]) :
|
44
|
-
prop[name];
|
45
|
-
}
|
46
|
-
|
47
|
-
// The dummy class constructor
|
48
|
-
function Class() {
|
49
|
-
// All construction is actually done in the init method
|
50
|
-
if ( !initializing && this.init )
|
51
|
-
this.init.apply(this, arguments);
|
52
|
-
}
|
53
|
-
|
54
|
-
// Populate our constructed prototype object
|
55
|
-
Class.prototype = prototype;
|
56
|
-
|
57
|
-
// Enforce the constructor to be what we expect
|
58
|
-
Class.prototype.constructor = Class;
|
59
|
-
|
60
|
-
// And make this class extendable
|
61
|
-
Class.extend = arguments.callee;
|
62
|
-
|
63
|
-
return Class;
|
64
|
-
};
|
65
|
-
})();
|
66
|
-
}
|
67
|
-
|
68
2
|
if(typeof console == 'undefined'){
|
69
3
|
console = {log: function(msg){alert(msg)}}
|
70
4
|
}
|
@@ -334,8 +334,6 @@ var initThinMan = function(){
|
|
334
334
|
if(typeof data.html != 'undefined'){
|
335
335
|
debug_logger.log("thin_man.AjaxSubmission.ajaxError data.html exists, inserting into target.")
|
336
336
|
this.error_target.html(data.html);
|
337
|
-
} else {
|
338
|
-
this.error_target.empty();
|
339
337
|
}
|
340
338
|
}
|
341
339
|
}else if(jqXHR.status == 500){
|
data/lib/thin_man/version.rb
CHANGED
@@ -18,9 +18,8 @@ module.exports = function(config) {
|
|
18
18
|
'test-main.js',
|
19
19
|
{pattern: 'jquery.js'},
|
20
20
|
{pattern: 'jasmine-fixture.js'},
|
21
|
-
{pattern: '../../app/assets/javascripts/simple_inheritance.js'},
|
22
|
-
{pattern: '../../app/assets/javascripts/debug_logger.js'},
|
23
21
|
{pattern: '../../app/assets/javascripts/thin_man.js'},
|
22
|
+
{pattern: '../../app/assets/javascripts/debug_logger.js'},
|
24
23
|
{pattern: 'spec/helpers/*.js'},
|
25
24
|
{pattern: 'spec/**/*Spec.js', included: false}
|
26
25
|
],
|
@@ -94,12 +94,6 @@ describe("thin_man", function(){
|
|
94
94
|
expect($('#test_dom_id').html()).toMatch('Required field');
|
95
95
|
});
|
96
96
|
|
97
|
-
it("empties the target if there is no html in the json", function(){
|
98
|
-
$target.affix('#remove_me')
|
99
|
-
thin.ajaxError(TestResponses.conflictNoHtml)
|
100
|
-
expect($('#test_dom_id').children().length).toEqual(0)
|
101
|
-
})
|
102
|
-
|
103
97
|
});
|
104
98
|
});
|
105
99
|
|
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.18.
|
4
|
+
version: 0.18.7
|
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: 2017-03-
|
11
|
+
date: 2017-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|