notifiee-ruby 1.0.1 → 1.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,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7080443ec6d028d4c10432ec264463bd673dd637e4f5ed6cfd75f9ac5b8859fa
4
- data.tar.gz: d117bf9d937bc8fc5d8db00966fc0756330ec441a918ba64e5a43100450acac3
3
+ metadata.gz: 6ec9f9a09d362c37d94289dd2ded48beac4ab73633fb7df9fc027abb18d9a6ef
4
+ data.tar.gz: a964a4bf0189dbe3cec24aa9a70b92bc694d2fc6c4dab88b15065a2b68e8461d
5
5
  SHA512:
6
- metadata.gz: 2c4e9723067bf4dc5c802632f2f7d2dedf0fa78d3c0b15eaef2505caf0cc32fe04e195f07aaac39743a06ada01230c56ad2f0b79b6d67ef5cbf50614aa9555f3
7
- data.tar.gz: 72487b7dd15f851caa5e0e06c139bccfe6cce465eeaec78eb358e6404f9ea7caea40e7540bb69b74c7199e0fc58b68168258d773af1827cd7564e113e7927839
6
+ metadata.gz: '0828198eaed0e4e3fa8c771449e8b0dd4877c7881c55e62c78432b32c5d37381b154f0605cf3c497cde6dc008431ff2908883230e89da68e4862ee23ba693813'
7
+ data.tar.gz: 4732da2793c3f3dbedb9f0b493500ebed16d07f4c4613d41e73f1b45c88619253fc2d28051e7502c16ef403c065c8c9787cac0d1909ed4f02b721fb2592a7b01
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- notifiee-ruby (1.0.0)
4
+ notifiee-ruby (1.0.1)
5
5
  json
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  [![Build Status](https://travis-ci.org/Notifiee/notifiee-ruby.svg?branch=master)](https://travis-ci.org/Notifiee/notifiee-ruby)
2
+ [![Gem Version](https://badge.fury.io/rb/notifiee-ruby.svg)](https://badge.fury.io/rb/notifiee-ruby)
2
3
  # Notifiee
3
4
 
4
5
  The Notifiee gem allows Ruby developers to programmatically send notifications to team members (via multiple channels like Email, SMS, Telegram, Slack, Messenger, and Twitter DMs) through the [Notifiee](https://notifiee.com) web service. The API is implemented as JSON over HTTP.
@@ -24,7 +25,7 @@ Or install globally:
24
25
  First configure your API client:
25
26
 
26
27
  ```ruby
27
- Notifiee::Client.api_key = "YOUR_API_KEY"
28
+ NotifieeAPI::Client.api_key = "YOUR_API_KEY"
28
29
  ```
29
30
 
30
31
  In Rails projects this should go in a notifiee initializer and the API key should probably be set with an ENV variable:
@@ -32,7 +33,7 @@ In Rails projects this should go in a notifiee initializer and the API key shoul
32
33
  ```ruby
33
34
  # config/initializers/notifiee.rb
34
35
 
35
- Notifiee::Client.api_key = ENV["YOUR_API_KEY"]
36
+ NotifieeAPI::Client.api_key = ENV["YOUR_API_KEY"]
36
37
  ```
37
38
 
38
39
  Your API key is associated with a project created within the [notifiee.com](https://notifiee.com) web interface. To get an API key you will need to sign up.
@@ -40,10 +41,10 @@ Your API key is associated with a project created within the [notifiee.com](http
40
41
  Once the configuration is set you can send notifications in your code like this:
41
42
 
42
43
  ```ruby
43
- Notifiee.notify(:bob, [:telegram], 'Something happened in our app!')
44
+ NotifieeAPI.notify(:bob, [:telegram], 'Something happened in our app!')
44
45
 
45
46
  # or with a subject
46
- Notifiee.notify(:bob, [:telegram], 'Something happened in our app!', subject: 'Our App Notification')
47
+ NotifieeAPI.notify(:bob, [:telegram], 'Something happened in our app!', subject: 'Our App Notification')
47
48
  ```
48
49
 
49
50
  NOTE: `:bob` is a notifiee that you would have had to have created from within the [notifiee.com](https://notifiee.com) web interface and configured the Telegram channel for.
@@ -1,9 +1,9 @@
1
- require "notifiee/version"
2
- require "notifiee/exceptions"
3
- require "notifiee/client"
4
- require "notifiee/notifications"
1
+ require "notifiee_api/version"
2
+ require "notifiee_api/exceptions"
3
+ require "notifiee_api/client"
4
+ require "notifiee_api/notifications"
5
5
 
6
- module Notifiee
6
+ module NotifieeAPI
7
7
 
8
8
  class << self
9
9
 
@@ -13,7 +13,7 @@ module Notifiee
13
13
  channels: channels,
14
14
  message: message
15
15
  )
16
- Notifiee::Notifications.create(payload)
16
+ NotifieeAPI::Notifications.create(payload)
17
17
  end
18
18
 
19
19
  end
@@ -1,7 +1,7 @@
1
1
  require 'net/http'
2
2
  require 'json'
3
3
 
4
- module Notifiee
4
+ module NotifieeAPI
5
5
  class Client
6
6
 
7
7
  @base_url = 'api.notifiee.com'
@@ -64,9 +64,9 @@ module Notifiee
64
64
  when Net::HTTPSuccess
65
65
  response.body
66
66
  when Net::HTTPUnauthorized
67
- raise Notifiee::Unauthorized.new response.body
67
+ raise NotifieeAPI::Unauthorized.new response.body
68
68
  else
69
- raise Notifiee::Error.new response.body
69
+ raise NotifieeAPI::Error.new response.body
70
70
  end
71
71
  end
72
72
 
@@ -1,4 +1,4 @@
1
- module Notifiee
1
+ module NotifieeAPI
2
2
 
3
3
  class Unauthorized < StandardError
4
4
  end
@@ -1,10 +1,10 @@
1
- module Notifiee
1
+ module NotifieeAPI
2
2
  class Notifications
3
3
 
4
4
  class << self
5
5
 
6
6
  def create(payload)
7
- Notifiee::Client.post 'notifications', payload
7
+ NotifieeAPI::Client.post 'notifications', payload
8
8
  end
9
9
 
10
10
  end
@@ -0,0 +1,3 @@
1
+ module NotifieeAPI
2
+ VERSION = "1.0.2"
3
+ end
@@ -1,11 +1,11 @@
1
1
 
2
2
  lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "notifiee/version"
4
+ require "notifiee_api/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "notifiee-ruby"
8
- spec.version = Notifiee::VERSION
8
+ spec.version = NotifieeAPI::VERSION
9
9
  spec.authors = ["Gareth Fuller"]
10
10
  spec.email = ["gareth@notifiee.com"]
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notifiee-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gareth Fuller
@@ -102,10 +102,10 @@ files:
102
102
  - bin/console
103
103
  - bin/setup
104
104
  - lib/notifiee-ruby.rb
105
- - lib/notifiee/client.rb
106
- - lib/notifiee/exceptions.rb
107
- - lib/notifiee/notifications.rb
108
- - lib/notifiee/version.rb
105
+ - lib/notifiee_api/client.rb
106
+ - lib/notifiee_api/exceptions.rb
107
+ - lib/notifiee_api/notifications.rb
108
+ - lib/notifiee_api/version.rb
109
109
  - notifiee-ruby.gemspec
110
110
  homepage: https://github.com/Notifiee/notifiee-ruby.git
111
111
  licenses:
@@ -1,3 +0,0 @@
1
- module Notifiee
2
- VERSION = "1.0.1"
3
- end