jlog-rails 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bb764a02d7ef59358cd7d47cceaeaf4ee8e02980
4
+ data.tar.gz: 606c99a283ce6d7db8ca7a17787ad26bb9ec21e6
5
+ SHA512:
6
+ metadata.gz: 530f561ee0f568c7a40e28f4b5379965a799b187afb49eac474fe2c0e98e4a3db8cde40f17fa09eaddf82cf2b77a8810bc9bec544106167b4614fbed0307dacb
7
+ data.tar.gz: b051fba0170dd31a71cd3de9ed498ff8feacfc7305366e822751f303e32ebf968f6e38b0f6408e01a6a015f9e100369cc910bca943dd803750917c5687436859
data/Makefile ADDED
@@ -0,0 +1,14 @@
1
+ BASE_FILES=src/jlog.js \
2
+ src/mount.js \
3
+ src/helpers.js \
4
+ src/levels.js \
5
+ src/logger.js \
6
+ src/logging_event.js \
7
+ src/layout.js \
8
+ src/layouts/pattern.js \
9
+ src/appender.js \
10
+ src/appenders/console.js \
11
+ src/appenders/ajax.js
12
+
13
+ all:
14
+ cat ${BASE_FILES} > vendor/assets/javascripts/jlog.js
data/README.md CHANGED
@@ -29,6 +29,9 @@ Dependencies:
29
29
 
30
30
  Changelog:
31
31
  ----------
32
+ * 0.2.3
33
+ * Using console error/warn facility to make console appender more verbose
34
+ * Moving all the sources into separate file; adding Makefile to create one output file
32
35
  * 0.2.2
33
36
  * Removed jquery-rails dependency
34
37
  * Fixed an issue with multi-line logging
data/lib/jlog/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jlog
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
File without changes
@@ -0,0 +1,36 @@
1
+ /*
2
+ Class: ConsoleAppender
3
+
4
+ Simple console appender.
5
+ */
6
+ JLog.ConsoleAppender = function() {
7
+ this.name = 'ConsoleAppender';
8
+
9
+ /*
10
+ Method: append
11
+
12
+ Attempts to append message into console.
13
+ */
14
+ if (window.console && window.console.log) {
15
+ this.calls = {};
16
+ this.calls[JLog.Level.DEBUG.name] = _.bind(window.console.debug || window.console.log, window.console);
17
+ this.calls[JLog.Level.WARN.name] = _.bind(window.console.warn || window.console.log, window.console);
18
+ this.calls[JLog.Level.ERROR.name] = _.bind(window.console.error || window.console.log, window.console);
19
+ this.calls[JLog.Level.FATAL.name] = _.bind(window.console.fatal ||
20
+ window.console.error ||
21
+ window.console.log, window.console);
22
+ this.append = _.bind(function(loggingEvent) {
23
+ var message = this.getLayout().format(loggingEvent);
24
+ if (this.calls[loggingEvent.level.name])
25
+ this.calls[loggingEvent.level.name](message);
26
+ else
27
+ window.console.log(message);
28
+ }, this);
29
+ }
30
+
31
+ this.toString = _.bind(function() {
32
+ return "JLog.ConsoleAppender(name=\"" + this.name + "\")";
33
+ }, this);
34
+ };
35
+
36
+ JLog.ConsoleAppender.prototype = new JLog.Appender();
File without changes
@@ -1,15 +1,3 @@
1
- //= include mount
2
-
3
- //= include helpers
4
- //= include levels
5
- //= include logger
6
- //= include logging_event
7
- //= include layout
8
- //= include layouts/pattern
9
- //= include appender
10
- //= include appenders/ajax
11
- //= include appenders/console
12
-
13
1
  /**
14
2
  *
15
3
  * @author Marcus R Breese mailto:mbreese@users.sourceforge.net
@@ -41,4 +29,3 @@
41
29
  * @remixer Helios Technologies mailto:contact@heliostech.fr
42
30
  *
43
31
  **/
44
-
File without changes
File without changes
File without changes
File without changes
File without changes
data/test/buster.js CHANGED
@@ -12,15 +12,7 @@ config["basic"] = {
12
12
  "test/lib/jquery-1.9.1.min.js"
13
13
  ],
