diff --git a/Gemfile b/Gemfile index a79e78f3..d9b07165 100755 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ source "http://gemcutter.org" bin_path "vendor/bin" disable_rubygems +disable_system_gems gem "thin" gem "shotgun" @@ -8,12 +9,13 @@ gem "templater" gem "sprockets" gem "sinatra" gem "sinatra-content-for" -gem "rack-test", "0.5.1" +gem "rack-test" gem "yui-compressor" gem "haml" gem "compass" gem "smusher" gem "rspec" +gem "rdoc" gem "sdoc" gem "cucumber" \ No newline at end of file diff --git a/Rakefile b/Rakefile index 88104e72..b8f992dd 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,3 @@ -require 'rubygems' require 'lib/middleman' require 'rake' require 'cucumber/rake/task' @@ -24,6 +23,7 @@ begin gem.add_dependency("smusher") gem.add_dependency("haml", ">=2.1.0") gem.add_dependency("compass") + gem.add_development_dependency("rdoc") gem.add_development_dependency("rspec") gem.add_development_dependency("sdoc") gem.add_development_dependency("cucumber") @@ -53,37 +53,35 @@ task :spec => :check_dependencies task :default => :spec -unless ENV["RUN_CODE_RUN"] - require 'rake/rdoctask' - require 'sdoc' +require 'rake/rdoctask' +require 'sdoc' - Rake::RDocTask.new do |rdoc| - if File.exist?('VERSION') - version = File.read('VERSION') - else - version = "" - end - - # rdoc.template = 'direct' - - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "middleman #{version}" - rdoc.rdoc_files.include('README*') - rdoc.rdoc_files.include('lib/**/*.rb') - rdoc.rdoc_files.exclude('lib/middleman/features/sprockets+ruby19.rb') - rdoc.rdoc_files.exclude('lib/middleman/templater+dynamic_renderer.rb') +Rake::RDocTask.new do |rdoc| + if File.exist?('VERSION') + version = File.read('VERSION') + else + version = "" end - desc "Build and publish documentation using GitHub Pages." - task :pages do - if !`git status`.include?('nothing to commit') - abort "dirty index - not publishing!" - end - - Rake::Task[:rerdoc].invoke - `git checkout gh-pages` - `ls -1 | grep -v rdoc | xargs rm -rf; mv rdoc/* .; rm -rf rdoc` - `git commit -a -m "update docs"; git push origin gh-pages` - `git checkout master` + # rdoc.template = 'direct' + + rdoc.rdoc_dir = 'rdoc' + rdoc.title = "middleman #{version}" + rdoc.rdoc_files.include('README*') + rdoc.rdoc_files.include('lib/**/*.rb') + rdoc.rdoc_files.exclude('lib/middleman/features/sprockets+ruby19.rb') + rdoc.rdoc_files.exclude('lib/middleman/templater+dynamic_renderer.rb') +end + +desc "Build and publish documentation using GitHub Pages." +task :pages do + if !`git status`.include?('nothing to commit') + abort "dirty index - not publishing!" end + + Rake::Task[:rerdoc].invoke + `git checkout gh-pages` + `ls -1 | grep -v rdoc | xargs rm -rf; mv rdoc/* .; rm -rf rdoc` + `git commit -a -m "update docs"; git push origin gh-pages` + `git checkout master` end \ No newline at end of file diff --git a/bin/mm-init b/bin/mm-init index 37a1dfd7..eb816c79 100755 --- a/bin/mm-init +++ b/bin/mm-init @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -require 'rubygems' +require File.join(File.dirname(File.dirname(__FILE__)), 'lib', 'middleman') require 'templater' module Generators diff --git a/lib/middleman.rb b/lib/middleman.rb index 62f05eab..962a077f 100644 --- a/lib/middleman.rb +++ b/lib/middleman.rb @@ -2,5 +2,5 @@ libdir = File.dirname(__FILE__) $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir) # Bundler -require File.join(File.dirname(libdir), "vendor", "gems", "environment") if ENV["RUN_CODE_RUN"] +require File.join(File.dirname(libdir), "vendor", "gems", "environment")# if ENV["RUN_CODE_RUN"] require 'middleman/base' \ No newline at end of file diff --git a/lib/middleman/base.rb b/lib/middleman/base.rb index be3ea213..c0964e98 100755 --- a/lib/middleman/base.rb +++ b/lib/middleman/base.rb @@ -1,6 +1,3 @@ -# Be nice to other library systems, like the wonderful Rip -require 'rubygems' unless ENV['NO_RUBYGEMS'] - # We're riding on Sinatra, so let's include it require 'sinatra/base' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2ac601b5..3660c15e 100755 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,9 +1,8 @@ -require 'rubygems' +#require 'rubygems' +require File.join(File.dirname(File.dirname(__FILE__)), 'lib', 'middleman') require 'spec' require 'rack/test' -require File.join(File.dirname(File.dirname(__FILE__)), 'lib', 'middleman') - Spec::Runner.configure do |config| end diff --git a/vendor/gems/environment.rb b/vendor/gems/environment.rb index 23411bde..00ae43a9 100644 --- a/vendor/gems/environment.rb +++ b/vendor/gems/environment.rb @@ -3,71 +3,73 @@ module Bundler file = File.expand_path(__FILE__) dir = File.dirname(file) + ENV["GEM_HOME"] = dir + ENV["GEM_PATH"] = dir ENV["PATH"] = "#{dir}/../bin:#{ENV["PATH"]}" ENV["RUBYOPT"] = "-r#{file} #{ENV["RUBYOPT"]}" - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/term-ansicolor-1.0.4/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/term-ansicolor-1.0.4/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/httpclient-2.1.5.2/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/httpclient-2.1.5.2/lib") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/builder-2.1.2/bin") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/builder-2.1.2/lib") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/polyglot-0.2.9/bin") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/polyglot-0.2.9/lib") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/treetop-1.4.2/bin") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/treetop-1.4.2/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rake-0.8.7/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rake-0.8.7/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rdoc-2.4.3/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rdoc-2.4.3/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/term-ansicolor-1.0.4/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/term-ansicolor-1.0.4/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/extlib-0.9.13/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/extlib-0.9.13/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/highline-1.5.1/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/highline-1.5.1/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/diff-lcs-1.1.2/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/diff-lcs-1.1.2/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/cucumber-0.4.4/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/cucumber-0.4.4/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rspec-1.2.9/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rspec-1.2.9/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/templater-1.0.0/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/templater-1.0.0/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/eventmachine-0.12.10/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/eventmachine-0.12.10/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/daemons-1.0.10/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/daemons-1.0.10/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/haml-2.2.13/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/haml-2.2.13/lib") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/json-1.2.0/bin") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/json-1.2.0/ext/json/ext") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/json-1.2.0/ext") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/json-1.2.0/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/smusher-0.4.2/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/smusher-0.4.2/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/configuration-1.1.0/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/configuration-1.1.0/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/extlib-0.9.13/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/extlib-0.9.13/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/diff-lcs-1.1.2/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/diff-lcs-1.1.2/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/launchy-0.3.3/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/launchy-0.3.3/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sdoc-0.2.14.1/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sdoc-0.2.14.1/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rspec-1.2.9/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rspec-1.2.9/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/cucumber-0.4.4/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/cucumber-0.4.4/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/daemons-1.0.10/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/daemons-1.0.10/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/yui-compressor-0.9.1/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/yui-compressor-0.9.1/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/highline-1.5.1/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/highline-1.5.1/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/haml-2.2.13/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/haml-2.2.13/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/compass-0.8.17/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/compass-0.8.17/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/eventmachine-0.12.10/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/eventmachine-0.12.10/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/httpclient-2.1.5.2/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/httpclient-2.1.5.2/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rake-0.8.7/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rake-0.8.7/lib") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sprockets-1.0.2/bin") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sprockets-1.0.2/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/templater-1.0.0/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/templater-1.0.0/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/smusher-0.4.2/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/smusher-0.4.2/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-1.0.1/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-1.0.1/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/thin-1.2.5/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/thin-1.2.5/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-test-0.5.2/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-test-0.5.2/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/configuration-1.1.0/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/configuration-1.1.0/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/launchy-0.3.3/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/launchy-0.3.3/lib") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/shotgun-0.4/bin") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/shotgun-0.4/lib") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sinatra-0.9.4/bin") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sinatra-0.9.4/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rdoc-2.4.3/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rdoc-2.4.3/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sdoc-0.2.14.1/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sdoc-0.2.14.1/lib") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sinatra-content-for-0.2/bin") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sinatra-content-for-0.2/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/thin-1.2.5/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/thin-1.2.5/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-1.0.1/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-1.0.1/lib") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-test-0.5.1/bin") - $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-test-0.5.1/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/compass-0.8.17/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/compass-0.8.17/lib") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/yui-compressor-0.9.1/bin") + $LOAD_PATH.unshift File.expand_path("#{dir}/gems/yui-compressor-0.9.1/lib") @gemfile = "#{dir}/../../Gemfile" diff --git a/vendor/gems/gems/rack-test-0.5.1/.document b/vendor/gems/gems/rack-test-0.5.2/.document similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/.document rename to vendor/gems/gems/rack-test-0.5.2/.document diff --git a/vendor/gems/gems/rack-test-0.5.1/.gitignore b/vendor/gems/gems/rack-test-0.5.2/.gitignore similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/.gitignore rename to vendor/gems/gems/rack-test-0.5.2/.gitignore diff --git a/vendor/gems/gems/rack-test-0.5.1/History.txt b/vendor/gems/gems/rack-test-0.5.2/History.txt similarity index 94% rename from vendor/gems/gems/rack-test-0.5.1/History.txt rename to vendor/gems/gems/rack-test-0.5.2/History.txt index 699509fa..feb4b94a 100644 --- a/vendor/gems/gems/rack-test-0.5.1/History.txt +++ b/vendor/gems/gems/rack-test-0.5.2/History.txt @@ -1,3 +1,10 @@ +== 0.5.2 / 2009-11-13 + +* Bug fixes + + * Call close on response body after iteration, not before (Simon Rozet) + * Add missing require for time in cookie_jar.rb (Jerry West) + == 0.5.1 / 2009-10-27 * Bug fixes diff --git a/vendor/gems/gems/rack-test-0.5.1/MIT-LICENSE.txt b/vendor/gems/gems/rack-test-0.5.2/MIT-LICENSE.txt similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/MIT-LICENSE.txt rename to vendor/gems/gems/rack-test-0.5.2/MIT-LICENSE.txt diff --git a/vendor/gems/gems/rack-test-0.5.1/README.rdoc b/vendor/gems/gems/rack-test-0.5.2/README.rdoc similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/README.rdoc rename to vendor/gems/gems/rack-test-0.5.2/README.rdoc diff --git a/vendor/gems/gems/rack-test-0.5.1/Rakefile b/vendor/gems/gems/rack-test-0.5.2/Rakefile similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/Rakefile rename to vendor/gems/gems/rack-test-0.5.2/Rakefile diff --git a/vendor/gems/gems/rack-test-0.5.1/Thorfile b/vendor/gems/gems/rack-test-0.5.2/Thorfile similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/Thorfile rename to vendor/gems/gems/rack-test-0.5.2/Thorfile diff --git a/vendor/gems/gems/rack-test-0.5.1/lib/rack/mock_session.rb b/vendor/gems/gems/rack-test-0.5.2/lib/rack/mock_session.rb similarity index 99% rename from vendor/gems/gems/rack-test-0.5.1/lib/rack/mock_session.rb rename to vendor/gems/gems/rack-test-0.5.2/lib/rack/mock_session.rb index 4a519e53..a3f509db 100644 --- a/vendor/gems/gems/rack-test-0.5.1/lib/rack/mock_session.rb +++ b/vendor/gems/gems/rack-test-0.5.2/lib/rack/mock_session.rb @@ -28,9 +28,10 @@ module Rack env["HTTP_COOKIE"] ||= cookie_jar.for(uri) @last_request = Rack::Request.new(env) status, headers, body = @app.call(@last_request.env) - body.close if body.respond_to?(:close) @last_response = MockResponse.new(status, headers, body, env["rack.errors"].flush) + body.close if body.respond_to?(:close) + cookie_jar.merge(last_response.headers["Set-Cookie"], uri) @after_request.each { |hook| hook.call } diff --git a/vendor/gems/gems/rack-test-0.5.1/lib/rack/test.rb b/vendor/gems/gems/rack-test-0.5.2/lib/rack/test.rb similarity index 99% rename from vendor/gems/gems/rack-test-0.5.1/lib/rack/test.rb rename to vendor/gems/gems/rack-test-0.5.2/lib/rack/test.rb index 20b0734a..dcc501e2 100644 --- a/vendor/gems/gems/rack-test-0.5.1/lib/rack/test.rb +++ b/vendor/gems/gems/rack-test-0.5.2/lib/rack/test.rb @@ -9,7 +9,7 @@ require "rack/test/uploaded_file" module Rack module Test - VERSION = "0.5.1" + VERSION = "0.5.2" DEFAULT_HOST = "example.org" MULTIPART_BOUNDARY = "----------XnJLe9ZIbbGUYtzPQJ16u1" diff --git a/vendor/gems/gems/rack-test-0.5.1/lib/rack/test/cookie_jar.rb b/vendor/gems/gems/rack-test-0.5.2/lib/rack/test/cookie_jar.rb similarity index 99% rename from vendor/gems/gems/rack-test-0.5.1/lib/rack/test/cookie_jar.rb rename to vendor/gems/gems/rack-test-0.5.2/lib/rack/test/cookie_jar.rb index 0e7aab66..b6b87fdc 100644 --- a/vendor/gems/gems/rack-test-0.5.1/lib/rack/test/cookie_jar.rb +++ b/vendor/gems/gems/rack-test-0.5.2/lib/rack/test/cookie_jar.rb @@ -1,4 +1,5 @@ require "uri" +require "time" module Rack module Test diff --git a/vendor/gems/gems/rack-test-0.5.1/lib/rack/test/methods.rb b/vendor/gems/gems/rack-test-0.5.2/lib/rack/test/methods.rb similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/lib/rack/test/methods.rb rename to vendor/gems/gems/rack-test-0.5.2/lib/rack/test/methods.rb diff --git a/vendor/gems/gems/rack-test-0.5.1/lib/rack/test/mock_digest_request.rb b/vendor/gems/gems/rack-test-0.5.2/lib/rack/test/mock_digest_request.rb similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/lib/rack/test/mock_digest_request.rb rename to vendor/gems/gems/rack-test-0.5.2/lib/rack/test/mock_digest_request.rb diff --git a/vendor/gems/gems/rack-test-0.5.1/lib/rack/test/uploaded_file.rb b/vendor/gems/gems/rack-test-0.5.2/lib/rack/test/uploaded_file.rb similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/lib/rack/test/uploaded_file.rb rename to vendor/gems/gems/rack-test-0.5.2/lib/rack/test/uploaded_file.rb diff --git a/vendor/gems/gems/rack-test-0.5.1/lib/rack/test/utils.rb b/vendor/gems/gems/rack-test-0.5.2/lib/rack/test/utils.rb similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/lib/rack/test/utils.rb rename to vendor/gems/gems/rack-test-0.5.2/lib/rack/test/utils.rb diff --git a/vendor/gems/gems/rack-test-0.5.1/rack-test.gemspec b/vendor/gems/gems/rack-test-0.5.2/rack-test.gemspec similarity index 97% rename from vendor/gems/gems/rack-test-0.5.1/rack-test.gemspec rename to vendor/gems/gems/rack-test-0.5.2/rack-test.gemspec index 1be716ce..e421235f 100644 --- a/vendor/gems/gems/rack-test-0.5.1/rack-test.gemspec +++ b/vendor/gems/gems/rack-test-0.5.2/rack-test.gemspec @@ -2,11 +2,11 @@ Gem::Specification.new do |s| s.name = %q{rack-test} - s.version = "0.5.1" + s.version = "0.5.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Bryan Helmkamp"] - s.date = %q{2009-10-27} + s.date = %q{2009-11-13} s.description = %q{Rack::Test is a small, simple testing API for Rack apps. It can be used on its own or as a reusable starting point for Web frameworks and testing libraries to build on. Most of its initial functionality is an extraction of Merb 1.0's diff --git a/vendor/gems/gems/rack-test-0.5.1/spec/fixtures/config.ru b/vendor/gems/gems/rack-test-0.5.2/spec/fixtures/config.ru similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/spec/fixtures/config.ru rename to vendor/gems/gems/rack-test-0.5.2/spec/fixtures/config.ru diff --git a/vendor/gems/gems/rack-test-0.5.1/spec/fixtures/fake_app.rb b/vendor/gems/gems/rack-test-0.5.2/spec/fixtures/fake_app.rb similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/spec/fixtures/fake_app.rb rename to vendor/gems/gems/rack-test-0.5.2/spec/fixtures/fake_app.rb diff --git a/vendor/gems/gems/rack-test-0.5.1/spec/fixtures/foo.txt b/vendor/gems/gems/rack-test-0.5.2/spec/fixtures/foo.txt similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/spec/fixtures/foo.txt rename to vendor/gems/gems/rack-test-0.5.2/spec/fixtures/foo.txt diff --git a/vendor/gems/gems/rack-test-0.5.1/spec/rack/test/cookie_spec.rb b/vendor/gems/gems/rack-test-0.5.2/spec/rack/test/cookie_spec.rb similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/spec/rack/test/cookie_spec.rb rename to vendor/gems/gems/rack-test-0.5.2/spec/rack/test/cookie_spec.rb diff --git a/vendor/gems/gems/rack-test-0.5.1/spec/rack/test/digest_auth_spec.rb b/vendor/gems/gems/rack-test-0.5.2/spec/rack/test/digest_auth_spec.rb similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/spec/rack/test/digest_auth_spec.rb rename to vendor/gems/gems/rack-test-0.5.2/spec/rack/test/digest_auth_spec.rb diff --git a/vendor/gems/gems/rack-test-0.5.1/spec/rack/test/multipart_spec.rb b/vendor/gems/gems/rack-test-0.5.2/spec/rack/test/multipart_spec.rb similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/spec/rack/test/multipart_spec.rb rename to vendor/gems/gems/rack-test-0.5.2/spec/rack/test/multipart_spec.rb diff --git a/vendor/gems/gems/rack-test-0.5.1/spec/rack/test/utils_spec.rb b/vendor/gems/gems/rack-test-0.5.2/spec/rack/test/utils_spec.rb similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/spec/rack/test/utils_spec.rb rename to vendor/gems/gems/rack-test-0.5.2/spec/rack/test/utils_spec.rb diff --git a/vendor/gems/gems/rack-test-0.5.1/spec/rack/test_spec.rb b/vendor/gems/gems/rack-test-0.5.2/spec/rack/test_spec.rb similarity index 91% rename from vendor/gems/gems/rack-test-0.5.1/spec/rack/test_spec.rb rename to vendor/gems/gems/rack-test-0.5.2/spec/rack/test_spec.rb index a8792c66..b0aaa61d 100644 --- a/vendor/gems/gems/rack-test-0.5.1/spec/rack/test_spec.rb +++ b/vendor/gems/gems/rack-test-0.5.2/spec/rack/test_spec.rb @@ -106,13 +106,43 @@ describe Rack::Test::Session do last_request.env["rack.input"].read.should == "foo[bar]=1" end - it "closes response's body" do - body = "Hello, World!" - body.should_receive(:close) - app = lambda {|env| - [200, {"Content-Type" => "text/html", "Content-Length" => "13"}, body] - } - Rack::Test::Session.new(Rack::MockSession.new(app)).request("/") + context "when the response body responds_to?(:close)" do + class CloseableBody + def initialize + @closed = false + end + + def each + return if @closed + yield "Hello, World!" + end + + def close + @closed = true + end + end + + it "closes response's body" do + body = CloseableBody.new + body.should_receive(:close) + + app = lambda do |env| + [200, {"Content-Type" => "text/html", "Content-Length" => "13"}, body] + end + + session = Rack::Test::Session.new(Rack::MockSession.new(app)) + session.request("/") + end + + it "closes response's body after iteration" do + app = lambda do |env| + [200, {"Content-Type" => "text/html", "Content-Length" => "13"}, CloseableBody.new] + end + + session = Rack::Test::Session.new(Rack::MockSession.new(app)) + session.request("/") + session.last_response.body.should == "Hello, World!" + end end context "when input is given" do diff --git a/vendor/gems/gems/rack-test-0.5.1/spec/spec.opts b/vendor/gems/gems/rack-test-0.5.2/spec/spec.opts similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/spec/spec.opts rename to vendor/gems/gems/rack-test-0.5.2/spec/spec.opts diff --git a/vendor/gems/gems/rack-test-0.5.1/spec/spec_helper.rb b/vendor/gems/gems/rack-test-0.5.2/spec/spec_helper.rb similarity index 100% rename from vendor/gems/gems/rack-test-0.5.1/spec/spec_helper.rb rename to vendor/gems/gems/rack-test-0.5.2/spec/spec_helper.rb diff --git a/vendor/gems/specifications/rack-test-0.5.1.gemspec b/vendor/gems/specifications/rack-test-0.5.2.gemspec similarity index 97% rename from vendor/gems/specifications/rack-test-0.5.1.gemspec rename to vendor/gems/specifications/rack-test-0.5.2.gemspec index c71da071..b24455dd 100644 --- a/vendor/gems/specifications/rack-test-0.5.1.gemspec +++ b/vendor/gems/specifications/rack-test-0.5.2.gemspec @@ -2,11 +2,11 @@ Gem::Specification.new do |s| s.name = %q{rack-test} - s.version = "0.5.1" + s.version = "0.5.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Bryan Helmkamp"] - s.date = %q{2009-10-26} + s.date = %q{2009-11-12} s.description = %q{Rack::Test is a small, simple testing API for Rack apps. It can be used on its own or as a reusable starting point for Web frameworks and testing libraries to build on. Most of its initial functionality is an extraction of Merb 1.0's