simple_cloud_logging 1.1.12 → 1.1.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/remotelogger.rb +8 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c20002408a629e79101a4d4a1e30856e6d3e314
4
- data.tar.gz: 2b6b80269f0455d2218b9bf143a7cf4c919517fc
3
+ metadata.gz: 085b61709dee222254d56b36ab1758a03fe28598
4
+ data.tar.gz: be3419091b1a7e658bbf4df854c0849a4bf12d09
5
5
  SHA512:
6
- metadata.gz: b99853e73c8c10d5b6e55857956a83e5785f58c709b790112c7db8cc78ec08376d4e47f776de3daaa73317615b631c6194e68cbdbb2bc4ffd8e5816b410ade38
7
- data.tar.gz: 91bc248dc9c826fbfc2c2b38f431e4222573296f76a74dbd8ba832faab32ce22f5f3ba02d8cff2b56f75d2af91c1c317eca3056b0c33717bd0862430526e2062
6
+ metadata.gz: 210e11498d59d37d57429cae4627183cf6cdff7efc8d78c44ec0d01a16bfc351834de8cc13bf67fbe5b8cb7f4b56d62f59678459e313246b171f042a34e3c0a8
7
+ data.tar.gz: b4a1d74913f0d9bb02d58b241a985a7e990379bb83b98b5f2a78bdb817c5695f38785731f68983b04c708fe8d78d5974e7443c138ab7915dcbadbd96db71003d
data/lib/remotelogger.rb CHANGED
@@ -1,18 +1,19 @@
1
1
  module BlackStack
2
2
  require_relative './baselogger'
3
3
  class RemoteLogger < BlackStack::BaseLogger
4
- attr_accessor :api_url, :api_port, :api_key
4
+ attr_accessor :api_protocol, :api_domain, :api_port, :api_key
5
5
 
6
- def initialize(the_filename, the_api_url, the_api_port, the_api_key)
6
+ def initialize(the_filename, the_api_protocol, the_api_domain, the_api_port, the_api_key)
7
7
  super(the_filename)
8
- self.api_url = the_api_url
8
+ self.api_protocol = the_api_protocol
9
+ self.api_domain = the_api_domain
9
10
  self.api_port = the_api_port
10
11
  self.api_key = the_api_key
11
12
  end
12
13
 
13
14
  def log(s, datetime=nil)
14
15
  ltext = super(s, datetime)
15
- url = "#{self.api_url}:#{self.api_port}/api1.4/scl/log.json"
16
+ url = "#{self.api_protocol}://#{self.api_domain}:#{self.api_port.to_s}/api1.4/scl/log.json"
16
17
  res = BlackStack::Netting::api_call(url, {
17
18
  'api_key' => self.api_key,
18
19
  'filename' => self.filename,
@@ -24,7 +25,7 @@ module BlackStack
24
25
 
25
26
  def logs(s, datetime=nil)
26
27
  ltext = super(s, datetime)
27
- url = "#{self.api_url}:#{self.api_port}/api1.4/scl/log.json"
28
+ url = "#{self.api_protocol}://#{self.api_domain}:#{self.api_port.to_s}/api1.4/scl/log.json"
28
29
  res = BlackStack::Netting::api_call(url, {
29
30
  'api_key' => self.api_key,
30
31
  'filename' => self.filename,
@@ -36,7 +37,7 @@ module BlackStack
36
37
 
37
38
  def logf(s, datetime=nil)
38
39
  ltext = super(s, datetime)
39
- url = "#{self.api_url}:#{self.api_port}/api1.4/scl/log.json"
40
+ url = "#{self.api_protocol}://#{self.api_domain}:#{self.api_port.to_s}/api1.4/scl/log.json"
40
41
  res = BlackStack::Netting::api_call(url, {
41
42
  'api_key' => self.api_key,
42
43
  'filename' => self.filename,
@@ -47,7 +48,7 @@ module BlackStack
47
48
  end
48
49
 
49
50
  def release()
50
- url = "#{self.api_url}:#{self.api_port}/api1.4/scl/release.json"
51
+ url = "#{self.api_url}:#{self.api_port.to_s}/api1.4/scl/release.json"
51
52
  res = BlackStack::Netting::api_call(url, {
52
53
  'api_key' => self.api_key,
53
54
  'filename' => self.filename,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_cloud_logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.12
4
+ version: 1.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi