fizx-parsley-ruby 0.3.0 → 0.3.1
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 +1 -0
- data/lib/parsley.rb +3 -0
- data/parsley-ruby.gemspec +1 -1
- metadata +1 -1
data/ext/cparsley.c
CHANGED
@@ -123,6 +123,7 @@ VALUE _parse(VALUE self, VALUE options){
|
|
123
123
|
char *base = NULL;
|
124
124
|
if(OPT_MATCH("input", "html")) flags |= PARSLEY_OPTIONS_HTML;
|
125
125
|
if(OPT_BOOL("prune")) flags |= PARSLEY_OPTIONS_PRUNE;
|
126
|
+
if(OPT_BOOL("collate")) flags |= PARSLEY_OPTIONS_COLLATE;
|
126
127
|
if(OPT_BOOL("allow_net")) flags |= PARSLEY_OPTIONS_ALLOW_NET;
|
127
128
|
if(OPT_BOOL("allow_local")) flags |= PARSLEY_OPTIONS_ALLOW_LOCAL;
|
128
129
|
if(OPT_BOOL("has_base")) base = STR2CSTR(OPT("base"));
|
data/lib/parsley.rb
CHANGED
@@ -34,6 +34,7 @@ class Parsley
|
|
34
34
|
# :input => [:html, :xml]
|
35
35
|
# :output => [:ruby, :json, :xml]
|
36
36
|
# :prune => [true, false]
|
37
|
+
# :collate => [true, false]
|
37
38
|
# :base => "http://some/base/href"
|
38
39
|
# :allow_net => [true, false]
|
39
40
|
# :allow_local => [true, false]
|
@@ -50,10 +51,12 @@ class Parsley
|
|
50
51
|
options[:input] ||= :html
|
51
52
|
options[:output] ||= :ruby
|
52
53
|
|
54
|
+
options[:collate] = true unless options.has_key?(:collate)
|
53
55
|
options[:prune] = true unless options.has_key?(:prune)
|
54
56
|
options[:allow_net] = true unless options.has_key?(:allow_net)
|
55
57
|
options[:allow_local] = true unless options.has_key?(:allow_local)
|
56
58
|
|
59
|
+
options[:collate] = !!options[:collate]
|
57
60
|
options[:prune] = !!options[:prune]
|
58
61
|
options[:allow_net] = !!options[:allow_net]
|
59
62
|
options[:allow_local] = !!options[:allow_local]
|
data/parsley-ruby.gemspec
CHANGED