14
14
  sources: [
15
- "vendor/assets/javascripts/mount.js",
16
- "vendor/assets/javascripts/levels.js",
17
- "vendor/assets/javascripts/logging_event.js",
18
- "vendor/assets/javascripts/logger.js",
19
- "vendor/assets/javascripts/layout.js",
20
- "vendor/assets/javascripts/layouts/pattern.js",
21
- "vendor/assets/javascripts/appender.js",
22
- "vendor/assets/javascripts/appenders/console.js",
23
- "vendor/assets/javascripts/appenders/ajax.js"
15
+ "vendor/assets/javascripts/jlog.js"
24
16
  ],
25
17
  tests: [
26
18
  "test/*-test.js"
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jlog-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
5
- prerelease:
4
+ version: 0.2.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Helios Technologies
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-05-02 00:00:00.000000000 Z
11
+ date: 2013-07-17 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: A lightweight JavaScript logger (for Rails)
15
14
  email: contact@heliostech.fr
@@ -20,6 +19,7 @@ files:
20
19
  - .gitignore
21
20
  - .rvmrc
22
21
  - Gemfile
22
+ - Makefile
23
23
  - README.md
24
24
  - Rakefile
25
25
  - app/controllers/jlog/ajax_controller.rb
@@ -33,46 +33,45 @@ files:
33
33
  - lib/jlog/formatters.rb
34
34
  - lib/jlog/version.rb
35
35
  - script/rails
36
+ - src/appender.js
37
+ - src/appenders/ajax.js
38
+ - src/appenders/console.js
39
+ - src/helpers.js
40
+ - src/jlog.js
41
+ - src/layout.js
42
+ - src/layouts/pattern.js
43
+ - src/levels.js
44
+ - src/logger.js
45
+ - src/logging_event.js
46
+ - src/mount.js
36
47
  - test/ajax-appender-test.js
37
48
  - test/buster.js
38
49
  - test/lib/jquery-1.9.1.min.js
39
50
  - test/lib/underscore.js
40
51
  - test/logger-test.js
41
52
  - test/pattern-layout-test.js
42
- - vendor/assets/javascripts/appender.js
43
- - vendor/assets/javascripts/appenders/ajax.js
44
- - vendor/assets/javascripts/appenders/console.js
45
- - vendor/assets/javascripts/helpers.js
46
- - vendor/assets/javascripts/jlog.js
47
- - vendor/assets/javascripts/layout.js
48
- - vendor/assets/javascripts/layouts/pattern.js
49
- - vendor/assets/javascripts/levels.js
50
- - vendor/assets/javascripts/logger.js
51
- - vendor/assets/javascripts/logging_event.js
52
- - vendor/assets/javascripts/mount.js
53
53
  homepage: http://rubygems.org/gems/jlog-rails
54
54
  licenses: []
55
+ metadata: {}
55
56
  post_install_message:
56
57
  rdoc_options: []
57
58
  require_paths:
58
59
  - lib
59
60
  required_ruby_version: !ruby/object:Gem::Requirement
60
- none: false
61
61
  requirements:
62
- - - ! '>='
62
+ - - '>='
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
65
  required_rubygems_version: !ruby/object:Gem::Requirement
66
- none: false
67
66
  requirements:
68
- - - ! '>='
67
+ - - '>='
69
68
  - !ruby/object:Gem::Version
70
69
  version: '0'
71
70
  requirements: []
72
71
  rubyforge_project: jlog-rails
73
- rubygems_version: 1.8.25
72
+ rubygems_version: 2.0.3
74
73
  signing_key:
75
- specification_version: 3
74
+ specification_version: 4
76
75
  summary: Jlog for Rails
77
76
  test_files:
78
77
  - test/ajax-appender-test.js
@@ -1,20 +0,0 @@
1
- /*
2
- Class: ConsoleAppender
3
-
4
- Simple console appender.
5
- */
6
- JLog.ConsoleAppender = function() {
7
- this.name = 'ConsoleAppender';
8
-
9
- /*
10
- Method: append
11
-
12
- Attempts to append message into console.
13
- */
14
- if (window.console && window.console.log)
15
- this.append = function(loggingEvent) {
16
- window.console.log(this.getLayout().format(loggingEvent));
17
- };
18
- };
19
-
20
- JLog.ConsoleAppender.prototype = new JLog.Appender();