rhack 1.2.1 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +13 -5
  2. data/README.md +21 -9
  3. data/ext/curb/curb.c +977 -977
  4. data/ext/curb/curb.h +52 -52
  5. data/ext/curb/curb_config.h +270 -270
  6. data/ext/curb/curb_easy.c +3437 -3434
  7. data/ext/curb/curb_easy.h +94 -94
  8. data/ext/curb/curb_errors.c +647 -647
  9. data/ext/curb/curb_errors.h +129 -129
  10. data/ext/curb/curb_macros.h +162 -162
  11. data/ext/curb/curb_multi.c +704 -702
  12. data/ext/curb/curb_multi.h +26 -26
  13. data/ext/curb/curb_postfield.c +523 -523
  14. data/ext/curb/curb_postfield.h +40 -40
  15. data/ext/curb/curb_upload.c +80 -80
  16. data/ext/curb/curb_upload.h +30 -30
  17. data/ext/curb-original/curb.c +977 -977
  18. data/ext/curb-original/curb.h +52 -52
  19. data/ext/curb-original/curb_config.h +238 -238
  20. data/ext/curb-original/curb_easy.c +3404 -3404
  21. data/ext/curb-original/curb_easy.h +90 -90
  22. data/ext/curb-original/curb_errors.c +647 -647
  23. data/ext/curb-original/curb_errors.h +129 -129
  24. data/ext/curb-original/curb_macros.h +159 -159
  25. data/ext/curb-original/curb_multi.c +633 -633
  26. data/ext/curb-original/curb_multi.h +26 -26
  27. data/ext/curb-original/curb_postfield.c +523 -523
  28. data/ext/curb-original/curb_postfield.h +40 -40
  29. data/ext/curb-original/curb_upload.c +80 -80
  30. data/ext/curb-original/curb_upload.h +30 -30
  31. data/lib/rhack/clients/base.rb +61 -10
  32. data/lib/rhack/clients/oauth.rb +4 -4
  33. data/lib/rhack/curl/easy.rb +1 -0
  34. data/lib/rhack/curl/global.rb +2 -0
  35. data/lib/rhack/curl/response.rb +4 -2
  36. data/lib/rhack/frame.rb +70 -32
  37. data/lib/rhack/js/browser/env.js +697 -697
  38. data/lib/rhack/js/browser/jquery.js +7180 -7180
  39. data/lib/rhack/js/browser/xmlsax.js +1564 -1564
  40. data/lib/rhack/js/browser/xmlw3cdom_1.js +1443 -1443
  41. data/lib/rhack/js/browser/xmlw3cdom_2.js +2744 -2744
  42. data/lib/rhack/page.rb +227 -68
  43. data/lib/rhack/scout.rb +52 -26
  44. data/lib/rhack/scout_squad.rb +10 -2
  45. data/lib/rhack/version.rb +1 -1
  46. data/rhack.gemspec +1 -1
  47. 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