rest-client--rest-client/rest-client.gemspec

33 lines
1.3 KiB
Ruby
Raw Permalink Normal View History

2009-06-20 22:19:56 +00:00
# -*- encoding: utf-8 -*-
2014-03-13 01:03:14 +00:00
require File.expand_path('../lib/restclient/version', __FILE__)
2008-06-26 12:07:50 +00:00
Gem::Specification.new do |s|
s.name = 'rest-client'
s.version = RestClient::VERSION
s.authors = ['REST Client Team']
s.description = 'A simple HTTP and REST client for Ruby, inspired by the Sinatra microframework style of specifying actions: get, put, post, delete.'
s.license = 'MIT'
s.email = 'discuss@rest-client.groups.io'
s.executables = ['restclient']
2016-06-06 03:28:26 +00:00
s.extra_rdoc_files = ['README.md', 'history.md']
2014-04-01 00:42:19 +00:00
s.files = `git ls-files -z`.split("\0")
s.test_files = `git ls-files -z spec/`.split("\0")
2014-04-26 01:24:00 +00:00
s.homepage = 'https://github.com/rest-client/rest-client'
s.summary = 'Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions.'
2010-09-22 16:24:43 +00:00
2016-05-24 15:05:52 +00:00
s.add_development_dependency('webmock', '~> 2.0')
2016-06-05 23:57:19 +00:00
s.add_development_dependency('rspec', '~> 3.0')
s.add_development_dependency('pry', '~> 0')
s.add_development_dependency('pry-doc', '~> 0')
s.add_development_dependency('rdoc', '>= 2.4.2', '< 6.0')
s.add_development_dependency('rubocop', '~> 0.49')
Add dependency on http-accept for Content-Type. The previous "Content-Type" header parser was ported from Python and was not very idiomatic Ruby. While fast and correct per the RFCs, it was triggering bugs in Ruby MRI that we could probably work around. Ideally someone would fix the bugs in Ruby MRI, but I haven't had time to track them down. Switch to using HTTP::Accept for parsing the media-type charset out of the "Content-Type" header. Also relax the tests since HTTP::Accept is somewhat stricter in the input it will accept. As a result, rest-client will now ignore Content-Type headers with a trailing `;` character. (This is invalid per the RFCs, so impact is likely to be small in comparison to fixing the Ruby 2.4 memory leak.) I also tried using https://github.com/httprb/content_type.rb but it is significantly slower (caused 2x blowup in time on a simple benchmark) and doesn't correctly handle content-types containing '.' characters. Fixes: #523 (occasional MRI segfault) Fixes: #611 (MRI 2.4.* memory leak) * Unfortunately, HTTP::Accept does not support Ruby 2.0 due to its use of named capture groups in StringScanner, which was added in Ruby 2.1. Because rest-client still supports Ruby 2.0, fall back on the old logic when running on Ruby 2.0. Even though Ruby 2.0 is unsupported, it probably still sees wide use since it is the system Ruby even on macOS Sierra. * Don't bother running tests for .cgi_parse_header on Ruby 2.0. Still keep the higher level tests that will exercise the deprecated code.
2017-07-05 03:46:03 +00:00
s.add_dependency('http-accept', '>= 1.7.0', '< 2.0')
2015-03-16 21:21:03 +00:00
s.add_dependency('http-cookie', '>= 1.0.2', '< 2.0')
s.add_dependency('mime-types', '>= 1.16', '< 4.0')
s.add_dependency('netrc', '~> 0.8')
s.required_ruby_version = '>= 2.0.0'
2008-07-23 00:00:09 +00:00
end