Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:jnunemaker/httparty
- Loading branch information
Showing
17 changed files
with
261 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,70 @@ | ||
require 'rubygems' | ||
require 'rake' | ||
|
||
begin | ||
require 'jeweler' | ||
Jeweler::Tasks.new do |gem| | ||
gem.name = "httparty" | ||
gem.summary = %Q{Makes http fun! Also, makes consuming restful web services dead easy.} | ||
gem.description = %Q{Makes http fun! Also, makes consuming restful web services dead easy.} | ||
gem.email = "nunemaker@gmail.com" | ||
gem.homepage = "http://httparty.rubyforge.org" | ||
gem.authors = ["John Nunemaker"] | ||
gem.add_dependency 'crack', '>= 0.1.1' | ||
gem.add_development_dependency "rspec" | ||
gem.post_install_message = "When you HTTParty, you must party hard!" | ||
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings | ||
end | ||
Jeweler::RubyforgeTasks.new do |rubyforge| | ||
rubyforge.doc_task = "rdoc" | ||
end | ||
rescue LoadError | ||
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" | ||
end | ||
|
||
require 'spec/rake/spectask' | ||
Spec::Rake::SpecTask.new(:spec) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.spec_files = FileList['spec/**/*_spec.rb'] | ||
end | ||
|
||
Spec::Rake::SpecTask.new(:rcov) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.pattern = 'spec/**/*_spec.rb' | ||
spec.rcov = true | ||
end | ||
|
||
task :spec => :check_dependencies | ||
|
||
begin | ||
require 'cucumber/rake/task' | ||
Cucumber::Rake::Task.new(:features) | ||
|
||
task :features => :check_dependencies | ||
rescue LoadError | ||
task :features do | ||
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber" | ||
end | ||
end | ||
|
||
task :default => [:spec, :features] | ||
|
||
require 'rake/rdoctask' | ||
Rake::RDocTask.new do |rdoc| | ||
if File.exist?('VERSION') | ||
version = File.read('VERSION') | ||
else | ||
version = "" | ||
end | ||
|
||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = "httparty #{version}" | ||
rdoc.rdoc_files.include('README*') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end | ||
|
||
desc 'Upload website files to rubyforge' | ||
task :website do | ||
sh %{rsync -av website/ jnunemaker@rubyforge.org:/var/www/gforge-projects/httparty} | ||
require 'rubygems' | ||
require 'rake' | ||
|
||
begin | ||
require 'jeweler' | ||
Jeweler::Tasks.new do |gem| | ||
gem.name = "httparty" | ||
gem.summary = %Q{Makes http fun! Also, makes consuming restful web services dead easy.} | ||
gem.description = %Q{Makes http fun! Also, makes consuming restful web services dead easy.} | ||
gem.email = "nunemaker@gmail.com" | ||
gem.homepage = "http://httparty.rubyforge.org" | ||
gem.authors = ["John Nunemaker"] | ||
gem.add_dependency 'crack', '>= 0.1.1' | ||
gem.add_development_dependency "rspec", "1.2.8" | ||
gem.post_install_message = "When you HTTParty, you must party hard!" | ||
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings | ||
end | ||
Jeweler::RubyforgeTasks.new do |rubyforge| | ||
rubyforge.doc_task = "rdoc" | ||
end | ||
rescue LoadError | ||
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" | ||
end | ||
|
||
require 'spec/rake/spectask' | ||
Spec::Rake::SpecTask.new(:spec) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.spec_files = FileList['spec/**/*_spec.rb'] | ||
spec.spec_opts = ['--options', 'spec/spec.opts'] | ||
end | ||
|
||
Spec::Rake::SpecTask.new(:rcov) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.pattern = 'spec/**/*_spec.rb' | ||
spec.rcov = true | ||
end | ||
|
||
task :spec => :check_dependencies | ||
|
||
begin | ||
require 'cucumber/rake/task' | ||
Cucumber::Rake::Task.new(:features) | ||
|
||
task :features => :check_dependencies | ||
rescue LoadError | ||
task :features do | ||
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber" | ||
end | ||
end | ||
|
||
task :default => [:spec, :features] | ||
|
||
require 'rake/rdoctask' | ||
Rake::RDocTask.new do |rdoc| | ||
if File.exist?('VERSION') | ||
version = File.read('VERSION') | ||
else | ||
version = "" | ||
end | ||
|
||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = "httparty #{version}" | ||
rdoc.rdoc_files.include('README*') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end | ||
|
||
desc 'Upload website files to rubyforge' | ||
task :website do | ||
sh %{rsync -av website/ jnunemaker@rubyforge.org:/var/www/gforge-projects/httparty} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.4.4 | ||
0.4.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Feature: Supports the timeout option | ||
In order to handle inappropriately slow response times | ||
As a developer | ||
I want my request to raise an exception after my specified timeout as elapsed | ||
|
||
Scenario: A long running response | ||
Given a remote service that returns '<h1>Some HTML</h1>' | ||
And that service is accessed at the path '/service.html' | ||
And that service takes 2 seconds to generate a response | ||
When I set my HTTParty timeout option to 1 | ||
And I call HTTParty#get with '/service.html' | ||
Then it should raise a Timeout::Error exception |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,109 @@ | ||
# Generated by jeweler | ||
# DO NOT EDIT THIS FILE | ||
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec` | ||
# -*- encoding: utf-8 -*- | ||
|
||
Gem::Specification.new do |s| | ||
s.name = %q{httparty} | ||
s.version = "0.4.4" | ||
s.version = "0.4.5" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version= | ||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["John Nunemaker"] | ||
s.date = %q{2009-07-19} | ||
s.date = %q{2009-09-12} | ||
s.default_executable = %q{httparty} | ||
s.description = %q{Makes http fun! Also, makes consuming restful web services dead easy.} | ||
s.email = %q{nunemaker@gmail.com} | ||
s.executables = ["httparty"] | ||
s.extra_rdoc_files = ["bin/httparty", "lib/httparty/cookie_hash.rb", "lib/httparty/core_extensions.rb", "lib/httparty/exceptions.rb", "lib/httparty/module_inheritable_attributes.rb", "lib/httparty/request.rb", "lib/httparty/response.rb", "lib/httparty/version.rb", "lib/httparty.rb", "README.rdoc"] | ||
s.files = ["bin/httparty", "cucumber.yml", "examples/aaws.rb", "examples/basic.rb", "examples/delicious.rb", "examples/google.rb", "examples/rubyurl.rb", "examples/twitter.rb", "examples/whoismyrep.rb", "features/basic_authentication.feature", "features/command_line.feature", "features/deals_with_http_error_codes.feature", "features/handles_multiple_formats.feature", "features/steps/env.rb", "features/steps/httparty_response_steps.rb", "features/steps/httparty_steps.rb", "features/steps/mongrel_helper.rb", "features/steps/remote_service_steps.rb", "features/supports_redirection.feature", "History", "httparty.gemspec", "lib/httparty/cookie_hash.rb", "lib/httparty/core_extensions.rb", "lib/httparty/exceptions.rb", "lib/httparty/module_inheritable_attributes.rb", "lib/httparty/request.rb", "lib/httparty/response.rb", "lib/httparty/version.rb", "lib/httparty.rb", "Manifest", "MIT-LICENSE", "Rakefile", "README.rdoc", "spec/fixtures/delicious.xml", "spec/fixtures/empty.xml", "spec/fixtures/google.html", "spec/fixtures/twitter.json", "spec/fixtures/twitter.xml", "spec/fixtures/undefined_method_add_node_for_nil.xml", "spec/httparty/cookie_hash_spec.rb", "spec/httparty/request_spec.rb", "spec/httparty/response_spec.rb", "spec/httparty_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "website/css/common.css", "website/index.html"] | ||
s.extra_rdoc_files = [ | ||
"README.rdoc" | ||
] | ||
s.files = [ | ||
".gitignore", | ||
"History", | ||
"MIT-LICENSE", | ||
"Manifest", | ||
"README.rdoc", | ||
"Rakefile", | ||
"VERSION", | ||
"bin/httparty", | ||
"cucumber.yml", | ||
"examples/aaws.rb", | ||
"examples/basic.rb", | ||
"examples/delicious.rb", | ||
"examples/google.rb", | ||
"examples/rubyurl.rb", | ||
"examples/twitter.rb", | ||
"examples/whoismyrep.rb", | ||
"features/basic_authentication.feature", | ||
"features/command_line.feature", | ||
"features/deals_with_http_error_codes.feature", | ||
"features/handles_multiple_formats.feature", | ||
"features/steps/env.rb", | ||
"features/steps/httparty_response_steps.rb", | ||
"features/steps/httparty_steps.rb", | ||
"features/steps/mongrel_helper.rb", | ||
"features/steps/remote_service_steps.rb", | ||
"features/supports_redirection.feature", | ||
"features/supports_timeout_option.feature", | ||
"httparty.gemspec", | ||
"lib/httparty.rb", | ||
"lib/httparty/cookie_hash.rb", | ||
"lib/httparty/core_extensions.rb", | ||
"lib/httparty/exceptions.rb", | ||
"lib/httparty/module_inheritable_attributes.rb", | ||
"lib/httparty/request.rb", | ||
"lib/httparty/response.rb", | ||
"lib/httparty/version.rb", | ||
"spec/fixtures/delicious.xml", | ||
"spec/fixtures/empty.xml", | ||
"spec/fixtures/google.html", | ||
"spec/fixtures/twitter.json", | ||
"spec/fixtures/twitter.xml", | ||
"spec/fixtures/undefined_method_add_node_for_nil.xml", | ||
"spec/httparty/cookie_hash_spec.rb", | ||
"spec/httparty/request_spec.rb", | ||
"spec/httparty/response_spec.rb", | ||
"spec/httparty_spec.rb", | ||
"spec/spec.opts", | ||
"spec/spec_helper.rb", | ||
"website/css/common.css", | ||
"website/index.html" | ||
] | ||
s.has_rdoc = true | ||
s.homepage = %q{http://httparty.rubyforge.org} | ||
s.post_install_message = %q{When you HTTParty, you must party hard!} | ||
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Httparty", "--main", "README.rdoc"] | ||
s.rdoc_options = ["--charset=UTF-8"] | ||
s.require_paths = ["lib"] | ||
s.rubyforge_project = %q{httparty} | ||
s.rubygems_version = %q{1.3.1} | ||
s.summary = %q{Makes http fun! Also, makes consuming restful web services dead easy.} | ||
s.test_files = [ | ||
"spec/httparty/cookie_hash_spec.rb", | ||
"spec/httparty/request_spec.rb", | ||
"spec/httparty/response_spec.rb", | ||
"spec/httparty_spec.rb", | ||
"spec/spec_helper.rb", | ||
"examples/aaws.rb", | ||
"examples/basic.rb", | ||
"examples/delicious.rb", | ||
"examples/google.rb", | ||
"examples/rubyurl.rb", | ||
"examples/twitter.rb", | ||
"examples/whoismyrep.rb" | ||
] | ||
|
||
if s.respond_to? :specification_version then | ||
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION | ||
s.specification_version = 2 | ||
|
||
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then | ||
s.add_runtime_dependency(%q<crack>, [">= 0.1.1"]) | ||
s.add_development_dependency(%q<echoe>, [">= 0"]) | ||
s.add_development_dependency(%q<rspec>, ["= 1.2.8"]) | ||
else | ||
s.add_dependency(%q<crack>, [">= 0.1.1"]) | ||
s.add_dependency(%q<echoe>, [">= 0"]) | ||
s.add_dependency(%q<rspec>, ["= 1.2.8"]) | ||
end | ||
else | ||
s.add_dependency(%q<crack>, [">= 0.1.1"]) | ||
s.add_dependency(%q<echoe>, [">= 0"]) | ||
s.add_dependency(%q<rspec>, ["= 1.2.8"]) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.