pingr 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pingr.rb +9 -1
- data/lib/pingr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 202bec9aa3e4a90f435d5d66eb1fd319a7356e885d68d9fa226ae064188647c1
|
4
|
+
data.tar.gz: 2b2fe5e03ae5f8cd563dc464be12f58eb371ab4777ef6474bf11aa00e260eb20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2b29b545c208d2f5e981fe14da19932f92aca1848c622f8600a5f624a3beeadcb737cebfa26fa5395b4c835659663f8e70019eed52c01cbd810b09f09a48680
|
7
|
+
data.tar.gz: 3e08b3f97fae4f82fe9753670a0948f79f099c99290d208b0464d0fcc6f39ca353fecf0e794aa7ea2c011a25a0489c9ef0bdc33a1a401fae9cda85b4bc13f9e5
|
data/lib/pingr.rb
CHANGED
@@ -4,6 +4,10 @@ require 'pingr/version'
|
|
4
4
|
require 'pingr/request'
|
5
5
|
|
6
6
|
module Pingr
|
7
|
+
|
8
|
+
require 'logger'
|
9
|
+
|
10
|
+
|
7
11
|
# Exceptions raised from within Pingr are of this class
|
8
12
|
class PingrError < StandardError; end
|
9
13
|
|
@@ -37,7 +41,11 @@ module Pingr
|
|
37
41
|
#
|
38
42
|
# Returns a Logger object. By default, the log clears itself every week
|
39
43
|
def self.logger
|
40
|
-
@logger ||=
|
44
|
+
@logger ||= if defined?(Rails)
|
45
|
+
Rails.logger
|
46
|
+
else
|
47
|
+
Logger.new(logger_name, shift_age = 'weekly')
|
48
|
+
end
|
41
49
|
end
|
42
50
|
|
43
51
|
# Public: Sets the logger to be used.
|
data/lib/pingr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pingr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bodacious
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|