rack-client 0.3.1.pre.e → 0.3.1.pre.f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -1,6 +1,4 @@
1
- require 'rubygems'
2
1
  require 'rake'
3
- require 'rake/gempackagetask'
4
2
  require 'rake/clean'
5
3
  require 'rspec/core/rake_task'
6
4
 
@@ -8,26 +6,6 @@ require 'rspec/core/rake_task'
8
6
  $:.unshift File.join(File.dirname(__FILE__), 'lib')
9
7
  require 'rack/client/version'
10
8
 
11
-
12
- spec = Gem::Specification.new do |s|
13
- s.name = "rack-client"
14
- s.rubyforge_project = s.name
15
- s.version = Rack::Client::VERSION
16
- s.author = "Tim Carey-Smith"
17
- s.email = "tim" + "@" + "spork.in"
18
- s.homepage = "http://github.com/halorgium/rack-client"
19
- s.summary = "A client wrapper around a Rack app or HTTP"
20
- s.description = s.summary
21
- s.files = %w[History.txt LICENSE README.textile Rakefile] + Dir["lib/**/*"] + Dir["demo/**/*"]
22
- s.test_files = Dir["spec/**/*"]
23
-
24
- s.add_bundler_dependencies
25
- end
26
-
27
- Rake::GemPackageTask.new(spec) do |package|
28
- package.gem_spec = spec
29
- end
30
-
31
9
  desc 'Install the package as a gem.'
32
10
  task :install => [:clean, :package] do
33
11
  gem = Dir['pkg/*.gem'].first
@@ -43,13 +43,16 @@ module Rack
43
43
  env.update 'SCRIPT_NAME' => ''
44
44
  env.update 'QUERY_STRING' => uri.query.to_s
45
45
 
46
- input = case body
47
- when nil then StringIO.new
48
- when String then StringIO.new(body)
49
- end
46
+ input, errors = StringIO.new(body.to_s), StringIO.new
47
+
48
+ if input.respond_to?(:set_encoding)
49
+ input.set_encoding('ASCII-8BIT')
50
+ errors.set_encoding('ASCII-8BIT')
51
+ end
52
+
50
53
 
51
54
  env.update 'rack.input' => input
52
- env.update 'rack.errors' => StringIO.new
55
+ env.update 'rack.errors' => errors
53
56
  env.update 'rack.url_scheme' => uri.scheme || 'http'
54
57
  env.update 'rack.version' => Rack::VERSION
55
58
  env.update 'rack.multithread' => true
@@ -754,7 +754,7 @@ x
754
754
  9
755
755
  build_env
756
756
  i
757
- 659
757
+ 620
758
758
  23
759
759
  2
760
760
  10
@@ -900,48 +900,6 @@ i
900
900
  6
901
901
  15
902
902
  20
903
- 5
904
- 49
905
- 20
906
- 0
907
- 49
908
- 21
909
- 0
910
- 13
911
- 10
912
- 164
913
- 15
914
- 20
915
- 5
916
- 49
917
- 20
918
- 0
919
- 49
920
- 18
921
- 0
922
- 9
923
- 169
924
- 1
925
- 8
926
- 185
927
- 20
928
- 6
929
- 7
930
- 22
931
- 64
932
- 20
933
- 5
934
- 49
935
- 20
936
- 0
937
- 81
938
- 23
939
- 81
940
- 23
941
- 19
942
- 6
943
- 15
944
- 20
945
903
  4
946
904
  44
947
905
  43
@@ -952,7 +910,7 @@ i
952
910
  1
953
911
  13
954
912
  7
955
- 24
913
+ 20
956
914
  64
957
915
  20
958
916
  6
@@ -975,12 +933,12 @@ i
975
933
  1
976
934
  13
977
935
  7
978
- 25
936
+ 21
979
937
  64
980
938
  20
981
939
  5
982
940
  49
983
- 26
941
+ 22
984
942
  0
985
943
  49
986
944
  9
@@ -1001,12 +959,15 @@ i
1001
959
  1
1002
960
  13
1003
961
  7
1004
- 27
962
+ 23
1005
963
  64
1006
964
  20
1007
965
  5
1008
966
  49
