fizx-parsley-ruby 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "parsley-ruby"
3
- s.version = "0.3.0"
3
+ s.version = "0.3.1"
4
4
  s.date = "2009-03-23"
5
5
  s.summary = "Ruby binding for parsley"
6
6
  s.email = "kyle@kylemaxwell.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fizx-parsley-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Maxwell