le 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/LE.gemspec +1 -1
  2. data/lib/le/host.rb +10 -19
  3. metadata +2 -2
data/LE.gemspec CHANGED
@@ -3,7 +3,7 @@ require File.expand_path(File.join(dir, 'lib', 'le'))
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "le"
6
- s.version = "2.1.1"
6
+ s.version = "2.1.2"
7
7
  s.date = Time.now
8
8
  s.summary = "Logentries plugin"
9
9
  s.description =<<EOD
@@ -2,33 +2,24 @@ module Le
2
2
  module Host
3
3
 
4
4
  def self.new(token, local)
5
-
6
5
  Le::Host::HTTP.new(token, local)
7
-
8
6
  end
9
-
7
+
10
8
  module InstanceMethods
11
9
  def formatter
12
- proc do |severity, datetime, progname, msg|
13
- message = "#{datetime} "
14
- message << format_message(msg, severity)
15
- end
16
- end
17
-
10
+ proc do |severity, datetime, _, msg|
11
+ message = "#{datetime} "
12
+ message << format_message(msg, severity)
13
+ end
14
+ end
15
+
18
16
  def format_message(message_in, severity)
19
- message_in = message_in.lstrip
17
+ message_in = message_in.inspect unless message_in.is_a?(String)
20
18
 
21
- message_out = ""
22
- message_out = "severity=#{severity}, "
23
- case message_in
24
- when String
25
- message_out << message_in
26
- else
27
- message_out << message_in.inspect
28
- end
29
- message_out
19
+ "severity=#{severity}, #{message_in.lstrip}"
30
20
  end
31
21
  end
22
+
32
23
  end
33
24
  end
34
25
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: le
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-17 00:00:00.000000000 Z
12
+ date: 2012-12-31 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! '
15
15