logstash-logger 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YzViNDkyMjE5ZTA0ZDVjNGViMmIxOWUzNWY2NDEyNGFjOWFmZmM4Nw==
5
- data.tar.gz: !binary |-
6
- MjY0ZjFjMWJkMjlhNzQ2YWUwNjllNmU0YzgzMWI1YTAxNTYxZTgyYg==
2
+ SHA1:
3
+ metadata.gz: 5cc1cc91049d6f846f8d942e4d0281683b904b0f
4
+ data.tar.gz: c2c7090c2787ea403b466fbfd7efa5dc73a48d6c
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NWNjMmU5OWUyMTMxNWUwZjgxNzg3MjE5ZjhjNDhmOTI1Y2I3NTQ0YmM4NmQw
10
- YWI1MjczNzc5N2I5M2IxMGMyNjVmMzFkOGY5ZWFkYThiNDhkZWEwNWEwOGY2
11
- ZWNkN2UwMTg1ODgzNTc3ZDgwMmNmNmZkZjAyNzU3YmRkZjhmY2I=
12
- data.tar.gz: !binary |-
13
- YzdiZWUzN2UzMmRjOGQ2NGNmZjRhZGVkYTIyYzllZWMxZjUzNTNkZDI5NzU4
14
- YzdmMDdiMGZlMTk1Y2ZjY2I4ZjAwMjZjZDYxMGU5ZjdiZjRhMWMwZDcyMTQy
15
- NTZhMTllZjQ5MzkxMGQ3ZmQ1YjcyM2FjMTM3YTllZTExN2RiYTE=
6
+ metadata.gz: 089bc8ab4e842eb8b2184967cf20987cca96d1ae85894b6c705eb05263ed9541dca41048ca01e3d5197eb57f8ec14bbec9f115b8537ef684770012f7f25f6674
7
+ data.tar.gz: d1f170fafd89df7d792b0e0e6aa15729200ca7b8046f0f31041a5dbdd5f09a0911b11e4553f085f51f273429da5c925324af83d0f40ecb8815072409964bca65
@@ -22,7 +22,7 @@ module LogStashLogger
22
22
  end
23
23
 
24
24
  def self.device_klass_for(type)
25
- case type
25
+ case type.to_sym
26
26
  when :udp then UDP
27
27
  when :tcp then TCP
28
28
  when :unix then Unix
@@ -1,3 +1,3 @@
1
1
  module LogStashLogger
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
data/spec/device_spec.rb CHANGED
@@ -8,4 +8,26 @@ describe LogStashLogger::Device do
8
8
  expect(device_with_port).to be_a LogStashLogger::Device::UDP
9
9
  end
10
10
  end
11
+
12
+ context "when passing in configuration" do
13
+ let(:configuration) { {type: :udp, port: port} }
14
+
15
+ subject(:new_device) { described_class.new(configuration) }
16
+
17
+ it "does not mutate the passed configuration" do
18
+ expect{ new_device }.to_not change { configuration }
19
+ expect( new_device ).to be_a LogStashLogger::Device::UDP
20
+ end
21
+ end
22
+
23
+ context "when configuration type is a String" do
24
+ let(:configuration) { {type: "udp", port: port} }
25
+
26
+ subject(:new_device) { described_class.new(configuration) }
27
+
28
+ it "it correctly recognizes the device type" do
29
+ expect(new_device).to be_a LogStashLogger::Device::UDP
30
+ end
31
+ end
32
+
11
33
  end
metadata CHANGED
@@ -1,139 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Butler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-13 00:00:00.000000000 Z
11
+ date: 2014-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-event
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: stud
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: redis
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ! '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ! '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: pry
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ! '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
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
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: wwtd
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ! '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
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
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: appraisal
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ! '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ! '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  description: Ruby logger that writes directly to LogStash
@@ -143,9 +143,9 @@ executables: []
143
143
  extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
- - .gitignore
147
- - .rspec
148
- - .travis.yml
146
+ - ".gitignore"
147
+ - ".rspec"
148
+ - ".travis.yml"
149
149
  - Appraisals
150
150
  - CHANGELOG.md
151
151
  - Gemfile
@@ -202,12 +202,12 @@ require_paths:
202
202
  - lib
203
203
  required_ruby_version: !ruby/object:Gem::Requirement
204
204
  requirements:
205
- - - ! '>='
205
+ - - ">="
206
206
  - !ruby/object:Gem::Version
207
207
  version: '0'
208
208
  required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  requirements:
210
- - - ! '>='
210
+ - - ">="
211
211
  - !ruby/object:Gem::Version
212
212
  version: '0'
213
213
  requirements: []