rhack 1.2.1 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +13 -5
- data/README.md +21 -9
- data/ext/curb/curb.c +977 -977
- data/ext/curb/curb.h +52 -52
- data/ext/curb/curb_config.h +270 -270
- data/ext/curb/curb_easy.c +3437 -3434
- data/ext/curb/curb_easy.h +94 -94
- data/ext/curb/curb_errors.c +647 -647
- data/ext/curb/curb_errors.h +129 -129
- data/ext/curb/curb_macros.h +162 -162
- data/ext/curb/curb_multi.c +704 -702
- data/ext/curb/curb_multi.h +26 -26
- data/ext/curb/curb_postfield.c +523 -523
- data/ext/curb/curb_postfield.h +40 -40
- data/ext/curb/curb_upload.c +80 -80
- data/ext/curb/curb_upload.h +30 -30
- data/ext/curb-original/curb.c +977 -977
- data/ext/curb-original/curb.h +52 -52
- data/ext/curb-original/curb_config.h +238 -238
- data/ext/curb-original/curb_easy.c +3404 -3404
- data/ext/curb-original/curb_easy.h +90 -90
- data/ext/curb-original/curb_errors.c +647 -647
- data/ext/curb-original/curb_errors.h +129 -129
- data/ext/curb-original/curb_macros.h +159 -159
- data/ext/curb-original/curb_multi.c +633 -633
- data/ext/curb-original/curb_multi.h +26 -26
- data/ext/curb-original/curb_postfield.c +523 -523
- data/ext/curb-original/curb_postfield.h +40 -40
- data/ext/curb-original/curb_upload.c +80 -80
- data/ext/curb-original/curb_upload.h +30 -30
- data/lib/rhack/clients/base.rb +61 -10
- data/lib/rhack/clients/oauth.rb +4 -4
- data/lib/rhack/curl/easy.rb +1 -0
- data/lib/rhack/curl/global.rb +2 -0
- data/lib/rhack/curl/response.rb +4 -2
- data/lib/rhack/frame.rb +70 -32
- data/lib/rhack/js/browser/env.js +697 -697
- data/lib/rhack/js/browser/jquery.js +7180 -7180
- data/lib/rhack/js/browser/xmlsax.js +1564 -1564
- data/lib/rhack/js/browser/xmlw3cdom_1.js +1443 -1443
- data/lib/rhack/js/browser/xmlw3cdom_2.js +2744 -2744
- data/lib/rhack/page.rb +227 -68
- data/lib/rhack/scout.rb +52 -26
- data/lib/rhack/scout_squad.rb +10 -2
- data/lib/rhack/version.rb +1 -1
- data/rhack.gemspec +1 -1
- metadata +17 -17
@@ -1,90 +1,90 @@
|
|
1
|
-
/* curb_easy.h - Curl easy mode
|
2
|
-
* Copyright (c)2006 Ross Bamford.
|
3
|
-
* Licensed under the Ruby License. See LICENSE for details.
|
4
|
-
*
|
5
|
-
* $Id: curb_easy.h 25 2006-12-07 23:38:25Z roscopeco $
|
6
|
-
*/
|
7
|
-
#ifndef __CURB_EASY_H
|
8
|
-
#define __CURB_EASY_H
|
9
|
-
|
10
|
-
#include "curb.h"
|
11
|
-
|
12
|
-
#include <curl/easy.h>
|
13
|
-
|
14
|
-
#ifdef CURL_VERSION_SSL
|
15
|
-
#if LIBCURL_VERSION_NUM >= 0x070b00
|
16
|
-
# if LIBCURL_VERSION_NUM <= 0x071004
|
17
|
-
# define CURB_FTPSSL CURLOPT_FTP_SSL
|
18
|
-
# define CURB_FTPSSL_ALL CURLFTPSSL_ALL
|
19
|
-
# define CURB_FTPSSL_TRY CURLFTPSSL_TRY
|
20
|
-
# define CURB_FTPSSL_CONTROL CURLFTPSSL_CONTROL
|
21
|
-
# define CURB_FTPSSL_NONE CURLFTPSSL_NONE
|
22
|
-
# else
|
23
|
-
# define CURB_FTPSSL CURLOPT_USE_SSL
|
24
|
-
# define CURB_FTPSSL_ALL CURLUSESSL_ALL
|
25
|
-
# define CURB_FTPSSL_TRY CURLUSESSL_TRY
|
26
|
-
# define CURB_FTPSSL_CONTROL CURLUSESSL_CONTROL
|
27
|
-
# define CURB_FTPSSL_NONE CURLUSESSL_NONE
|
28
|
-
# endif
|
29
|
-
#endif
|
30
|
-
#endif
|
31
|
-
|
32
|
-
/* a lot of this *could* be kept in the handler itself,
|
33
|
-
* but then we lose the ability to query it's status.
|
34
|
-
*/
|
35
|
-
typedef struct {
|
36
|
-
/* The handler */
|
37
|
-
CURL *curl;
|
38
|
-
|
39
|
-
VALUE opts; /* rather then allocate everything we might need to store, allocate a Hash and only store objects we actually use... */
|
40
|
-
VALUE multi; /* keep a multi handle alive for each easy handle not being used by a multi handle. This improves easy performance when not within a multi context */
|
41
|
-
|
42
|
-
/* Other opts */
|
43
|
-
unsigned short local_port; // 0 is no port
|
44
|
-
unsigned short local_port_range; // " " " "
|
45
|
-
unsigned short proxy_port; // " " " "
|
46
|
-
int proxy_type;
|
47
|
-
long http_auth_types;
|
48
|
-
long proxy_auth_types;
|
49
|
-
long max_redirs;
|
50
|
-
unsigned long timeout;
|
51
|
-
unsigned long connect_timeout;
|
52
|
-
long dns_cache_timeout;
|
53
|
-
unsigned long ftp_response_timeout;
|
54
|
-
long low_speed_limit;
|
55
|
-
long low_speed_time;
|
56
|
-
long ssl_version;
|
57
|
-
long use_ssl;
|
58
|
-
long ftp_filemethod;
|
59
|
-
unsigned short resolve_mode;
|
60
|
-
|
61
|
-
/* bool flags */
|
62
|
-
char proxy_tunnel;
|
63
|
-
char fetch_file_time;
|
64
|
-
char ssl_verify_peer;
|
65
|
-
char ssl_verify_host;
|
66
|
-
char header_in_body;
|
67
|
-
char use_netrc;
|
68
|
-
char follow_location;
|
69
|
-
char unrestricted_auth;
|
70
|
-
char verbose;
|
71
|
-
char multipart_form_post;
|
72
|
-
char enable_cookies;
|
73
|
-
char ignore_content_length;
|
74
|
-
char callback_active;
|
75
|
-
|
76
|
-
struct curl_slist *curl_headers;
|
77
|
-
struct curl_slist *curl_ftp_commands;
|
78
|
-
|
79
|
-
int last_result; /* last result code from multi loop */
|
80
|
-
|
81
|
-
} ruby_curl_easy;
|
82
|
-
|
83
|
-
extern VALUE cCurlEasy;
|
84
|
-
|
85
|
-
VALUE ruby_curl_easy_setup(ruby_curl_easy *rbce);
|
86
|
-
VALUE ruby_curl_easy_cleanup(VALUE self, ruby_curl_easy *rbce);
|
87
|
-
|
88
|
-
void init_curb_easy();
|
89
|
-
|
90
|
-
#endif
|
1
|
+
/* curb_easy.h - Curl easy mode
|
2
|
+
* Copyright (c)2006 Ross Bamford.
|
3
|
+
* Licensed under the Ruby License. See LICENSE for details.
|
4
|
+
*
|
5
|
+
* $Id: curb_easy.h 25 2006-12-07 23:38:25Z roscopeco $
|
6
|
+
*/
|
7
|
+
#ifndef __CURB_EASY_H
|
8
|
+
#define __CURB_EASY_H
|
9
|
+
|
10
|
+
#include "curb.h"
|
11
|
+
|
12
|
+
#include <curl/easy.h>
|
13
|
+
|
14
|
+
#ifdef CURL_VERSION_SSL
|
15
|
+
#if LIBCURL_VERSION_NUM >= 0x070b00
|
16
|
+
# if LIBCURL_VERSION_NUM <= 0x071004
|
17
|
+
# define CURB_FTPSSL CURLOPT_FTP_SSL
|
18
|
+
# define CURB_FTPSSL_ALL CURLFTPSSL_ALL
|
19
|
+
# define CURB_FTPSSL_TRY CURLFTPSSL_TRY
|
20
|
+
# define CURB_FTPSSL_CONTROL CURLFTPSSL_CONTROL
|
21
|
+
# define CURB_FTPSSL_NONE CURLFTPSSL_NONE
|
22
|
+
# else
|
23
|
+
# define CURB_FTPSSL CURLOPT_USE_SSL
|
24
|
+
# define CURB_FTPSSL_ALL CURLUSESSL_ALL
|
25
|
+
# define CURB_FTPSSL_TRY CURLUSESSL_TRY
|
26
|
+
# define CURB_FTPSSL_CONTROL CURLUSESSL_CONTROL
|
27
|
+
# define CURB_FTPSSL_NONE CURLUSESSL_NONE
|
28
|
+
# endif
|
29
|
+
#endif
|
30
|
+
#endif
|
31
|
+
|
32
|
+
/* a lot of this *could* be kept in the handler itself,
|
33
|
+
* but then we lose the ability to query it's status.
|
34
|
+
*/
|
35
|
+
typedef struct {
|
36
|
+
/* The handler */
|
37
|
+
CURL *curl;
|
38
|
+
|
39
|
+
VALUE opts; /* rather then allocate everything we might need to store, allocate a Hash and only store objects we actually use... */
|
40
|
+
VALUE multi; /* keep a multi handle alive for each easy handle not being used by a multi handle. This improves easy performance when not within a multi context */
|
41
|
+
|
42
|
+
/* Other opts */
|
43
|
+
unsigned short local_port; // 0 is no port
|
44
|
+
unsigned short local_port_range; // " " " "
|
45
|
+
unsigned short proxy_port; // " " " "
|
46
|
+
int proxy_type;
|
47
|
+
long http_auth_types;
|
48
|
+
long proxy_auth_types;
|
49
|
+
long max_redirs;
|
50
|
+
unsigned long timeout;
|
51
|
+
unsigned long connect_timeout;
|
52
|
+
long dns_cache_timeout;
|
53
|
+
unsigned long ftp_response_timeout;
|
54
|
+
long low_speed_limit;
|
55
|
+
long low_speed_time;
|
56
|
+
long ssl_version;
|
57
|
+
long use_ssl;
|
58
|
+
long ftp_filemethod;
|
59
|
+
unsigned short resolve_mode;
|
60
|
+
|
61
|
+
/* bool flags */
|
62
|
+
char proxy_tunnel;
|
63
|
+
char fetch_file_time;
|
64
|
+
char ssl_verify_peer;
|
65
|
+
char ssl_verify_host;
|
66
|
+
char header_in_body;
|
67
|
+
char use_netrc;
|
68
|
+
char follow_location;
|
69
|
+
char unrestricted_auth;
|
70
|
+
char verbose;
|
71
|
+
char multipart_form_post;
|
72
|
+
char enable_cookies;
|
73
|
+
char ignore_content_length;
|
74
|
+
char callback_active;
|
75
|
+
|
76
|
+
struct curl_slist *curl_headers;
|
77
|
+
struct curl_slist *curl_ftp_commands;
|
78
|
+
|
79
|
+
int last_result; /* last result code from multi loop */
|
80
|
+
|
81
|
+
} ruby_curl_easy;
|
82
|
+
|
83
|
+
extern VALUE cCurlEasy;
|
84
|
+
|
85
|
+
VALUE ruby_curl_easy_setup(ruby_curl_easy *rbce);
|
86
|
+
VALUE ruby_curl_easy_cleanup(VALUE self, ruby_curl_easy *rbce);
|
87
|
+
|
88
|
+
void init_curb_easy();
|
89
|
+
|
90
|
+
#endif
|