monitor_me 0.1.1 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b37893b505f1083e76f1609d3e50289ebbae8c1400c69737990ba85f70d9df9
4
- data.tar.gz: 312980926d794d7b64d4fce50550c7cf9083648dd5f5d30bd03c579f89e09c05
3
+ metadata.gz: 3eb6fa6bcda802aec02ee57e951a7e9762e091742f0805dcb9844c0821f1455e
4
+ data.tar.gz: 3cb7e64dc863368c7de7ee0f3b0fb237008b8da8f51f9f73333eda6bb4e7b6af
5
5
  SHA512:
6
- metadata.gz: 423bded64be59faad6bc5ef59fe1eb1b171bbd73765e4c5698de9f08a5d6173d3a30d53c2332f9b35f2001fd789810fcd3b57f179a79319c4192b88d6ceca336
7
- data.tar.gz: 2baf340c017cdc9b43262a8143c316ef745b8f1e9fc1d7a762cc364c386f0d42fcce12298855364226104bd06aa6f04800ce202edf747816b46f5756a187400b
6
+ metadata.gz: 8aef5a5a38f89704a9b77a1b6b6935e323affc74c04645bfa6eea5f34ce4f720ff2f9a2ba4957619c56cb84cb875402cb03f020fb52b07b87f3ebbed882d9de5
7
+ data.tar.gz: 41b53d13739505b2c1ddfbb36040b8f85cc746fb368f9a7388d3330b9b3f8f9cbf577deb3af279ec03c889ed19e23195887ca927303c9f305225ce3bb1cb9dd1
@@ -1,3 +1,3 @@
1
1
  class MonitorMe
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.4'
3
3
  end
data/lib/monitor_me.rb CHANGED
@@ -1,17 +1,18 @@
1
1
  require "monitor_me/version"
2
2
 
3
3
  class MonitorMe
4
- attr_accessor :apikey
5
- def initialize(apikey)
6
- @apikey = apikey
7
- end
8
4
 
9
- def log_error(record)
10
- print "LOGGIN ERROR FOR #{record.class.name} RECORD"
11
- print record.errors.full_messages
5
+ def self.log_error(record)
6
+ if MONITOR_APIKEY.blank?
7
+ print "Oops. Cannot send response without apikey. Please provide an apikey in this format in config/environments/*.rb:"
8
+ print "MONITOR_APIKEY = 'apikey' # note it is strongly recommended to use ENV variables in non-development environments!"
9
+ else
10
+ print "LOGGIN ERROR FOR #{record.class.name} RECORD"
11
+ print record.errors.full_messages
12
+ end
12
13
  end
13
14
 
14
- def print_api_key_global
15
+ def self.print_api_key_global
15
16
  print "#{MONITOR_APIKEY}" unless MONITOR_APIKEY.blank?
16
17
  end
17
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monitor_me
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Charette