madvertise-logging 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,16 +2,12 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
+ gem 'syslogger', :require => false
6
+
5
7
  group :development, :test do
6
- gem 'bundler'
7
- gem 'kramdown'
8
- gem 'pry'
9
- gem 'pry-doc'
10
8
  gem 'rake'
11
9
  gem 'reek'
12
10
  gem 'rspec'
13
- gem 'ruby2ruby', '=1.3.0' # 1.3.1 is broken :(
14
11
  gem 'simplecov'
15
- gem 'syslogger', :require => false
16
12
  gem 'yard'
17
13
  end
@@ -1,4 +1,3 @@
1
- require 'madvertise/logging/version'
2
1
  require 'madvertise/logging/improved_logger'
3
2
  require 'madvertise/logging/multi_logger'
4
3
 
@@ -1,17 +1,16 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/madvertise/logging/version', __FILE__)
1
+ # encoding: utf-8
3
2
 
4
- Gem::Specification.new do |gem|
5
- gem.name = "madvertise-logging"
6
- gem.version = Madvertise::Logging::VERSION
7
- gem.authors = ["Benedikt Böhm"]
8
- gem.email = ["benedikt.boehm@madvertise.com"]
9
- gem.description = %q{Advanced logging classes with buffer backend, transactions, multi logger, etc}
10
- gem.summary = %q{Advanced logging classes with buffer backend, transactions, multi logger, etc}
11
- gem.homepage = "https://github.com/madvertise/logging"
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "madvertise-logging"
5
+ spec.version = "1.0.3"
6
+ spec.authors = ["madvertise Mobile Advertising GmbH"]
7
+ spec.email = ["tech@madvertise.com"]
8
+ spec.description = %q{Advanced logging classes with buffer backend, transactions, multi logger, etc}
9
+ spec.summary = %q{Advanced logging classes with buffer backend, transactions, multi logger, etc}
10
+ spec.homepage = "https://github.com/madvertise/logging"
12
11
 
13
- gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
14
- gem.files = `git ls-files`.split("\n")
15
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
- gem.require_paths = ["lib"]
12
+ spec.files = `git ls-files`.split($/)
13
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
14
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
+ spec.require_paths = ["lib"]
17
16
  end
@@ -1,5 +1,8 @@
1
- require 'reek/rake/task'
2
-
3
- Reek::Rake::Task.new do |t|
4
- t.fail_on_error = false
1
+ begin
2
+ require 'reek/rake/task'
3
+ Reek::Rake::Task.new do |t|
4
+ t.fail_on_error = false
5
+ end
6
+ rescue LoadError
7
+ STDERR.puts "failed to load reek. please add gem 'reek' to your Gemfile in order to use reek"
5
8
  end
@@ -1,7 +1,13 @@
1
- require 'rspec'
2
- require 'rspec/core/rake_task'
1
+ begin
2
+ require 'rspec'
3
+ require 'rspec/core/rake_task'
3
4
 
4
- desc "Run the specs"
5
- RSpec::Core::RakeTask.new do |t|
6
- t.rspec_opts = ['--options', "spec/spec.opts"]
5
+ desc "Run the specs"
6
+ RSpec::Core::RakeTask.new do |t|
7
+ t.rspec_opts = ['--options', "spec/spec.opts"]
8
+ end
9
+
10
+ task :default => [:spec]
11
+ rescue LoadError
12
+ STDERR.puts "failed to load rspec. please add gem 'rspec' to your Gemfile in order to use rspec"
7
13
  end
@@ -1,5 +1,9 @@
1
- require 'yard'
1
+ begin
2
+ require 'yard'
2
3
 
3
- YARD::Rake::YardocTask.new do |t|
4
- t.files = ['lib/**/*.rb', 'README.rdoc']
4
+ YARD::Rake::YardocTask.new do |t|
5
+ t.files = ['lib/**/*.rb', 'README.rdoc']
6
+ end
7
+ rescue LoadError
8
+ STDERR.puts "failed to load yard. please add gem 'yard' to your Gemfile in order to use yard"
5
9
  end
metadata CHANGED
@@ -1,33 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madvertise-logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
5
- prerelease:
4
+ version: 1.0.3
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - Benedikt Böhm
9
- autorequire:
8
+ - madvertise Mobile Advertising GmbH
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-11 00:00:00.000000000 Z
12
+ date: 2013-05-20 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Advanced logging classes with buffer backend, transactions, multi logger,
15
- etc
14
+ description: Advanced logging classes with buffer backend, transactions, multi logger, etc
16
15
  email:
17
- - benedikt.boehm@madvertise.com
16
+ - tech@madvertise.com
18
17
  executables: []
19
18
  extensions: []
20
19
  extra_rdoc_files: []
21
20
  files:
22
21
  - .gitignore
23
- - .rvmrc
24
22
  - .travis.yml
25
23
  - .yardopts
26
24
  - Gemfile
27
25
  - LICENSE
28
26
  - README.md
29
27
  - Rakefile
