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

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,11 +4,13 @@ module Rack
4
4
  class Basic
5
5
  include Rack::Client::DualBand
6
6
 
7
- def initialize(app, username, password)
8
- @app, @username, @password = app, username, password
7
+ def initialize(app, username, password, force = false)
8
+ @app, @username, @password, @force = app, username, password, force
9
9
  end
10
10
 
11
11
  def sync_call(env)
12
+ return authorized_call(env) if @force
13
+
12
14
  request = Rack::Request.new(env)
13
15
  response = Response.new(*@app.call(env))
14
16
  challenge = Basic::Challenge.new(request, response)
@@ -21,6 +23,8 @@ module Rack
21
23
  end
22
24
 
23
25
  def async_call(env, &b)
26
+ return authorized_call(env, &b) if @force
27
+
24
28
  @app.call(env) do |response_parts|
25
29
  request = Rack::Request.new(env)
26
30
  response = Response.new(*response_parts)
@@ -43,7 +47,7 @@ module Rack
43
47
  end
44
48
 
45
49
  def encoded_login
46
- ["#{@username}:#{@password}"].pack("m*")
50
+ ["#{@username}:#{@password}"].pack("m*").chomp
47
51
  end
48
52
 
49
53
  class Challenge < Abstract::Challenge
@@ -455,7 +455,7 @@ x
455
455
  15
456
456
  option_accessor
457
457
  i
458
- 56
458
+ 54
459
459
  5
460
460
  20
461
461
  0
@@ -480,9 +480,8 @@ i
480
480
  20
481
481
  0
482
482
  47
483
- 49
483
+ 101
484
484
  3
485
- 0
486
485
  7
487
486
  4
488
487
  63
@@ -498,9 +497,8 @@ i
498
497
  20
499
498
  0
500
499
  47
501
- 49
500
+ 101
502
501
  3
503
- 0
504
502
  7
505
503
  6
506
504
  63
@@ -728,7 +726,7 @@ p
728
726
  p
729
727
  11
730
728
  I
731
- 0
729
+ -1
732
730
  I
733
731
  6
734
732
  I
@@ -744,11 +742,11 @@ I
744
742
  I
745
743
  9
746
744
  I
747
- 26
745
+ 25
748
746
  I
749
747
  a
750
748
  I
751
- 38
749
+ 36
752
750
  x
753
751
  71
754
752
  /Users/ben/code/rack-client/lib/rack/client/middleware/cache/options.rb
@@ -774,7 +772,7 @@ x
774
772
  11
775
773
  option_name
776
774
  i
777
- 50
775
+ 49
778
776
  20
779
777
  0
780
778
  13
@@ -786,20 +784,19 @@ i
786
784
  2
787
785
  1
788
786
  9
789
- 25
787
+ 24
790
788
  15
791
789
  7
792
790
  3
793
791
  20
794
792
  0
795
793
  47
796
- 49
794
+ 101
797
795
  4
798
- 0
799
796
  63
800
797
  2
801
798
  8
802
- 49
799
+ 48
803
800
  13
804
801
  45
805
802
  5
@@ -809,12 +806,12 @@ i
809
806
  2
810
807
  1
811
808
  9
812
- 40
809
+ 39
813
810
  15
814
811
  20
815
812
  0
816
813
  8
817
- 49
814
+ 48
818
815
  15
819
816
  5
820
817
  45
@@ -863,7 +860,7 @@ raise
863
860
  p
864
861
  11
865
862
  I
866
- 0
863
+ -1
867
864
  I
868
865
  d
869
866
  I
@@ -875,15 +872,15 @@ I
875
872
  I
876
873
  f
877
874
  I
878
- 1a
875
+ 19
879
876
  I
880
877
  10
881
878
  I
882
- 29
879
+ 28
883
880
  I
884
881
  11
885
882
  I
886
- 32
883
+ 31
887
884
  x
888
885
  71
889
886
  /Users/ben/code/rack-client/lib/rack/client/middleware/cache/options.rb
@@ -969,7 +966,7 @@ x
969
966
  p
970
967
  5
971
968
  I
972
- 0
969
+ -1
973
970
  I
974
971
  61
975
972
  I
@@ -1107,7 +1104,7 @@ each
1107
1104
  p
1108
1105
  5
1109
1106
  I
1110
- 0
1107
+ -1
1111
1108
  I
1112
1109
  66
1113
1110
  I
@@ -1221,7 +1218,7 @@ options=
1221
1218
  p
1222
1219
  15
1223
1220
  I
1224
- 0
1221
+ -1
1225
1222
  I
1226
1223
  6f
1227
1224
  I
@@ -1489,9 +1486,9 @@ x
1489
1486
  8
1490
1487
  options=
1491
1488
  p
1492
- 27
1489
+ 29
1493
1490
  I
1494
- 0
1491
+ -1
1495
1492
  I
1496
1493
  7a
1497
1494
  I
@@ -1535,6 +1532,10 @@ I
1535
1532
  I
1536
1533
  84
1537
1534
  I
1535
+ 79
1536
+ I
1537
+ 7b
1538
+ I
1538
1539
  7c
1539
1540
  I
1540
1541
  93
@@ -1601,7 +1602,7 @@ x
1601
1602
  p
1602
1603
  5
1603
1604
  I
1604
- 0
1605
+ -1
1605
1606
  I
1606
1607
  89
1607
1608
  I
@@ -1673,7 +1674,7 @@ x
1673
1674
  p
1674
1675
  5
1675
1676
  I
1676
- 0
1677
+ -1
1677
1678
  I
1678
1679
  8d
1679
1680
  I
@@ -48,7 +48,7 @@ module Rack
48
48
  end
49
49
  end
50
50
 
51
- Yaml = YAML
51
+ Json = JSON
52
52
  end
53
53
  end
54
54
  end
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Client
3
- VERSION = "0.3.1.pre.f"
3
+ VERSION = "0.3.1.pre.g"
4
4
  end
5
5
  end
@@ -152,7 +152,7 @@ x
152
152
  VERSION
153
153
  s
154
154
  11
155
- 0.3.1.pre.e
155
+ 0.3.1.pre.f
156
156
  x
157
157
  9
158
158
  const_set
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1923832057
4
+ hash: 1923832058
5
5
  prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
9
  - 1
10
10
  - pre
11
- - f
12
- version: 0.3.1.pre.f
11
+ - g
12
+ version: 0.3.1.pre.g
13
13
  platform: ruby
14
14
  authors:
15
15
  - Tim Carey-Smith
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-12-03 00:00:00 -08:00
20
+ date: 2011-01-02 00:00:00 -08:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency