loggr 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  *.gem
2
2
  *.rbc
3
3
  .bundle
4
- *.lock
5
4
  pkg/*
6
5
  *.log
@@ -1,11 +1,11 @@
1
1
  rvm:
2
2
  - 1.8.7
3
- - 1.9.2
4
3
  - 1.9.3
5
4
  - jruby
6
- - rbx
7
- - rbx-2.0
8
- - ree
5
+ gemfile:
6
+ - gemfiles/activesupport-3.0.gemfile
7
+ - gemfiles/activesupport-3.1.gemfile
8
+ - gemfiles/activesupport-3.2.gemfile
9
9
 
10
10
  notifications:
11
11
  recipients:
data/Appraisals CHANGED
@@ -1,4 +1,4 @@
1
- appraise "activesupport-3.0.x" do
1
+ appraise "activesupport-3.0" do
2
2
  gem 'activesupport', '~> 3.0.9'
3
3
  end
4
4
 
@@ -6,6 +6,6 @@ appraise "activesupport-3.1" do
6
6
  gem 'activesupport', '~> 3.1.0'
7
7
  end
8
8
 
9
- appraise "activesupport-head" do
10
- gem 'activesupport', :path => '../../rails/activesupport/'
9
+ appraise "activesupport-3.2" do
10
+ gem 'activesupport', '~> 3.2.0'
11
11
  end
@@ -0,0 +1,27 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ loggr (1.1.2)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ activesupport (3.1.1)
10
+ multi_json (~> 1.0)
11
+ appraisal (0.4.0)
12
+ bundler
13
+ rake
14
+ minitest (2.6.2)
15
+ multi_json (1.0.3)
16
+ rake (0.9.2)
17
+
18
+ PLATFORMS
19
+ java
20
+ ruby
21
+
22
+ DEPENDENCIES
23
+ activesupport (>= 3.0.0)
24
+ appraisal (>= 0.4)
25
+ loggr!
26
+ minitest (>= 2.3.0)
27
+ rake (>= 0.8.7)
@@ -0,0 +1,24 @@
1
+ PATH
2
+ remote: /Users/lukas/Projects/_github/loggr
3
+ specs:
4
+ loggr (1.1.1)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ activesupport (3.0.11)
10
+ appraisal (0.4.0)
11
+ bundler
12
+ rake
13
+ minitest (2.10.1)
14
+ rake (0.9.2.2)
15
+
16
+ PLATFORMS
17
+ ruby
18
+
19
+ DEPENDENCIES
20
+ activesupport (~> 3.0.9)
21
+ appraisal (>= 0.4)
22
+ loggr!
23
+ minitest (>= 2.3.0)
24
+ rake (>= 0.8.7)
@@ -0,0 +1,27 @@
1
+ PATH
2
+ remote: /Users/lukas/Projects/_github/loggr
3
+ specs:
4
+ loggr (1.1.1)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ activesupport (3.1.1)
10
+ multi_json (~> 1.0)
11
+ appraisal (0.4.0)
12
+ bundler
13
+ rake
14
+ minitest (2.6.2)
15
+ multi_json (1.0.3)
16
+ rake (0.9.2)
17
+
18
+ PLATFORMS
19
+ java
20
+ ruby
21
+
22
+ DEPENDENCIES
23
+ activesupport (~> 3.1.0)
24
+ appraisal (>= 0.4)
25
+ loggr!
26
+ minitest (>= 2.3.0)
27
+ rake (>= 0.8.7)
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "activesupport", "~> 3.2.0"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,29 @@
1
+ PATH
2
+ remote: /Users/lukas/Projects/_github/loggr
3
+ specs:
4
+ loggr (1.1.1)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ activesupport (3.2.0)
10
+ i18n (~> 0.6)
11
+ multi_json (~> 1.0)
12
+ appraisal (0.4.0)
13
+ bundler
14
+ rake
15
+ i18n (0.6.0)
16
+ minitest (2.10.1)
17
+ multi_json (1.0.4)
18
+ rake (0.9.2.2)
19
+
20
+ PLATFORMS
21
+ java
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ activesupport (~> 3.2.0)
26
+ appraisal (>= 0.4)
27
+ loggr!
28
+ minitest (>= 2.3.0)
29
+ rake (>= 0.8.7)
@@ -3,7 +3,7 @@ require 'loggr/adapter'
3
3
  # This is basically a factory facade to create new Logger instances
4
4
  # which behave all like standard Ruby Stdlib Loggers.
5
5
  #
6
- class LoggerFactory
6
+ class LoggerFactory
7
7
  # Ensure we get all those factory methods directly here
8
8
  extend Loggr::Adapter
9
9
  end
@@ -100,12 +100,14 @@ module Loggr
100
100
 
101
101
  protected
102
102
 
103
- # Construct the message, note that progname will be ignored, maybe set as
104
- # MDC?
105
- def build_message(message = nil, progname = nil, &block)
106
- message = yield if message.nil? && block_given?
107
- message.to_s.gsub(/$\s*^/, '')
108
- end
103
+ # Construct the message, note that progname will be ignored, maybe set as
104
+ # MDC?
105
+ #
106
+ # Removes leading newlines.
107
+ def build_message(message = nil, progname = nil, &block)
108
+ message = yield if message.nil? && block_given?
109
+ message.to_s.sub(/^\n+/, '')
110
+ end
109
111
  end
110
112
  end
111
113
  end
@@ -1,4 +1,4 @@
1
1
  module Loggr
2
2
  # Called gem version for compatibility with loggr/agents/loggr-rb (loggr-rb gem)
3
- GEM_VERSION = "1.1.1"
3
+ GEM_VERSION = "1.1.2"
4
4
  end
@@ -24,5 +24,5 @@ Gem::Specification.new do |s|
24
24
  s.add_development_dependency "rake", ">= 0.8.7"
25
25
  s.add_development_dependency "minitest", ">= 2.3.0"
26
26
  s.add_development_dependency "activesupport", ">= 3.0.0"
27
- s.add_development_dependency "appraisal", ">= 0.3.8"
27
+ s.add_development_dependency "appraisal", ">= 0.4"
28
28
  end
@@ -146,6 +146,13 @@ class Loggr::SLF4J::LoggerTest < MiniTest::Unit::TestCase
146
146
  assert_equal Hash.new, @logger.java_mdc.to_hash
147
147
  end
148
148
 
149
+ def test_strip_leading_newlines
150
+ skip_unless_jruby
151
+ assert_equal " some\nnewline\nmessage", @logger.send(:build_message, " some\nnewline\nmessage")
152
+ assert_equal "Started GET \"/service/dossiers\" for 127.0.0.1 at Wed Feb 15 22:28:02 +0100 2012", @logger.send(:build_message, "\n\nStarted GET \"/service/dossiers\" for 127.0.0.1 at Wed Feb 15 22:28:02 +0100 2012")
153
+ assert_equal "NoMethodError (missing foobar):\n backtrace1\n backtrace2\n\n", @logger.send(:build_message, "\n\nNoMethodError (missing foobar):\n backtrace1\n backtrace2\n\n")
154
+ end
155
+
149
156
  def test_java_logger
150
157
  skip_unless_jruby
151
158
  refute_nil @logger.java_logger
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loggr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 1
10
- version: 1.1.1
9
+ - 2
10
+ version: 1.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lukas Westermann
@@ -15,11 +15,9 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-30 00:00:00 Z
18
+ date: 2012-02-15 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: rake
22
- prerelease: false
23
21
  requirement: &id001 !ruby/object:Gem::Requirement
24
22
  none: false
25
23
  requirements:
@@ -31,11 +29,11 @@ dependencies:
31
29
  - 8
32
30
  - 7
33
31
  version: 0.8.7
34
- type: :development
32
+ name: rake
35
33
  version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: minitest
34
+ type: :development
38
35
  prerelease: false
36
+ - !ruby/object:Gem::Dependency
39
37
  requirement: &id002 !ruby/object:Gem::Requirement
40
38
  none: false
41
39
  requirements:
@@ -47,11 +45,11 @@ dependencies:
47
45
  - 3
48
46
  - 0
49
47
  version: 2.3.0
50
- type: :development
48
+ name: minitest
51
49
  version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: activesupport
50
+ type: :development
54
51
  prerelease: false
52
+ - !ruby/object:Gem::Dependency
55
53
  requirement: &id003 !ruby/object:Gem::Requirement
56
54
  none: false
57
55
  requirements:
@@ -63,11 +61,11 @@ dependencies:
63
61
  - 0
64
62
  - 0
65
63
  version: 3.0.0
66
- type: :development
64
+ name: activesupport
67
65
  version_requirements: *id003
68
- - !ruby/object:Gem::Dependency
69
- name: appraisal
66
+ type: :development
70
67
  prerelease: false
68
+ - !ruby/object:Gem::Dependency
71
69
  requirement: &id004 !ruby/object:Gem::Requirement
72
70
  none: false
73
71
  requirements:
@@ -76,11 +74,12 @@ dependencies:
76
74
  hash: 3
77
75
  segments:
78
76
  - 0
79
- - 3
80
- - 8
81
- version: 0.3.8
82
- type: :development
77
+ - 4
78
+ version: "0.4"
79
+ name: appraisal
83
80
  version_requirements: *id004
81
+ type: :development
82
+ prerelease: false
84
83
  description: Adapters for different ruby logging backends. Create loggers using different adapters, like Logger (Stdlib), Rails or SLF4J (in JRuby only).
85
84
  email:
86
85
  - lukas@at-point.ch
@@ -95,13 +94,17 @@ files:
95
94
  - .travis.yml
96
95
  - Appraisals
97
96
  - Gemfile
97
+ - Gemfile.lock
98
98
  - LICENSES.md
99
99
  - MIT-LICENSE
100
100
  - README.md
101
101
  - Rakefile
102
- - gemfiles/activesupport-3.0.x.gemfile
102
+ - gemfiles/activesupport-3.0.gemfile
103
+ - gemfiles/activesupport-3.0.gemfile.lock
103
104
  - gemfiles/activesupport-3.1.gemfile
104
- - gemfiles/activesupport-head.gemfile
105
+ - gemfiles/activesupport-3.1.gemfile.lock
106
+ - gemfiles/activesupport-3.2.gemfile
107
+ - gemfiles/activesupport-3.2.gemfile.lock
105
108
  - lib/logback-classic-0.9.29.jar
106
109
  - lib/logback-core-0.9.29.jar
107
110
  - lib/loggr.rb
@@ -168,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
171
  requirements: []
169
172
 
170
173
  rubyforge_project:
171
- rubygems_version: 1.8.10
174
+ rubygems_version: 1.8.15
172
175
  signing_key:
173
176
  specification_version: 3
174
177
  summary: Logger factory framework (including an SLF4J wrapper)
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "activesupport", :path=>"../../rails/activesupport/"
6
-
7
- gemspec :path=>"../"