RUL 0.0.1

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.
@@ -0,0 +1 @@
1
+ pkg/
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source :rubygems
2
+ gem 'uuid'
@@ -0,0 +1,14 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ macaddr (1.6.1)
5
+ systemu (~> 2.5.0)
6
+ systemu (2.5.2)
7
+ uuid (2.3.5)
8
+ macaddr (~> 1.0)
9
+
10
+ PLATFORMS
11
+ ruby
12
+
13
+ DEPENDENCIES
14
+ uuid
@@ -0,0 +1,4 @@
1
+ RUL
2
+ ===
3
+
4
+ The Rails UUID-aware Logger (RUL), adds a UUID from the current thread to all messages getting logged. With a UUID-aware log statement, you can more easily track your user's activity through your application.
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,8 @@
1
+ require 'active_support'
2
+ require 'rul/rul'
3
+
4
+ module RUL
5
+ class Railtie < ::Rails::Railtie
6
+ ActiveSupport::BufferedLogger.send(:include, ::RUL::Logging)
7
+ end
8
+ end
@@ -0,0 +1,21 @@
1
+ require 'uuid'
2
+
3
+ module RUL
4
+ module Logging
5
+ @@uuid = UUID.new
6
+
7
+ def self.included(base)
8
+ base.class_eval do
9
+ alias_method_chain :add, :uuid_info
10
+ end
11
+ end
12
+
13
+ def add_with_uuid_info severity, message=nil, progname=nil, &block
14
+ uuid = (Thread.current[:uuid] ||= @uuid.generate)
15
+ unless message.include?(uuid)
16
+ message = "#{uuid} - #{message}"
17
+ end
18
+ add_without_uuid_information severity, message, progname, &block
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: UTF-8
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "RUL"
6
+ s.version = "0.0.1"
7
+ s.authors = ["Jason Rogers"]
8
+ s.email = ["jacaetevha@gmail.com"]
9
+ s.homepage = "https://github.com/jacaetevha/RUL"
10
+ s.summary = %q{UUID-aware logging for Rails}
11
+ s.description = %q{The Rails UUID-aware Logger (RUL) is a plugin that adds a UUID from the current thread to all messages getting logged. With a UUID-aware log statement, you can more easily track your user's activity through your application.}
12
+ s.files = `git ls-files`.split("\n")
13
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
15
+ s.require_paths = ["lib"]
16
+ end
metadata ADDED
@@ -0,0 +1,55 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: RUL
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Jason Rogers
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-18 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: The Rails UUID-aware Logger (RUL) is a plugin that adds a UUID from the
15
+ current thread to all messages getting logged. With a UUID-aware log statement,
16
+ you can more easily track your user's activity through your application.
17
+ email:
18
+ - jacaetevha@gmail.com
19
+ executables: []
20
+ extensions: []
21
+ extra_rdoc_files: []
22
+ files:
23
+ - .gitignore
24
+ - Gemfile
25
+ - Gemfile.lock
26
+ - README.md
27
+ - Rakefile
28
+ - lib/rul.rb
29
+ - lib/rul/rul.rb
30
+ - rul.gemspec
31
+ homepage: https://github.com/jacaetevha/RUL
32
+ licenses: []
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ requirements: []
50
+ rubyforge_project:
51
+ rubygems_version: 1.8.24
52
+ signing_key:
53
+ specification_version: 3
54
+ summary: UUID-aware logging for Rails
55
+ test_files: []