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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b85417a19a572d31ba7b9b8189e5e68d7713adef
4
- data.tar.gz: 45a8486a13282a99514bfa793d5cf9a0c13515ab
3
+ metadata.gz: 327e424a71b1501fba2b73c2168b02f7f8fa9c5d
4
+ data.tar.gz: 1b195cf51302eb1cd1294366204a6ee4a8f7717f
5
5
  SHA512:
6
- metadata.gz: c2ecef724413e9d1f9470a7af054a06395a8c9907b74dc6e4adce3cf93cd82bcee3dd61e2fc57c1a9cd2d1c6a82e877bacecec262536523c64c36253847fec79
7
- data.tar.gz: cc50fece87690cf8f377844d957c7d253b176924fc5b555b9002502a555a35f8d9fdd81c8d9df3b67950b1f7ebaadfc8856099a0ce3f98fd7211f479fbef40b1
6
+ metadata.gz: aeb98ae2a391d9ffda65aa1ea17055590ab51048952c82dfc4d66a259f76ab041e9d7f28de97b0d7876bcb66eedfe14aa3a16c9181f7f08fbd2522c9907806f2
7
+ data.tar.gz: ea5f01d8586576879c85af87ecd2527923a1e58e60ba757948739d83fa8b6673c8257199a248ab533a0b74c5c67eba4377f9433d7df5911c8c5d28c1c5ef8cd5
data/CHANGELOG.markdown CHANGED
@@ -1,2 +1,3 @@
1
+ #### 0.0.3
1
2
  #### 0.0.2
2
3
  #### 0.0.1
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. Push to the branch (`git push origin my-new-feature`)
34
- 5. Create a new Pull Request
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module LogstashScribbler
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  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.2
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-16 00:00:00.000000000 Z
11
+ date: 2015-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-event