pingr 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pingr.rb +9 -1
  3. data/lib/pingr/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5aafdc1569dd1d154d3aea5788cf65838b1308a21eb9761ccb9d2087745bc3de
4
- data.tar.gz: b3576e36e8d3065a62e788c7ddeec45ad58de1aaa55a7b34dcd487079b87f116
3
+ metadata.gz: 202bec9aa3e4a90f435d5d66eb1fd319a7356e885d68d9fa226ae064188647c1
4
+ data.tar.gz: 2b2fe5e03ae5f8cd563dc464be12f58eb371ab4777ef6474bf11aa00e260eb20
5
5
  SHA512:
6
- metadata.gz: cea8d57221a83b3f187392835e14e6561d183dd60d18dab4a232ac90cb41c0eebba6faa90a1fc1a61cdcc8a547af5b848b625042166ac1c5a5f45384f3137b15
7
- data.tar.gz: 34d51c7cb94c67244720bebe174f75e0b36ca210c7ef8a9f0ad987f915dc626276949cd7044720ff30488a5ab62482e9fd375968b7871d5f8e8b8aaaefc833dd
6
+ metadata.gz: c2b29b545c208d2f5e981fe14da19932f92aca1848c622f8600a5f624a3beeadcb737cebfa26fa5395b4c835659663f8e70019eed52c01cbd810b09f09a48680
7
+ data.tar.gz: 3e08b3f97fae4f82fe9753670a0948f79f099c99290d208b0464d0fcc6f39ca353fecf0e794aa7ea2c011a25a0489c9ef0bdc33a1a401fae9cda85b4bc13f9e5
@@ -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 ||= Logger.new(logger_name, shift_age = 'weekly')
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pingr
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
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.0
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-17 00:00:00.000000000 Z
11
+ date: 2020-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake