motion-tidy 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ module Tidy
2
+ module_function
3
+
4
+ def XHTML(html, encoding="UTF8")
5
+ error_ptr = Pointer.new(:id)
6
+ diagnostics_ptr = Pointer.new(:object)
7
+ xhtml = CTidy.tidy.tidyHTMLString(html, encoding:encoding, error:error_ptr)
8
+ raise error_ptr[0].description if error_ptr[0]
9
+ xhtml
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ module Tidy
2
+ VERSION = '0.2.1'
3
+ end
@@ -0,0 +1,14 @@
1
+ require "motion-tidy/version"
2
+
3
+ unless defined?(Motion::Project::Config)
4
+ raise "This file must be required within a RubyMotion project Rakefile."
5
+ end
6
+
7
+ Motion::Project::App.setup do |app|
8
+ Dir.glob(File.join(File.dirname(__FILE__), 'motion-tidy/*.rb')).each do |file|
9
+ app.files.unshift(file)
10
+ end
11
+
12
+ app.pods ||= Motion::Project::CocoaPods.new(app)
13
+ app.pods.dependency 'CTidy', '~> 0.2.0'
14
+ end
metadata ADDED
@@ -0,0 +1,59 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: motion-tidy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Francis Chong
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-05-22 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: motion-cocoapods
16
+ requirement: &70147839914200 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 1.0.2
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70147839914200
25
+ description: libtidy wrapper for rubymotion
26
+ email:
27
+ - francis@ignition.hk
28
+ executables: []
29
+ extensions: []
30
+ extra_rdoc_files: []
31
+ files:
32
+ - motion/lib/motion-tidy.rb
33
+ - motion/lib/motion-tidy/tidy.rb
34
+ - motion/lib/motion-tidy/version.rb
35
+ homepage: https://github.com/siuying/CTidy
36
+ licenses: []
37
+ post_install_message:
38
+ rdoc_options: []
39
+ require_paths:
40
+ - motion/lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ requirements: []
54
+ rubyforge_project:
55
+ rubygems_version: 1.8.15
56
+ signing_key:
57
+ specification_version: 3
58
+ summary: libtidy wrapper for rubymotion
59
+ test_files: []