stella 0.7.2 → 0.7.2.002

Sign up to get free protection for your applications and to get access to all the features.
data/bin/stella CHANGED
@@ -54,7 +54,7 @@ class Stella::CLI::Definition
54
54
  Stella.loglev += 1
55
55
  end
56
56
  global :V, :version, "Display version number" do
57
- puts "Stella version: #{Stella::VERSION}"
57
+ puts "Stella version: #{Stella::VERSION} (#{Stella::VERSION::PATCH})"
58
58
  exit 0
59
59
  end
60
60
 
data/lib/stella/client.rb CHANGED
@@ -51,14 +51,17 @@ module Stella
51
51
 
52
52
  uri = build_request_uri req.uri, params, container
53
53
 
54
- if usecase.http_auth
54
+ if http_auth = usecase.http_auth || req.http_auth
55
55
  # TODO: The first arg is domain and can include a URI path.
56
56
  # Are there cases where this is important?
57
57
  domain = '%s://%s%s' % [uri.scheme, uri.host, '/'] #File.dirname(uri.path)
58
- user, pass = usecase.http_auth.user, usecase.http_auth.pass
59
- Stella.li2 " AUTH (#{usecase.http_auth.kind}) #{domain} (#{user}/#{pass})"
58
+ user, pass = http_auth.user, http_auth.pass
59
+ user = container.instance_eval &user if Proc === user
60
+ pass = container.instance_eval &pass if Proc === pass
61
+ Stella.li2 " AUTH (#{http_auth.kind}) #{domain} (#{user}/#{pass})"
60
62
  http_client.set_auth(domain, user, pass)
61
63
  end
64
+
62
65
  raise NoHostDefined, req.uri if uri.host.nil? || uri.host.empty?
63
66
  stella_id = [Time.now, self.digest_cache, req.digest_cache, params, headers, counter].gibbler
64
67
 
@@ -23,6 +23,7 @@ module Stella::Data::HTTP
23
23
  field :http_method
24
24
  field :http_version
25
25
  field :content_type
26
+ field :http_auth
26
27
 
27
28
  def has_body?
28
29
  !@body.nil?
@@ -39,6 +40,11 @@ module Stella::Data::HTTP
39
40
  instance_eval &definition unless definition.nil?
40
41
  end
41
42
 
43
+ def auth(user=nil, pass=nil, kind=:basic)
44
+ @http_auth ||= Stella::Testplan::Usecase::Auth.new
45
+ @http_auth.user, @http_auth.pass, @http_auth.kind = user, pass, kind
46
+ end
47
+
42
48
  def desc(*args)
43
49
  @desc = args.first unless args.empty?
44
50
  @desc
data/lib/stella/engine.rb CHANGED
@@ -5,7 +5,7 @@ module Stella::Engine
5
5
  module Base
6
6
  extend self
7
7
 
8
- @@client_limit = 200
8
+ @@client_limit = 1000
9
9
 
10
10
  def update(*args)
11
11
  what, *args = args
@@ -19,6 +19,7 @@ class Testplan
19
19
  #
20
20
  class Usecase
21
21
  include Gibbler::Complex
22
+ include Stella::Data::Helpers
22
23
  extend Attic
23
24
 
24
25
  class Auth < Struct.new(:kind, :user, :pass)
@@ -6,7 +6,7 @@ module Stella
6
6
  MAJOR = 0.freeze
7
7
  MINOR = 7.freeze
8
8
  TINY = 2.freeze
9
- PATCH = '001'.freeze
9
+ PATCH = '002'.freeze
10
10
  end
11
11
  def self.to_s; [MAJOR, MINOR, TINY].join('.'); end
12
12
  def self.to_f; self.to_s.to_f; end
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.2"
4
+ s.version = "0.7.2.002"
5
5
  s.summary = "Blame Stella for breaking your web applications."
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
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.2
4
+ version: 0.7.2.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: 2009-10-29 00:00:00 -04:00
12
+ date: 2009-10-30 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency