telesignature 0.0.6 → 0.0.7
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 +1 -1
- data/README.md +0 -3
- data/lib/telesignature/mock_service/railtie.rb +1 -14
- data/lib/telesignature/mock_service/spin_up.rb +18 -0
- data/lib/telesignature/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ee169bfd2307fa6994c9b40c08fbbdb29508feaf
|
|
4
|
+
data.tar.gz: 3cdbb04ef63b532e3f7d3eefb4074ab0585f3cf6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af79fa44c17b3892f7deb0f604c4204ac876058a0c905c4fce2022f5702f11df124c8f302b85f2a97c26be0a371932be54e6d5d295c941f192d81c358353ca12
|
|
7
|
+
data.tar.gz: e07bb0e4dea327370e758f6c88a9acc92723b65eddcd2f1f4df9d256cbbb9787e24edddb2b47184e3782ba00c63912fa82a7fb7edc4d0ca1722e8d0fe2be77f5
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -46,9 +46,6 @@ Enable it by setting ENV['TELESIGN_STUBBED'] to something truthy.
|
|
|
46
46
|
|
|
47
47
|
The Sinatra app will run on "http://localhost:11989".
|
|
48
48
|
|
|
49
|
-
The stubs app will shutdown with a rails server, but a console still needs a manual shutdown.
|
|
50
|
-
A known issue, hoping to get that sorted out sometime soonish...
|
|
51
|
-
|
|
52
49
|
Currently stubs mode supports:
|
|
53
50
|
|
|
54
51
|
post '/v1/verify/sms'
|
|
@@ -2,20 +2,7 @@ module Telesignature
|
|
|
2
2
|
module MockService
|
|
3
3
|
class Railtie < ::Rails::Railtie
|
|
4
4
|
initializer 'telesignature_railtie.configure_rails_initialization' do
|
|
5
|
-
|
|
6
|
-
if ENV['TELESIGN_STUBBED']
|
|
7
|
-
port = (ENV['TELESIGN_PORT'].to_i || 11989)
|
|
8
|
-
if `lsof -i :#{port}`.blank? # no process running on 11988
|
|
9
|
-
Process.detach(pid = Process.fork do
|
|
10
|
-
require 'telesignature/mock_service/fake_server'
|
|
11
|
-
end)
|
|
12
|
-
else
|
|
13
|
-
Rails.logger.warn "TELESIGN STUB MODE FAILED TO START\nProcess already listening on #{port}"
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
at_exit { pid && `kill #{pid}` }
|
|
18
|
-
|
|
5
|
+
require 'telesignature/mock_service/spin_up'
|
|
19
6
|
end
|
|
20
7
|
end
|
|
21
8
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module Telesignature
|
|
2
|
+
module MockService
|
|
3
|
+
module SpinUp
|
|
4
|
+
if ENV['TELESIGN_STUBBED']
|
|
5
|
+
port = (ENV['TELESIGN_PORT'].to_i || 11989)
|
|
6
|
+
if `lsof -i :#{port}`.blank? # no process running on 11988
|
|
7
|
+
Process.detach(pid = Process.fork do
|
|
8
|
+
require 'telesignature/mock_service/fake_server'
|
|
9
|
+
end)
|
|
10
|
+
else
|
|
11
|
+
Rails.logger.warn "TELESIGN STUB MODE FAILED TO START\nProcess already listening on #{port}"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
at_exit { pid && `kill #{pid}` }
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Koch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-03-
|
|
11
|
+
date: 2014-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -172,6 +172,7 @@ files:
|
|
|
172
172
|
- lib/telesignature/helpers.rb
|
|
173
173
|
- lib/telesignature/mock_service/fake_server.rb
|
|
174
174
|
- lib/telesignature/mock_service/railtie.rb
|
|
175
|
+
- lib/telesignature/mock_service/spin_up.rb
|
|
175
176
|
- lib/telesignature/phone_id.rb
|
|
176
177
|
- lib/telesignature/response.rb
|
|
177
178
|
- lib/telesignature/service_base.rb
|