rubinius-rails_logger 0.2.0 → 0.3.0

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: 635c5608bd2bf45d3dff1ad548a905e630cdbe5a
4
- data.tar.gz: b6ea53b1f96c1f22e083e835ca4fca822b534ae1
3
+ metadata.gz: cdf13f7367e964dca324d745e1b9c8d44135b5b8
4
+ data.tar.gz: 1d8b930888af33e0c0f648c50779187c4fa9d98f
5
5
  SHA512:
6
- metadata.gz: 773d9ac4646133e129bf6a1ff0574c2dba2c6cb923d5099a97373b36aa8886fc5cf4a9dfd1134f0c496a778aad7386324682ce750ee99cddb0832d89ae1cd00a
7
- data.tar.gz: f47af5654c3c4be57b5e89d30bb1181ca3e9fa325bc3f448f530b6eab00af958881aef5b8cb3ed230f4af680121e50acde6be8817b80eceb251e3a5ee4d87ab3
6
+ metadata.gz: 409c8ddb1e3c1ee0dc5ee55984b2a3159ada8f5c3acb4c4de877658b097facacc8404022a932b17013e41edeb8d621d6eb54d5830f130a038795976f5738b794
7
+ data.tar.gz: 98c00a89b6b4733e11a668145a819076c10f11f5c6e626b91ce6a8dcf357048d598f45701ab1bad89739f68bfaa76a06dd1ac4869d1ef4ce85cde266ab0a881b
@@ -2,10 +2,11 @@ require "rubinius/rails_logger/version"
2
2
 
3
3
  module Rubinius
4
4
  class RailsLogger
5
- # These operations are no-ops but provided for method-call compatibility.
5
+ # provided for method-call compatibility, formatter and level are no-ops
6
6
  attr_accessor :formatter, :level, :progname
7
7
 
8
8
  def initialize(name)
9
+ @progname = name
9
10
  @logger = Rubinius::Logger.new name
10
11
  @level = :warn
11
12
  end
@@ -30,6 +31,20 @@ module Rubinius
30
31
  false
31
32
  end
32
33
 
34
+ def add(severity, message = nil, program_name = nil, &block)
35
+ program_name ||= progname
36
+
37
+ if message.nil?
38
+ message = if block_given?
39
+ yield
40
+ else
41
+ program_name
42
+ end
43
+ end
44
+
45
+ log(severity, message)
46
+ end
47
+
33
48
  def log(severity, message, &block)
34
49
  message = yield if block_given?
35
50
  @logger.send severity, message
@@ -1,5 +1,5 @@
1
1
  module Rubinius
2
2
  class RailsLogger
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubinius-rails_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Shirai
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-01 00:00:00.000000000 Z
11
+ date: 2015-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- version_requirements: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: '1.9'
19
14
  name: bundler
20
- type: :development
21
15
  prerelease: false
22
16
  requirement: !ruby/object:Gem::Requirement
23
17
  requirements:
24
18
  - - "~>"
25
19
  - !ruby/object:Gem::Version
26
20
  version: '1.9'
27
- - !ruby/object:Gem::Dependency
21
+ type: :development
28
22
  version_requirements: !ruby/object:Gem::Requirement
29
23
  requirements:
30
24
  - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: '10.0'
26
+ version: '1.9'
27
+ - !ruby/object:Gem::Dependency
33
28
  name: rake
34
- type: :development
35
29
  prerelease: false
36
30
  requirement: !ruby/object:Gem::Requirement
37
31
  requirements:
38
32
  - - "~>"
39
33
  - !ruby/object:Gem::Version
40
34
  version: '10.0'
41
- - !ruby/object:Gem::Dependency
35
+ type: :development
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
38
  - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: '3.2'
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
- type: :development
49
43
  prerelease: false
50
44
  requirement: !ruby/object:Gem::Requirement
51
45
  requirements:
52
46
  - - "~>"
53
47
  - !ruby/object:Gem::Version
54
48
  version: '3.2'
49
+ type: :development
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.2'
55
55
  description: Rubinius includes a logging facility that is used by Rubinius itself.
56
56
  Due to limitations of logging facilities like syslog (where syslog can only be opened
57
57
  once in a process), the Rubinius RailsLogger provides a Rails-compatible logger
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.4.6
94
+ rubygems_version: 2.4.8
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Rubinius RailsLogger is a logging adapter to the Rubinius logging facility