lines 0.1.21 → 0.1.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzZjZDcxM2I5YjM2OTUyMmI2YmZlZmI2ZWRhNzgxMmJlNTVkM2E5MQ==
4
+ ZGY1NGIwNzgzMjEwODZjZjA4ZTBhNTZjYTA3YTEzNWYzMTRkYjYyNA==
5
5
  data.tar.gz: !binary |-
6
- ZGVhNDVhOTUyYzQzZDY3YTBiOWQ1NmExMTc4MTlhMWZkNGZiY2YxZQ==
6
+ OWZkYzQxZDk2ZTFkMjYxMzM1OWQyZDI1YTg1ZTc3NTUxYzBjMDZhYQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MmYzMGZiNGVkOTAwZjJiY2ViOGY3OGI2NGYyYTYwZDRiNzU3MmZkMWViOGNh
10
- ODYzZjJjNDRmNTA2NmM2ODA2MjY2ZmVhODhmMjcyZDQ1MjY5OTJlZjE1NDgw
11
- N2Q2ZWQxYjk1OTJjYzRhNWQ0ZmE1OTZlMmEwMTJkMTkzNmZlYTQ=
9
+ Y2I1YTQyMDc5ZThjZjY1NmUzZTQ1NzEzZjE0M2M2MjVhMjNlNTUwMDU3Njk2
10
+ YmYzYjk5MjE1NjBhMThkMzI1YThkNTVhYzJjNjhjY2MzYTkwMzA0N2EwOTc1
11
+ NjAwZDUxMDU0ZTgyMDUxNmM5MTc2MjdlZmUzZTAyNTJhZTAwMzY=
12
12
  data.tar.gz: !binary |-
13
- MTU4N2I1MGUwYTM4ZTZhOWU2MGMzNjQwOGE3MWQzN2M1ODI2ZDQyZjQ4MmI4
14
- ZWJiNWI3YTcxYzIwNWNjMzMyZGU1ZDE5NmZiZGRiMTUyMjUyYTllMDYzNzll
15
- YmE1NDA3YjQ2ZjM2OGY5NTAwNWRjNGYyMGVlYjQ3MTM2MmM3ZWM=
13
+ MGQ0YWU0ZmM5ZWQ4NThhZjRkNWM3N2U4Y2Q3OTc1YmY3M2U0NmE5M2ZlNGIz
14
+ MmQyYjRlYjc5MTM5ODBiYWRmMjNiYzExMzVlNDYyODA2OTM1NzRmZmRhMzNl
15
+ MTJkMWFiNzIwMmYyNTYxYzRjMTFhNmJmOTM2YWQ1ODUwNmVmMDM=
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
 
2
- n.n.n / 2013-06-27
2
+ 0.1.22 / 2013-06-27
3
+ ==================
4
+
5
+ * Fixes issue where Syslog is not recognized as an outputter
6
+ * Fixes issue when Lines.use is given an array of outputters
7
+
8
+ 0.1.21 / 2013-06-27
3
9
  ==================
4
10
 
5
11
  * Return self when silencing the Rack::CommonLogger
data/lib/lines/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lines
2
- VERSION = "0.1.21"
2
+ VERSION = "0.1.22"
3
3
  end
data/lib/lines.rb CHANGED
@@ -48,7 +48,7 @@ module Lines
48
48
  #
49
49
  # Lines.use(Syslog, $stderr)
50
50
  def use(*outputs)
51
- outputters.replace(outputs.map{|o| to_outputter o})
51
+ outputters.replace(outputs.flatten.map{|o| to_outputter o})
52
52
  end
53
53
 
54
54
  # The main function. Used to record objects in the logs as lines.
@@ -113,15 +113,8 @@ module Lines
113
113
  def to_outputter(out)
114
114
  return out if out.respond_to?(:output)
115
115
  return StreamOutputter.new(out) if out.respond_to?(:write)
116
-
117
- case out
118
- when IO
119
- StreamOutputter.new(out)
120
- when Syslog
121
- SyslogOutputter.new
122
- else
123
- raise ArgumentError, "unknown outputter #{out.inspect}"
124
- end
116
+ return SyslogOutputter.new if out == ::Syslog
117
+ raise ArgumentError, "unknown outputter #{out.inspect}"
125
118
  end
126
119
  end
127
120
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lines
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Pfenniger