hpricot_scrub 0.3.1 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.txt CHANGED
@@ -1,6 +1,10 @@
1
+ 2007-04-05 Michael <michael@underpantsgnome.com>
2
+ Release 0.3.2
3
+ - Fix broken dependancy in the gem
4
+
1
5
  2008-06-03 Mina Naguib <mina.hpricotscrub@naguib.ca>
2
6
  Release 0.3.1
3
- - Allow an element rule to be a Proc (which is expected to return one of
7
+ - Allow an element rule to be a Proc (which is expected to return one of
4
8
  the other non-proc rules (false/:strip/true/attr_rules). This allows the
5
9
  building of highly custom filtering rules (for example filter out <B>
6
10
  tags unless their parent is a <P>...)
data/History.txt ADDED
@@ -0,0 +1,42 @@
1
+ 2007-04-05 Michael <michael@underpantsgnome.com>
2
+ Release 0.3.2
3
+ - Fix broken dependancy in the gem
4
+
5
+ 2008-06-03 Mina Naguib <mina.hpricotscrub@naguib.ca>
6
+ Release 0.3.1
7
+ - Allow an element rule to be a Proc (which is expected to return one of
8
+ the other non-proc rules (false/:strip/true/attr_rules). This allows the
9
+ building of highly custom filtering rules (for example filter out <B>
10
+ tags unless their parent is a <P>...)
11
+ - Slight cleanup of internal documentation
12
+
13
+ 2008-01-11 Mina Naguib <mina.hpricotscrub@naguib.ca>
14
+ Release 0.3.0
15
+ Large overhaul of the module's logic to mimic most of perl's HTML::Scrubber
16
+ functionality:
17
+ - Deprecate config keys :allow_tags, :remove_tags and :allow_attributes
18
+ - Introduce config keys :elem_rules, :default_elem_rule,
19
+ :default_comment_rule and :default_attribute_rule
20
+ - Document the above (inline - visible in rdoc & the likes)
21
+
22
+ 2007-04-05 Michael <michael@underpantsgnome.com>
23
+ Release 0.2.3
24
+ Add patches from Eric Wong
25
+ - Recursive scrubbing wasn't scrubbing if parent was in allow
26
+ - Add optional use of HTMLEntities
27
+
28
+ 2007-03-04 Michael <michael@underpantsgnome.com>
29
+ Release 0.2.2
30
+ Add patches from Eric Wong
31
+ - Apparently my environment is automagically including YAML, added that
32
+ - Add a check to see if an element responds to scrub when calling scrubable?
33
+
34
+ 2007-03-04 Michael <michael@underpantsgnome.com>
35
+ Release 0.2.0
36
+ - Add String methods for scrub and scrub!
37
+
38
+ - Fixed a bug where nested elements were not being scrubbed when using a
39
+ config hash
40
+
41
+ 2007-03-03 Michael <michael@underpantsgnome.com>
42
+ - Release 0.1.0, Initial Gem version
data/README.txt CHANGED
@@ -1,9 +1,54 @@
1
- README for hpricot_scrub
2
- ========================
1
+ = hpricot_scrub
2
+
3
+ http://trac.underpantsgnome.com/hpricot_scrub
4
+
5
+ == DESCRIPTION:
3
6
 
4
7
  HpricotScrub is a wrapper around Hpricot that allows you to easily scrub HTML
5
8
  of tags and attributes you don't want in the final output.
6
9
 
7
10
  See examples/config.yml for a sample config file or
8
11
 
9
- http://trac.underpantsgnome.com/hpricot_scrub
12
+ == FEATURES/PROBLEMS:
13
+
14
+
15
+ == SYNOPSIS:
16
+
17
+ require 'rubygems'
18
+ require 'hpricot_scrub'
19
+
20
+ doc = Hpricot(open('http://slashdot.org/').read)
21
+ text = doc.scrub
22
+
23
+ == REQUIREMENTS:
24
+
25
+ hpricot
26
+
27
+ == INSTALL:
28
+
29
+ sudo gem install hpricot_scrub
30
+
31
+ == LICENSE:
32
+
33
+ (The MIT License)
34
+
35
+ Copyright (c) 2008 FIX
36
+
37
+ Permission is hereby granted, free of charge, to any person obtaining
38
+ a copy of this software and associated documentation files (the
39
+ 'Software'), to deal in the Software without restriction, including
40
+ without limitation the rights to use, copy, modify, merge, publish,
41
+ distribute, sublicense, and/or sell copies of the Software, and to
42
+ permit persons to whom the Software is furnished to do so, subject to
43
+ the following conditions:
44
+
45
+ The above copyright notice and this permission notice shall be
46
+ included in all copies or substantial portions of the Software.
47
+
48
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
49
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
50
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
51
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
52
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
53
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
54
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -48,6 +48,6 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
48
48
 
49
49
  # == Optional
50
50
  #p.changes - A description of the release's latest changes.
51
- p.extra_deps = ['hpricot', '>= 0.5']
51
+ p.extra_deps = [['hpricot', '>= 0.5']]
52
52
  #p.spec_extras - A hash of extra values to set in the gemspec.
53
53
  end
File without changes
@@ -2,7 +2,7 @@ module HpricotScrub #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- TINY = 1
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,38 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: hpricot_scrub
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.3.1
7
- date: 2008-06-04 00:00:00 -05:00
8
- summary: Scrub HTML with Hpricot
9
- require_paths:
10
- - lib
11
- email: michael@underpantsgnome.com
12
- homepage: http://trac.underpantsgnome.com/hpricot_scrub/
13
- rubyforge_project: hpricot-scrub
14
- description: Scrub HTML with Hpricot
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
4
+ version: 0.3.3
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - UnderpantsGnome
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-07-11 00:00:00 -05:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hpricot
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: "0.5"
23
+ version:
24
+ description: Scrub HTML with Hpricot
25
+ email: michael@underpantsgnome.com
26
+ executables: []
27
+
28
+ extensions: []
29
+
30
+ extra_rdoc_files:
31
+ - README.txt
32
+ - CHANGELOG.txt
33
+ - History.txt
31
34
  files:
32
35
  - Rakefile
33
36
  - README.txt
34
37
  - CHANGELOG.txt
35
- - Manifest.txt
38
+ - History.txt
36
39
  - setup.rb
37
40
  - lib/hpricot_scrub/hpricot_scrub.rb
38
41
  - lib/hpricot_scrub/version.rb
@@ -41,39 +44,35 @@ files:
41
44
  - test/scrubber_data.rb
42
45
  - test/hpricot_scrub_test.rb
43
46
  - test/old_hpricot_scrub_test.rb
47
+ - examples/config.yml
44
48
  - examples/old_config.yml
45
- test_files:
46
- - test/hpricot_scrub_test.rb
47
- - test/old_hpricot_scrub_test.rb
49
+ has_rdoc: true
50
+ homepage: http://trac.underpantsgnome.com/hpricot_scrub/
51
+ post_install_message:
48
52
  rdoc_options:
49
53
  - --main
50
54
  - README.txt
51
- extra_rdoc_files:
52
- - README.txt
53
- - CHANGELOG.txt
54
- - Manifest.txt
55
- executables: []
56
-
57
- extensions: []
58
-
55
+ require_paths:
56
+ - lib
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: "0"
62
+ version:
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: "0"
68
+ version:
59
69
  requirements: []
60
70
 
61
- dependencies:
62
- - !ruby/object:Gem::Dependency
63
- name: hpricot
64
- version_requirement:
65
- version_requirements: !ruby/object:Gem::Version::Requirement
66
- requirements:
67
- - - ">"
68
- - !ruby/object:Gem::Version
69
- version: 0.0.0
70
- version:
71
- - !ruby/object:Gem::Dependency
72
- name: ">= 0.5"
73
- version_requirement:
74
- version_requirements: !ruby/object:Gem::Version::Requirement
75
- requirements:
76
- - - ">"
77
- - !ruby/object:Gem::Version
78
- version: 0.0.0
79
- version:
71
+ rubyforge_project: hpricot-scrub
72
+ rubygems_version: 1.0.1
73
+ signing_key:
74
+ specification_version: 2
75
+ summary: Scrub HTML with Hpricot
76
+ test_files:
77
+ - test/hpricot_scrub_test.rb
78
+ - test/old_hpricot_scrub_test.rb
data/Manifest.txt DELETED
@@ -1,13 +0,0 @@
1
- Rakefile
2
- README.txt
3
- CHANGELOG.txt
4
- Manifest.txt
5
- setup.rb
6
- lib/hpricot_scrub/hpricot_scrub.rb
7
- lib/hpricot_scrub/version.rb
8
- lib/hpricot_scrub.rb
9
- test/test_helper.rb
10
- test/scrubber_data.rb
11
- test/hpricot_scrub_test.rb
12
- test/old_hpricot_scrub_test.rb
13
- examples/old_config.yml