1009
- 28
967
+ 24
968
+ 0
969
+ 49
970
+ 22
1010
971
  0
1011
972
  49
1012
973
  9
@@ -1027,15 +988,15 @@ i
1027
988
  1
1028
989
  13
1029
990
  7
1030
- 29
991
+ 25
1031
992
  64
1032
993
  20
1033
994
  5
1034
995
  49
1035
- 30
996
+ 26
1036
997
  0
1037
998
  49
1038
- 26
999
+ 22
1039
1000
  0
1040
1001
  49
1041
1002
  9
@@ -1056,10 +1017,10 @@ i
1056
1017
  1
1057
1018
  13
1058
1019
  7
1059
- 31
1020
+ 27
1060
1021
  64
1061
1022
  7
1062
- 32
1023
+ 28
1063
1024
  64
1064
1025
  49
1065
1026
  9
@@ -1080,15 +1041,15 @@ i
1080
1041
  1
1081
1042
  13
1082
1043
  7
1083
- 33
1044
+ 29
1084
1045
  64
1085
1046
  20
1086
1047
  5
1087
1048
  49
1088
- 20
1049
+ 30
1089
1050
  0
1090
1051
  49
1091
- 26
1052
+ 22
1092
1053
  0
1093
1054
  49
1094
1055
  9
@@ -1098,88 +1059,103 @@ i
1098
1059
  10
1099
1060
  1
1100
1061
  15
1101
- 20
1102
- 3
1103
- 13
1104
- 1
1105
- 12
1106
- 49
1107
- 34
1108
- 1
1109
- 9
1110
- 380
1111
- 15
1112
1062
  45
1113
- 35
1114
- 36
1063
+ 31
1064
+ 32
1115
1065
  13
1116
1066
  71
1117
1067
  4
1118
1068
  47
1119
1069
  9
1120
- 375
1070
+ 330
1121
1071
  47
1122
1072
  49
1123
1073
  5
1124
1074
  0
1125
1075
  13
1076
+ 20
1077
+ 3
1078
+ 49
1079
+ 22
1080
+ 0
1126
1081
  47
1127
1082
  49
1128
1083
  6
1129
- 0
1084
+ 1
1130
1085
  15
1131
1086
  8
1132
- 378
1087
+ 338
1088
+ 20
1089
+ 3
1133
1090
  49
1134
- 4
1091
+ 22
1135
1092
  0
1136
- 8
1137
- 423
1138
- 13
1139
- 45
1140
- 37
1141
- 38
1142
- 12
1143
1093
  49
1144
- 34
1094
+ 4
1145
1095
  1
1146
- 9
1147
- 421
1148
- 15
1149
1096
  45
1150
- 35
1151
- 39
1097
+ 31
1098
+ 33
1152
1099
  13
1153
1100
  71
1154
1101
  4
1155
1102
  47
1156
1103
  9
1157
- 414
1104
+ 359
1158
1105
  47
1159
1106
  49
1160
1107
  5
1161
1108
  0
1162
1109
  13
1163
- 20
1164
- 3
1165
1110
  47
1166
1111
  49
1167
1112
  6
1168
- 1
1113
+ 0
1169
1114
  15
1170
1115
  8
1171
- 419
1172
- 20
1173
- 3
1116
+ 362
1174
1117
  49
1175
1118
  4
1176
- 1
1119
+ 0
1120
+ 17
1121
+ 2
1122
+ 19
1123
+ 7
1124
+ 15
1125
+ 19
1177
1126
  8
1178
- 423
1179
1127
  15
1128
+ 2
1129
+ 15
1130
+ 20
1131
+ 7
1132
+ 7
1133
+ 34
1134
+ 49
1135
+ 35
1180
1136
  1
1181
- 19
1137
+ 9
1138
+ 400
1139
+ 20
1140
+ 7
1182
1141
  7
1142
+ 36
1143
+ 64
1144
+ 49
1145
+ 34
1146
+ 1
1147
+ 15
1148
+ 20
1149
+ 8
1150
+ 7
1151
+ 36
1152
+ 64
1153
+ 49
1154
+ 34
1155
+ 1
1156
+ 8
1157
+ 401
1158
+ 1
1183
1159
  15
