soup-ruby 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/soup/extconf.rb +5 -22
- data/ext/soup/soup.c +0 -15
- data/ext/soup/soup.cr +1 -1
- data/lib/soup/version.rb +1 -1
- metadata +57 -36
- checksums.yaml +0 -7
data/ext/soup/extconf.rb
CHANGED
@@ -19,37 +19,20 @@ end
|
|
19
19
|
# Look for headers in {gem_root}/ext/{package}
|
20
20
|
if use_gems
|
21
21
|
%w[
|
22
|
-
glib2 gdk_pixbuf2 atk gtk2].each do |package|
|
23
|
-
|
24
|
-
|
25
|
-
$CFLAGS += " -I" + Gem.loaded_specs[package].full_gem_path + "/ext/" + package
|
26
|
-
else
|
27
|
-
if fn = $".find { |n| n.sub(/[.](so|rb)$/,'') == package }
|
28
|
-
dr = $:.find { |d| File.exist?(File.join(d, fn)) }
|
29
|
-
pt = File.join(dr,fn) if dr && fn
|
30
|
-
else
|
31
|
-
pt = "??"
|
32
|
-
end
|
33
|
-
STDERR.puts "require '" + package + "' loaded '"+pt+"' instead of the gem - trying to continue, but build may fail"
|
34
|
-
end
|
22
|
+
glib2 gdk_pixbuf2 atk gtk2 ].each do |package|
|
23
|
+
require package
|
24
|
+
$CFLAGS += " -I"+Gem.loaded_specs[package].full_gem_path+"/ext/"+package
|
35
25
|
end
|
36
26
|
end
|
37
27
|
if RbConfig::CONFIG.has_key?('rubyhdrdir')
|
38
|
-
|
28
|
+
$CFLAGS += " -I" + RbConfig::CONFIG['rubyhdrdir']+'/ruby'
|
39
29
|
end
|
40
30
|
|
41
31
|
$CFLAGS += " -I."
|
42
32
|
have_func("rb_errinfo")
|
43
33
|
PKGConfig.have_package("gtk+-2.0") or exit(-1)
|
44
34
|
PKGConfig.have_package("libsoup-2.4") or exit(-1)
|
45
|
-
|
46
|
-
unless have_header("libsoup/soup.h")
|
47
|
-
paths = Gem.find_files("libsoup/soup.h")
|
48
|
-
paths.each do |path|
|
49
|
-
$CFLAGS += " '-I#{File.dirname(path)}'"
|
50
|
-
end
|
51
|
-
have_header("libsoup/soup.h") or exit -1
|
52
|
-
end
|
35
|
+
have_header("libsoup/soup.h") or exit(-1)
|
53
36
|
|
54
37
|
STDOUT.print("checking for new allocation framework... ") # for ruby-1.7
|
55
38
|
if Object.respond_to? :allocate
|
data/ext/soup/soup.c
CHANGED
@@ -139,11 +139,7 @@ static VALUE rubber_flags_cmp(VALUE value, VALUE other)
|
|
139
139
|
VALUE a,b;
|
140
140
|
a = rb_funcall(value, rb_intern("to_i"), 0);
|
141
141
|
b = rb_funcall(other, rb_intern("to_i"), 0);
|
142
|
-
#ifdef RB_NUM_COERCE_FUNCS_NEED_OPID
|
143
|
-
return rb_num_coerce_cmp(a, b, rb_intern("=="));
|
144
|
-
#else
|
145
142
|
return rb_num_coerce_cmp(a, b);
|
146
|
-
#endif
|
147
143
|
}
|
148
144
|
|
149
145
|
static VALUE rubber_flags_to_i(VALUE value)
|
@@ -210,7 +206,6 @@ static VALUE flagsMessageFlags_SOUP_MESSAGE_NO_REDIRECT = Qnil;
|
|
210
206
|
static VALUE flagsMessageFlags_SOUP_MESSAGE_CAN_REBUILD = Qnil;
|
211
207
|
static VALUE flagsMessageFlags_SOUP_MESSAGE_CONTENT_DECODED = Qnil;
|
212
208
|
static VALUE flagsMessageFlags_SOUP_MESSAGE_CERTIFICATE_TRUSTED = Qnil;
|
213
|
-
static VALUE flagsMessageFlags_SOUP_MESSAGE_NEW_CONNECTION = Qnil;
|
214
209
|
static VALUE rubber_flagsMessageFlags_flags_inspect(VALUE value)
|
215
210
|
{
|
216
211
|
FlagsData *data = NULL;
|
@@ -246,12 +241,6 @@ static VALUE flagsMessageFlags_SOUP_MESSAGE_NEW_CONNECTION = Qnil;
|
|
246
241
|
rb_str_cat2(str, "certificate-trusted");
|
247
242
|
c ++;
|
248
243
|
}
|
249
|
-
if ((data->value & SOUP_MESSAGE_NEW_CONNECTION)==SOUP_MESSAGE_NEW_CONNECTION) {
|
250
|
-
if (c>0)
|
251
|
-
rb_str_cat2(str, ", ");
|
252
|
-
rb_str_cat2(str, "new-connection");
|
253
|
-
c ++;
|
254
|
-
}
|
255
244
|
rb_str_cat2(str, " (");
|
256
245
|
sprintf(number, "%i", data->value);
|
257
246
|
rb_str_cat2(str, number);
|
@@ -276,7 +265,6 @@ static VALUE flags_MessageFlags_to_ruby(int value) { switch(value) {
|
|
276
265
|
case SOUP_MESSAGE_CAN_REBUILD: return flagsMessageFlags_SOUP_MESSAGE_CAN_REBUILD;
|
277
266
|
case SOUP_MESSAGE_CONTENT_DECODED: return flagsMessageFlags_SOUP_MESSAGE_CONTENT_DECODED;
|
278
267
|
case SOUP_MESSAGE_CERTIFICATE_TRUSTED: return flagsMessageFlags_SOUP_MESSAGE_CERTIFICATE_TRUSTED;
|
279
|
-
case SOUP_MESSAGE_NEW_CONNECTION: return flagsMessageFlags_SOUP_MESSAGE_NEW_CONNECTION;
|
280
268
|
}; return make_flags_value(flagsMessageFlags, value, "various", "Various"); }
|
281
269
|
static int flags_ruby_to_MessageFlags(VALUE val) { return flags_value_to_int(val, flagsMessageFlags); }
|
282
270
|
static VALUE cMessage;
|
@@ -730,9 +718,6 @@ Init_soup(void)
|
|
730
718
|
flagsMessageFlags_SOUP_MESSAGE_CERTIFICATE_TRUSTED = make_flags_value(flagsMessageFlags, SOUP_MESSAGE_CERTIFICATE_TRUSTED, "certificate-trusted", "SOUP_MESSAGE_CERTIFICATE_TRUSTED");
|
731
719
|
rb_obj_freeze(flagsMessageFlags_SOUP_MESSAGE_CERTIFICATE_TRUSTED);
|
732
720
|
rb_define_const(flagsMessageFlags, "CERTIFICATE_TRUSTED", flagsMessageFlags_SOUP_MESSAGE_CERTIFICATE_TRUSTED);
|
733
|
-
flagsMessageFlags_SOUP_MESSAGE_NEW_CONNECTION = make_flags_value(flagsMessageFlags, SOUP_MESSAGE_NEW_CONNECTION, "new-connection", "SOUP_MESSAGE_NEW_CONNECTION");
|
734
|
-
rb_obj_freeze(flagsMessageFlags_SOUP_MESSAGE_NEW_CONNECTION);
|
735
|
-
rb_define_const(flagsMessageFlags, "NEW_CONNECTION", flagsMessageFlags_SOUP_MESSAGE_NEW_CONNECTION);
|
736
721
|
cMessage = G_DEF_CLASS(SOUP_TYPE_MESSAGE, "Message", mSoup);
|
737
722
|
rb_define_method(cMessage, "initialize", Message_initialize, 2);
|
738
723
|
rb_define_method(cMessage, "set_request_header", Message_set_request_header, 2);
|
data/ext/soup/soup.cr
CHANGED
@@ -93,7 +93,7 @@ module Soup
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
96
|
-
flags MessageFlags (SOUP_MESSAGE_NO_REDIRECT, SOUP_MESSAGE_CAN_REBUILD, SOUP_MESSAGE_CONTENT_DECODED, SOUP_MESSAGE_CERTIFICATE_TRUSTED
|
96
|
+
flags MessageFlags (SOUP_MESSAGE_NO_REDIRECT, SOUP_MESSAGE_CAN_REBUILD, SOUP_MESSAGE_CONTENT_DECODED, SOUP_MESSAGE_CERTIFICATE_TRUSTED)
|
97
97
|
|
98
98
|
gobject Message < SOUP_TYPE_MESSAGE
|
99
99
|
@type SoupMessage
|
data/lib/soup/version.rb
CHANGED
metadata
CHANGED
@@ -1,42 +1,53 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: soup-ruby
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
12
|
+
authors:
|
7
13
|
- Geoff Youngs
|
8
14
|
autorequire:
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
17
|
+
|
18
|
+
date: 2013-09-04 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
14
21
|
name: rubber-generate
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.0.17
|
20
|
-
type: :runtime
|
21
22
|
prerelease: false
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 61
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 0
|
32
|
+
- 17
|
26
33
|
version: 0.0.17
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
27
36
|
description: |+
|
28
37
|
Libsoup bindings for ruby. Partial coverage sufficient to allow HTTP requests to be handled without blocking the mainloop.
|
29
|
-
|
38
|
+
|
30
39
|
e.g
|
31
40
|
require 'gtk2'
|
32
41
|
require 'soup'
|
33
|
-
|
42
|
+
|
34
43
|
email: git@intersect-uk.co.uk
|
35
44
|
executables: []
|
36
|
-
|
45
|
+
|
46
|
+
extensions:
|
37
47
|
- ext/soup/extconf.rb
|
38
48
|
extra_rdoc_files: []
|
39
|
-
|
49
|
+
|
50
|
+
files:
|
40
51
|
- ext/soup/extconf.rb
|
41
52
|
- ext/soup/soup.c
|
42
53
|
- ext/soup/soup.cr
|
@@ -45,27 +56,37 @@ files:
|
|
45
56
|
- README.md
|
46
57
|
- lib/soup/version.rb
|
47
58
|
homepage: http://github.com/geoffyoungs/soup-ruby
|
48
|
-
licenses:
|
59
|
+
licenses:
|
49
60
|
- The Ruby License
|
50
|
-
metadata: {}
|
51
61
|
post_install_message:
|
52
62
|
rdoc_options: []
|
53
|
-
|
63
|
+
|
64
|
+
require_paths:
|
54
65
|
- lib
|
55
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
hash: 3
|
72
|
+
segments:
|
73
|
+
- 0
|
74
|
+
version: "0"
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
hash: 3
|
81
|
+
segments:
|
82
|
+
- 0
|
83
|
+
version: "0"
|
65
84
|
requirements: []
|
85
|
+
|
66
86
|
rubyforge_project:
|
67
|
-
rubygems_version:
|
87
|
+
rubygems_version: 1.8.15
|
68
88
|
signing_key:
|
69
|
-
specification_version:
|
89
|
+
specification_version: 3
|
70
90
|
summary: Soup bindings using rubber-generate
|
71
91
|
test_files: []
|
92
|
+
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 3e2efeb1383ac6f0068f671c973fda5818ab9c1b
|
4
|
-
data.tar.gz: 902fe349db099b8f8c9e951d9d5a32ccfa0bb361
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 6800bc6ff9703efefb4a62a0700cb2f6c0690ff47b3df302252013614bfbf5cf51b05e6e1ea18754ffde8da959e73d3b5b1fe03799dae1fa46c17bb3e3c9dc32
|
7
|
-
data.tar.gz: 5ac8e7fc6487e3e201063eb40c1ef3eb4f311cc5f56f2a1db463babc975f33625ea3e07cc072af15f545d637add8c01ff1d9caf73f47c9e5e036e8c67ca75205
|