Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update to bundler

Add an inspect and to_s to the proxy to stop it from providing massive information
  • Loading branch information...
commit 441789d6ee3df3ebc0b6616e6fea39751c94cd6c 1 parent b756511
@hassox authored
View
10 Gemfile
@@ -0,0 +1,10 @@
+source :rubygems
+
+gemspec
+
+gem 'rake'
+
+group :test do
+ gem 'rspec', '~>2'
+ gem 'rack-test'
+end
View
31 Gemfile.lock
@@ -0,0 +1,31 @@
+PATH
+ remote: .
+ specs:
+ warden (1.0.4)
+ rack (>= 1.0)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ diff-lcs (1.1.2)
+ rack (1.2.2)
+ rack-test (0.6.0)
+ rack (>= 1.0)
+ rake (0.8.7)
+ rspec (2.5.0)
+ rspec-core (~> 2.5.0)
+ rspec-expectations (~> 2.5.0)
+ rspec-mocks (~> 2.5.0)
+ rspec-core (2.5.1)
+ rspec-expectations (2.5.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.5.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rack-test
+ rake
+ rspec (~> 2)
+ warden!
View
13 Rakefile
@@ -1,11 +1,12 @@
+# -*- encoding: utf-8 -*-
require 'rubygems'
+require 'rake'
+$:.unshift File.join(File.dirname(__FILE__), "lib")
+
+require 'rspec/core'
require 'rspec/core/rake_task'
-require File.join(File.dirname(__FILE__), "lib", "warden", "version")
task :default => :spec
-desc "Run specs"
-RSpec::Core::RakeTask.new do |t|
- t.pattern = 'spec/**/*_spec.rb'
- t.rspec_opts = %w(-fs --color --backtrace)
-end
+desc "Run all specs in spec directory"
+RSpec::Core::RakeTask.new(:spec)
View
8 lib/warden/proxy.rb
@@ -259,6 +259,14 @@ def custom_failure?
!!@custom_failure
end
+ def inspect(*args)
+ "Warden::Proxy:#{object_id} @config=#{@config.inspect}"
+ end
+
+ def to_s(*args)
+ inspect(*args)
+ end
+
private
def _perform_authentication(*args)
View
2  lib/warden/version.rb
@@ -1,4 +1,4 @@
# encoding: utf-8
module Warden
- VERSION = "1.0.3".freeze
+ VERSION = "1.0.4".freeze
end
View
37 warden.gemspec
@@ -1,23 +1,24 @@
# -*- encoding: utf-8 -*-
-$:.push File.expand_path("../lib", __FILE__)
-require "warden/version"
-Gem::Specification.new do |s|
- s.name = "warden"
- s.version = Warden::VERSION.dup
- s.platform = Gem::Platform::RUBY
- s.summary = "Rack middleware that provides authentication for rack applications"
- s.email = "has.sox@gmail.com"
- s.homepage = "http://github.com/hassox/warden"
- s.authors = ["Daniel Neighman", "José Valim"]
-
- s.rubyforge_project = "warden"
+require 'lib/warden/version'
- s.files = `git ls-files`.split("\n")
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+Gem::Specification.new do |s|
+ s.name = %q{warden}
+ s.version = Warden::VERSION
+ s.authors = ["Daniel Neighman"]
+ s.date = %q{2010-10-12}
+ s.email = %q{has.sox@gmail.com}
+ s.extra_rdoc_files = [
+ "LICENSE",
+ "README.textile"
+ ]
+ s.files = Dir["**/*"]
+ s.homepage = %q{http://github.com/hassox/warden}
+ s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
-
- s.add_dependency "rack", ">= 1.0.0"
- s.add_development_dependency "rspec", "~> 1"
+ s.rubyforge_project = %q{warden}
+ s.rubygems_version = %q{1.3.7}
+ s.summary = %q{Rack middleware that provides authentication for rack applications}
+ s.add_dependency "rack", ">= 1.0"
end
+
Please sign in to comment.
Something went wrong with that request. Please try again.