soar_auditing_format 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: 63b94935c99264de5ac0f5a9fb0b88ce2f1718b4
4
- data.tar.gz: 7397a4fff409fa113cfd28b2e7a3a5288921bf58
3
+ metadata.gz: d1b22f9811633feafb8afc432cdbe51c9b59eba5
4
+ data.tar.gz: 1de132eb1255a1724aa283a11de76f56d76d7160
5
5
  SHA512:
6
- metadata.gz: 20f98f028dc46a3dcc30d774810a06cd4c4c46776b764b1bd940fe79c992e3575b96046578e3639e5f494bc74e669f360ea15b1fa55052898dd2a802519c8223
7
- data.tar.gz: 7b596173ba504e477b029af241326eab01920e5489b3499e3ae82f1cc67b6547f01751a22c49fdc0689911393ca76ea86d384310b94f69aa33b9a173c40851e8
6
+ metadata.gz: cea74740591a49b52165bbf1f457421d8dcbe8503ebb14e0c37862c7b2b265ab35ef2f5816f59be59207c705e113f20a66344f93d11baaf3d9c07e7a20aba2ff
7
+ data.tar.gz: b05cdf9130bd8da727bb461b71f9c354820998333fd7d4547c6480afc2d5e72e8b4bd85a26d13e392f1a003e3b549dbe19e3974dc42d9900642c47e2b0fc7b6b
data/README.md CHANGED
@@ -48,7 +48,7 @@ require 'securerandom'
48
48
  class Main
49
49
  def test_sanity
50
50
  my_optional_field = SoarAuditingFormatter::Formatter.optional_field_format("somekey", "somevalue")
51
- puts SoarAuditingFormatter::Formatter.format(:error,SecureRandom.hex(32),Time.now,"#{my_optional_field} message")
51
+ puts SoarAuditingFormatter::Formatter.format(:error,SecureRandom.hex(32),Time.now.utc.iso8601(3),"#{my_optional_field} message")
52
52
  end
53
53
  end
54
54
 
@@ -56,6 +56,12 @@ main = Main.new
56
56
  main.test_sanity
57
57
  ```
58
58
 
59
+ The formatted output of the example above will be something like this:
60
+
61
+ ``` bash
62
+ error,9241cee6f0368942202d4d0e22ac09cde6c88446137c8c48e4eb053a703855f8,2016-05-27T08:40:27.087Z,[somekey:somevalue] message
63
+ ```
64
+
59
65
  ## Contributing
60
66
 
61
67
  Bug reports and feature requests are welcome by email to barney dot de dot villiers at hetzner dot co dot za. This gem is sponsored by Hetzner (Pty) Ltd (http://hetzner.co.za)
@@ -1,7 +1,6 @@
1
1
  require 'time'
2
2
 
3
3
  module SoarAuditingFormatter
4
- #TODO check if we can do "#{field} here "
5
4
  FORMAT="%s,%s,%s,%s" unless defined? FORMAT; FORMAT.freeze
6
5
  OPTIONAL_FIELD_FORMAT = "[%s:%s]" unless defined? OPTIONAL_FIELD_FORMAT; OPTIONAL_FIELD_FORMAT.freeze
7
6
 
@@ -1,3 +1,3 @@
1
1
  module SoarAuditingFormatter
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/sanity/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'byebug'
4
- gem 'soar_auditing_format', "~> 0.0.2"
4
+ gem 'soar_auditing_format', "~> 0.0.3"
data/sanity/sanity.rb CHANGED
@@ -5,7 +5,7 @@ require 'securerandom'
5
5
  class Main
6
6
  def test_sanity
7
7
  my_optional_field = SoarAuditingFormatter::Formatter.optional_field_format("somekey", "somevalue")
8
- puts SoarAuditingFormatter::Formatter.format(:error,SecureRandom.hex(32),Time.now,"#{my_optional_field} message")
8
+ puts SoarAuditingFormatter::Formatter.format(:error,SecureRandom.hex(32),Time.now.utc.iso8601(3),"#{my_optional_field} message")
9
9
  end
10
10
  end
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar_auditing_format
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
  - Barney de Villiers