monitor_me 0.1.0 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/lib/monitor_me/version.rb +1 -1
- data/lib/monitor_me.rb +15 -9
- data/monitor_me.gemspec +2 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '04877ef867d24081dde04954662ee9d790945f815e838e67895e040e88ae6642'
|
4
|
+
data.tar.gz: acc173212e41d01c8748748a86500233df06724403da843daed3382974f2b39b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b4c26b463501b9a39bcd3c185ca65937e172568498051de276b2e03fddc5e13cd3e64d2214e9767e7afe9b062a308195bfc60add4b794654c138d8026573da2
|
7
|
+
data.tar.gz: 3bdcec0f03812335f6b2c222feb2b67a8858ef6de76ffc5d17c699658360dbf7b4f7c2d396b628bbc44e013fe1acb4fbd1d776c9ff3087cf72eb264839f520b6
|
data/Gemfile
CHANGED
data/lib/monitor_me/version.rb
CHANGED
data/lib/monitor_me.rb
CHANGED
@@ -1,17 +1,23 @@
|
|
1
1
|
require "monitor_me/version"
|
2
|
+
require 'colorize'
|
2
3
|
|
3
4
|
class MonitorMe
|
4
|
-
attr_accessor :apikey
|
5
|
-
def initialize(apikey)
|
6
|
-
@apikey = apikey
|
7
|
-
end
|
8
5
|
|
9
|
-
def
|
10
|
-
|
6
|
+
def self.log_error(record)
|
7
|
+
if MONITOR_APIKEY.nil? || MONITOR_APIKEY.empty?
|
8
|
+
puts "Oops. Cannot send response without apikey.".red
|
9
|
+
puts "Please provide an apikey in this format in config/environments/*.rb:"
|
10
|
+
puts "\nMONITOR_APIKEY = 'apikey' # note it is strongly recommended to use ENV variables in non-development environments!"
|
11
|
+
else
|
12
|
+
puts "LOGGIN ERROR FOR #{record.class.name} RECORD\n".yellow
|
13
|
+
record.errors.full_messages.each do |error|
|
14
|
+
puts error.red
|
15
|
+
end
|
16
|
+
puts record.to_yaml
|
17
|
+
end
|
11
18
|
end
|
12
19
|
|
13
|
-
def
|
14
|
-
|
15
|
-
print record.errors.full_messages
|
20
|
+
def self.puts_api_key_global
|
21
|
+
puts "#{MONITOR_APIKEY}" unless MONITOR_APIKEY.blank?
|
16
22
|
end
|
17
23
|
end
|
data/monitor_me.gemspec
CHANGED
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.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Charette
|
@@ -9,7 +9,21 @@ autorequire:
|
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2022-05-14 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: colorize
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
description:
|
14
28
|
email:
|
15
29
|
- charettesa19@gmail.com
|