reel 0.5.0 → 0.6.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of reel might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rspec +0 -1
- data/.travis.yml +3 -4
- data/CHANGES.md +25 -5
- data/Gemfile +3 -3
- data/Guardfile +13 -23
- data/examples/roundtrip.rb +15 -5
- data/lib/reel.rb +1 -0
- data/lib/reel/connection.rb +4 -2
- data/lib/reel/request.rb +2 -2
- data/lib/reel/request/body.rb +4 -0
- data/lib/reel/request/info.rb +7 -2
- data/lib/reel/request/parser.rb +5 -1
- data/lib/reel/response.rb +2 -2
- data/lib/reel/response/writer.rb +1 -1
- data/lib/reel/server.rb +21 -10
- data/lib/reel/server/http.rb +1 -1
- data/lib/reel/server/https.rb +6 -18
- data/lib/reel/server/unix.rb +18 -0
- data/lib/reel/spy.rb +2 -1
- data/lib/reel/stream.rb +2 -2
- data/lib/reel/version.rb +2 -2
- data/lib/reel/websocket.rb +77 -44
- data/reel.gemspec +4 -1
- data/spec/reel/connection_spec.rb +85 -66
- data/spec/reel/http_server_spec.rb +8 -11
- data/spec/reel/https_server_spec.rb +22 -33
- data/spec/reel/response/writer_spec.rb +1 -1
- data/spec/reel/response_spec.rb +2 -2
- data/spec/reel/unix_server_spec.rb +41 -0
- data/spec/reel/websocket_spec.rb +95 -20
- data/spec/spec_helper.rb +26 -4
- data/spec/support/create_certs.rb +73 -0
- metadata +65 -43
- data/spec/fixtures/ca.crt +0 -27
- data/spec/fixtures/ca.key +0 -27
- data/spec/fixtures/client.crt +0 -83
- data/spec/fixtures/client.key +0 -27
- data/spec/fixtures/client.unsigned.crt +0 -22
- data/spec/fixtures/server.crt +0 -82
- data/spec/fixtures/server.key +0 -27
data/spec/fixtures/client.key
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
-----BEGIN RSA PRIVATE KEY-----
|
2
|
-
MIIEpAIBAAKCAQEA1es86ZACF+BYo58rV/OBoB2/IWHTSQJ/vYOe1xq6rQB+gZS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-
us/+Ks3WIDyYdPSPnbE=
|
22
|
-
-----END CERTIFICATE-----
|
data/spec/fixtures/server.crt
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
Certificate:
|
2
|
-
Data:
|
3
|
-
Version: 3 (0x2)
|
4
|
-
Serial Number: 3 (0x3)
|
5
|
-
Signature Algorithm: sha1WithRSAEncryption
|
6
|
-
Issuer: C=US, ST=California, L=San Francisco, O=Celluloid, CN=ca.example.com/emailAddress=ca@example.com
|
7
|
-
Validity
|
8
|
-
Not Before: Nov 7 23:33:55 2013 GMT
|
9
|
-
Not After : Nov 7 23:33:55 2014 GMT
|
10
|
-
Subject: C=US, ST=California, O=Celluloid, CN=127.0.0.1/emailAddress=server@example.com
|
11
|
-
Subject Public Key Info:
|
12
|
-
Public Key Algorithm: rsaEncryption
|
13
|
-
RSA Public Key: (2048 bit)
|
14
|
-
Modulus (2048 bit):
|
15
|
-
00:a9:2e:cd:d7:83:4d:11:b6:81:b8:f9:22:9a:68:
|
16
|
-
d7:f0:e8:3b:de:f5:dd:0a:92:0d:02:35:f5:3c:02:
|
17
|
-
cc:4e:81:32:14:d5:0b:bc:b3:e6:f3:2a:4a:9e:eb:
|
18
|
-
a3:5f:09:ae:93:f1:53:e9:93:d5:5b:22:51:76:38:
|
19
|
-
d7:60:63:8a:3c:9a:e5:75:ab:e9:92:ea:3d:87:0c:
|
20
|
-
0b:56:3e:20:e3:3f:ef:58:3b:01:9f:fc:34:f7:2e:
|
21
|
-
14:9b:83:c9:3e:6a:52:f6:72:a7:bb:07:55:cd:52:
|
22
|
-
c3:45:12:f4:3e:c9:02:e5:8f:d3:16:29:be:e7:6d:
|
23
|
-
80:cc:f1:aa:9d:bf:8e:8a:1a:80:e3:f6:ff:6b:7e:
|
24
|
-
6e:10:88:ac:08:07:ab:bf:2a:84:06:db:66:05:ee:
|
25
|
-
c4:f8:3b:8e:23:53:fb:b6:d3:17:26:de:b5:75:12:
|
26
|
-
58:34:80:2f:d4:3f:f6:2a:9e:e3:0f:09:96:1c:2b:
|
27
|
-
f6:7d:bd:81:ad:0c:9e:86:f0:e6:03:70:f6:52:64:
|
28
|
-
17:64:aa:57:df:85:80:6c:b1:28:f7:47:bb:13:0a:
|
29
|
-
aa:21:e2:6b:34:f2:e9:1c:1b:27:1b:bd:43:be:71:
|
30
|
-
6a:cf:2a:79:b2:4a:c1:9a:09:8b:46:92:9e:d0:b0:
|
31
|
-
7d:5e:73:b4:06:03:4d:61:64:bd:b2:2f:c0:ae:24:
|
32
|
-
c5:1b
|
33
|
-
Exponent: 65537 (0x10001)
|
34
|
-
X509v3 extensions:
|
35
|
-
X509v3 Basic Constraints:
|
36
|
-
CA:FALSE
|
37
|
-
Netscape Comment:
|
38
|
-
OpenSSL Generated Certificate
|
39
|
-
X509v3 Subject Key Identifier:
|
40
|
-
B3:4D:7D:A4:A3:AC:8D:B7:7A:F6:EC:6E:25:60:CE:64:D2:2E:AC:AC
|
41
|
-
X509v3 Authority Key Identifier:
|
42
|
-
keyid:AA:86:7C:26:D1:5F:D6:58:04:1C:07:DC:57:33:B5:BA:B3:68:2D:AC
|
43
|
-
|
44
|
-
Signature Algorithm: sha1WithRSAEncryption
|
45
|
-
2b:fa:71:6f:e8:27:af:93:b8:2c:15:53:9d:00:15:25:0d:db:
|
46
|
-
33:ac:83:a7:a6:10:b0:d3:ca:7c:57:ae:d9:ca:4f:92:92:fe:
|
47
|
-
bd:3e:7d:59:af:33:59:1e:01:31:7c:01:7f:43:66:f3:96:84:
|
48
|
-
d6:20:e2:6d:69:61:eb:28:e9:b4:0c:9d:59:76:04:44:a1:0e:
|
49
|
-
76:7e:b5:d8:a8:30:7c:2a:82:63:ee:dc:34:56:26:e7:08:65:
|
50
|
-
7b:0e:31:33:f9:06:4a:51:4e:1a:e5:1a:5e:51:3c:d0:00:b2:
|
51
|
-
6a:6d:3c:c3:80:77:34:1a:0d:51:20:fc:5b:0b:e3:68:a0:3e:
|
52
|
-
72:10:b2:f7:7e:5d:a3:40:96:46:fe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