stella 0.8.6.001 → 0.8.6.002

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/CHANGES.txt CHANGED
@@ -10,6 +10,12 @@ STELLA, CHANGES
10
10
  * TODO: request block conditions.
11
11
  * TODO: process templates for calls to set in get blocks
12
12
 
13
+ #### 0.8.7 (2010-04-??) ###############################
14
+
15
+ * FIXED: sequential, rsequential, and random values were broken for Arrays
16
+ * CHANGE: Enforce port 443 if port 80 and scheme is HTTPS.
17
+
18
+
13
19
  #### 0.8.6 (2010-04-14) ###############################
14
20
 
15
21
  * FIXED: Wait option and hosts on CLI were not being passed correctly
data/VERSION.yml CHANGED
@@ -2,4 +2,4 @@
2
2
  :MAJOR: 0
3
3
  :MINOR: 8
4
4
  :PATCH: 6
5
- :BUILD: '001'
5
+ :BUILD: '002'
data/lib/stella.rb CHANGED
@@ -139,8 +139,8 @@ module Stella
139
139
  blk.call res
140
140
  end
141
141
  rescue => ex
142
- STDERR.puts ex.message
143
- STDERR.puts ex.backtrace if Stella.debug?
142
+ Stella.stdout.info "#{ex.message} (#{ex.class})"
143
+ Stella.stdout.info ex.backtrace if Stella.debug?
144
144
  nil
145
145
  end
146
146
 
@@ -153,8 +153,8 @@ module Stella
153
153
  blk.call res
154
154
  end
155
155
  rescue => ex
156
- STDERR.puts ex.message
157
- STDERR.puts ex.backtrace if Stella.debug?
156
+ Stella.stdout.info ex.message
157
+ Stella.stdout.info ex.backtrace if Stella.debug?
158
158
  nil
159
159
  end
160
160
 
data/lib/stella/client.rb CHANGED
@@ -300,6 +300,7 @@ module Stella
300
300
  uri.scheme = base_uri.scheme if uri.scheme.nil?
301
301
  uri.host = base_uri.host if uri.host.nil?
302
302
  uri.port = base_uri.port if uri.port.nil?
303
+ uri.port = 443 if uri.port == 80 && uri.scheme == "https"
303
304
 
304
305
  # Support for specifying default path prefix:
305
306
  # $ stella verify -p plan.rb http://localhost/basicauth
@@ -244,9 +244,9 @@ class Stella::Client
244
244
 
245
245
  def random(*args)
246
246
  input, idxcol = *std_arg_processor(*args)
247
-
248
- if @random_value[input.object_id]
249
- value = @random_value[input.object_id]
247
+ input.digest
248
+ if @random_value[input.digest_cache]
249
+ value = @random_value[input.digest_cache]
250
250
  else
251
251
  value = case input.class.to_s
252
252
  when "Symbol"
@@ -266,7 +266,7 @@ class Stella::Client
266
266
  Stella.ld "RANDVALUES: #{input} #{value.class} #{value.inspect}"
267
267
  value = value[ rand(value.size) ] if value.is_a?(Array)
268
268
  Stella.ld "SELECTED: #{value.class} #{value} "
269
- @random_value[input.object_id] = value
269
+ @random_value[input.digest_cache] = value
270
270
  end
271
271
 
272
272
  # The resource may be an Array of Arrays (e.g. a CSV file)
@@ -284,9 +284,9 @@ class Stella::Client
284
284
  # NOTE: This is global across all users
285
285
  def sequential(*args)
286
286
  input, idxcol = *std_arg_processor(*args)
287
-
288
- if @sequential_value[input.object_id]
289
- value = @sequential_value[input.object_id]
287
+ input.digest # prime the cache
288
+ if @sequential_value[input.digest_cache]
289
+ value = @sequential_value[input.digest_cache]
290
290
  else
291
291
  value = case input.class.to_s
292
292
  when "Symbol"
@@ -299,14 +299,15 @@ class Stella::Client
299
299
  when "Proc"
300
300
  input.call
301
301
  end
302
- digest = value.object_id
302
+ digest = value.digest
303
303
  if value.is_a?(Array)
304
+ vsize = value.size
304
305
  idxrow = Stella::Client::Container.sequential_offset(digest, value.size-1)
305
306
  value = value[ idxrow ]
306
- Stella.ld "SELECTED(SEQ): #{value} #{idxrow} #{input} #{digest}"
307
+ Stella.ld "SELECTED(SEQ): #{value} #{idxrow} (of #{vsize-1}) #{input} #{digest}"
307
308
  end
308
309
  # I think this needs to be updated for global_sequential:
309
- @sequential_value[input.object_id] = value
310
+ @sequential_value[input.digest_cache] = value
310
311
  end
311
312
  # The resource may be an Array of Arrays (e.g. a CSV file)
312
313
  if value.is_a?(Array) && !idxcol.nil?
@@ -322,9 +323,9 @@ class Stella::Client
322
323
  # NOTE: This is global across all users
323
324
  def rsequential(*args)
324
325
  input, idxcol = *std_arg_processor(*args)
325
-
326
- if @rsequential_value[input.object_id]
327
- value = @rsequential_value[input.object_id]
326
+ input.digest
327
+ if @rsequential_value[input.digest_cache]
328
+ value = @rsequential_value[input.digest_cache]
328
329
  else
329
330
  value = case input.class.to_s
330
331
  when "Symbol"
@@ -337,7 +338,7 @@ class Stella::Client
337
338
  when "Proc"
338
339
  input.call
339
340
  end
340
- digest = value.object_id
341
+ digest = value.digest
341
342
  if value.is_a?(Array)
342
343
  idxrow = Stella::Client::Container.rsequential_offset(digest, value.size-1)
343
344
  value = value[ idxrow ]
@@ -345,7 +346,7 @@ class Stella::Client
345
346
  end
346
347
 
347
348
  # I think this needs to be updated for global_sequential:
348
- @rsequential_value[input.object_id] = value
349
+ @rsequential_value[input.digest_cache] = value
349
350
  end
350
351
  # The resource may be an Array of Arrays (e.g. a CSV file)
351
352
  if value.is_a?(Array) && !idxcol.nil?
data/stella.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{stella}
8
- s.version = "0.8.6.001"
8
+ s.version = "0.8.6.002"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Delano Mandelbaum"]
12
- s.date = %q{2010-04-14}
12
+ s.date = %q{2010-05-04}
13
13
  s.default_executable = %q{stella}
14
14
  s.description = %q{Blame Stella for breaking your web application!}
15
15
  s.email = %q{delano@solutious.com}
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.8.6.001
4
+ version: 0.8.6.002
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: 2010-04-14 00:00:00 -04:00
12
+ date: 2010-05-04 00:00:00 -04:00
13
13
  default_executable: stella
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency