rack_check 0.1.0 → 0.2.0

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: 48f2ac2cc6b95a389c7de1172c08a8a95b8bd7a1
4
- data.tar.gz: 878e042ca38b7437b9909a2e3d88cc8081a57fd2
3
+ metadata.gz: 4aa32f99238054589b506204575a854191839f76
4
+ data.tar.gz: 7054ecea565a3f0d90c366c52a93b5e03cfa87a8
5
5
  SHA512:
6
- metadata.gz: 8851e0bdf1022371b30818f4f0247356c0ec1b36a6dd2f179eadc372e8b715a3e1c6b8307dcb986ffe10313dc62c70a74196b23fa8f7db44d27b1a6dc8ddac9f
7
- data.tar.gz: 4885c0fc6b66dc9808e2deef17b7e9390eaa97f0998c30787b906310b1370fddd28a18f6ae90a0e97ecac80cccddc8e60cbd9177253ed122c91c140c71a62233
6
+ metadata.gz: 7d1007233623eca042e83c1b6be51cd577b1571491b010fcf0d57c611b267bc00a249a6b226875ac863cc300e5a426d608ad7a2f70eb4f7ac4f4afd3533f838a
7
+ data.tar.gz: 762e6e53caddf58c63d641ba24c21ba141f2cb9e6e7ef3ccf88cc82f50b60203cb8daab7a1185e2ddf8117d1925d9b2510a97b85d070406f67014acc6d00c880
data/Gemfile CHANGED
@@ -1,4 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ group :development do
4
+ gem 'passenger'
5
+ gem 'puma'
6
+ end
7
+
3
8
  # Specify your gem's dependencies in rack_check.gemspec
4
9
  gemspec
@@ -1,3 +1,5 @@
1
+ require 'socket'
2
+
1
3
  module RackCheck
2
4
 
3
5
  class ServerManager
@@ -37,6 +39,9 @@ class ServerManager
37
39
 
38
40
  def stop
39
41
  @stop_var.put true
42
+ while check_port
43
+ sleep 0.1
44
+ end
40
45
  end
41
46
 
42
47
  private
@@ -56,7 +61,10 @@ class ServerManager
56
61
  end
57
62
 
58
63
  def check_port
59
- `lsof -n -i :#{context.app_server_port}`.lines.count > 0
64
+ TCPSocket.new('localhost', context.app_server_port).close
65
+ true
66
+ rescue
67
+ false
60
68
  end
61
69
  end
62
70
  end
@@ -1,3 +1,3 @@
1
1
  module RackCheck
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tinco Andringa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-03 00:00:00.000000000 Z
11
+ date: 2017-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  requirements: []
129
129
  rubyforge_project:
130
- rubygems_version: 2.5.2
130
+ rubygems_version: 2.6.10
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: Tool that checks a Ruby application server for Rack compliancy