schmurfy-bacon 1.7.3 → 1.7.4

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
- SHA1:
3
- metadata.gz: fe3fe3e7195524b20560f2b03750b4c0812a3d01
4
- data.tar.gz: cecd1d2257c54748a2f1deeb5184d25bef185d36
2
+ SHA256:
3
+ metadata.gz: 5bbbf87534ceb73d7947f2de3c145c63785eaf55fbec842f798e8b69dcab0643
4
+ data.tar.gz: bbfd8fa73f40ca2f9ab63604720fc7006301066a44643a5697003784e4906432
5
5
  SHA512:
6
- metadata.gz: 483b80a6f6b9ede2e41ef16985fbdc859b90cbaa68ce2e6631c1d5c3982cbec2d2b3c5b588497b4cd1566667dcc16910d62219c474c267c22a752a1fd14176c8
7
- data.tar.gz: f745dd3b561395507d5300074ce3b477379653f031965f6fc2ce9d077f3e788501cc85e63138986ea34ca8f24cc0f315d0aa7f34131323f703d20e529dbd907b
6
+ metadata.gz: a1342cfd205fe0e73de78bd8f647e00a713592d1b3911e386442007bd538c0c443cf4175677d767e4856f9c63381a3eb286273b88df52ed34675b54db9e1f8ef
7
+ data.tar.gz: 47df737e1cc4f3379a3f50661892c0462e7f1da3f9ea7111e5704526b1ee263168c0ad93a81b9a86c03aa7869efa1694690f81466f3e3d0608b96fbb99e55f3a
@@ -1,14 +1,13 @@
1
1
 
2
- gem 'em-http-request', '~> 1.0'
2
+ gem 'em-http-request'
3
3
  gem 'thin'
4
4
  require 'em-http-request'
5
5
  require 'thin'
6
6
 
7
- require 'em-synchrony'
8
- require 'em-synchrony/em-http'
9
-
10
7
  module Bacon
11
8
  module HTTPHelpers
9
+ @@servers = []
10
+
12
11
  def start_server(rack_app = nil, &block)
13
12
  $bacon_http_port ||= 11000
14
13
  $bacon_http_port+= 1
@@ -20,7 +19,20 @@ module Bacon
20
19
  end
21
20
 
22
21
  Thin::Logging.silent = true
23
- Thin::Server.start('127.0.0.1', $bacon_http_port, &block)
22
+
23
+ server = Thin::Server.new('127.0.0.1', $bacon_http_port, &block)
24
+ server.start
25
+
26
+ @@servers << server
27
+ end
28
+
29
+ def stop_servers()
30
+ @@servers.each{|s| s.stop() }
31
+ @@servers = []
32
+ end
33
+
34
+ def http_url(path)
35
+ "http://127.0.0.1:#{$bacon_http_port}#{path}"
24
36
  end
25
37
 
26
38
  def http_request(method, path, args = {}, &block)
data/lib/bacon/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bacon
2
- VERSION = "1.7.3"
2
+ VERSION = "1.7.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schmurfy-bacon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.3
4
+ version: 1.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Neukirchen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-03 00:00:00.000000000 Z
11
+ date: 2019-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor
@@ -100,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
- rubyforge_project:
104
- rubygems_version: 2.6.8
103
+ rubygems_version: 3.0.3
105
104
  signing_key:
106
105
  specification_version: 4
107
106
  summary: a small RSpec clone