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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a448e1d00470daa53d811729c4ee9e0806286af
4
- data.tar.gz: a4e943c4b10762c3a9fddbb1c0893cf85b9252fb
3
+ metadata.gz: 613aff8e23860a268cad6b4505d2ea8ae6f1eee4
4
+ data.tar.gz: 334cdecfe293ce52d63df1efc715e80783169d95
5
5
  SHA512:
6
- metadata.gz: 7e7a60220c0f937aa88b85217a3fab78631feb29ea9aeffa7abcd2c9bdd1ba4a24566b60b5d059f6881124c27c209b48b96292b7b2eea9220c467d7dc985d7bb
7
- data.tar.gz: eca99b813b6343e60c651696732904e059b76a17093d43610c3e72073eea88064032544e50abad2a94b9bf94cb994c83bdcbf692a48db045f55cdb0e78f4189a
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
- TODO: Write usage instructions here
21
+ Please read the Readme at: http://source.modulotech.fr/modulotech/messagingateway
22
22
 
23
- ## Development
23
+ ## Upgrading version
24
24
 
25
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
25
+ Go to file _version.rb_ and udpate the version number
26
26
 
27
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
27
+ ## Building gem
28
28
 
29
- ## Contributing
30
-
31
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/message_gateway_gem.
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
 
@@ -1,3 +1,3 @@
1
1
  module MessageGatewayGem
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -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: { token: MessagingGateway.configuration.token,
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.3
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-30 00:00:00.000000000 Z
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: []