notifiable-sender 0.3.0 → 0.3.1

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
  SHA1:
3
- metadata.gz: 751302771dbfd40b4a9056ab25a45550c985713e
4
- data.tar.gz: 5ada967cceeebfa8e29cf08151368045957fc7de
3
+ metadata.gz: fd58196fd6796f7c7cdd49cdc504fd7b6df8adc7
4
+ data.tar.gz: 11a8004e4c3aee8054ad14b78510fb2ee03e21bc
5
5
  SHA512:
6
- metadata.gz: 9943eb5949d139004acdb8b1a834b07bd6be43c8e0245e1a0dfd601f9b044111e7f150a73556211b01d9e5250286c04f81b2fc381168de84835fe305d793efd0
7
- data.tar.gz: d9233f93783c4252fae42ec6f1a24e8152ea77affb1978ea4f78c7524580a22f873a005d5600481c7b44f186ac5a550e587443eba8ebbf708d7ecee0233e2468
6
+ metadata.gz: b721862a60ddf7c986f263ca14d6760fa901f4f9ab1095e00ab3e55bfd26f85c32c7e5d80d2f947ba2e9b97ba3b5cc4a081e57f668275d6e8534191db449a18a
7
+ data.tar.gz: 9c996befb2d1e364d45062c9879e087e54103b1b2fbbe08f96f1691268d01a2596ccca1b23e520b19fb1f6d7f8a8e9a75ea2b220d3966e237870529f85503632
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Notifiable::Sender
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/notifiable/sender`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Wrapper for the notifiable notifications API. Use this to send notifications from Ruby code.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,13 +20,10 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- 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).
23
+ ```ruby
24
+ notifiable = Notifiable::Sender.new(ENV['notifiable_access_id'])
25
+ notifiable.send_notification(message: 'Hello notifiable')
26
+ ```
32
27
 
33
28
  ## Contributing
34
29
 
@@ -1,3 +1,3 @@
1
1
  module Notifiable
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -6,8 +6,8 @@ require 'logger'
6
6
  module Notifiable
7
7
  class Sender
8
8
  def initialize(access_id, base_uri: 'https://notifiable.futureworkshops.com', secret_key: nil, logger: Logger.new(STDOUT))
9
- raise 'base_uri cannot be nil' if base_uri.empty?
10
- raise 'access_id cannot be nil' if access_id.empty?
9
+ raise 'base_uri cannot be nil' if !base_uri || base_uri.empty?
10
+ raise 'access_id cannot be nil' if !access_id || access_id.empty?
11
11
 
12
12
  @base_uri, @access_id, @secret_key, @logger = base_uri, access_id, secret_key, logger
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notifiable-sender
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith