telesignature 0.0.6 → 0.0.7

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: 5d38082c98e11a5bc577b8e9696f3601a66e644c
4
- data.tar.gz: a6ac534087b37099fc8524caa157ee406d04a2ef
3
+ metadata.gz: ee169bfd2307fa6994c9b40c08fbbdb29508feaf
4
+ data.tar.gz: 3cdbb04ef63b532e3f7d3eefb4074ab0585f3cf6
5
5
  SHA512:
6
- metadata.gz: 77a5fc46d68da31e656695227c08c2925e85ce05670eab3649b341eeddab72848960cb510d9c1c8805808b496c5d7df295e24a76a26e3a2e590afd0358df4826
7
- data.tar.gz: c4b8d96b0cde65ff925e5af9023202fcd0faaf6c3dee872fb3195e727425280799a1d25283b11a7dc3da9cbd77c97bf47bfb3dc0e9750b6b321b89e64b56cf02
6
+ metadata.gz: af79fa44c17b3892f7deb0f604c4204ac876058a0c905c4fce2022f5702f11df124c8f302b85f2a97c26be0a371932be54e6d5d295c941f192d81c358353ca12
7
+ data.tar.gz: e07bb0e4dea327370e758f6c88a9acc92723b65eddcd2f1f4df9d256cbbb9787e24edddb2b47184e3782ba00c63912fa82a7fb7edc4d0ca1722e8d0fe2be77f5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- telesignature (0.0.6)
4
+ telesignature (0.0.7)
5
5
  faraday
6
6
 
7
7
  GEM
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
@@ -1,3 +1,3 @@
1
1
  module Telesignature
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  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.6
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 00:00:00.000000000 Z
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