Module: Patron
- Defined in:
- lib/patron.rb,
lib/patron/util.rb,
lib/patron/error.rb,
lib/patron/request.rb,
lib/patron/session.rb,
lib/patron/version.rb,
lib/patron/response.rb,
lib/patron/proxy_type.rb,
lib/patron/response_decoding.rb,
ext/patron/session_ext.c
Defined Under Namespace
Modules: HeaderParser, ProxyType, Util Classes: Aborted, ConnectionFailed, Error, HeaderCharsetInvalid, HostResolutionError, NonRepresentableBody, PartialFileError, Request, Response, Session, TimeoutError, TooManyRedirects, URLFormatError, UnsupportedHTTPVersion, UnsupportedProtocol, UnsupportedSSLVersion
Constant Summary collapse
- VERSION =
"0.13.3"
Class Method Summary collapse
-
.libcurl_version ⇒ Object
Returns the version of the embedded libcurl.
-
.libcurl_version_exact ⇒ Object
Returns the version of the embedded libcurl.
-
.user_agent_string ⇒ String
Returns the default User-Agent string.
-
.version ⇒ String
Returns the version number of the gem.
Class Method Details
.libcurl_version ⇒ Object
Returns the version of the embedded libcurl.
@return [String] libcurl version string
247 248 249 250 251 |
# File 'ext/patron/session_ext.c', line 247 static VALUE libcurl_version(VALUE klass) { char* value = curl_version(); UNUSED_ARGUMENT(klass); return rb_str_new2(value); } |
.libcurl_version_exact ⇒ Object
Returns the version of the embedded libcurl.
@return [Array] an array of MAJOR, MINOR, PATCH integers
258 259 260 261 262 263 264 265 |
# File 'ext/patron/session_ext.c', line 258 static VALUE libcurl_version_exact(VALUE klass) { UNUSED_ARGUMENT(klass); VALUE cv_major = INT2FIX(LIBCURL_VERSION_MAJOR); VALUE cv_minor = INT2FIX(LIBCURL_VERSION_MINOR); VALUE cv_patch = INT2FIX(LIBCURL_VERSION_PATCH); VALUE version_arr = rb_ary_new3(3, cv_major, cv_minor, cv_patch); return version_arr; } |
.user_agent_string ⇒ String
Returns the default User-Agent string
17 18 19 |
# File 'lib/patron.rb', line 17 def self.user_agent_string @ua ||= "Patron/Ruby-%s-%s" % [version, libcurl_version] end |
.version ⇒ String
Returns the version number of the gem
11 12 13 |
# File 'lib/patron.rb', line 11 def self.version VERSION end |