custos_notifier 0.2 → 0.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.
- data/lib/custos_notifier.rb +13 -0
- metadata +6 -6
data/lib/custos_notifier.rb
CHANGED
@@ -55,6 +55,19 @@ module CustosNotifier
|
|
55
55
|
end
|
56
56
|
|
57
57
|
|
58
|
+
# Send custom notification to Custos service. Any messages can be sent to service in
|
59
|
+
# <tt>message</tt> param. Second parameter is optional and could be anything you want.
|
60
|
+
def custom_notify(message, parameters = {})
|
61
|
+
url = "#{ configuration.url }/notifications"
|
62
|
+
notify_params = {
|
63
|
+
:project => CustosNotifier.configuration.project,
|
64
|
+
:api_key => CustosNotifier.configuration.api_key,
|
65
|
+
}
|
66
|
+
notify_params["notification"] = {"title" => message, "customs" => parameters.inspect}
|
67
|
+
RestClient.post(url, notify_params)
|
68
|
+
end
|
69
|
+
|
70
|
+
|
58
71
|
protected
|
59
72
|
|
60
73
|
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: custos_notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 13
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: "0.
|
8
|
+
- 3
|
9
|
+
version: "0.3"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Sebastian Nowak
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-07-
|
17
|
+
date: 2011-07-05 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
requirements: []
|
78
78
|
|
79
79
|
rubyforge_project:
|
80
|
-
rubygems_version: 1.
|
80
|
+
rubygems_version: 1.3.7
|
81
81
|
signing_key:
|
82
82
|
specification_version: 3
|
83
83
|
summary: Notifier for Custos service.
|