logger_facade 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a47f01542a6c0c29f55fb9f18b3964cea85cd436
4
- data.tar.gz: 6545ed4009bda96bc5c63bea58b25f47807627a8
3
+ metadata.gz: a03bbd88c4325311651423874347267938d0a223
4
+ data.tar.gz: d60d40699f592f86d91806e5f7a2f951cf1b83bf
5
5
  SHA512:
6
- metadata.gz: d5f6fee935a12743caf1590f5bc21d605a264ddf0af1e9ba9bffe7a6d2db8da71d126af1fd692463390da18f92959ffcff607232eebfcbf11b95877aa1bfd9a5
7
- data.tar.gz: b3c0b2b40bc51dc1865ffb65c2d6c246cc3fc31ac873ae15595e3697e5e8b4327b46d23e570a0e8ccf3e5a1a07ba6a0c127a87e3a556e7246fc57e4c3669a251
6
+ metadata.gz: f76e85d4f2cc8427bc121b22665f57bf010511ab872ac5bd513ea5ea9cbb32c297b61e25a28ee702ded1d692fe0e37e4eb75ed79060a69e9adbb197c07792295
7
+ data.tar.gz: 085f727e79a48179d5b019fdad87ae10cf069adf609c389f956286ee7fe9234d2deea0d6583d96d9aef275f6fa9c3ae03dea0482b14acd4a5aa705131538caf4
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- logger_facade (0.0.0)
5
- hashie
4
+ logger_facade (0.0.1)
5
+ hashie (~> 3.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -44,11 +44,11 @@ PLATFORMS
44
44
  ruby
45
45
 
46
46
  DEPENDENCIES
47
- bump
47
+ bump (~> 0.5)
48
48
  bundler (~> 1.6)
49
- codeclimate-test-reporter
49
+ codeclimate-test-reporter (~> 0.3)
50
50
  logger_facade!
51
- pry
52
- rake
53
- rspec
54
- simplecov
51
+ pry (~> 0.10)
52
+ rake (~> 10.3)
53
+ rspec (~> 3.0)
54
+ simplecov (~> 0.9)
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  # Logger Facade Ruby
7
7
 
8
- [![version](https://badge.fury.io/rb/logger-facade-ruby.svg)](https://rubygems.org/gems/logger-facade)
8
+ [![version](https://badge.fury.io/rb/logger_facade.svg)](https://rubygems.org/gems/logger_facade)
9
9
 
10
10
 
11
11
  Simple class library to work as logger facade.
@@ -0,0 +1,11 @@
1
+ module LoggerFacade
2
+
3
+ module Loggable
4
+
5
+ def log
6
+ @log ||= LoggerFacade::Manager.get_logger(self.class.name)
7
+ end
8
+
9
+ end
10
+
11
+ end
@@ -1,3 +1,3 @@
1
1
  module LoggerFacade
2
- VERSION = '0.0.0'
2
+ VERSION = '0.0.1'
3
3
  end
data/lib/logger_facade.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require_relative 'logger_facade/version'
2
2
  require_relative 'logger_facade/manager'
3
3
  require_relative 'logger_facade/log'
4
+ require_relative 'logger_facade/loggable'
4
5
  require_relative 'logger_facade/plugins'
5
6
 
6
7
  module LoggerFacade
@@ -7,9 +7,14 @@ Gem::Specification.new do |spec|
7
7
  spec.version = LoggerFacade::VERSION
8
8
  spec.authors = ["Pedro Januário"]
9
9
  spec.email = ["prnjanuario@gmail.com"]
10
- spec.description = %q{Logger Facade library}
10
+ spec.description = %q{Simple class library to work as logger facade.
11
+ This simple logger facade allows you to hook plugins to execute logging.}
11
12
  spec.summary = %q{Logger Facade library}
12
13
  spec.homepage = "https://github.com/pjanuario/logger-facade-ruby"
14
+ spec.metadata = {
15
+ "source_code" => "https://github.com/pjanuario/logger-facade-ruby",
16
+ "issue_tracker" => "https://github.com/pjanuario/logger-facade-ruby/issues"
17
+ }
13
18
  spec.license = "MIT"
14
19
 
15
20
  spec.files = `git ls-files`.split($/)
@@ -18,12 +23,12 @@ Gem::Specification.new do |spec|
18
23
  spec.require_paths = ["lib"]
19
24
 
20
25
  spec.add_development_dependency 'bundler', '~> 1.6'
21
- spec.add_development_dependency 'rake'
22
- spec.add_development_dependency 'rspec'
23
- spec.add_development_dependency 'pry'
24
- spec.add_development_dependency 'simplecov'
25
- spec.add_development_dependency 'codeclimate-test-reporter'
26
- spec.add_development_dependency 'bump'
26
+ spec.add_development_dependency 'rake', '~> 10.3'
27
+ spec.add_development_dependency 'rspec', '~> 3.0'
28
+ spec.add_development_dependency 'pry', '~> 0.10'
29
+ spec.add_development_dependency 'simplecov', '~> 0.9'
30
+ spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.3'
31
+ spec.add_development_dependency 'bump', '~> 0.5'
27
32
 
28
- spec.add_dependency 'hashie'
33
+ spec.add_dependency 'hashie', '~> 3.2'
29
34
  end
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+
3
+ describe LoggerFacade::Loggable do
4
+
5
+ class X
6
+ include LoggerFacade::Loggable
7
+
8
+ def method
9
+ # force lazy load
10
+ log
11
+ end
12
+
13
+ end
14
+
15
+ it('creates a logger with class name') do
16
+ expect(LoggerFacade::Manager).to receive(:get_logger).with("X")
17
+ X.new.method
18
+ end
19
+
20
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logger_facade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Januário
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-30 00:00:00.000000000 Z
11
+ date: 2014-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -28,101 +28,103 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '10.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '10.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '3.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '0.10'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '0.10'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '0.9'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '0.9'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: codeclimate-test-reporter
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '0.3'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '0.3'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bump
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '0.5'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '0.5'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: hashie
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '3.2'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
125
- description: Logger Facade library
124
+ version: '3.2'
125
+ description: |-
126
+ Simple class library to work as logger facade.
127
+ This simple logger facade allows you to hook plugins to execute logging.
126
128
  email:
127
129
  - prnjanuario@gmail.com
128
130
  executables: []
@@ -140,6 +142,7 @@ files:
140
142
  - Rakefile
141
143
  - lib/logger_facade.rb
142
144
  - lib/logger_facade/log.rb
145
+ - lib/logger_facade/loggable.rb
143
146
  - lib/logger_facade/manager.rb
144
147
  - lib/logger_facade/plugins.rb
145
148
  - lib/logger_facade/plugins/console.rb
@@ -147,12 +150,15 @@ files:
147
150
  - logger_facade.gemspec
148
151
  - spec/spec_helper.rb
149
152
  - spec/unit/log_spec.rb
153
+ - spec/unit/loggable_spec.rb
150
154
  - spec/unit/manager_spec.rb
151
155
  - spec/unit/plugins/console_spec.rb
152
156
  homepage: https://github.com/pjanuario/logger-facade-ruby
153
157
  licenses:
154
158
  - MIT
155
- metadata: {}
159
+ metadata:
160
+ source_code: https://github.com/pjanuario/logger-facade-ruby
161
+ issue_tracker: https://github.com/pjanuario/logger-facade-ruby/issues
156
162
  post_install_message:
157
163
  rdoc_options: []
158
164
  require_paths:
@@ -176,5 +182,6 @@ summary: Logger Facade library
176
182
  test_files:
177
183
  - spec/spec_helper.rb
178
184
  - spec/unit/log_spec.rb
185
+ - spec/unit/loggable_spec.rb
179
186
  - spec/unit/manager_spec.rb
180
187
  - spec/unit/plugins/console_spec.rb