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 CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b39f93d0821904ce90f8701ebddb01815ab34741
4
- data.tar.gz: d490eddef2a9cb231cefa69ebf3212d060c2de70
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Yzg4NDViMTJhNDMxMjMyY2FhNTkwYWY0NDg4N2ZlMzYxMDI4NTNjOQ==
5
+ data.tar.gz: !binary |-
6
+ NjM5ZjQwNzFmOWE5YmYxZWQ5NzIwMzUzM2Q5ZTY0ZDUwZWRhMTIxMA==
5
7
  SHA512:
6
- metadata.gz: 8fdcbe8fef8f98911db3ef35522cb5a21a7531355a5a6949f0438d2befa8bfbbeab2f60eed7c62031ee8226181ada3b931bc5044bb8ee86f81fe184a4b27fd4f
7
- data.tar.gz: 613a6b7f5a1577d76d1d7e94d7ca225d86e167469cf23a78fca8efa441019caafc9fda1d5146bfe57ddf696a0244191cd7bd92f24fbe1a284f477929f0bfa788
8
+ metadata.gz: !binary |-
9
+ Mzc5ZGY3OTExMzcwMzQ0MTM1MWY5MTkwMDQ3MjFiOTY2YTM4M2ZmYjkyN2Fh
10
+ NzE2N2Q2ZTViNTNlMWYwNGIzNmZiZmU5MjY1ZDI3OTcwNTJhNDY0MGI5MTcw
11
+ ZDVlODBiMDY0ZjY2NjY1ZGJkYWQ3ODEzNzUzNGY0YWE3MjJjZTY=
12
+ data.tar.gz: !binary |-
13
+ YjNmNmJjYzFhMGUxZWVjZjMyNjIxOWFhODdhMjRjYTRkNTBiZGEwNDNhYzhl
14
+ ZTI0OTljMDNlYzJmZWU1NDIyNWYyZmFhMDk1NTM2MGJjODdmZTFiY2M0NzBh
15
+ MDk2YzYzMDc3ZDRmYjA5Y2UwOTA4N2M2YzZiMjQ0OWY4YzFkNjI=
data/.gitignore CHANGED
@@ -6,3 +6,4 @@ spec/dummy/db/*.sqlite3-journal
6
6
  spec/dummy/log/*.log
7
7
  spec/dummy/tmp/
8
8
  spec/dummy/.sass-cache
9
+ proactive_support-*.gem
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- proactive_support (0.0.1)
4
+ proactive_support (0.0.2)
5
5
  activerecord (>= 3)
6
6
 
7
7
  GEM
@@ -36,6 +36,3 @@ PLATFORMS
36
36
  DEPENDENCIES
37
37
  proactive_support!
38
38
  sqlite3
39
-
40
- BUNDLED WITH
41
- 1.11.2
@@ -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,9 @@
1
+ module ProactiveSupport
2
+ module Adapters
3
+ class Alert
4
+ def create(level, customer_id, message, options)
5
+
6
+ end
7
+ end
8
+ end
9
+ end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ProactiveSupport
2
- VERSION = "0.0.1"
2
+ VERSION = '0.0.2'
3
3
  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.1
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
- - ".gitignore"
49
- - ".ruby-gemset"
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: []