nexmo_rails 0.2.0 → 0.3.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 13cc8e0c5e0ab5daba2fd596043c08a8e8c91b5db2557d1f1b802be190683cb6
|
|
4
|
+
data.tar.gz: 1e14760bf28f806bac4b8e1fd3958cf4d8f33f035dcef23add1ce2c2c56d2b85
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f150c7ddc423fc5b7110a06e6f1ed23f790398d087464187a9301ec246ccd14bf4a3873bb80420482f80615b533a6f7d40a51b5acb75e444a944f7f05c44399
|
|
7
|
+
data.tar.gz: e8e7177f54d6fcf4c18e0071607fd1672711dae459f0c3f29b20c5e3dd9ed6428277fb8cb6dc7e99f274ac6cf9a8316a9e4b2b9e58df3e3acf2b0cfdd28671bc
|
|
@@ -8,10 +8,10 @@ class NexmoInitializerGenerator < Rails::Generators::Base
|
|
|
8
8
|
def create_nexmo_initializer
|
|
9
9
|
initializer "nexmo.rb" do <<~HEREDOC
|
|
10
10
|
Nexmo.setup do |config|
|
|
11
|
-
config.api_key = ENV['NEXMO_API_KEY']
|
|
12
|
-
config.api_secret = ENV['NEXMO_API_SECRET']
|
|
13
|
-
config.
|
|
14
|
-
config.application_id = ENV['NEXMO_APPLICATION_ID']
|
|
11
|
+
config.api_key = ENV['NEXMO_API_KEY']
|
|
12
|
+
config.api_secret = ENV['NEXMO_API_SECRET']
|
|
13
|
+
config.signature_secret = ENV['NEXMO_API_SIGNATURE']
|
|
14
|
+
config.application_id = ENV['NEXMO_APPLICATION_ID']
|
|
15
15
|
config.private_key = ENV['NEXMO_PRIVATE_KEY']
|
|
16
16
|
end
|
|
17
17
|
HEREDOC
|
data/lib/nexmo_rails/version.rb
CHANGED
data/lib/nexmo_rails.rb
CHANGED
|
@@ -12,10 +12,17 @@ module Nexmo
|
|
|
12
12
|
:numbers, :number_insight, :pricing, :redact,
|
|
13
13
|
:secrets, :sms, :signature, :tfa, :verify
|
|
14
14
|
|
|
15
|
-
def setup
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
def setup(&block)
|
|
16
|
+
config = OpenStruct.new
|
|
17
|
+
config.instance_eval(&block)
|
|
18
|
+
|
|
19
|
+
self.client = ::Nexmo::Client.new(
|
|
20
|
+
api_key: config.api_key,
|
|
21
|
+
api_secret: config.api_secret,
|
|
22
|
+
signature_secret: config.signature_secret,
|
|
23
|
+
application_id: config.application_id,
|
|
24
|
+
private_key: config.private_key
|
|
25
|
+
)
|
|
19
26
|
end
|
|
20
27
|
end
|
|
21
28
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nexmo_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nexmo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-06-
|
|
11
|
+
date: 2019-06-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jwt
|