stella 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
data/stella.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = "stella"
3
3
  s.rubyforge_project = 'stella'
4
- s.version = "0.7.1"
4
+ s.version = "0.7.2"
5
5
  s.summary = "Blame Stella for breaking your web applications."
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
@@ -76,6 +76,8 @@
76
76
  support/useragents.txt
77
77
  tryouts/01_numeric_mixins_tryouts.rb
78
78
  tryouts/12_digest_tryouts.rb
79
+ tryouts/configs/failed_requests.rb
80
+ tryouts/configs/global_sequential.rb
79
81
  tryouts/proofs/thread_queue.rb
80
82
  vendor/httpclient-2.1.5.2/httpclient.rb
81
83
  vendor/httpclient-2.1.5.2/httpclient/auth.rb
@@ -93,7 +93,6 @@ post '/listing/add' do
93
93
  end
94
94
  @listings << { :name => params[:name], :id => rand(100000), :city => params[:city] }
95
95
  if params[:logo].is_a?(Hash) && params[:logo][:tempfile]
96
- p "TODO: Fix uploads"
97
96
  #p params[:logo]
98
97
  #FileUtils.mv params[:logo][:tempfile].path, "logo-#{params[:name]}"
99
98
  end
@@ -0,0 +1,31 @@
1
+
2
+ usecase "Failed Requests" do
3
+
4
+ get "/" do
5
+ param :req => 1 # success
6
+ end
7
+
8
+ get "/badpath" do
9
+ param :req => 2 # failed
10
+ end
11
+
12
+ get "/badpath" do
13
+ param :req => 3
14
+ response 404 do # success
15
+ end
16
+ end
17
+
18
+ get "/badpath" do
19
+ param :req => 4
20
+ response 404 do # failed
21
+ fail
22
+ end
23
+ end
24
+
25
+ get "/badpath" do
26
+ param :req => 5
27
+ response do # success
28
+ end
29
+ end
30
+
31
+ end
@@ -0,0 +1,18 @@
1
+
2
+ usecase "Global Sequential" do
3
+
4
+ get "/" do
5
+ param :req => 1
6
+ param :a => sequential([1,2,3])
7
+ param :b => sequential([4,5,6])
8
+ param :c => sequential([7,8,9])
9
+ end
10
+
11
+ get "/" do
12
+ param :req => 2
13
+ param :a => rsequential([33,22,11])
14
+ param :b => rsequential([66,55,44])
15
+ param :c => rsequential([99,88,77])
16
+ end
17
+
18
+ end
@@ -766,13 +766,13 @@ private
766
766
  do_get_block(req, proxy, conn, &block)
767
767
  end
768
768
  res = conn.pop
769
- res.request = req
770
769
  break
771
- rescue RetryableResponse
770
+ rescue RetryableResponse => ex
772
771
  res = conn.pop
773
772
  retry_count -= 1
774
773
  end
775
774
  end
775
+ res.request = req unless res.nil?
776
776
  res
777
777
  end
778
778
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stella
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-21 00:00:00 -04:00
12
+ date: 2009-10-29 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -134,6 +134,8 @@ files:
134
134
  - support/useragents.txt
135
135
  - tryouts/01_numeric_mixins_tryouts.rb
136
136
  - tryouts/12_digest_tryouts.rb
137
+ - tryouts/configs/failed_requests.rb
138
+ - tryouts/configs/global_sequential.rb
137
139
  - tryouts/proofs/thread_queue.rb
138
140
  - vendor/httpclient-2.1.5.2/httpclient.rb
139
141
  - vendor/httpclient-2.1.5.2/httpclient/auth.rb
@@ -174,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
176
  requirements: []
175
177
 
176
178
  rubyforge_project: stella
177
- rubygems_version: 1.3.2
179
+ rubygems_version: 1.3.5
178
180
  signing_key:
179
181
  specification_version: 3
180
182
  summary: Blame Stella for breaking your web applications.