1184
1160
  20
1185
1161
  4
@@ -1192,7 +1168,7 @@ i
1192
1168
  1
1193
1169
  13
1194
1170
  7
1195
- 40
1171
+ 37
1196
1172
  64
1197
1173
  20
1198
1174
  7
@@ -1215,32 +1191,10 @@ i
1215
1191
  1
1216
1192
  13
1217
1193
  7
1218
- 41
1194
+ 38
1219
1195
  64
1220
- 45
1221
- 35
1222
- 42
1223
- 13
1224
- 71
1225
- 4
1226
- 47
1227
- 9
1228
- 483
1229
- 47
1230
- 49
1231
- 5
1232
- 0
1233
- 13
1234
- 47
1235
- 49
1236
- 6
1237
- 0
1238
- 15
1196
+ 20
1239
1197
  8
1240
- 486
1241
- 49
1242
- 4
1243
- 0
1244
1198
  49
1245
1199
  9
1246
1200
  2
@@ -1260,13 +1214,20 @@ i
1260
1214
  1
1261
1215
  13
1262
1216
  7
1263
- 43
1217
+ 39
1264
1218
  64
1265
1219
  20
1266
1220
  5
1267
1221
  49
1268
- 44
1222
+ 40
1269
1223
  0
1224
+ 13
1225
+ 10
1226
+ 473
1227
+ 15
1228
+ 7
1229
+ 41
1230
+ 64
1270
1231
  49
1271
1232
  9
1272
1233
  2
@@ -1286,13 +1247,13 @@ i
1286
1247
  1
1287
1248
  13
1288
1249
  7
1289
- 45
1250
+ 42
1290
1251
  64
1291
1252
  45
1292
- 46
1293
- 47
1294
1253
  43
1295
- 48
1254
+ 44
1255
+ 43
1256
+ 45
1296
1257
  49
1297
1258
  9
1298
1259
  2
@@ -1312,7 +1273,7 @@ i
1312
1273
  1
1313
1274
  13
1314
1275
  7
1315
- 49
1276
+ 46
1316
1277
  64
1317
1278
  2
1318
1279
  49
@@ -1334,7 +1295,7 @@ i
1334
1295
  1
1335
1296
  13
1336
1297
  7
1337
- 50
1298
+ 47
1338
1299
  64
1339
1300
  2
1340
1301
  49
@@ -1356,7 +1317,7 @@ i
1356
1317
  1
1357
1318
  13
1358
1319
  7
1359
- 51
1320
+ 48
1360
1321
  64
1361
1322
  3
1362
1323
  49
@@ -1378,30 +1339,30 @@ i
1378
1339
  1
1379
1340
  13
1380
1341
  7
1381
- 52
1342
+ 49
1382
1343
  64
1383
1344
  20
1384
1345
  4
1385
1346
  7
1386
- 43
1347
+ 39
1387
1348
  64
1388
1349
  49
1389
1350
  12
1390
1351
  1
1391
1352
  7
1392
- 53
1353
+ 50
1393
1354
  64
1394
1355
  83
1395
- 54
1356
+ 51
1396
1357
  9
1397
- 645
1358
+ 606
1398
1359
  7
1399
- 55
1360
+ 52
1400
1361
  64
1401
1362
  8
1402
- 648
1363
+ 609
1403
1364
  7
1404
- 56
1365
+ 53
1405
1366
  64
1406
1367
  49
1407
1368
  9
@@ -1415,16 +1376,16 @@ i
1415
1376
  4
1416
1377
  11
1417
1378
  I
1418
- e
1379
+ f
1419
1380
  I
1420
- 8
1381
+ 9
1421
1382
  I
1422
1383
  2
1423
1384
  I
1424
1385
  4
1425
1386
  n
1426
1387
  p
1427
- 57
1388
+ 54
1428
1389
  x
1429
1390
  4
1430
1391
  Hash
@@ -1481,18 +1442,6 @@ empty?
1481
1442
  s
1482
1443
  1
1483
1444
  /
1484
- x
1485
- 5
1486
- query
1487
- x
1488
- 4
1489
- nil?
1490
- s
1491
- 1
1492
- ?
1493
- x
1494
- 1
1495
- +
1496
1445
  s
