thin_man 0.19.6 → 0.19.7
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/debug_logger.js +12 -2
- data/app/assets/javascripts/thin_man.js +937 -931
- data/lib/thin_man/ajax_helper.rb +4 -1
- data/lib/thin_man/version.rb +1 -1
- data/test/javascript/karma.conf.js +44 -49
- data/test/javascript/spec/thinManSpec.js +224 -254
- data/test/thin_man_test.rb +6 -1
- 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: 6d0c901eb1d780f09bb66efdf55cd3c961b8d74e
|
4
|
+
data.tar.gz: 6297c85daccfe287bf75644c81e3908fbd4663f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97e18d8ccf7871a07dff8318ee1e308b0688dbc6bdbb82ccd3ae7a288f554d19a3f702a1281f1af7ed3873c257fee99087de7623e740aa75065f05bceac61d44
|
7
|
+
data.tar.gz: 95a4c711990183133a41c1e6c7383c75a9425bf55f1f77eae8d45432ee0042e7f0febd85ae5f920256b46798e81bc13b540e7ba380370e1a431e1a7e105fea8e
|
@@ -7,12 +7,22 @@ var DebugLogger = Class.extend({
|
|
7
7
|
if($debug_settings.data('logging_on')){
|
8
8
|
console.log('Debug logging turned on.')
|
9
9
|
this.logging_on = true;
|
10
|
+
this.logger_level = $debug_settings.data('logger_level') || 1;
|
11
|
+
this.allows = $debug_settings.data('logger_include');
|
10
12
|
} else {
|
11
13
|
this.logging_on = false;
|
12
14
|
}
|
13
15
|
},
|
14
|
-
log: function(msg){
|
15
|
-
if(
|
16
|
+
log: function(msg, level, source){
|
17
|
+
if(level === undefined){
|
18
|
+
level = 0;
|
19
|
+
}
|
20
|
+
if(source === undefined || this.allows === undefined){
|
21
|
+
source_allowed = true;
|
22
|
+
}else{
|
23
|
+
source_allowed = this.allows[source];
|
24
|
+
}
|
25
|
+
if(this.logging_on && this.logger_level >= level && source_allowed){
|
16
26
|
console.log(msg)
|
17
27
|
}
|
18
28
|
}
|