le 2.7.0 → 2.7.1
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 +4 -4
- data/LE.gemspec +1 -1
- data/README.md +4 -0
- data/lib/le/host.rb +2 -3
- data/lib/le/host/http.rb +4 -4
- data/test/host_spec.rb +3 -2
- 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: 9d7dc0d828ccd0a2da4e17ba3ad4c1678d301d88
|
4
|
+
data.tar.gz: 231712fa4e9a2247970bf5ee580c2ae32743a842
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0784b859a1ba71690740c396bb452c4dfe68e5078e82e2f1b8363c6a0c44b362dd401f27ab1f78c81694a7afd6694bdc5772c0abc61d36db4a77ea707a4368f
|
7
|
+
data.tar.gz: 31175cb4822f6d06bd6fa2456ea6760c2f14e37230242b0e9e5ca69afd52062cd01e99f416ba545998e8f4ae969b48adad451973ee1216d8d166a5efea286f7c
|
data/LE.gemspec
CHANGED
data/README.md
CHANGED
@@ -79,6 +79,10 @@ a UDP connection. Additionally, when connecting via UDP, be sure to specify a po
|
|
79
79
|
|
80
80
|
Rails.logger = Le.new('', :udp_port => 13287)
|
81
81
|
|
82
|
+
Users have the option of using `data.logentries.com` which uses ports 80 and 443 for insecure and secure connections respectively.
|
83
|
+
|
84
|
+
Rails.logger = Le.new('', :data_endpoint => true)
|
85
|
+
|
82
86
|
|
83
87
|
|
84
88
|
Step for setting up DataHub
|
data/lib/le/host.rb
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
module Le
|
2
2
|
module Host
|
3
3
|
|
4
|
-
|
5
|
-
def self.new(token, local, debug, ssl, datahub_endpoint, host_id, custom_host, udp_port)
|
4
|
+
def self.new(token, local, debug, ssl, datahub_endpoint, host_id, custom_host, udp_port, use_data_endpoint)
|
6
5
|
|
7
|
-
Le::Host::HTTP.new(token, local, debug, ssl, datahub_endpoint, host_id, custom_host, udp_port)
|
6
|
+
Le::Host::HTTP.new(token, local, debug, ssl, datahub_endpoint, host_id, custom_host, udp_port, use_data_endpoint)
|
8
7
|
end
|
9
8
|
|
10
9
|
module InstanceMethods
|
data/lib/le/host/http.rb
CHANGED
@@ -20,10 +20,10 @@ module Le
|
|
20
20
|
|
21
21
|
include Le::Host::InstanceMethods
|
22
22
|
#! attr_accessor :token, :queue, :started, :thread, :conn, :local, :debug, :ssl, :datahub_enabled, :dathub_ip, :datahub_port, :host_id, :custom_host, :host_name_enabled, :host_name
|
23
|
-
attr_accessor :token, :queue, :started, :thread, :conn, :local, :debug, :ssl, :datahub_enabled, :datahub_ip, :datahub_port, :datahub_endpoint, :host_id, :host_name_enabled, :host_name, :custom_host, :udp_port, :
|
23
|
+
attr_accessor :token, :queue, :started, :thread, :conn, :local, :debug, :ssl, :datahub_enabled, :datahub_ip, :datahub_port, :datahub_endpoint, :host_id, :host_name_enabled, :host_name, :custom_host, :udp_port, :use_data_endpoint
|
24
24
|
|
25
25
|
|
26
|
-
def initialize(token, local, debug, ssl, datahub_endpoint, host_id, custom_host, udp_port,
|
26
|
+
def initialize(token, local, debug, ssl, datahub_endpoint, host_id, custom_host, udp_port, use_data_endpoint)
|
27
27
|
if local
|
28
28
|
device = if local.class <= TrueClass
|
29
29
|
if defined?(Rails)
|
@@ -41,7 +41,7 @@ module Le
|
|
41
41
|
@debug= debug
|
42
42
|
@ssl = ssl
|
43
43
|
@udp_port = udp_port
|
44
|
-
@
|
44
|
+
@use_data_endpoint = use_data_endpoint
|
45
45
|
|
46
46
|
@datahub_endpoint = datahub_endpoint
|
47
47
|
if !@datahub_endpoint[0].empty?
|
@@ -166,7 +166,7 @@ module Le
|
|
166
166
|
def openConnection
|
167
167
|
dbg "LE: Reopening connection to Logentries API server"
|
168
168
|
|
169
|
-
if @
|
169
|
+
if @use_data_endpoint
|
170
170
|
host = DATA_ENDPOINT
|
171
171
|
if @ssl
|
172
172
|
port = DATA_PORT_SECURE
|
data/test/host_spec.rb
CHANGED
@@ -5,15 +5,16 @@ describe Le::Host do
|
|
5
5
|
let(:token) { '11111111-2222-3333-aaaa-bbbbbbbbbbbb' }
|
6
6
|
let(:local) { false }
|
7
7
|
let(:debug) { false }
|
8
|
-
let(:ssl) {
|
8
|
+
let(:ssl) { true }
|
9
9
|
let(:udp_port){ nil }
|
10
10
|
|
11
11
|
let(:datahub_endpoint) { ["", 10000] }
|
12
12
|
let(:host_id) { ""}
|
13
13
|
let(:custom_host) { [false, ""]}
|
14
|
+
let(:data_endpoint) {true}
|
14
15
|
|
15
16
|
#let(:host) { Le::Host.new(token, local, debug, ssl) }
|
16
|
-
let(:host) { Le::Host.new(token, local, debug, ssl,
|
17
|
+
let(:host) { Le::Host.new(token, local, debug, ssl, udp_port)}
|
17
18
|
specify { host.must_be_instance_of Le::Host::HTTP }
|
18
19
|
|
19
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: le
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Lacomber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|