30
- - benchmark.rb
31
28
  - lib/madvertise-logging.rb
32
29
  - lib/madvertise/logging.rb
33
30
  - lib/madvertise/logging/airbrake.rb
@@ -36,7 +33,6 @@ files:
36
33
  - lib/madvertise/logging/improved_logger.rb
37
34
  - lib/madvertise/logging/mask.reek
38
35
  - lib/madvertise/logging/multi_logger.rb
39
- - lib/madvertise/logging/version.rb
40
36
  - madvertise-logging.gemspec
41
37
  - spec/improved_logger_spec.rb
42
38
  - spec/multi_logger_spec.rb
@@ -47,38 +43,37 @@ files:
47
43
  - tasks/yard.rake
48
44
  homepage: https://github.com/madvertise/logging
49
45
  licenses: []
50
- post_install_message:
46
+ post_install_message:
51
47
  rdoc_options: []
52
48
  require_paths:
53
49
  - lib
54
50
  required_ruby_version: !ruby/object:Gem::Requirement
55
- none: false
56
51
  requirements:
57
- - - ! '>='
52
+ - - '>='
58
53
  - !ruby/object:Gem::Version
59
- version: '0'
60
54
  segments:
61
55
  - 0
62
- hash: -857241795239883919
63
- required_rubygems_version: !ruby/object:Gem::Requirement
56
+ version: '0'
57
+ hash: 2
64
58
  none: false
59
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
60
  requirements:
66
- - - ! '>='
61
+ - - '>='
67
62
  - !ruby/object:Gem::Version
68
- version: '0'
69
63
  segments:
70
64
  - 0
71
- hash: -857241795239883919
65
+ version: '0'
66
+ hash: 2
67
+ none: false
72
68
  requirements: []
73
- rubyforge_project:
74
- rubygems_version: 1.8.25
75
- signing_key:
69
+ rubyforge_project:
70
+ rubygems_version: 1.8.24
71
+ signing_key:
76
72
  specification_version: 3
77
- summary: Advanced logging classes with buffer backend, transactions, multi logger,
78
- etc
73
+ summary: Advanced logging classes with buffer backend, transactions, multi logger, etc
79
74
  test_files:
80
75
  - spec/improved_logger_spec.rb
81
76
  - spec/multi_logger_spec.rb
82
77
  - spec/spec.opts
83
78
  - spec/spec_helper.rb
84
- has_rdoc:
79
+ has_rdoc:
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use --create ruby-1.9.3-p392@madvertise-logging
@@ -1,52 +0,0 @@
1
- require 'bundler/setup'
2
- require 'madvertise-logging'
3
- require 'benchmark'
4
-
5
- puts "Using " + %x(ruby -v)
6
- puts
7
-
8
- $log = Madvertise::Logging::ImprovedLogger.new(:buffer)
9
-
10
- STRING_A = ("a string"*10).freeze
11
- STRING_B = ("b string"*10).freeze
12
-
13
- n = 2000000
14
-
15
- puts ">>> Testing String interpolation vs. concatenation (n=#{n})"
16
-
17
- Benchmark.bmbm do |x|
18
- x.report("append double") { n.times do; "" << STRING_A << STRING_B << STRING_A; end }
19
- x.report("concat double") { n.times do; STRING_A + STRING_B + STRING_A; end }
20
- x.report("concat interp") { n.times do; "#{STRING_A}#{STRING_B}#{STRING_A}"; end }
21
- end
22
-
23
- n = 50000
24
-
25
- puts
26
- puts ">>> Testing caller"
27
- Benchmark.bmbm do |x|
28
- x.report("caller") { n.times do; caller; end }
29
- end
30
-
31
- $debug = false
32
- $log.level = :info
33
-
34
- puts
35
- puts ">>> Testing log.debug with debug disabled (n=#{n})"
36
- Benchmark.bmbm do |x|
37
- x.report("debug w/ guard") { n.times do; $log.debug(STRING_A) if $debug; end }
38
- x.report("debug w/ block") { n.times do; $log.debug{STRING_A}; end }
39
- x.report("debug w/ block + concat") { n.times do; $log.debug{"#{STRING_A}#{STRING_B}#{STRING_A}"}; end }
40
- x.report("debug w/o guard") { n.times do; $log.debug(STRING_A); end }
41
- x.report("debug w/o guard + concat") { n.times do; $log.debug("#{STRING_A}#{STRING_B}#{STRING_A}"); end }
42
- end
43
-
44
- $debug = true
45
- $log.level = :debug
46
-
47
- puts
48
- puts ">>> Testing log.debug with debug enabled (n=#{n})"
49
- Benchmark.bmbm do |x|
50
- x.report("debug w/ guard") { n.times do; $log.debug(STRING_A) if $debug; end }
51
- x.report("debug w/o guard") { n.times do; $log.debug(STRING_A); end }
52
- end
@@ -1,6 +0,0 @@
1
- module Madvertise
2
- module Logging
3
- # @private
4
- VERSION = "1.0.2"
5
- end
6
- end