le 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LE.gemspec +1 -1
- data/lib/le.rb +21 -21
- metadata +9 -12
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c081b6d0353c9aa254c632712734cd964c9b6e78
|
4
|
+
data.tar.gz: da38d455bede20fb74aa72a88e50a67290254675
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0039c3cbedb594d9c09fdc3fea6eed429323f28787a8870851ae6ecdb73fe93a2648035e7edd53546024cfc37c8096848dbd3e25e9a15678e27212c77b7bb910
|
7
|
+
data.tar.gz: b3196c854ca3357cdded9f00c5f4eefe345a3a197715a2bddf5bbbd13a70bd979b7b78cb8e9a76b72dcd329fe33bdcdd0b11dafd642633175575cc9e18aebf3f
|
data/LE.gemspec
CHANGED
data/lib/le.rb
CHANGED
@@ -4,36 +4,36 @@ require 'logger'
|
|
4
4
|
|
5
5
|
module Le
|
6
6
|
|
7
|
-
|
7
|
+
def self.new(token, options={})
|
8
8
|
|
9
|
-
|
9
|
+
self.checkParams(token)
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
opt_local = options[:local] || false
|
12
|
+
opt_debug = options[:debug] || false
|
13
|
+
opt_ssl = options[:ssl] || false
|
14
|
+
opt_log_level = options[:log_level] || Logger::DEBUG
|
15
15
|
|
16
|
-
|
16
|
+
host = Le::Host.new(token, opt_local, opt_debug, opt_ssl)
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
if defined?(ActiveSupport::TaggedLogging)
|
19
|
+
logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(host))
|
20
|
+
elsif defined?(ActiveSupport::Logger)
|
21
|
+
logger = ActiveSupport::Logger.new(host)
|
22
|
+
logger.formatter = host.formatter if host.respond_to?(:formatter)
|
23
|
+
else
|
24
|
+
logger = Logger.new(host)
|
25
|
+
logger.formatter = host.formatter if host.respond_to?(:formatter)
|
26
|
+
end
|
23
27
|
|
24
|
-
|
25
|
-
|
26
|
-
if host.respond_to?(:formatter)
|
27
|
-
logger.formatter = host.formatter
|
28
|
-
end
|
28
|
+
logger.level = opt_log_level
|
29
29
|
|
30
|
-
|
31
|
-
|
30
|
+
logger
|
31
|
+
end
|
32
32
|
|
33
|
-
|
33
|
+
def self.checkParams(token)
|
34
34
|
# Check if the key is valid UUID format
|
35
35
|
if (token =~ /\A(urn:uuid:)?[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12}\z/i) == nil
|
36
36
|
puts "\nLE: It appears the LOGENTRIES_TOKEN you entered is invalid!\n"
|
37
37
|
end
|
38
|
-
|
38
|
+
end
|
39
39
|
end
|
metadata
CHANGED
@@ -1,50 +1,47 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: le
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
5
|
-
prerelease:
|
4
|
+
version: 2.2.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Mark Lacomber (Logentries)
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-03-27 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
|
-
description:
|
13
|
+
description: |2+
|
15
14
|
|
16
|
-
'
|
17
15
|
email: marklacomber@gmail.com
|
18
16
|
executables: []
|
19
17
|
extensions: []
|
20
18
|
extra_rdoc_files: []
|
21
19
|
files:
|
22
20
|
- LE.gemspec
|
23
|
-
- ./lib/le.rb
|
24
21
|
- ./lib/le/host.rb
|
25
22
|
- ./lib/le/host/http.rb
|
23
|
+
- ./lib/le.rb
|
26
24
|
homepage:
|
27
25
|
licenses: []
|
26
|
+
metadata: {}
|
28
27
|
post_install_message:
|
29
28
|
rdoc_options: []
|
30
29
|
require_paths:
|
31
30
|
- lib
|
32
31
|
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
32
|
requirements:
|
35
|
-
- -
|
33
|
+
- - '>='
|
36
34
|
- !ruby/object:Gem::Version
|
37
35
|
version: '0'
|
38
36
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
37
|
requirements:
|
41
|
-
- -
|
38
|
+
- - '>='
|
42
39
|
- !ruby/object:Gem::Version
|
43
40
|
version: '0'
|
44
41
|
requirements: []
|
45
42
|
rubyforge_project:
|
46
|
-
rubygems_version: 1.8
|
43
|
+
rubygems_version: 2.1.8
|
47
44
|
signing_key:
|
48
|
-
specification_version:
|
45
|
+
specification_version: 4
|
49
46
|
summary: Logentries plugin
|
50
47
|
test_files: []
|