textris 0.5.0 → 0.6.0

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
- SHA1:
3
- metadata.gz: b5b1b356ff6632acadf4831ec739a67b94b41091
4
- data.tar.gz: e3a85db82e310bc468db91927e9436f419973839
2
+ SHA256:
3
+ metadata.gz: cd28b9ac3a423603ff04fe56ed5551b98e0ee25efb567c2e9bebf0e40607a547
4
+ data.tar.gz: 303d52aac458a7cf0b7e779261b3356bf331229fafe0030802c06c760d692682
5
5
  SHA512:
6
- metadata.gz: 1a1189862b71010b4c3ea10c128fc5683d25030ad800b442324855185ff8127c1ae4fbd28a42607888bb3c16d11894db833549144555be6ba7ed4162893a63bd
7
- data.tar.gz: 62828972a887951e081a5a9e310b765efe2546d75dd04fe9265ff1aae5ab81f50134d1c6e8c136f767ec269a406515b9f4b13414195e43d3e5544cd8a57ba780
6
+ metadata.gz: 8b90c45135057231f6b3689599628d9d3e2264938eb1f1d4526764e6e4ce198eeb500c367833e5d4ea581b81603b24f7b79a8794b687dd3015b613082228e830
7
+ data.tar.gz: 1d19bfb9156bf45962134c08d6e96f8516fa65b8ae8fc7f17b8f3fbc4846a947c2c429f64655494831cd3127ae93f35849c67e49b19e785f394ee17613a7de71
data/README.md CHANGED
@@ -209,7 +209,7 @@ end
209
209
  In order to use Nexmo with **textris**, you need to include the `nexmo` gem in your `Gemfile`:
210
210
 
211
211
  ```ruby
212
- gem 'nexmo'
212
+ gem 'nexmo', '~> 4'
213
213
  ```
214
214
 
215
215
  The Nexmo gem uses the environment variables `NEXMO_API_KEY` and `NEXMO_API_SECRET` to authenticate with the API.
@@ -35,7 +35,11 @@ module Textris
35
35
  private
36
36
 
37
37
  def method_missing(method_name, *args)
38
- self.new(method_name, *args).call_action
38
+ new(method_name, *args).call_action
39
+ end
40
+
41
+ def respond_to_missing?(method, *args)
42
+ public_instance_methods(true).include?(method) || super
39
43
  end
40
44
  end
41
45
 
@@ -3,7 +3,7 @@ module Textris
3
3
  class Nexmo < Textris::Delivery::Base
4
4
  def deliver(phone)
5
5
  client.send_message(
6
- from: message.from_phone,
6
+ from: sender_id,
7
7
  to: phone,
8
8
  text: message.content
9
9
  )
@@ -13,6 +13,10 @@ module Textris
13
13
  def client
14
14
  @client ||= ::Nexmo::Client.new
15
15
  end
16
+
17
+ def sender_id
18
+ message.from_phone || message.from_name
19
+ end
16
20
  end
17
21
  end
18
22
  end
@@ -80,7 +80,7 @@ module Textris
80
80
  @to = parse_to options[:to]
81
81
 
82
82
  unless @to.present?
83
- raise(ArgumentError, "Recipients must be provided and E.164 compilant")
83
+ raise(ArgumentError, "Recipients must be provided and E.164 compliant")
84
84
  end
85
85
  end
86
86
 
@@ -1,3 +1,3 @@
1
1
  module Textris
2
- VERSION = '0.5.0'
2
+ VERSION = '0.6.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Visuality
7
8
  - Karol Słuszniak
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2017-12-06 00:00:00.000000000 Z
12
+ date: 2019-04-24 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -223,7 +224,7 @@ dependencies:
223
224
  description: Implement texter classes for sending SMS messages in similar way to how
224
225
  e-mails are sent with ActionMailer-based mailers. Take advantage of e-mail proxying
225
226
  and enhanced phone number parsing, among others.
226
- email: k.sluszniak@visuality.pl
227
+ email: contact@visuality.pl
227
228
  executables: []
228
229
  extensions: []
229
230
  extra_rdoc_files:
@@ -270,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
271
  version: '0'
271
272
  requirements: []
272
273
  rubyforge_project:
273
- rubygems_version: 2.6.11
274
+ rubygems_version: 2.7.3
274
275
  signing_key:
275
276
  specification_version: 4
276
277
  summary: Simple SMS messaging gem for Rails based on concepts and conventions similar