fluent-logger 0.4.9 → 0.4.10

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: 532df79f191489b5d78a4932672edeef3933b6e1
4
- data.tar.gz: 8e9c1c4c801934d8b8b5bd061b967db9b7e2b7e0
3
+ metadata.gz: c28c12beb5dd5c132b8b110bc75f91e396871395
4
+ data.tar.gz: 719e9ca555e70f8e6546c75f090169b7701787c2
5
5
  SHA512:
6
- metadata.gz: 4469d3a25c1fa8f0ef7a1d8235ab14074faf52bf401698eff4be5d9649b3f014c6c753b0493d2e436dd5c77b97a400e8eb99fb1234ce3ec6ab36c5c2090d96ea
7
- data.tar.gz: fc5f204dcf8208232c740f95325b805c1bcb8a1ea28de2dca95e329f8bfe3471d62a4544e95ad0916008941710b202e07a5c40b8014e593bb9fc658a4ddd52a2
6
+ metadata.gz: 964de8579891ba48e5b8a74cc15d40068ec5530082233db9600c3ff1b4e35c3e08197d469c0631039dd9bd6175de26a565197b29df7425a21565fd4301139e7d
7
+ data.tar.gz: 1ad8bf051fb2d9f31f89093d8e642651904f7e169080cfdbdb15163e06777bd9d63593a56a5e1b14add881cd172ef39e624f179bb44eed258d2d9a6608e36e34
data/.travis.yml CHANGED
@@ -3,7 +3,7 @@ rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
5
  - 2.0.0
6
- - 2.1.0
6
+ - 2.1
7
7
  - ree
8
8
  - rbx
9
9
 
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ Release 0.4.10 - 2015/01/10
2
+
3
+ * Call closed? in connect? method to check connection is closed or not
4
+ * Add rspec-its for spec
5
+
1
6
  Release 0.4.9 - 2014/04/17
2
7
 
3
8
  * Fix the peformance regression caused by many to_json calls
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Fluent logger
2
- A structured event loger
2
+ A structured event logger
3
3
 
4
4
  ## Examples
5
5
 
@@ -40,7 +40,7 @@ log.post("access", {"agent"=>"foo"})
40
40
 
41
41
  ### Fluent
42
42
  ```ruby
43
- Fluent::Logger::FluentLogger.open('tag_prefix', :host=>'localhost', :port=24224)
43
+ Fluent::Logger::FluentLogger.open('tag_prefix', :host=>'localhost', :port=>24224)
44
44
  ```
45
45
 
46
46
  ### Console
@@ -55,8 +55,8 @@ Fluent::Logger::NullLogger.open
55
55
 
56
56
  |name|description|
57
57
  |---|---|
58
- |Web site|http://fluent.github.com/|
59
- |Documents|http://fluent.github.com/doc/|
58
+ |Web site|http://fluentd.org/|
59
+ |Documents|http://docs.fluentd.org/|
60
60
  |Source repository|https://github.com/fluent/fluent-logger-ruby|
61
61
  |Author|Sadayuki Furuhashi|
62
62
  |Copyright|(c) 2011 FURUHASHI Sadayuki|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.9
1
+ 0.4.10
@@ -38,7 +38,8 @@ EOF
38
38
  gem.add_dependency 'yajl-ruby', '~> 1.0'
39
39
  gem.add_dependency "msgpack", [">= 0.4.4", "!= 0.5.0", "!= 0.5.1", "!= 0.5.2", "!= 0.5.3", "< 0.6.0"]
40
40
  gem.add_development_dependency 'rake', '>= 0.9.2'
41
- gem.add_development_dependency 'rspec', '>= 2.7.0'
41
+ gem.add_development_dependency 'rspec', '>= 3.0.0'
42
+ gem.add_development_dependency 'rspec-its', '>= 1.1.0'
42
43
  gem.add_development_dependency 'simplecov', '>= 0.5.4'
43
44
  gem.add_development_dependency 'timecop', '>= 0.3.0'
44
45
  end
@@ -119,7 +119,7 @@ class FluentLogger < LoggerBase
119
119
  end
120
120
 
121
121
  def connect?
122
- !!@con
122
+ @con && !@con.closed?
123
123
  end
124
124
 
125
125
  private
@@ -1,7 +1,7 @@
1
1
  module Fluent
2
2
  module Logger
3
3
 
4
- VERSION = '0.4.9'
4
+ VERSION = '0.4.10'
5
5
 
6
6
  end
7
7
  end
@@ -111,7 +111,7 @@ EOF
111
111
 
112
112
  context('post') do
113
113
  it ('success') {
114
- logger.post('tag', {'a' => 'b'}).should be_true
114
+ expect(logger.post('tag', {'a' => 'b'})).to be true
115
115
  wait_transfer
116
116
  queue.last.should == ['logger-test.tag', {'a' => 'b'}]
117
117
  }
@@ -202,7 +202,7 @@ EOF
202
202
  context "not running fluentd" do
203
203
  context('fluent logger interface') do
204
204
  it ('post & close') {
205
- logger.post('tag', {'a' => 'b'}).should be_false
205
+ expect(logger.post('tag', {'a' => 'b'})).to be false
206
206
  wait_transfer # even if wait
207
207
  queue.last.should be_nil
208
208
  logger.close
data/spec/logger_spec.rb CHANGED
@@ -13,6 +13,7 @@ describe Fluent::Logger do
13
13
 
14
14
  it('post') {
15
15
  test_logger.should_receive(:post).with('tag1', {:foo => :bar})
16
+ #allow_any_instance_of(test_logger).to receive(:post).with('tag1', {:foo => :bar})
16
17
  Fluent::Logger.post('tag1', {:foo => :bar})
17
18
  }
18
19
 
@@ -28,7 +29,7 @@ describe Fluent::Logger do
28
29
  Fluent::Logger.open('tag-prefix', {
29
30
  :logger => ::Logger.new(fluent_logger_logger_io)
30
31
  })
31
- Fluent::Logger.default.kind_of?(Fluent::Logger::FluentLogger).should be_true
32
+ expect(Fluent::Logger.default.kind_of?(Fluent::Logger::FluentLogger)).to be true
32
33
  }
33
34
 
34
35
  it('open with BaseLogger class') {
data/spec/spec_helper.rb CHANGED
@@ -19,6 +19,9 @@ if ENV['SIMPLE_COV']
19
19
  end
20
20
  end
21
21
 
22
+ require 'rspec'
23
+ require 'rspec/its'
24
+
22
25
  # Requires supporting files with custom matchers and macros, etc,
23
26
  # in ./support/ and its subdirectories.
24
27
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-17 00:00:00.000000000 Z
11
+ date: 2015-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yajl-ruby
@@ -88,14 +88,28 @@ dependencies:
88
88
  requirements:
89
89
  - - ">="
90
90
  - !ruby/object:Gem::Version
91
- version: 2.7.0
91
+ version: 3.0.0
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - ">="
97
97
  - !ruby/object:Gem::Version
98
- version: 2.7.0
98
+ version: 3.0.0
99
+ - !ruby/object:Gem::Dependency
100
+ name: rspec-its
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: 1.1.0
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 1.1.0
99
113
  - !ruby/object:Gem::Dependency
100
114
  name: simplecov
101
115
  requirement: !ruby/object:Gem::Requirement