realweb 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +10 -6
- data/lib/realweb.rb +2 -2
- metadata +8 -15
data/README.rdoc
CHANGED
@@ -36,12 +36,16 @@ the specs.
|
|
36
36
|
end
|
37
37
|
|
38
38
|
|
39
|
-
RealWeb.start_server boots the given config.ru in a
|
40
|
-
on the server object, the server is killed.
|
39
|
+
RealWeb.start_server boots the given config.ru in a fork. When you call stop
|
40
|
+
on the server object, the server process is killed.
|
41
41
|
|
42
|
-
The example
|
43
|
-
for RealWeb backends.
|
42
|
+
The example above is an extremely simplistic rack app. We usually use Sinatra
|
43
|
+
apps for RealWeb backends.
|
44
44
|
|
45
|
-
==
|
45
|
+
== Threaded Server
|
46
46
|
|
47
|
-
You can specifically
|
47
|
+
You can specifically boot a server in a thread instead of a fork with
|
48
|
+
start_server_in_thread. This can allow you to manipulate the state of the
|
49
|
+
RealWeb server. Use at your own risk. This can lead to harder to
|
50
|
+
comprehend tests. Actually reaching behind a "mock" api to change it's
|
51
|
+
behavior during the test run is not ideal.
|
data/lib/realweb.rb
CHANGED
@@ -6,19 +6,19 @@ module RealWeb
|
|
6
6
|
def start_server_in_thread(*args)
|
7
7
|
InThreadServer.new(*args) { |server| server.start }
|
8
8
|
end
|
9
|
-
alias start_server start_server_in_thread
|
10
9
|
|
11
10
|
def start_server_in_fork(*args)
|
12
11
|
ForkingServer.new(*args) { |server| server.start }
|
13
12
|
end
|
13
|
+
alias start_server start_server_in_fork
|
14
14
|
|
15
15
|
def with_server_in_thread(*args, &block)
|
16
16
|
InThreadServer.with_rackup(*args, &block)
|
17
17
|
end
|
18
|
-
alias with_server with_server_in_thread
|
19
18
|
|
20
19
|
def with_server_in_fork(*args, &block)
|
21
20
|
ForkingServer.with_rackup(*args, &block)
|
22
21
|
end
|
22
|
+
alias with_server with_server_in_fork
|
23
23
|
end
|
24
24
|
end
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: realweb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 19
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
8
|
+
- 6
|
9
|
+
version: 0.1.6
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Ben Burkert
|
@@ -17,25 +16,23 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date: 2010-06-
|
19
|
+
date: 2010-06-02 00:00:00 -07:00
|
21
20
|
default_executable:
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
24
|
-
|
25
|
-
none: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
24
|
requirements:
|
27
25
|
- - ">="
|
28
26
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 19
|
30
27
|
segments:
|
31
28
|
- 1
|
32
29
|
- 1
|
33
30
|
- 0
|
34
31
|
version: 1.1.0
|
35
|
-
requirement: *id001
|
36
32
|
name: rack
|
37
|
-
type: :runtime
|
38
33
|
prerelease: false
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
39
36
|
description: Easily runs a rack app for tests that hit web APIs
|
40
37
|
email: cloud-engineering@engineyard.com
|
41
38
|
executables: []
|
@@ -52,7 +49,7 @@ files:
|
|
52
49
|
- lib/realweb.rb
|
53
50
|
- README.rdoc
|
54
51
|
- LICENSE
|
55
|
-
has_rdoc:
|
52
|
+
has_rdoc: false
|
56
53
|
homepage: http://github.com/engineyard/realweb
|
57
54
|
licenses: []
|
58
55
|
|
@@ -62,27 +59,23 @@ rdoc_options: []
|
|
62
59
|
require_paths:
|
63
60
|
- lib
|
64
61
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
62
|
requirements:
|
67
63
|
- - ">="
|
68
64
|
- !ruby/object:Gem::Version
|
69
|
-
hash: 3
|
70
65
|
segments:
|
71
66
|
- 0
|
72
67
|
version: "0"
|
73
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
69
|
requirements:
|
76
70
|
- - ">="
|
77
71
|
- !ruby/object:Gem::Version
|
78
|
-
hash: 3
|
79
72
|
segments:
|
80
73
|
- 0
|
81
74
|
version: "0"
|
82
75
|
requirements: []
|
83
76
|
|
84
77
|
rubyforge_project:
|
85
|
-
rubygems_version: 1.3.
|
78
|
+
rubygems_version: 1.3.6
|
86
79
|
signing_key:
|
87
80
|
specification_version: 3
|
88
81
|
summary: Easily runs a rack app for tests that hit web APIs
|