fizx-parsley-ruby 0.1.2 → 0.2.0
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.
- data/ext/cparsley.c +2 -2
- data/parsley-ruby.gemspec +1 -1
- data/test/test_parsley.rb +1 -1
- metadata +1 -1
data/ext/cparsley.c
CHANGED
@@ -43,14 +43,14 @@ VALUE _new(VALUE self, VALUE parsley, VALUE incl){
|
|
43
43
|
VALUE _parse_file(VALUE self, VALUE name, VALUE input, VALUE output){
|
44
44
|
parsleyPtr parsley;
|
45
45
|
Data_Get_Struct(self, parsleyPtr, parsley);
|
46
|
-
return _parse_doc(parsley_parse_file(parsley, STR2CSTR(name), input == ID2SYM(rb_intern("html"))), output);
|
46
|
+
return _parse_doc(parsley_parse_file(parsley, STR2CSTR(name), input == ID2SYM(rb_intern("html")), 1), output);
|
47
47
|
}
|
48
48
|
|
49
49
|
VALUE _parse_string(VALUE self, VALUE string, VALUE input, VALUE output) {
|
50
50
|
parsleyPtr parsley;
|
51
51
|
Data_Get_Struct(self, parsleyPtr, parsley);
|
52
52
|
char* cstr = STR2CSTR(string);
|
53
|
-
return _parse_doc(parsley_parse_string(parsley, cstr, strlen(cstr), input == ID2SYM(rb_intern("html"))), output);
|
53
|
+
return _parse_doc(parsley_parse_string(parsley, cstr, strlen(cstr), input == ID2SYM(rb_intern("html")), 1), output);
|
54
54
|
}
|
55
55
|
|
56
56
|
VALUE _parse_doc(parsedParsleyPtr ptr, VALUE type) {
|
data/parsley-ruby.gemspec
CHANGED
data/test/test_parsley.rb
CHANGED
@@ -31,7 +31,7 @@ class TestParsley < Test::Unit::TestCase
|
|
31
31
|
|
32
32
|
def test_xml
|
33
33
|
@parsley = Parsley.new("hi" => "h1")
|
34
|
-
xml = "<?xml version=\"1.0\"?>\n<parsley:root xmlns:parsley=\"http://
|
34
|
+
xml = "<?xml version=\"1.0\"?>\n<parsley:root xmlns:parsley=\"http://parselets.com/json\"><hi position=\"63\">Nick's Crispy Tacos</hi></parsley:root>\n"
|
35
35
|
assert_equal(xml, @parsley.parse(:file => @page, :output => :xml))
|
36
36
|
end
|
37
37
|
|