quandl_logger 0.2.1 → 0.2.2

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: d9c87b8b85ed3d443f4b40de909376b089602862
4
- data.tar.gz: 2f48d6d22595a7fc549fcf7859cda56a0c0fdd43
3
+ metadata.gz: 6ea752248767ea26fe4014de334e727f16af1bd0
4
+ data.tar.gz: 4a383942651498e641abbb731da766ad7d91dfba
5
5
  SHA512:
6
- metadata.gz: 85814482909e1e96df5cd28d9f32fef94705c43e0b09c255f28845ae4d9550ce967c50fd84f68ae93c663d9a4aeeb75c6d72a48e8ac350accf440d4bf9435c23
7
- data.tar.gz: 6ebc5809eb9c7cc8488c71c49fecdc97a78ad32467f1d515d64fd3f74962923babedd4d016ca60d4ce536d24448c95b3ada7ba03f5eb920e37353b6648462af7
6
+ metadata.gz: e50074a3a8f00a7b1e2c9dbd54e4d72e0e5979d49dac5bf5e831f868bc2b283c7774716624dfbcd710a107fa7c38eb31e4d9dfe8a1c02b9f487fd1084f45497b
7
+ data.tar.gz: 39a7864945b05c156968a442b76c59503aa5f890235e1dacad6b411deddb13a6dc09c52a09ac9eeac6f326d32da9500b45066f6e55844c9ee8d6b754b7124e2a
data/Guardfile ADDED
@@ -0,0 +1,8 @@
1
+ group :specs do
2
+ guard :rspec, cmd: 'bundle exec rspec --fail-fast -f doc --color' do
3
+ watch(%r{^spec/.+_spec\.rb$})
4
+ watch(%r{^(lib/.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
5
+ watch('spec/spec_helper.rb') { 'spec' }
6
+ end
7
+ end
8
+
data/examples/logger.rb CHANGED
@@ -1,7 +1,8 @@
1
+ require 'pry'
1
2
  require 'quandl/logger'
2
3
 
3
- # use ruby old logger
4
- logger = Logger.new( File.join(Rails.root, "log/example.log") )
4
+ # use logger
5
+ logger = Logger.new( "./log/example.log" )
5
6
 
6
7
  Quandl::Logger.use( logger )
7
8
 
@@ -47,7 +47,7 @@ class Configuration
47
47
 
48
48
  def assign_attributes(hash)
49
49
  hash.each do |k,v|
50
- send("#{k}=", v) if self.class.attribute_names.include?(k) && respond_to?("#{k}=")
50
+ send("#{k}=", v) if self.class.attribute_names.include?(k.to_sym) && respond_to?("#{k}=")
51
51
  end
52
52
  end
53
53
 
@@ -0,0 +1,7 @@
1
+ class Quandl::Logger::Outputs
2
+
3
+ def self.method_missing(method_sym, *args, &block)
4
+ puts(args)
5
+ end
6
+
7
+ end
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  class Logger
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
data/lib/quandl/logger.rb CHANGED
@@ -8,6 +8,7 @@ require "active_support/core_ext/hash"
8
8
  require "active_support/core_ext/object"
9
9
 
10
10
  require 'quandl/logger/graylog2'
11
+ require 'quandl/logger/outputs'
11
12
 
12
13
  module Quandl
13
14
  class Logger
@@ -24,7 +25,8 @@ module Quandl
24
25
  end
25
26
 
26
27
  def use(value)
27
- return use_file(value) if value.kind_of?( ::Logger ) || value.kind_of?(String)
28
+ return use_file(value) if value.kind_of?(String)
29
+ @logger = value
28
30
  end
29
31
 
30
32
  def info_with_elapsed(message=nil, &block)
@@ -26,4 +26,7 @@ Gem::Specification.new do |s|
26
26
 
27
27
  s.add_runtime_dependency "activesupport", ">= 3.0.0"
28
28
  s.add_runtime_dependency "gelf", "~> 1.3.2"
29
- end
29
+
30
+ s.add_development_dependency "guard"
31
+ s.add_development_dependency "guard-rspec"
32
+ 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.1
4
+ version: 0.2.2
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-14 00:00:00.000000000 Z
11
+ date: 2013-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -122,6 +122,34 @@ dependencies:
122
122
  - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: 1.3.2
125
+ - !ruby/object:Gem::Dependency
126
+ name: guard
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: guard-rspec
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
125
153
  description: Quandl logger class for use in quandl gems.
126
154
  email:
127
155
  - blake@hilscher.ca
@@ -131,6 +159,7 @@ extra_rdoc_files: []
131
159
  files:
132
160
  - .gitignore
133
161
  - Gemfile
162
+ - Guardfile
134
163
  - LICENSE
135
164
  - README.md
136
165
  - Rakefile
@@ -141,6 +170,7 @@ files:
141
170
  - lib/quandl/configuration.rb
142
171
  - lib/quandl/logger.rb
143
172
  - lib/quandl/logger/graylog2.rb
173
+ - lib/quandl/logger/outputs.rb
144
174
  - lib/quandl/logger/version.rb
145
175
  - quandl_logger.gemspec
146
176
  - spec/fixtures/config/graylog2.yml