monitor_me 0.1.0 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21d22d02a97b1997bcda172b40212e0928ff4bf2c2d02f2b92257fa6f0024c70
4
- data.tar.gz: a2b0300e1de5be899c0a95dde87347b6bc625127dca27fb0e9912ddf1a79e058
3
+ metadata.gz: ff4a8de2e94dc1fcc303eb0c6cfa5498965eb706bfca92e5522de6c4b1b31a86
4
+ data.tar.gz: 53e3427957cdf8f449aa9d6ad31d92e5c6f3499cd1f8a23b407fe843dc5484ad
5
5
  SHA512:
6
- metadata.gz: 6bbe110f0a0719cc0754a610b12d302279b5dd22437a2d580e0f8dbd1f8262e92e36f2fe34793553531ac45f75d5f21ec788c20d426dbf93537ac1e4d3999373
7
- data.tar.gz: c458af612c720cda6f1f4f060b1348bf43c600346979bf4b26f384ba0c5426b7b442a6ba960e10f571c948e40cc7cdb47723b1d694b455ccbe963303db17cd79
6
+ metadata.gz: 333fad8871bb6cf601d3dc836b1480773775ccb6f93adfdcc83593d6456dc54fd12029eb2b0f3df22ac041af305b22a6784d10f82366890e40de967b6dc3bc6b
7
+ data.tar.gz: 401ee0fbb5d1dcaa5d6914dbdf7c19d331a1d79031f23a7081dd80465dc43ead898661286d099b6cad9c724c7d1912f7b3ed6eddcc7cfe61657491a9e2cf5319
@@ -1,3 +1,3 @@
1
1
  class MonitorMe
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.3'
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 print_api_key
10
- print "APIKEY: #{apikey}"
5
+ def 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
11
13
  end
12
14
 
13
- def log_error(record)
14
- print "LOGGIN ERROR FOR #{record.class.name} RECORD"
15
- print record.errors.full_messages
15
+ def self.print_api_key_global
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.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Charette