madvertise-logging 1.2.1-java → 1.3.0-java

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --require spec_helper
2
+ --color
3
+ --format Fuubar
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 1.9.2
3
+ - jruby-1.7.4
5
4
  - ruby-head
6
- - jruby-head
5
+ - 2.0.0
6
+ - 1.9.3
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ gemspec
5
5
  gem 'syslogger', :require => false
6
6
 
7
7
  group :development, :test do
8
+ gem 'fuubar'
8
9
  gem 'rake'
9
10
  gem 'reek'
10
11
  gem 'rspec'
@@ -249,7 +249,7 @@ module Madvertise
249
249
 
250
250
  case @backend
251
251
  when :log4j
252
- create_log4j_backend
252
+ create_log4j_logger
253
253
  when :ruby
254
254
  create_ruby_logger(STDOUT)
255
255
  when :stdout
@@ -315,30 +315,21 @@ module Madvertise
315
315
  end
316
316
 
317
317
  def create_logger
318
- case RUBY_PLATFORM
319
- when 'java'
320
- create_log4j_logger
321
- else
322
- create_ruby_logger(@logfile)
323
- end
318
+ create_ruby_logger(@logfile)
324
319
  end
325
320
 
326
321
  def create_log4j_logger
327
- begin
328
- require 'log4j'
329
- require 'log4jruby'
330
- Log4jruby::Logger.get($0).tap do |logger|
331
- @backend = :log4j
332
- configure_log4j(logger)
333
- end
334
- rescue LoadError
335
- self.logger = :ruby
336
- error("Couldn't load log4jruby gem, falling back to pure ruby Logger")
322
+ Log4jruby::Logger.get($0).tap do |logger|
323
+ @backend = :log4j
324
+ configure_log4j(logger)
337
325
  end
338
326
  end
339
327
 
340
328
  def configure_log4j(logger)
341
- return unless @backend == :log4j
329
+ return unless RUBY_PLATFORM == 'java'
330
+
331
+ require 'log4j'
332
+ require 'log4jruby'
342
333
 
343
334
  @console = org.apache.log4j.ConsoleAppender.new
344
335
  @console.setLayout(org.apache.log4j.PatternLayout.new(Formatter.log4j_format))
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "madvertise-logging"
5
- spec.version = "1.2.1"
5
+ spec.version = "1.3.0"
6
6
  spec.authors = ["madvertise Mobile Advertising GmbH"]
7
7
  spec.email = ["tech@madvertise.com"]
8
8
  spec.description = %q{Advanced logging classes with buffer backend, transactions, multi logger, etc}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madvertise-logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: java
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-01 00:00:00.000000000 Z
12
+ date: 2013-09-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: log4jruby
@@ -51,6 +51,7 @@ extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
53
  - .gitignore
54
+ - .rspec
54
55
  - .travis.yml
55
56
  - .yardopts
56
57
  - Gemfile
@@ -68,7 +69,6 @@ files:
68
69
  - madvertise-logging.gemspec
69
70
  - spec/improved_logger_spec.rb
70
71
  - spec/multi_logger_spec.rb
71
- - spec/spec.opts
72
72
  - spec/spec_helper.rb
73
73
  - tasks/reek.rake
74
74
  - tasks/rspec.rake
@@ -83,13 +83,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - '>='
85
85
  - !ruby/object:Gem::Version
86
+ segments:
87
+ - 0
86
88
  version: '0'
89
+ hash: 2
87
90
  none: false
88
91
  required_rubygems_version: !ruby/object:Gem::Requirement
89
92
  requirements:
90
93
  - - '>='
91
94
  - !ruby/object:Gem::Version
95
+ segments:
96
+ - 0
92
97
  version: '0'
98
+ hash: 2
93
99
  none: false
94
100
  requirements: []
95
101
  rubyforge_project:
@@ -100,6 +106,5 @@ summary: Advanced logging classes with buffer backend, transactions, multi logge
100
106
  test_files:
101
107
  - spec/improved_logger_spec.rb
102
108
  - spec/multi_logger_spec.rb
103
- - spec/spec.opts
104
109
  - spec/spec_helper.rb
105
110
  has_rdoc:
@@ -1,2 +0,0 @@
1
- --colour
2
- --format documentation