telesignature 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cf01a84031f2daabb72b74fca9e54b661f81e20
4
- data.tar.gz: abfb60952ead2911ba72a613778456fb0ce85200
3
+ metadata.gz: 5d38082c98e11a5bc577b8e9696f3601a66e644c
4
+ data.tar.gz: a6ac534087b37099fc8524caa157ee406d04a2ef
5
5
  SHA512:
6
- metadata.gz: 1884ea8328d04a0ca8da306131ec3e9e5f41bbab2504da27fb7dbeb4c02e6620d47d1bd5763facf59f2116da6267f697d41b771f9a993fe6ecd02063b10691fc
7
- data.tar.gz: abdb17c479449d78b479a24af53bd0794e693cc7f2ce168b66776bb5141de599ac60386ed1e8a72fbb1793460f5502e7367705b9fc3448214cc8ba674c109e99
6
+ metadata.gz: 77a5fc46d68da31e656695227c08c2925e85ce05670eab3649b341eeddab72848960cb510d9c1c8805808b496c5d7df295e24a76a26e3a2e590afd0358df4826
7
+ data.tar.gz: c4b8d96b0cde65ff925e5af9023202fcd0faaf6c3dee872fb3195e727425280799a1d25283b11a7dc3da9cbd77c97bf47bfb3dc0e9750b6b321b89e64b56cf02
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- telesignature (0.0.5)
4
+ telesignature (0.0.6)
5
5
  faraday
6
6
 
7
7
  GEM
@@ -47,7 +47,7 @@ class StdHelpers
47
47
  end
48
48
  end
49
49
 
50
- Mimic.mimic port: 11989, host: 'localhost', fork: false do
50
+ Mimic.mimic port: (ENV['TELESIGN_PORT'].to_i || 11989), host: (ENV['TELESIGN_URL'] || 'localhost'), fork: false do
51
51
  # 'https://rest.telesign.com/v1/verify/sms'
52
52
  # params['phone_number']
53
53
  # params['language']
@@ -2,11 +2,20 @@ module Telesignature
2
2
  module MockService
3
3
  class Railtie < ::Rails::Railtie
4
4
  initializer 'telesignature_railtie.configure_rails_initialization' do
5
+
5
6
  if ENV['TELESIGN_STUBBED']
6
- Process.detach(Process.fork do
7
- require 'telesignature/mock_service/fake_server'
8
- end)
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
9
15
  end
16
+
17
+ at_exit { pid && `kill #{pid}` }
18
+
10
19
  end
11
20
  end
12
21
  end
@@ -1,3 +1,3 @@
1
1
  module Telesignature
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
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.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Koch