proactive_support 0.0.1 → 0.0.2
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 +13 -5
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -4
- data/lib/proactive_support.rb +4 -1
- data/lib/proactive_support/adapters/alert.rb +9 -0
- data/lib/proactive_support/mgmt/alerts.rb +26 -0
- data/lib/proactive_support/version.rb +1 -1
- metadata +11 -9
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
Yzg4NDViMTJhNDMxMjMyY2FhNTkwYWY0NDg4N2ZlMzYxMDI4NTNjOQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NjM5ZjQwNzFmOWE5YmYxZWQ5NzIwMzUzM2Q5ZTY0ZDUwZWRhMTIxMA==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
Mzc5ZGY3OTExMzcwMzQ0MTM1MWY5MTkwMDQ3MjFiOTY2YTM4M2ZmYjkyN2Fh
|
10
|
+
NzE2N2Q2ZTViNTNlMWYwNGIzNmZiZmU5MjY1ZDI3OTcwNTJhNDY0MGI5MTcw
|
11
|
+
ZDVlODBiMDY0ZjY2NjY1ZGJkYWQ3ODEzNzUzNGY0YWE3MjJjZTY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YjNmNmJjYzFhMGUxZWVjZjMyNjIxOWFhODdhMjRjYTRkNTBiZGEwNDNhYzhl
|
14
|
+
ZTI0OTljMDNlYzJmZWU1NDIyNWYyZmFhMDk1NTM2MGJjODdmZTFiY2M0NzBh
|
15
|
+
MDk2YzYzMDc3ZDRmYjA5Y2UwOTA4N2M2YzZiMjQ0OWY4YzFkNjI=
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/lib/proactive_support.rb
CHANGED
@@ -12,8 +12,10 @@ module ProactiveSupport
|
|
12
12
|
autoload :Note, ::File.expand_path('../../app/models/proactive_support/note.rb', __FILE__)
|
13
13
|
autoload :Flag, ::File.expand_path('../../app/models/proactive_support/flag.rb', __FILE__)
|
14
14
|
|
15
|
+
class AlertAdapterNotConfigured < ::StandardError; end
|
16
|
+
|
15
17
|
class Configuration
|
16
|
-
attr_accessor :transient_expiration
|
18
|
+
attr_accessor :transient_expiration, :alert_adapter
|
17
19
|
end
|
18
20
|
|
19
21
|
class << self
|
@@ -43,3 +45,4 @@ end
|
|
43
45
|
|
44
46
|
require 'proactive_support/mgmt/flags'
|
45
47
|
require 'proactive_support/mgmt/notes'
|
48
|
+
require 'proactive_support/mgmt/alerts'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module ProactiveSupport
|
2
|
+
module Mgmt
|
3
|
+
class Alerts
|
4
|
+
class << self
|
5
|
+
def info(customer_id, message, options = {})
|
6
|
+
create 'info', customer_id, message, options
|
7
|
+
end
|
8
|
+
|
9
|
+
def warn(customer_id, message, options = {})
|
10
|
+
create 'warn', customer_id, message, options
|
11
|
+
end
|
12
|
+
|
13
|
+
def error(customer_id, message, options = {})
|
14
|
+
create 'error', customer_id, message, options
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def create(level, customer_id, message, options)
|
20
|
+
raise ::ProactiveSupport::AlertAdapterNotConfigured if ::ProactiveSupport.configuration.alert_adapter.nil?
|
21
|
+
::ProactiveSupport.configuration.alert_adapter.new.create(level, customer_id, message, options)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proactive_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Frank
|
@@ -14,28 +14,28 @@ dependencies:
|
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Proactive Support module.
|
@@ -45,8 +45,8 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
-
|
49
|
-
-
|
48
|
+
- .gitignore
|
49
|
+
- .ruby-gemset
|
50
50
|
- Gemfile
|
51
51
|
- Gemfile.lock
|
52
52
|
- MIT-LICENSE
|
@@ -71,7 +71,9 @@ files:
|
|
71
71
|
- example/app/views/proactive_support/notes/show.html.erb
|
72
72
|
- lib/proactive-support.rb
|
73
73
|
- lib/proactive_support.rb
|
74
|
+
- lib/proactive_support/adapters/alert.rb
|
74
75
|
- lib/proactive_support/engine.rb
|
76
|
+
- lib/proactive_support/mgmt/alerts.rb
|
75
77
|
- lib/proactive_support/mgmt/flags.rb
|
76
78
|
- lib/proactive_support/mgmt/notes.rb
|
77
79
|
- lib/proactive_support/version.rb
|
@@ -127,12 +129,12 @@ require_paths:
|
|
127
129
|
- lib
|
128
130
|
required_ruby_version: !ruby/object:Gem::Requirement
|
129
131
|
requirements:
|
130
|
-
- -
|
132
|
+
- - ! '>='
|
131
133
|
- !ruby/object:Gem::Version
|
132
134
|
version: '0'
|
133
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
136
|
requirements:
|
135
|
-
- -
|
137
|
+
- - ! '>='
|
136
138
|
- !ruby/object:Gem::Version
|
137
139
|
version: '0'
|
138
140
|
requirements: []
|