1497
1446
  9
1498
1447
  PATH_INFO
@@ -1524,24 +1473,28 @@ s
1524
1473
  12
1525
1474
  QUERY_STRING
1526
1475
  x
1527
- 3
1528
- ===
1476
+ 5
1477
+ query
1529
1478
  x
1530
1479
  8
1531
1480
  StringIO
1532
1481
  n
1533
- x
1534
- 6
1535
- String
1536
- n
1537
1482
  n
1483
+ x
1484
+ 12
1485
+ set_encoding
1486
+ x
1487
+ 11
1488
+ respond_to?
1489
+ s
1490
+ 10
1491
+ ASCII-8BIT
1538
1492
  s
1539
1493
  10
1540
1494
  rack.input
1541
1495
  s
1542
1496
  11
1543
1497
  rack.errors
1544
- n
1545
1498
  s
1546
1499
  15
1547
1500
  rack.url_scheme
@@ -1549,6 +1502,9 @@ x
1549
1502
  6
1550
1503
  scheme
1551
1504
  s
1505
+ 4
1506
+ http
1507
+ s
1552
1508
  12
1553
1509
  rack.version
1554
1510
  x
@@ -1611,37 +1567,33 @@ I
1611
1567
  I
1612
1568
  90
1613
1569
  I
1614
- 26
1570
+ 27
1615
1571
  I
1616
- ba
1572
+ a7
1617
1573
  I
1618
1574
  28
1619
1575
  I
1620
- d1
1576
+ c1
1621
1577
  I
1622
1578
  29
1623
1579
  I
1624
- eb
1580
+ de
1625
1581
  I
1626
1582
  2a
1627
1583
  I
1628
- 105
1584
+ fb
1629
1585
  I
1630
1586
  2b
1631
1587
  I
1632
- 122
1588
+ 113
1633
1589
  I
1634
1590
  2c
1635
1591
  I
1636
- 13a
1637
- I
1638
- 2d
1639
- I
1640
- 157
1592
+ 130
1641
1593
  I
1642
- 2f
1594
+ 2e
1643
1595
  I
1644
- 15a
1596
+ 174
1645
1597
  I
1646
1598
  30
1647
1599
  I
@@ -1649,52 +1601,56 @@ I
1649
1601
  I
1650
1602
  31
1651
1603
  I
1652
- 1a6
1653
- I
1654
- 2f
1604
+ 186
1655
1605
  I
1656
- 1aa
1657
- I
1658
- 34
1606
+ 32
1659
1607
  I
1660
- 1c1
1608
+ 190
1661
1609
  I
1662
- 35
1610
+ 30
1663
1611
  I
1664
- 1ee
1612
+ 192
1665
1613
  I
1666
1614
  36
1667
1615
  I
1668
- 208
1616
+ 1a9
1669
1617
  I
1670
1618
  37
1671
1619
  I
1672
- 222
1620
+ 1c0
1673
1621
  I
1674
1622
  38
1675
1623
  I
1676
- 238
1624
+ 1e1
1677
1625
  I
1678
1626
  39
1679
1627
  I
1680
- 24e
1628
+ 1fb
1681
1629
  I
1682
1630
  3a
1683
1631
  I
1684
- 264
1632
+ 211
1633
+ I
1634
+ 3b
1635
+ I
1636
+ 227
1685
1637
  I
1686
1638
  3c
1687
1639
  I
1688
- 290
1640
+ 23d
1689
1641
  I
1690
1642
  3e
1691
1643
  I
1692
- 293
1644
+ 269
1645
+ I
1646
+ 40
1647
+ I
1648
+ 26c
1693
1649
  x
1694
1650
  59
1695
1651
  /Users/ben/code/rack-client/lib/rack/client/adapter/base.rb
1696
1652
  p
1697
- 8
1653
+ 9
1698
1654
  x
1699
1655
  14
1700
1656
  request_method
@@ -1719,6 +1675,9 @@ path_info
1719
1675
  x
1720
1676
  5
1721
1677
  input
1678
+ x
1679
+ 6
1680
+ errors
1722
1681
  p
1723
1682
  13
1724
1683
  I