1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00
rest-client--rest-client/rest-client.gemspec

33 lines
1.3 KiB
Ruby
Raw Normal View History

2009-06-20 18:19:56 -04:00
# -*- encoding: utf-8 -*-
2014-03-12 21:03:14 -04:00
require File.expand_path('../lib/restclient/version', __FILE__)
2008-06-26 08:07:50 -04: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-05 23:28:26 -04:00
s.extra_rdoc_files = ['README.md', 'history.md']
2014-03-31 20:42:19 -04:00
s.files = `git ls-files -z`.split("\0")
s.test_files = `git ls-files -z spec/`.split("\0")
2014-04-25 21:24:00 -04: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 12:24:43 -04:00
2016-05-24 11:05:52 -04:00
s.add_development_dependency('webmock', '~> 2.0')
2016-06-05 19:57:19 -04: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')
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-04 23:46:03 -04:00
s.add_dependency('http-accept', '>= 1.7.0', '< 2.0')
2015-03-16 17:21:03 -04: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-22 20:00:09 -04:00
end