yell-adapters-syslog 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.travis.yml ADDED
@@ -0,0 +1,17 @@
1
+ language: ruby
2
+
3
+ script: "rake"
4
+
5
+ rvm:
6
+ - 1.8.7
7
+ - 1.9.2
8
+ - 1.9.3
9
+ - jruby-18mode
10
+ - jruby-19mode
11
+ - rbx-18mode
12
+ - rbx-19mode
13
+ - ree
14
+
15
+ notifications:
16
+ email:
17
+ - me@rudionrails.com
data/README.md ADDED
@@ -0,0 +1,52 @@
1
+ Yell Adapters Syslog - Syslog Adapter for Your Extensible Logging Library
2
+
3
+ If you are not yet familiar with **Yell - Your Extensible Logging Library**
4
+ check out the githup project under https://github.com/rudionrails/yell or jump
5
+ directly into the Yell wiki at https://github.com/rudionrails/yell/wiki.
6
+
7
+ ## Installation
8
+
9
+ System wide:
10
+
11
+ ```console
12
+ gem install yell-adapters-syslog
13
+ ```
14
+
15
+ Or in your Gemfile:
16
+
17
+ ```ruby
18
+ gem "yell-adapters-syslog"
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```ruby
24
+ logger = Yell.new :syslog
25
+
26
+ logger.info "Hello World"
27
+ # Check your syslog for the received message.
28
+ ```
29
+
30
+ Or alternatively with the block syntax:
31
+
32
+ ```ruby
33
+ logger = Yell.new do
34
+ adapter :syslog
35
+ end
36
+
37
+ logger.info 'Hello World!'
38
+ ```
39
+
40
+ You can pass set `options` and the `facility`:
41
+
42
+ ```ruby
43
+ logger = Yell.new do
44
+ adapter :syslog, :facility => :user, :syslog_options => [:pid, :cons]
45
+ end
46
+
47
+ logger.info 'Hello World!'
48
+ ```
49
+
50
+
51
+ Copyright © 2012 Rudolf Schmidt, released under the MIT license
52
+
data/Rakefile CHANGED
@@ -1 +1,22 @@
1
- require "bundler/gem_tasks"
1
+ $:.unshift( 'lib' )
2
+
3
+ require 'bundler'
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ # === RSpec
7
+ begin
8
+ require 'rspec/core/rake_task'
9
+
10
+ desc "Run specs"
11
+ RSpec::Core::RakeTask.new do |t|
12
+ t.rspec_opts = %w(--color --format progress --order random)
13
+ t.ruby_opts = %w(-w)
14
+ end
15
+ rescue LoadError
16
+ task :spec do
17
+ abort "`gem install rspec` in order to run tests"
18
+ end
19
+ end
20
+
21
+ task :default => :spec
22
+
@@ -21,6 +21,9 @@
21
21
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
+
25
+ require 'syslog'
26
+
24
27
  require 'yell'
25
28
 
26
29
  require File.dirname(__FILE__) + '/yell/adapters/syslog'
@@ -1,7 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'syslog'
4
-
5
3
  module Yell #:nodoc:
6
4
  module Adapters #:nodoc:
7
5
 
@@ -4,7 +4,7 @@ module Yell #:nodoc:
4
4
  module Adapters #:nodoc:
5
5
 
6
6
  class Syslog
7
- VERSION = "0.4.0"
7
+ VERSION = "0.4.1"
8
8
 
9
9
  end
10
10
  end
data/spec/spec_helper.rb CHANGED
@@ -5,7 +5,6 @@ require 'yell-adapters-syslog'
5
5
 
6
6
  require 'rspec'
7
7
  require 'rr'
8
- require 'timecop'
9
8
 
10
9
  RSpec.configure do |config|
11
10
  config.mock_framework = :rr
@@ -44,10 +44,10 @@ describe Yell::Adapters::Syslog do
44
44
  context "FacilityMap" do
45
45
  subject { Yell::Adapters::Syslog::FacilityMap }
46
46
 
47
- # :console => ::Syslog::LOG_CONSOLE, # described in 1.9.3 docu, but not defined
48
- # :lrp => ::Syslog::LOG_LRP, # described in 1.9.3 docu, but not defined
49
- # :ntp => ::Syslog::LOG_NTP, # described in 1.9.3 docu, but not defined
50
- # :security => ::Syslog::LOG_SECURITY, # described in 1.9.3 docu, but not defined
47
+ # :console => Syslog::LOG_CONSOLE, # described in 1.9.3 docu, but not defined
48
+ # :lrp => Syslog::LOG_LRP, # described in 1.9.3 docu, but not defined
49
+ # :ntp => Syslog::LOG_NTP, # described in 1.9.3 docu, but not defined
50
+ # :security => Syslog::LOG_SECURITY, # described in 1.9.3 docu, but not defined
51
51
  it { subject[:auth].should == Syslog::LOG_AUTH }
52
52
  it { subject[:authpriv].should == Syslog::LOG_AUTHPRIV }
53
53
  it { subject[:cron].should == Syslog::LOG_CRON }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yell-adapters-syslog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yell
16
- requirement: &70357165504240 !ruby/object:Gem::Requirement
16
+ requirement: &70313191826040 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.4'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70357165504240
24
+ version_requirements: *70313191826040
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70357165503840 !ruby/object:Gem::Requirement
27
+ requirement: &70313191825640 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70357165503840
35
+ version_requirements: *70313191825640
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rr
38
- requirement: &70357165503380 !ruby/object:Gem::Requirement
38
+ requirement: &70313191825180 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70357165503380
46
+ version_requirements: *70313191825180
47
47
  description: Syslog adapter for Yell
48
48
  email:
49
49
  executables: []
@@ -51,8 +51,10 @@ extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
53
  - .gitignore
54
+ - .travis.yml
54
55
  - Gemfile
55
56
  - LICENSE.txt
57
+ - README.md
56
58
  - Rakefile
57
59
  - lib/yell-adapters-syslog.rb
58
60
  - lib/yell/adapters/syslog.rb