messaging_gateway 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -7
- data/lib/messaging_gateway/version.rb +1 -1
- data/lib/messaging_gateway.rb +4 -4
- data/messaging_gateway-0.0.3.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 613aff8e23860a268cad6b4505d2ea8ae6f1eee4
|
4
|
+
data.tar.gz: 334cdecfe293ce52d63df1efc715e80783169d95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bf3320f65fc28651aa33fb02a4123220f35c9f52dcfcae58215fa8aaaa13338578d6e2bd24c2ad77e71b9a216b91fa83f0a0d087fda231a4eae5f5062a90475
|
7
|
+
data.tar.gz: 72b1f3ebda00aff8cb684d17d48f4ef5bc7147fd3dc61443e81b8118e6234d53c171ad8f7f65614cf53540572b6105afc9782fbc549ccc6183e30e25bde5b1e4
|
data/README.md
CHANGED
@@ -18,15 +18,16 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
Please read the Readme at: http://source.modulotech.fr/modulotech/messagingateway
|
22
22
|
|
23
|
-
##
|
23
|
+
## Upgrading version
|
24
24
|
|
25
|
-
|
25
|
+
Go to file _version.rb_ and udpate the version number
|
26
26
|
|
27
|
-
|
27
|
+
## Building gem
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
$ gem build messaging_gateway.gemspec
|
30
|
+
|
31
|
+
## Push the latest version to rubygems
|
32
|
+
$ gem push messaging_gateway-0.0.x.gem
|
32
33
|
|
data/lib/messaging_gateway.rb
CHANGED
@@ -24,11 +24,12 @@ module MessagingGateway
|
|
24
24
|
end
|
25
25
|
|
26
26
|
class Configuration
|
27
|
-
attr_accessor :server_url, :token, :server_path
|
27
|
+
attr_accessor :server_url, :token, :server_path, :environment
|
28
28
|
|
29
29
|
def initialize
|
30
30
|
@server_url = 'localhost:3001'
|
31
31
|
@server_path = '/api/v1/items'
|
32
|
+
@environment = 'development'
|
32
33
|
end
|
33
34
|
end
|
34
35
|
|
@@ -36,14 +37,13 @@ module MessagingGateway
|
|
36
37
|
def self.create_notification(recipient, body, format, url)
|
37
38
|
if MessagingGateway.configuration.token.nil? || MessagingGateway.configuration.token == ""
|
38
39
|
raise "Il manque le token !"
|
39
|
-
elsif @server_name.nil? || @server_name == ""
|
40
|
-
raise "Il manque le nom de serveur !"
|
41
40
|
elsif @environment.nil? || @environment == ""
|
42
41
|
raise "Il manque l'environnement !"
|
43
42
|
end
|
44
43
|
begin
|
45
44
|
response = HTTParty.post("http://#{MessagingGateway.configuration.server_url}#{MessagingGateway.configuration.server_path}",
|
46
|
-
body: {
|
45
|
+
body: { environment: @environment,
|
46
|
+
token: MessagingGateway.configuration.token,
|
47
47
|
recipient: recipient,
|
48
48
|
body: body,
|
49
49
|
format: format,
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: messaging_gateway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lotzer_a
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- lib/messaging_gateway/version.rb
|
87
87
|
- messaging_gateway-0.0.1.gem
|
88
88
|
- messaging_gateway-0.0.2.gem
|
89
|
+
- messaging_gateway-0.0.3.gem
|
89
90
|
- messaging_gateway.gemspec
|
90
91
|
homepage: ''
|
91
92
|
licenses: []
|