telesignature 0.0.3 → 0.0.4
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 +4 -4
- data/Gemfile.lock +5 -5
- data/README.md +33 -2
- data/lib/telesignature/verify.rb +2 -2
- data/lib/telesignature/version.rb +1 -1
- data/telesignature.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5e430a6951e4fa685cb34b0fcfcde9c78583985
|
4
|
+
data.tar.gz: 8c607aff7d237e6283a29a9b93975c9926cd323a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11069f94b3df23fd6d892a5c92bf2f10992d0abda30160b998af43dd5cc32b95e7a58a0f02ee734088cd84098b7c878035a79f6a88bf3390e38b1513fad65bab
|
7
|
+
data.tar.gz: f78c83ba5e3999eb61db4aa9c60f9ac4c3bf0b27cc0f12e5402abf830875f8fc3a357a882f824b117b583dfa4576ecef9503527c5db834498e1d071b004a238f
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
telesignature (0.0.
|
5
|
-
faraday
|
4
|
+
telesignature (0.0.4)
|
5
|
+
faraday
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
@@ -23,8 +23,8 @@ GEM
|
|
23
23
|
debugger-ruby_core_source (~> 1.3.2)
|
24
24
|
debugger-linecache (1.2.0)
|
25
25
|
debugger-ruby_core_source (1.3.2)
|
26
|
-
faraday (0.
|
27
|
-
multipart-post (
|
26
|
+
faraday (0.9.0)
|
27
|
+
multipart-post (>= 1.2, < 3)
|
28
28
|
ffi (1.9.3)
|
29
29
|
formatador (0.2.4)
|
30
30
|
guard (2.5.1)
|
@@ -44,7 +44,7 @@ GEM
|
|
44
44
|
lumberjack (1.0.4)
|
45
45
|
method_source (0.8.2)
|
46
46
|
minitest (5.3.0)
|
47
|
-
multipart-post (
|
47
|
+
multipart-post (2.0.0)
|
48
48
|
nio4r (1.0.0)
|
49
49
|
pry (0.9.12.6)
|
50
50
|
coderay (~> 1.0)
|
data/README.md
CHANGED
@@ -3,6 +3,37 @@ telesign
|
|
3
3
|
|
4
4
|
Ruby TeleSign SDK
|
5
5
|
|
6
|
-
|
6
|
+
example
|
7
|
+
=============
|
8
|
+
```ruby
|
9
|
+
require 'telesignature'
|
10
|
+
|
11
|
+
customer_id = 'FFFFFFFF-EEEE-DDDD-1234-AB1234567890'
|
12
|
+
secret_key = 'EXAMPLE----TE8sTgg45yusumoN6BYsBVkh+yRJ5czgsnCehZaOYldPJdmFh6NeX8kunZ2zU1YWaUw/0wV6xfw=='
|
13
|
+
phone_number = '4445551212'
|
14
|
+
|
15
|
+
verifier = Telesignature::Verify.new customer_id: customer_id,
|
16
|
+
secret_key: secret_key
|
17
|
+
|
18
|
+
phone_info = verifier.sms phone_number: phone_number #, verify_code: '12345'
|
19
|
+
|
20
|
+
p "##################"
|
21
|
+
p phone_info.data
|
22
|
+
p phone_info.headers
|
23
|
+
p phone_info.status
|
24
|
+
p phone_info.raw_data
|
25
|
+
p phone_info.verify_code
|
26
|
+
p "##################"
|
27
|
+
|
28
|
+
status_info = verifier.status phone_info.data['reference_id'], phone_info.verify_code
|
29
|
+
# status_info = verifier.status phone_info.data['reference_id'], '12345'
|
7
30
|
|
8
|
-
|
31
|
+
p "\n\n\n"
|
32
|
+
p "##################"
|
33
|
+
p status_info.data
|
34
|
+
p status_info.headers
|
35
|
+
p status_info.status
|
36
|
+
p status_info.raw_data
|
37
|
+
p status_info.verify_code
|
38
|
+
p "##################"
|
39
|
+
```
|
data/lib/telesignature/verify.rb
CHANGED
@@ -117,7 +117,7 @@ module Telesignature
|
|
117
117
|
|
118
118
|
response = @conn.post do |req|
|
119
119
|
req.url resource
|
120
|
-
req.body = fields
|
120
|
+
req.body = URI.encode_www_form(fields)
|
121
121
|
req.headers = headers
|
122
122
|
# proxies=@proxy
|
123
123
|
end
|
@@ -199,7 +199,7 @@ module Telesignature
|
|
199
199
|
|
200
200
|
response = @conn.post do |req|
|
201
201
|
req.url resource
|
202
|
-
req.body = fields
|
202
|
+
req.body = URI.encode_www_form(fields)
|
203
203
|
req.headers = headers
|
204
204
|
# proxies=@proxy
|
205
205
|
end
|
data/telesignature.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_dependency 'faraday'
|
20
|
+
spec.add_dependency 'faraday'
|
21
21
|
|
22
22
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
23
23
|
spec.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telesignature
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Koch
|
@@ -14,16 +14,16 @@ dependencies:
|
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - '
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - '
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|