logstash_scribbler 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +1 -0
- data/README.md +4 -2
- data/lib/logstash_scribbler.rb +0 -8
- data/lib/logstash_scribbler/message.rb +3 -1
- data/lib/logstash_scribbler/version.rb +1 -1
- data/spec/logstash_scribbler_spec.rb +0 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 327e424a71b1501fba2b73c2168b02f7f8fa9c5d
|
4
|
+
data.tar.gz: 1b195cf51302eb1cd1294366204a6ee4a8f7717f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeb98ae2a391d9ffda65aa1ea17055590ab51048952c82dfc4d66a259f76ab041e9d7f28de97b0d7876bcb66eedfe14aa3a16c9181f7f08fbd2522c9907806f2
|
7
|
+
data.tar.gz: ea5f01d8586576879c85af87ecd2527923a1e58e60ba757948739d83fa8b6673c8257199a248ab533a0b74c5c67eba4377f9433d7df5911c8c5d28c1c5ef8cd5
|
data/CHANGELOG.markdown
CHANGED
data/README.md
CHANGED
@@ -30,5 +30,7 @@ config.template = LogstashScribbler.template
|
|
30
30
|
1. Fork it ( https://github.com/[my-github-username]/logstash_scribbler/fork )
|
31
31
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
32
32
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
33
|
-
4.
|
34
|
-
5.
|
33
|
+
4. Write Tests
|
34
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
35
|
+
6. Create a new Pull Request
|
36
|
+
7. Make sure tests pass
|
data/lib/logstash_scribbler.rb
CHANGED
@@ -4,15 +4,7 @@ require "logstash_scribbler/message"
|
|
4
4
|
module LogstashScribbler
|
5
5
|
def self.template
|
6
6
|
lambda do |options|
|
7
|
-
load_dependencies
|
8
7
|
LogstashScribbler::Message.new(options).log
|
9
8
|
end
|
10
9
|
end
|
11
|
-
|
12
|
-
def self.load_dependencies
|
13
|
-
require 'logstash-event'
|
14
|
-
rescue LoadError
|
15
|
-
puts 'You need to install the logstash-event gem to use the logstash output.'
|
16
|
-
raise
|
17
|
-
end
|
18
10
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'logstash-event'
|
2
|
+
|
1
3
|
module LogstashScribbler
|
2
4
|
class Message
|
3
5
|
attr_reader :error, :message, :custom_fields, :object
|
@@ -38,7 +40,7 @@ module LogstashScribbler
|
|
38
40
|
end
|
39
41
|
|
40
42
|
def is_active_record?(object)
|
41
|
-
object.is_a?(ActiveRecord::Base)
|
43
|
+
defined?(ActiveRecord::Base) && object.is_a?(ActiveRecord::Base)
|
42
44
|
end
|
43
45
|
end
|
44
46
|
end
|
@@ -19,10 +19,4 @@ describe LogstashScribbler do
|
|
19
19
|
LogstashScribbler.template.call({:message => "FooFoo Bar"})
|
20
20
|
end
|
21
21
|
|
22
|
-
it "calls .load_dependencies" do
|
23
|
-
expect(LogstashScribbler).to receive(:load_dependencies).once
|
24
|
-
LogstashScribbler.template.call({:message => "FooFoo Bar"})
|
25
|
-
end
|
26
|
-
|
27
|
-
|
28
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash_scribbler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Hursh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-event
|