rumour-ruby 0.0.2 → 0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa24ca89f5552cb7c69cabfc888e5ec71792cbcb
4
- data.tar.gz: 73ee0ad55471bdd276622ccdbce91a7a49ddc232
3
+ metadata.gz: 6fcedf58fc1405166a840214b69cd021061b686c
4
+ data.tar.gz: c83cf9a0d47872b3fa5d12fb60f0252ef135f362
5
5
  SHA512:
6
- metadata.gz: 6df32bfc1cd8cac9dbc71c0010919a8a9e1d325bf4e576d405378ba5ddd0e3e66401d5c02cce8c51a7f02f6f3d1f480fbc7314ea06abffb13760a4391697e233
7
- data.tar.gz: a84a4bde48fea637ef61390c88c906b834b29e5fd37abae1da03e8e069cd674d03fafc15f52723ff8c3bf1005f11c4ecc4a740bc14c38c4729d25c76ecf78cd5
6
+ metadata.gz: b097f87b2d6698b79d126a2b8b8e4ef10abb177adca5f1c5d4d38766311210428da56be8186e6431287fc088dcfacecb86936ad310c66013550568d706a07547
7
+ data.tar.gz: 4a2ed172d3be58f075b27d2551cdd7b325d0d68aebcf31c8e1bdcd82fe98fdbc9f22ad5444e1abde98d3c8cbbbd0493aaf02bece3130ddf7458d7baaf9ec0361
data/Gemfile CHANGED
@@ -2,3 +2,8 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in rumour-ruby.gemspec
4
4
  gemspec
5
+
6
+ group :test do
7
+ gem 'rake'
8
+ gem 'rspec'
9
+ end
@@ -12,6 +12,7 @@ module Rumour
12
12
 
13
13
  def initialize(access_token = nil)
14
14
  @access_token = access_token || Rumour.configuration.access_token
15
+ raise Rumour::Errors::AuthenticationError.new('Missing access token') if @access_token.nil?
15
16
  end
16
17
 
17
18
  def send_text_message(sender, recipient, body)
@@ -1,3 +1,3 @@
1
1
  module Rumour
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
data/spec/client_spec.rb CHANGED
@@ -22,6 +22,12 @@ RSpec.describe Rumour::Client do
22
22
 
23
23
  expect(rumour_client.access_token).to eq('CONFIGURED_ACCESS_TOKEN')
24
24
  end
25
+
26
+ it 'raises an AuthenticationError if no access_token is supplied' do
27
+ Rumour.configure { |config| config.access_token = nil }
28
+ expect { rumour_client = Rumour::Client.new }.to raise_error(Rumour::Errors::AuthenticationError)
29
+ Rumour.configure { |config| config.access_token = 'CONFIGURED_ACCESS_TOKEN' }
30
+ end
25
31
  end
26
32
 
27
33
  describe '.send_text_message with valid data' do
@@ -34,7 +40,7 @@ RSpec.describe Rumour::Client do
34
40
  end
35
41
 
36
42
  describe '.send_text_message with invalid data' do
37
- it 'creates and retrieves a new message as a hash' do
43
+ it 'raises a RequestError' do
38
44
  rumour_client = Rumour::Client.new(RUMOUR_TEST_ACCESS_TOKEN)
39
45
 
40
46
  expect {
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'rumour'
1
+ require 'rumour-ruby'
2
2
  # require "codeclimate-test-reporter"
3
3
  # CodeClimate::TestReporter.start
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumour-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joao Diogo Costa