elk 0.5.0 → 0.5.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: e3184044f09e7d64a7822c28eaa6e3de56978fc9
4
- data.tar.gz: db5a2368596d235da746132e3dae9e03dd56adf2
3
+ metadata.gz: c66ab0f4764c2d454ca4e118649665e59867067d
4
+ data.tar.gz: 469c8c1cd70ba2056a0c60923c1309054249ae57
5
5
  SHA512:
6
- metadata.gz: d0ced3eef3b56b1225c8c1d92acf8a8a6f428f5105aa2e4a33e666a37c0db058d0bb0fc4348eea2d28232d4960944563aa1bc028ce1bb4e51f8c0cb60bdb4620
7
- data.tar.gz: eeeec30f922cc461df8d750621b6c34a62097286848e7477bbef10e490e5af5cedad303355984529971a008a0fb866e72488eaa550da379deec663c4c7ca38c7
6
+ metadata.gz: e8f86119aea25fe735348bba9b15b903f1a876ee4c385c7ab480187c77e3d8064ee993d844890f6d99d527b183f276cde0b2fa66a0d1a0b727900230d49798b1
7
+ data.tar.gz: 6b41045238491a46ceae2d5efe1727d24a4d0b0bfe9adb976ab60e965b0d03c1146f227518ef64a1d7823ec2777e50c9dded1f33b293c30690a3c86b3d84b263
data/README.MD CHANGED
@@ -31,7 +31,7 @@ Test specs with:
31
31
 
32
32
  ## Usage
33
33
 
34
- elk can be used to allocate a phone numbers, manage the numbers and send/recieve messages through these numbers.
34
+ elk can be used to allocate phone numbers, manage the numbers and send/receive messages through these numbers.
35
35
 
36
36
  ### Authentication and configuration
37
37
 
@@ -41,6 +41,7 @@ module Elk
41
41
  #
42
42
  # Optional parameters
43
43
  # * :flash - if set to non-false value SMS is sent as a "Flash SMS"
44
+ # * :flashsms - alias of :flash
44
45
  # * :client - `Elk::Client` instance
45
46
  # * :whendelivered - Callback URL that will receive a POST after delivery
46
47
  #
@@ -54,7 +55,7 @@ module Elk
54
55
  arguments[:to] = Array(parameters.fetch(:to)).join(",")
55
56
  arguments[:message] = parameters.fetch(:message)
56
57
 
57
- if parameters.fetch(:flash) { false }
58
+ if parameters.values_at(:flash, :flashsms).any?
58
59
  arguments[:flashsms] = "yes"
59
60
  end
60
61
 
@@ -1,3 +1,3 @@
1
1
  module Elk
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -57,10 +57,20 @@ describe Elk::SMS do
57
57
  to_return(fixture('sends_a_sms.txt'))
58
58
  end
59
59
 
60
- it "should send flash SMS through API" do
61
- described_class.send(from: from, to: to, message: message, flash: true)
60
+ context "with flash parameter" do
61
+ it "should send flash SMS through API" do
62
+ described_class.send(from: from, to: to, message: message, flash: true)
62
63
 
63
- expect(@stub).to have_been_requested
64
+ expect(@stub).to have_been_requested
65
+ end
66
+ end
67
+
68
+ context "with flashsms parameter" do
69
+ it "should send flash SMS through API" do
70
+ described_class.send(from: from, to: to, message: message, flashsms: true)
71
+
72
+ expect(@stub).to have_been_requested
73
+ end
64
74
  end
65
75
  end
66
76
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan Eckerström
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-13 00:00:00.000000000 Z
11
+ date: 2017-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -129,9 +129,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - API account at 46elks.com
131
131
  rubyforge_project:
132
- rubygems_version: 2.4.5.1
132
+ rubygems_version: 2.4.5.2
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Client library for 46elks SMS/MMS/Voice service.
136
136
  test_files: []
137
- has_rdoc: true