sms_center 0.0.11 → 0.0.15

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
  SHA256:
3
- metadata.gz: fb43bb2ad685588a16addd09b0a34bfd6b4245bfc64ae2ad3d328132e95b0415
4
- data.tar.gz: 376fd549f16e8a71de281868efe54d136c1d2c4c2f00784673c8390a4defb00b
3
+ metadata.gz: a8790cc6cec70d60232f64fb79a5c0c054ed2ea698808d7faf45955b925bc588
4
+ data.tar.gz: 3cbe0d1bf594712eaa82ba1740d17ac80ecf455a4b13976071b391ec9cac5ac2
5
5
  SHA512:
6
- metadata.gz: d2891fab8d4039f998d27bcc2894c3b0fb4742cbd79ab994d3246078cdad19318c0b7d33acda0aa2e5625f44d20fe3cd6520058592d49f86357415acc5cd36f5
7
- data.tar.gz: a5954cae36a37a388695c88baad154bf90eb992288f46c043c80b1a7ddc6df46b5726d0349cc749ca72d03ba27537e2bff28361fad6bf482086626870ba8a093
6
+ metadata.gz: 1b911967c6c57ffe53dc3b0fce03afbb7198cd76bc9d6bffe630a844526a0db646255edaf4ed375d1193e6991e65dc9b195bb122a30190708a88ef1719d012ee
7
+ data.tar.gz: c5e5ea8d9cfacaaec58ddbb99329db3a6f186b62c3d4944af850b83bb308b5bf8a23bccb39398269659e3171f7b05b8d7185d3925ef44a69c0b168adb45d85fa
@@ -8,7 +8,8 @@ class SmsCenter::Nexmo
8
8
  api_secret: keys[:NEXMO_API_SECRET],
9
9
  to: to_number,
10
10
  text: content,
11
- from: from_number
11
+ from: from_number,
12
+ type: 'unicode'
12
13
  }
13
14
  end
14
15
  end
data/lib/sms_center.rb CHANGED
@@ -58,10 +58,10 @@ class SmsCenter
58
58
  private
59
59
  def platform_by_country(country, to_number)
60
60
  platform_by_country = SmsCenter.platform_by_country
61
- platform = platform_by_country[country.downcase.to_sym]
61
+ platform = platform_by_country[country.downcase.to_sym] if country.present?
62
62
  if platform.is_a?(Hash)
63
63
  phone = Phonelib.parse(to_number, country.downcase.to_sym)
64
- platform_by_carrier = platform[phone.carrier.to_sym]
64
+ platform_by_carrier = platform[phone.carrier&.to_sym]
65
65
  platform = platform_by_carrier.present? ? platform_by_carrier : platform[:default]
66
66
  elsif platform.nil?
67
67
  platform = platform_by_country[:default]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sms_center
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Deleveree
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-11 00:00:00.000000000 Z
11
+ date: 2021-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient