tidy-ext 0.1.7
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/.gitignore +4 -0
- data/LICENSE +50 -0
- data/README +12 -0
- data/Rakefile +60 -0
- data/VERSION +1 -0
- data/ext/tidy/access.c +3310 -0
- data/ext/tidy/access.h +279 -0
- data/ext/tidy/alloc.c +107 -0
- data/ext/tidy/attrask.c +209 -0
- data/ext/tidy/attrdict.c +2398 -0
- data/ext/tidy/attrdict.h +122 -0
- data/ext/tidy/attrget.c +213 -0
- data/ext/tidy/attrs.c +1911 -0
- data/ext/tidy/attrs.h +374 -0
- data/ext/tidy/buffio.c +232 -0
- data/ext/tidy/buffio.h +118 -0
- data/ext/tidy/charsets.c +1032 -0
- data/ext/tidy/charsets.h +14 -0
- data/ext/tidy/clean.c +2674 -0
- data/ext/tidy/clean.h +87 -0
- data/ext/tidy/config.c +1746 -0
- data/ext/tidy/config.h +153 -0
- data/ext/tidy/entities.c +419 -0
- data/ext/tidy/entities.h +24 -0
- data/ext/tidy/extconf.rb +5 -0
- data/ext/tidy/fileio.c +106 -0
- data/ext/tidy/fileio.h +46 -0
- data/ext/tidy/forward.h +69 -0
- data/ext/tidy/iconvtc.c +105 -0
- data/ext/tidy/iconvtc.h +15 -0
- data/ext/tidy/istack.c +373 -0
- data/ext/tidy/lexer.c +3825 -0
- data/ext/tidy/lexer.h +617 -0
- data/ext/tidy/localize.c +1882 -0
- data/ext/tidy/mappedio.c +329 -0
- data/ext/tidy/mappedio.h +16 -0
- data/ext/tidy/message.h +207 -0
- data/ext/tidy/parser.c +4408 -0
- data/ext/tidy/parser.h +76 -0
- data/ext/tidy/platform.h +636 -0
- data/ext/tidy/pprint.c +2276 -0
- data/ext/tidy/pprint.h +93 -0
- data/ext/tidy/ruby-tidy.c +195 -0
- data/ext/tidy/streamio.c +1407 -0
- data/ext/tidy/streamio.h +222 -0
- data/ext/tidy/tagask.c +286 -0
- data/ext/tidy/tags.c +955 -0
- data/ext/tidy/tags.h +235 -0
- data/ext/tidy/tidy-int.h +129 -0
- data/ext/tidy/tidy.h +1097 -0
- data/ext/tidy/tidyenum.h +622 -0
- data/ext/tidy/tidylib.c +1751 -0
- data/ext/tidy/tmbstr.c +306 -0
- data/ext/tidy/tmbstr.h +92 -0
- data/ext/tidy/utf8.c +539 -0
- data/ext/tidy/utf8.h +52 -0
- data/ext/tidy/version.h +14 -0
- data/ext/tidy/win32tc.c +795 -0
- data/ext/tidy/win32tc.h +19 -0
- data/spec/spec_helper.rb +5 -0
- data/spec/tidy/compat_spec.rb +44 -0
- data/spec/tidy/remote_uri_spec.rb +14 -0
- data/spec/tidy/test1.html +5 -0
- data/spec/tidy/tidy_spec.rb +34 -0
- metadata +125 -0
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>HTML Tidy License</title>
|
5
|
+
</head>
|
6
|
+
|
7
|
+
<body>
|
8
|
+
<pre>
|
9
|
+
HTML Tidy
|
10
|
+
|
11
|
+
HTML parser and pretty printer
|
12
|
+
|
13
|
+
Copyright (c) 1998-2003 World Wide Web Consortium
|
14
|
+
(Massachusetts Institute of Technology, European Research
|
15
|
+
Consortium for Informatics and Mathematics, Keio University).
|
16
|
+
All Rights Reserved.
|
17
|
+
|
18
|
+
This software and documentation is provided "as is," and
|
19
|
+
the copyright holders and contributing author(s) make no
|
20
|
+
representations or warranties, express or implied, including
|
21
|
+
but not limited to, warranties of merchantability or fitness
|
22
|
+
for any particular purpose or that the use of the software or
|
23
|
+
documentation will not infringe any third party patents,
|
24
|
+
copyrights, trademarks or other rights.
|
25
|
+
|
26
|
+
The copyright holders and contributing author(s) will not be held
|
27
|
+
liable for any direct, indirect, special or consequential damages
|
28
|
+
arising out of any use of the software or documentation, even if
|
29
|
+
advised of the possibility of such damage.
|
30
|
+
|
31
|
+
Permission is hereby granted to use, copy, modify, and distribute
|
32
|
+
this source code, or portions hereof, documentation and executables,
|
33
|
+
for any purpose, without fee, subject to the following restrictions:
|
34
|
+
|
35
|
+
1. The origin of this source code must not be misrepresented.
|
36
|
+
2. Altered versions must be plainly marked as such and must
|
37
|
+
not be misrepresented as being the original source.
|
38
|
+
3. This Copyright notice may not be removed or altered from any
|
39
|
+
source or altered source distribution.
|
40
|
+
|
41
|
+
The copyright holders and contributing author(s) specifically
|
42
|
+
permit, without fee, and encourage the use of this source code
|
43
|
+
as a component for supporting the Hypertext Markup Language in
|
44
|
+
commercial products. If you use this source code in a product,
|
45
|
+
acknowledgment is not required but would be appreciated.
|
46
|
+
</pre>
|
47
|
+
|
48
|
+
|
49
|
+
</body>
|
50
|
+
</html>
|
data/README
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'rake/extensiontask'
|
4
|
+
|
5
|
+
#require File.join(File.expand_path(File.dirname(__FILE__)), "lib")
|
6
|
+
|
7
|
+
MAKE = 'make'
|
8
|
+
|
9
|
+
begin
|
10
|
+
require 'jeweler'
|
11
|
+
Jeweler::Tasks.new do |gem|
|
12
|
+
gem.name = "tidy-ext"
|
13
|
+
gem.summary = "HTML Tidy library implemented as a Ruby extension."
|
14
|
+
gem.description = <<-EOS
|
15
|
+
Tidies up web pages.
|
16
|
+
EOS
|
17
|
+
gem.email = "carl.douglas@gmail.com"
|
18
|
+
gem.homepage = "http://github.com/carld/tidy"
|
19
|
+
gem.authors = ["Carl Douglas"]
|
20
|
+
gem.extensions = FileList["ext/**/extconf.rb"]
|
21
|
+
end
|
22
|
+
Jeweler::GemcutterTasks.new
|
23
|
+
rescue LoadError
|
24
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
25
|
+
end
|
26
|
+
|
27
|
+
desc "Launch an IRB session with the environment loaded"
|
28
|
+
task :console do
|
29
|
+
exec("irb -I lib -r tidy/alone")
|
30
|
+
end
|
31
|
+
|
32
|
+
require 'spec/rake/spectask'
|
33
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
34
|
+
spec.libs << 'lib' << 'spec'
|
35
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
36
|
+
end
|
37
|
+
|
38
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
39
|
+
spec.libs << 'lib' << 'spec'
|
40
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
41
|
+
spec.rcov = true
|
42
|
+
end
|
43
|
+
|
44
|
+
task :spec => :check_dependencies
|
45
|
+
|
46
|
+
task :default => :spec
|
47
|
+
|
48
|
+
require 'rake/rdoctask'
|
49
|
+
Rake::RDocTask.new do |rdoc|
|
50
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
51
|
+
|
52
|
+
rdoc.rdoc_dir = 'rdoc'
|
53
|
+
rdoc.title = "tidy #{version}"
|
54
|
+
rdoc.rdoc_files.include('README*')
|
55
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
56
|
+
end
|
57
|
+
|
58
|
+
Rake::ExtensionTask.new('tidy')
|
59
|
+
|
60
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.7
|