yell-adapters-syslog 2.0.0 → 2.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: bd7a60b4277eb051c4de7a44bb33d812bd0e2f0d
4
- data.tar.gz: 5d8e263dbce6cd9e55fe3e79e73ecd117d426304
3
+ metadata.gz: 88730ce89b2ddb2da08abc68b9df76876f4080a9
4
+ data.tar.gz: a47d08ef91a99c79e998f311cf5439a3404ddffe
5
5
  SHA512:
6
- metadata.gz: ba4e99cdc70ac1fdac5ea8b02ee1853eba9499e79bf50d422480ea80367b0502fe35793d723c23c989ec8746ed3a5c68cecf845663848118944b5981c4a1ed52
7
- data.tar.gz: 79ea1ecbb64d808a9575673e6a970a23db02449f5216675f3b651213c66312e1b7de6e5ee65951bdc0313243e638e43ec8ae1aa3bea8853e6b9b8f47200e52de
6
+ metadata.gz: 7ac647e566676fc28b5c606b45f1b2c28dff431d50f35afa645311ec3d98d5e5762ddd35b63ceef08f904a535ee52f87c8a0b892fdaaf8e8aa2e02065795fb3f
7
+ data.tar.gz: 04932c0bf3231e6e620c3d831413f9fe557051bd920bfbcbbd50132a81a700b82d5746fecdebe041c9d270ab6e511cd5a0b9e9a62f1ad3f0c9ab44bd064cce85
@@ -169,13 +169,10 @@ module Yell #:nodoc:
169
169
 
170
170
  def to_message( m )
171
171
  message = m.to_s
172
- message = message.dup if message.frozen?
173
172
 
174
- message.strip!
175
- message.gsub!(/%/, '%%') # syslog(3) freaks on % (printf)
176
- message.gsub!(/\e\[[^m]*m/, '') # remove useless ansi color codes
177
-
178
- message
173
+ message.strip.
174
+ gsub(/%/, '%%'). # syslog(3) freaks on % (printf)
175
+ gsub(/\e\[[^m]*m/, '') # remove useless ansi color codes
179
176
  end
180
177
 
181
178
  end
@@ -120,11 +120,18 @@ describe Yell::Adapters::Syslog do
120
120
  end
121
121
 
122
122
  context :message do
123
- subject { Yell::Adapters::Syslog.new }
123
+ let(:adapter) { Yell::Adapters::Syslog.new }
124
124
  let(:event) { Yell::Event.new(logger, 1, "Hello World".freeze) }
125
125
 
126
126
  it "formats frozen strings" do
127
- expect { subject.write event }.to_not raise_error
127
+ expect { adapter.write event }.to_not raise_error
128
+ end
129
+
130
+ it "does not modify strings" do
131
+ event = Yell::Event.new(logger, 1, "%")
132
+ adapter.write(event)
133
+
134
+ event.messages.should == ["%"]
128
135
  end
129
136
  end
130
137
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "yell-adapters-syslog"
5
- s.version = "2.0.0"
5
+ s.version = "2.0.1"
6
6
 
7
7
  s.authors = ["Rudolf Schmidt"]
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yell-adapters-syslog
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rudolf Schmidt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-28 00:00:00.000000000 Z
11
+ date: 2013-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yell