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 +5 -5
- data/README.md +1 -1
- data/lib/textris/base.rb +5 -1
- data/lib/textris/delivery/nexmo.rb +5 -1
- data/lib/textris/message.rb +1 -1
- data/lib/textris/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cd28b9ac3a423603ff04fe56ed5551b98e0ee25efb567c2e9bebf0e40607a547
|
4
|
+
data.tar.gz: 303d52aac458a7cf0b7e779261b3356bf331229fafe0030802c06c760d692682
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/lib/textris/base.rb
CHANGED
@@ -35,7 +35,11 @@ module Textris
|
|
35
35
|
private
|
36
36
|
|
37
37
|
def method_missing(method_name, *args)
|
38
|
-
|
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:
|
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
|
data/lib/textris/message.rb
CHANGED
data/lib/textris/version.rb
CHANGED
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.
|
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:
|
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:
|
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.
|
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
|