javascript_safe_logger 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/javascript_safe_logger.gemspec +32 -0
- data/lib/javascript_safe_logger/engine.rb +5 -0
- data/lib/javascript_safe_logger/version.rb +3 -0
- data/lib/javascript_safe_logger.rb +3 -0
- data/vendor/assets/javascripts/safe_logger/index.js +1 -0
- data/vendor/assets/javascripts/safe_logger/log.js +13 -0
- metadata +73 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "javascript_safe_logger/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "javascript_safe_logger"
|
7
|
+
s.version = JavascriptSafeLogger::VERSION
|
8
|
+
s.authors = ["Jesse House"]
|
9
|
+
s.email = ["jesse.house@gmail.com"]
|
10
|
+
s.homepage = "https://github.com/house9/javascript_safe_logger"
|
11
|
+
s.summary = %q{
|
12
|
+
Rails 3.1 javascript asset for Paul Irish console.log wrapper
|
13
|
+
}
|
14
|
+
s.description = %q{
|
15
|
+
Rails 3.1 javascript asset for Paul Irish console.log wrapper
|
16
|
+
|
17
|
+
http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
|
18
|
+
https://raw.github.com/paulirish/html5-boilerplate/master/js/plugins.js
|
19
|
+
|
20
|
+
add to your Gemfile and then include in your application.js
|
21
|
+
//= require safe_logger
|
22
|
+
|
23
|
+
usage: log('inside coolFunc', this, arguments);
|
24
|
+
}
|
25
|
+
|
26
|
+
s.rubyforge_project = "javascript_safe_logger"
|
27
|
+
|
28
|
+
s.files = `git ls-files`.split("\n")
|
29
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
30
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
31
|
+
s.require_paths = ["lib"]
|
32
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require ./log
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// https://raw.github.com/paulirish/html5-boilerplate/master/js/plugins.js (45cd0378d5c3fdb03098)
|
2
|
+
// usage: log('inside coolFunc', this, arguments);
|
3
|
+
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
|
4
|
+
window.log = function(){
|
5
|
+
log.history = log.history || []; // store logs to an array for reference
|
6
|
+
log.history.push(arguments);
|
7
|
+
if(this.console) {
|
8
|
+
arguments.callee = arguments.callee.caller;
|
9
|
+
console.log( Array.prototype.slice.call(arguments) );
|
10
|
+
}
|
11
|
+
};
|
12
|
+
// make it safe to use console.log always
|
13
|
+
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{});
|
metadata
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: javascript_safe_logger
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Jesse House
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2011-06-24 00:00:00 -07:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: "\n Rails 3.1 javascript asset for Paul Irish console.log wrapper\n \n http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/\n https://raw.github.com/paulirish/html5-boilerplate/master/js/plugins.js\n \n add to your Gemfile and then include in your application.js\n //= require safe_logger\n \n usage: log('inside coolFunc', this, arguments);\n "
|
22
|
+
email:
|
23
|
+
- jesse.house@gmail.com
|
24
|
+
executables: []
|
25
|
+
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
30
|
+
files:
|
31
|
+
- .gitignore
|
32
|
+
- Gemfile
|
33
|
+
- Rakefile
|
34
|
+
- javascript_safe_logger.gemspec
|
35
|
+
- lib/javascript_safe_logger.rb
|
36
|
+
- lib/javascript_safe_logger/engine.rb
|
37
|
+
- lib/javascript_safe_logger/version.rb
|
38
|
+
- vendor/assets/javascripts/safe_logger/index.js
|
39
|
+
- vendor/assets/javascripts/safe_logger/log.js
|
40
|
+
has_rdoc: true
|
41
|
+
homepage: https://github.com/house9/javascript_safe_logger
|
42
|
+
licenses: []
|
43
|
+
|
44
|
+
post_install_message:
|
45
|
+
rdoc_options: []
|
46
|
+
|
47
|
+
require_paths:
|
48
|
+
- lib
|
49
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
version: "0"
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
65
|
+
requirements: []
|
66
|
+
|
67
|
+
rubyforge_project: javascript_safe_logger
|
68
|
+
rubygems_version: 1.3.7
|
69
|
+
signing_key:
|
70
|
+
specification_version: 3
|
71
|
+
summary: Rails 3.1 javascript asset for Paul Irish console.log wrapper
|
72
|
+
test_files: []
|
73
|
+
|