log-warrior 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3eee7a9375d7f595a529b09e9aabebee543ed5614e6278b4b4fa7ea72a4b5f6a
4
- data.tar.gz: 47f73ba99ab9d90f1c30fbe0fa5bef84d70511919ca3917248aa7d95462627b0
3
+ metadata.gz: 2fc2f1b53c8a11bec2a00dc5a6ac8c81c5edbad4a6276f7f36982572b7a19e38
4
+ data.tar.gz: da548b279e1d8c537f7fb43b27a0ef264f62d4e25179f22df765e2de097fd76d
5
5
  SHA512:
6
- metadata.gz: 6c4b65df63c7da400feac30bcf2c24ad4517e64543d94b27db3a2f15d38b44e13686f42de3a1ee9a1ec04c3ec41915f1d94cfc4684c30bb5a338f67ae3976098
7
- data.tar.gz: 2ffb9a70ae529dc56da280f701926611837bf063769cc5a2c96367880264e6a210e3e7b0caa9a7beb45ce13ce7c26a81c2051f6baf0794ff72abf1d97015e7f8
6
+ metadata.gz: 62b11540e4f86c3ae216d595476d05a601b7e5b0e77d13788895a8a75ff048d6805f89552b77bbca129c2f12dd5a9fefbfc8a59daeac9276606203288021fc55
7
+ data.tar.gz: 217aa97e72c50de058e4742c66f3f587cbbc193bc9c20e4d0035164bd375612fc5c0abd6addb5b206f1f5ee4a546339a53b6a3909b403d5ceffd9031a81f8e4e
data/lib/log/warrior.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "warrior/version"
4
4
  require_relative "warrior/configuration"
5
+ require_relative "warrior/logger"
5
6
 
6
7
  module Log
7
8
  module Warrior
@@ -13,6 +14,7 @@ module Log
13
14
 
14
15
  def self.configuration
15
16
  @configuration ||= Configuration.new
17
+ @logger = Logger.new
16
18
  end
17
19
 
18
20
  def self.reset
@@ -23,6 +25,10 @@ module Log
23
25
  yield(configuration)
24
26
  end
25
27
 
28
+ def self.push(log_type: nil, application: nil, url: nil, headers: nil, body: nil, response: nil)
29
+ @logger.push(log_type, application, url, headers, body, response)
30
+ end
31
+
26
32
 
27
33
 
28
34
  # http://lizabinante.com/blog/creating-a-configurable-ruby-gem/
@@ -12,7 +12,7 @@ module Log
12
12
  @collection = @connection[@collection_name]
13
13
  end
14
14
 
15
- def self.create(log_type: nil, application: nil, url: nil, headers: nil, body: nil, response: nil)
15
+ def self.push(log_type: nil, application: nil, url: nil, headers: nil, body: nil, response: nil)
16
16
  res = @collection.insert_one({
17
17
  log_type: log_type,
18
18
  application: application,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Log
4
4
  module Warrior
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log-warrior
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - dhian alyusi