quandl_logger 0.2.3 → 0.2.4

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: aaf2d63efde5449ce729d6bfb3af667185481399
4
- data.tar.gz: 7e72611a92ad68d771cdaa8ba6ccbe42c57e0450
3
+ metadata.gz: 3aa1d95a63bd32f2a13d1e3a28af7d1e939b0c59
4
+ data.tar.gz: 9c37000c27e3ff87d1d2ed448409bb63307847f5
5
5
  SHA512:
6
- metadata.gz: 7504204571253541ac7d0740d61f113282b63713fcb4055676b4439ae595004354aee7003174ac2e1da4940f0bafcf739a2bb9a78e968c9aac29d17cff6d6f4b
7
- data.tar.gz: 53aca7b4a10ed06022977c2129c9c3d68870c32c141e8b46e9035726ad694bb477e49529e04d6b3a2820ff08529d238271af9a3eb0827e386406d7f892772e9b
6
+ metadata.gz: 6c1e13d281a61bd175af8e1ba3ed77f5c2b617f423c614a7353e0b3dbc956c06a53d7f0ad4f95f932126646da4573a6951bcba70fde2183ba2a4db9ca673f834
7
+ data.tar.gz: 21bb61cad41510b4d123a3e2cd3bbc63764e6f8002386dfbb71879d60648f22023e44f6aaf40ebdd0f94da0d5c850029af42d415a0d79a0e2380e75ae37f77e7
data/UPGRADE.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.2.4
2
+
3
+ * Quandl::Logger::Outputs should write to stdout and stderr
4
+
5
+
1
6
  ## 0.2.1
2
7
 
3
8
  * add hostname to configuration
@@ -1,7 +1,37 @@
1
1
  class Quandl::Logger::Outputs
2
+ class << self
3
+
4
+ def info(*args)
5
+ stdout(*args)
6
+ end
7
+
8
+ def debug(*args)
9
+ stdout(*args)
10
+ end
11
+
12
+ def fatal(*args)
13
+ stderr(*args)
14
+ end
15
+
16
+ def warn(*args)
17
+ stderr(*args)
18
+ end
19
+
20
+ def error(*args)
21
+ stderr(*args)
22
+ end
23
+
24
+ def stdout(*args)
25
+ $stdout.puts( args.collect(&:to_s).join(', ') + "\n" )
26
+ end
27
+
28
+ def stderr(*args)
29
+ $stderr.puts( args.collect(&:to_s).join(', ') + "\n" )
30
+ end
31
+
32
+ def method_missing(method_sym, *args, &block)
33
+ stdout(args)
34
+ end
2
35
 
3
- def self.method_missing(method_sym, *args, &block)
4
- puts(args)
5
36
  end
6
-
7
- end
37
+ end
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  class Logger
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.4"
4
4
  end
5
5
  end
@@ -23,10 +23,9 @@ Gem::Specification.new do |s|
23
23
  s.add_development_dependency "fivemat", "~> 1.2"
24
24
  s.add_development_dependency "pry"
25
25
  s.add_development_dependency "simplecov"
26
+ s.add_development_dependency "guard"
27
+ s.add_development_dependency "guard-rspec"
26
28
 
27
29
  s.add_runtime_dependency "activesupport", ">= 3.0.0"
28
30
  s.add_runtime_dependency "gelf", "~> 1.3.2"
29
-
30
- s.add_development_dependency "guard"
31
- s.add_development_dependency "guard-rspec"
32
31
  end
@@ -0,0 +1,22 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+
4
+ describe Quandl::Logger::Outputs do
5
+ let(:logger){ Quandl::Logger::Outputs }
6
+ subject{ logger }
7
+
8
+ [:info, :debug].each do |type|
9
+ it "#{type} should puts 'hello #{type}' to $stdout" do
10
+ $stdout.should_receive(:puts).with(%Q{hello #{type}\n})
11
+ subject.send(type, %Q{hello #{type}})
12
+ end
13
+ end
14
+
15
+ [:warn, :error, :fatal].each do |type|
16
+ it "#{type} should puts 'hello #{type}' to $stderr" do
17
+ $stderr.should_receive(:puts).with(%Q{hello #{type}\n})
18
+ subject.send(type, %Q{hello #{type}})
19
+ end
20
+ end
21
+
22
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hilscher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-29 00:00:00.000000000 Z
11
+ date: 2013-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -95,61 +95,61 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: activesupport
98
+ name: guard
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '>='
102
102
  - !ruby/object:Gem::Version
103
- version: 3.0.0
104
- type: :runtime
103
+ version: '0'
104
+ type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '>='
109
109
  - !ruby/object:Gem::Version
110
- version: 3.0.0
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: gelf
112
+ name: guard-rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - '>='
116
116
  - !ruby/object:Gem::Version
117
- version: 1.3.2
118
- type: :runtime
117
+ version: '0'
118
+ type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - '>='
123
123
  - !ruby/object:Gem::Version
124
- version: 1.3.2
124
+ version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: guard
126
+ name: activesupport
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - '>='
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
131
+ version: 3.0.0
132
+ type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - '>='
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: 3.0.0
139
139
  - !ruby/object:Gem::Dependency
140
- name: guard-rspec
140
+ name: gelf
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '>='
143
+ - - ~>
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
145
+ version: 1.3.2
146
+ type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '>='
150
+ - - ~>
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: 1.3.2
153
153
  description: Quandl logger class for use in quandl gems.
154
154
  email:
155
155
  - blake@hilscher.ca
@@ -175,6 +175,7 @@ files:
175
175
  - quandl_logger.gemspec
176
176
  - spec/fixtures/config/graylog2.yml
177
177
  - spec/lib/quandl/logger/graylog2_spec.rb
178
+ - spec/lib/quandl/logger/outputs_spec.rb
178
179
  - spec/lib/quandl/logger_spec.rb
179
180
  - spec/spec_helper.rb
180
181
  homepage: http://blake.hilscher.ca/
@@ -204,5 +205,6 @@ summary: Quandl logger class for use in quandl gems.
204
205
  test_files:
205
206
  - spec/fixtures/config/graylog2.yml
206
207
  - spec/lib/quandl/logger/graylog2_spec.rb
208
+ - spec/lib/quandl/logger/outputs_spec.rb
207
209
  - spec/lib/quandl/logger_spec.rb
208
210
  - spec/spec_helper.rb